View Single Post
  #14  
Old 12-05-2004, 09:24 PM
 
elomibao elomibao is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default

Quote:
Originally Posted by roccons
Quote:
I wish [customers] to be redirected to the Catagory page always.
Anyone has the answer to this?

For example, if they clicked in the shopping cart link (instead of adding a product) they won't like the two steps history back behaviour.

I had the same dilema. The Continue Shopping should only appear if and only if I added a product. No sense in having a Continue Shopping button if you didn't added a product in the first place.

Code:
# # Redirect # if($mode=="add" and $productid) { if($config["General"]["redirect_to_cart"]=="Y") { func_header_location("cart.php"); } else{ if(!empty($HTTP_REFERER)) { func_header_location($HTTP_REFERER); } else { func_header_location("home.php?cat=$cat&page=$page"); } } }

Changed redirect to:
Code:
func_header_location("cart.php?mode=added");

then before:
Code:
func_header_location("cart.php");

added:
Code:
if ($mode == "added") $smarty->assign("cshopping","1");

then in cart.tpl, above the checkout button:
Code:
{if $cshopping eq "1"} <TD align="right"> {include file="buttons/button.tpl" button_title="Continue Shopping" style="button" href="javascript:history.go(-2);"} </TD> {/if}

Conditions:
Redirect to cart has to be Y.
Buy Now code in templates disabled
You can only add to cart when viewing product details (or clicking on a particular product).
__________________
X-Cart Pro 4.0.5
Fedora Core 2
Apache 2.x/PHP 4.x
MySQL 3.x
Reply With Quote