Jump to content

"continue Shopping" Button To Redirect To The Last Product In The Product List


Pierre-Antoine
 Share

Recommended Posts

Hi,

 

I am using PrestaShop 1.6.0.14

 

When you are on a product page and you add it to your cart, a ajax pop up appear with a "continue shopping" button which just make the pop up disapear, but you stay on the product page.

 

How could we make the "continue shopping" button redirect to the product in the product list, and not stay on the product page ?

 

Any ideas are welcome !

 

Thank you in advance for your help,

Share this post


Link to post
Share on other sites

  • 1 month later...

I'm afraid you have to change it in every order steps tpl files. For example in order-paymant.tpl I changed text from "back to order" to "back to chose carrier".

<p class="cart_navigation clearfix">
	<a href="{$link->getPageLink('order', true, NULL, "step=2")|escape:'html':'UTF-8'}" title="{l s='Previous'}" class="button-exclusive btn btn-outline">
	     {l s='zpět na výběr doručení'}
	</a>
</p>

But I don't know how to put last seen product to link...

  • Like 1

Share this post


Link to post
Share on other sites

  • 1 year later...

The post #4 is rubbish since the code postet is related to the order finalization.

 

You had to change controllers to go back to the list of products. But it's more difficult than it seems. The user adding a product to a cart can do this from many different places. Homepage, product list (where to go from there), product details, product search, manufacturers list and so on.

 

The issue is, controllers usually don't know anything about a previous page a request was made from. I'd assume this kind change would require a lot of changes or overrides in core files. And first of all: figure out wich pages needed redirection and which do not because add to cart can be done from many places, not only from the product detail page. Which means: redirection in terms of "going back" would not always be your first choice. Imagine a user finds your product on a search engine or other page, goes from there to your product detail page, add to cart. If you then go back, the user is out of your shop.

Edited by Scully (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More