So I have the SimpleCart setup but when I add a product to the cart it takes me to the cart page. Is there a way I can add to cart without it taking me to that page? It will stay on the current page so I can add more products?
I think this is the code for it... or am I missing it and its in the schema somewhere?
<!-- add to cart -->
<?php
$formName = "addform" . $record['num'];
$cartItems = array(
array(
'name' => $record['name'],
'unitPrice' => $record['price'],
'recordNum' => $record['num'],
'tableOrTag' => '_sc_example_products',
'quantity=' => '_sc_quantity',
),
//array('name' => 'Color: Blue', 'OPTION' => TRUE),
//array('name' => 'Region: North', 'OPTION' => TRUE),
//array('name' => 'Size: Xl', 'OPTION' => TRUE),
);
?>
<form method="post" name="<?php echo $formName ?>" action="?">
<input type="hidden" name="_sc_action" value="add">
<?php sc_createAddFormData($cartItems); ?>
<input type="text2" name="_sc_quantity" size="5" maxlength="5" value="0" /><br/>
<a href="#" title="Add to Cart" class="addToCart" onclick="document.forms.<?php echo $formName ?>.submit(); return false;">Add to Cart</a><br />
</form>
<!-- /add to cart -->