Forums / General Questions / Stop 'add to cart' button from navigating to shopping cart page

Stop 'add to cart' button from navigating to shopping cart page

Started by johs on 21 Jun 2011, 11:24 AM · Views: 1,829

Results 1 to 8 of 8
21 Jun 2011, 11:24 AM
#1
johs avatar

johs

New Zenner

Join Date:
Jun 2011
Posts:
4
Plugin Contributions:
0

Stop 'add to cart' button from navigating to shopping cart page

My shopping cart is displayed on my sidebar at all times. How do I modify the 'add to shopping cart' button so that it adds the items correctly but does NOT navigate the customer to the shopping cart page? He should see the update on the sidebar, and should be able to add additional items with different options without having to re-navigate to the product page.

21 Jun 2011, 11:33 AM
#2
johs avatar

johs

New Zenner

Join Date:
Jun 2011
Posts:
4
Plugin Contributions:
0

Re: Stop 'add to cart' button from navigating to shopping cart page

Its Zen Cart 1.3.9h

Its a fresh install with many boxes turned off and moved around, but nothing special.

21 Jun 2011, 11:51 AM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Stop 'add to cart' button from navigating to shopping cart page

Admin - Configuration - My Store - Display Cart After Adding Product

22 Jun 2011, 2:52 AM
#4
bryan_davis avatar

bryan_davis

New Zenner

Join Date:
Jan 2011
Posts:
9
Plugin Contributions:
0

Re: Stop 'add to cart' button from navigating to shopping cart page

I'm having the same problem. I've done the admin thing suggested here, but it still goes to the cart when a user searches for something. How do you set up the same feature to work for the search results pages as they do for the product pages and the browse pages?

22 Jun 2011, 10:23 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Stop 'add to cart' button from navigating to shopping cart page

That's not the same problem. If your site is landing on the shopping cart page when it should be displaying search results, we'll need a link to the site.

22 Jun 2011, 3:16 PM
#6
bryan_davis avatar

bryan_davis

New Zenner

Join Date:
Jan 2011
Posts:
9
Plugin Contributions:
0

Re: Stop 'add to cart' button from navigating to shopping cart page

Thanks for the reply:

Site link: http://www.halfpricehobbies.com/store/

When you search and add a product to the cart, it takes you to the home page. All the product pages and browse pages work as expected from the admin configuration. Let me know if you need any other details.

22 Jun 2011, 3:56 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Stop 'add to cart' button from navigating to shopping cart page

That's standard Zencart behavior - when adding products to the cart from the search results page, the store returns to the main page. I'd guess the thinking is that there's no reason to return to the search results page, so the main page is the logical place, other than the shopping cart.

Where were you thinking it should return to ?

22 Jun 2011, 4:01 PM
#8
bryan_davis avatar

bryan_davis

New Zenner

Join Date:
Jan 2011
Posts:
9
Plugin Contributions:
0

Re: Stop 'add to cart' button from navigating to shopping cart page

I would like it to return to (or stay on) that search results page. It seems like it could be done as the search terms are part of the URL string. My PHP skills just aren't good enough to figure out how to implement.

For example, right now the page is redirecting here (when I search for "academy" and add a product to my cart)

http://www.halfpricehobbies.com/store/index.php?main_page=index&search_in_description=1&keyword=academy&inc_subcat=0&sort=20a

I would like it to function like it does when you browse products and return here:

http://www.halfpricehobbies.com/store/index.php?main_page=advanced_search_result&search_in_description=1&keyword=academy

with just a notification at the top of the page that it was added to the cart successfully. To me it should work like it does when you browse a category. If you go here:

http://www.halfpricehobbies.com/store/index.php?main_page=index&cPath=1

and add a product to the cart, it does not take you away from where you were last...just notifies you that the product has been added to the cart. I'd like to searches to behave the same way, and customers are telling us that is their preference as well.

Is this possible to do even?