Developer forum

Forum » Development » Redirect to shopping cart when product is added

Redirect to shopping cart when product is added


Reply
Hi all,



Just wanted to let you all know.



If you want the user to be redirect to the shopping cart (or any other page) you can use the "redirect" parameter to accomplish this.



For instance:



In "Template\eCom\Product\Product.html" add the following just below
tag:







And it only seems to work in combination with the "CartCmd" parameter with the value "Add", so add this one too:









Greetz,

Emil

Replies

 
Reply

Very useful. :-)


 


On my shopping cart I have a link to the product description page, like this:


 



 


Now the link does not work, since the product link will be changed to the redirect link.


 


Any way to fix that?


 


Michael Stigaard Sørensen

 
Reply

I would like to make use of the mentioned redirect parameter, but the forum seems to exclude code tags from the posts (which, one might argue, is a slight problem for a developer forum).

 

Can someone describe how the parameter works ... without using code tags?

 

Thanks!

 
Reply

It just dawned on me that I can view source =)

 
Reply

Hehe... But just in case someone doesn't figure that out, here's the that Emil posted:)

 

<input type="hidden" name="redirect" value="[replace this with url to redirect to]" />

 

 
Reply

Without a form: CartCmd=Add&Redirect=[url]

 
Reply

 

You must be logged in to post in the forum