Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Disable cart redirect when adding new product? 
 
winans_fred
Sr. Member
 
Total Posts:  83
Joined:  2007-09-06
 

Hi,

Is it possible to add a product to the cart *without* redirecting to the cart?  This is very clunky.  In addition, there is no “continue shopping” button in the cart… am I missing something?

Thanks,

Fred

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jonathan Hedrén
Member
 
Total Posts:  67
Joined:  2007-08-31
Sweden
 

To “stop” the redirect I would try to overload Mage_Checkout_CartController::_backToCart() and/or the addAction()-method in that class (and add a “backToProduct"-method). I’ll try to help you out if you need some advice about this…

 
Magento Community Magento Community
Magento Community
Magento Community
 
winans_fred
Sr. Member
 
Total Posts:  83
Joined:  2007-09-06
 

Please feel free to elaborate.  I don’t have the time to figure it out right now.  Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
joanna
Jr. Member
 
Total Posts:  16
Joined:  2007-12-04
 

Actually, it’s configurable now on the latest release 0.7.15480.

You can find the option under admin System - Configuration - Sales tab and then in Shopping Cart section, set After adding a product redirect to shopping cart to No.

Hope that helps.
Joanna

 
Magento Community Magento Community
Magento Community
Magento Community
 
addisonk
Jr. Member
 
Total Posts:  5
Joined:  2008-02-13
 

I did as you recommend, and after they press add to cart, it goes to the homepage! Can this be changed to stay on the same page?

Ideally I would like a add to cart that takes no page reload whatsoever such as used in http://showroom.myshopify.com/ using ajax i believe.

It could even use the shopping cart on the right column, just so it doesn’t reload.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iblastoff
Sr. Member
 
Total Posts:  252
Joined:  2007-08-31
 

if you set it correctly (probably have to clear your system cache as well), then adding an item to a cart will display this message above “Product Name was successfully added to your shopping cart.” without redirecting anywhere.

 
Magento Community Magento Community
Magento Community
Magento Community
 
addisonk
Jr. Member
 
Total Posts:  5
Joined:  2008-02-13
 

It does when you are on a product page, but I searched for a product, and then clicked the add to cart by product in the search results page, and it redirects to homepage.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ll4Dll
Jr. Member
 
Total Posts:  7
Joined:  2009-01-04
 

Hi was this resolved ....

I have created a static block with products but the add to cart keeps redirecting to the index page.....  I am using this

http://storename.com/magento/checkout/cart/add/uenc/,/product/{$data_array[’product_id’]}/ to link products images.  Any help would be great.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MartinaL
Sr. Member
 
Total Posts:  82
Joined:  2008-03-31
 

I am trying to use this as well (in version 1.3.0) and I have it set to No, have cleared my cache and it is still redirecting to the shopping cart every time I add a product?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ll4Dll
Jr. Member
 
Total Posts:  7
Joined:  2009-01-04
 
MartinaL - 01 April 2009 06:02 PM

I am trying to use this as well (in version 1.3.0) and I have it set to No, have cleared my cache and it is still redirecting to the shopping cart every time I add a product?

It works with my products in list and grid views it will also work if i include a static block but i had to capture the setLocation() url to make it work on cms pages.

to see the setLocation() of a product just view sourse.  As for1.3.0 have not been that brave to up grade as yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mmay
Jr. Member
 
Total Posts:  10
Joined:  2009-03-03
 

Funny I don’t see these settings in 1.2.0.3 version.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Periculi
Sr. Member
 
Total Posts:  249
Joined:  2009-02-03
 

System->Configuration->Checkout is where I found the option.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top