Re: Can you change the "back to shopping" behaviour?
Quote:
Originally Posted by
Minnie Mouse
i dont have time right now to do this, but a switch to turn this on or off in admin would be great wouldnt it. you could choose the default behavior of the continue shopping button in the mystore config. go to item or go to category or always go home. something like that and then base the logic around the swich... hmm
There is a switch ... Admin->Configuration->My Store->Display Cart After Adding Product ... goto shopping cart or not.
Re: Can you change the "back to shopping" behaviour?
no that's the reverse of what is needed. we want a switch that governs the behavior of the continue shopping button, not one that governs the add to cart button.
Re: Can you change the "back to shopping" behaviour?
Quote:
Originally Posted by
Minnie Mouse
no that's the reverse of what is needed. we want a switch that governs the behavior of the continue shopping button, not one that governs the add to cart button.
oops ... i read that too quickly.
Re: Can you change the "back to shopping" behaviour?
yes, but it is a good thought for building it. it is probably similar to what is needed and could be adapted to this.
L
Re: Can you change the "back to shopping" behaviour?
Quote:
Originally Posted by
adelante
Here's the quick and dirty solution that I've come up with. It involves setting up a template override for the following files:
includes/templates/template_default/templates/tpl_index_product_list.php and
includes/templates/template_default/templates/tpl_shopping_cart_default.php
in the tpl_index_product_list.php insert the following lines of code at line 15 (just above "<div class="centerColumn" id="indexProductList">"
<!-- start record category being visited adelante /-->
<!-- reset the session variable /-->
<?php unset($_SESSION["last_category_visited"]);
<!--set the variable last category visited wit the current product category number /-->
session_start();
$_SESSION["last_category_visited"] = $current_category_id;
?>
<!-- end record category being visited adelante /-->
in the tpl_shopping_cart_default.php insert the following lines of code at line 130 which is just above "<!--bof shopping cart buttons-->"
<!-- Generate back to shopping path 04052007 Adelante /-->
<?php
$back_shopping_path = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'index.php?mainpage=index&cPath=' . $_SESSION["last_category_visited"] .'">' ;
?>
<!--end back to shopping path /-->
You will also need to change the line
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>
to
<div class="buttonRow back"><?php echo $back_shopping_path . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>
This seems like the only viable solution-- to prevent the cart from simply throwing users back to my home page (which I myself find pretty annoying). Generally, our users purchase several items, often in the same category. Throwing the user away from the listing could cost us sales, or perhaps even cause us to lose customers.
Re: Can you change the "back to shopping" behaviour?
It worked flawlessly. Now if I can just get it to work with Chemo's Ultimate URLs... & send the user to an optimized URL...
I've been fighting with Chemos Ultimate URL mod because he uses -c- in categories and -p- in products, along with the category & product numbers where applicable--
I really want perfectly clean URLs like wordpress uses--
If only I understood their php redirect system, I could alter Chemos URL mod on my own...
Re: Can you change the "back to shopping" behaviour?
Here's a link to the forum support for Chemo's mod...
http://www.zen-cart.com/forum/showth...35034&page=143
Re: Can you change the "back to shopping" behaviour?
I've ended up uninstalling chemo's mod, it's too buggy & no one seems to be supporting it right now.
Re: Can you change the "back to shopping" behaviour?
I'm adding an item from this link:
/index.php?main_page=index&cPath=65_68_70_77
then, when I choose back to shopping, it's sending me to:
/index.php?main_page=index&cPath=77
this is with the modification from Adelante.. is there any other possible way to do this, so that it correctly includes all the categories? "/index.php?main_page=index&cPath=77" sends me to a strange looking page.... (it doesn't show the subcatogories open on the left sidebar).
Re: Can you change the "back to shopping" behaviour?
Ok, I'm posting again because I love talking to myself..
no seriously though--
I noticed on my product pages the "listing" button (in between my prev/ next buttons on my cart) does exactly what I wish my "return to shopping" button will do.
Is there some way I can safely use something similar on the backend of my "return to shopping button"?