I ended up using the code supplied by xgarb, but I found that I had to modifiy the continue_shopping.tpl from
{* 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}
[img]{$ImagesDir}/buttons/continue_shopping.gif[/img]
to
{* 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_produ ctid`"}
{elseif $last_cat neq ""}
{assign var="href" value="`$WebDir`home.php?cat=`$last_cat`"}
{else}
{assign var="href" value="`$WebDir`home.php"}
{/if}
{include file="buttons/button.tpl" button_title=$lng.lbl_continue_shopping style="button" href="$href"}
The reason? What if the customer wasn't in a category before clicking the 'continue shopping' button? I found it was going the home page, which in my case is index.html, so I made it go to home.php instead. I'm not sure if the code is exactly right, but it works
