View Single Post
  #2  
Old 04-24-2008, 01:00 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Continue Shopping button that returns customer to catagory

Quote:
Originally Posted by mmonaco
I hope I didn't reinvent the wheel here, but i couldn't find anything on search.

This is how I made the "Continue Shopping" button on the fast lane checkout screen return the customer to the last catagory they viewed:

Change to /modules/Fast_Lane_Checkout/home_main.tpl I changed the URL in this line:

<td>{include file="modules/Fast_Lane_Checkout/big_button.tpl" button_title=$lng.lbl_continue_shopping style="button" href="home.php?cat=$catreturn"}</td>


Added to /cart.php at the top of all the x_session_register lines.

#added for Continue Shopping Button
x_session_register("catreturn");
$smarty->assign("catreturn", $catreturn);


Added to /products.php at the top, below the first set of comments.

#added for Continue Shopping Button
x_session_register("catreturn");
$catreturn = $cat;
x_session_save("catreturn");
$smarty->assign("catreturn", $catreturn);

Now i don't know if i did it right, but it seems to work for me on 4.1.9. It doesn't return the customer to the catagory if they search for a product directly, but I think it will serve the purpose, and it's easy. Feel free to clean the code if it's dirty.

I think that will not work in the transition from the search product, product page and other possible locations (except for the category PAGE).

I would remembers the urls of the user arrived and then would return it back.

PS. Not remembered page list of products, the type of sorting.
Reply With Quote