1. Copy /includes/init_includes/init_cart_handler.php
to /includes/init_includes/overrides/init_cart_handler.php
(yes, "overrides/" is literal ... it means "overrides/", not a template name)
2. Edit the new file (in the overrides folder)
and replace this:
Code:
if (DISPLAY_CART == 'true') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
} else {
with this:
Code:
if ($current_page_base == FILENAME_DEFAULT) {
$goto = FILENAME_DEFAULT;
$parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
} elseif (DISPLAY_CART == 'true') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
} else {
This will cause the add-to-cart to leave the customer on the product listing page or the product-info page, depending where they came from, assuming the Display Cart After Adding Product setting is set to false.
On second thought, even this shouldn't be necessary, as the core code already does it.
Bookmarks