View Single Post
  #37  
Old 10-17-2005, 03:08 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default

Going from inthepink's code I did this...

create a tpl. file in buttons called continue_shopping.tpl

add the following code to it...

Code:
{* source: http://forum.x-cart.com/viewtopic.php?t=1124 *} {if $goto eq "product" and $last_productid neq ""} {assign var="href" value="`$WebDir`product.php?productid=`$last_productid`"} {elseif $last_cat neq ""} {assign var="href" value="`$WebDir`home.php?cat=`$last_cat`"} {else} {assign var="href" value="`$http_location`"} {/if} {include file="buttons/button.tpl" button_title="Continue Shopping" style="button" href="$href"}

add to config.php....

Code:
x_session_register("last_cat"); x_session_register("last_productid"); if($HTTP_GET_VARS['cat'] != "") { $last_cat = $cat; } if($HTTP_GET_VARS['productid'] != "") { $last_productid = $productid; } $smarty->assign("last_productid", $last_productid); $smarty->assign("last_cat", $last_cat);

You can then use....

Code:
{include file="buttons/continue_shopping.tpl"}

whereever you like to give you a continue shopping button. I've got it next to the checkout button and also below 'Your shopping cart is empty'

sweet!
__________________
Core version: 5.5.xx
Reply With Quote