Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add to cart - without leaving Product listing?

Add to cart - without leaving Product listing?

Locked

Views: 660

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
17 Jun 2010, 3:10 PM
#1
bigmo337 avatar

bigmo337

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Add to cart - without leaving Product listing?

Current when a product is added, you are taken back to the product info page.

I want my customers to be taken back to the product listing.

An even better ideal solution would be, adding to the cart without ever leaving the page. Therefore just updating the shopping cart sidebox module?

Any help is apreciated.

17 Jun 2010, 3:35 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Add to cart - without leaving Product listing?

If you peek in the Configuration ... My Store ... there is a setting on whether or not you are taken to the Shopping Cart when adding products ...

Display Cart After Adding Product
Display the shopping cart after adding a product (or return back to their origin)

true
false

However, if you go to the shopping_cart, and click a Product in the cart you will be taken to the product _info page as there are so many places that a Product could have been added to the shopping cart ...

17 Jun 2010, 3:55 PM
#3
bigmo337 avatar

bigmo337

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Add to cart - without leaving Product listing?

I have that setting as false.

So are saying that it is not possible, to add a product to the cart without leaving the page where it was added from ie the product listing?

Because at the moment when I add to the cart from the product listing of a category page, a message at the top of the page says, "The product is sucessfully added to the product", then I am taken to the product info page of the product added, rather than the category page where I clicked on add to cart.

My site is pizza website, a product info is not really necessary. A description is more than enough.

20 Jun 2010, 9:44 PM
#4
bigmo337 avatar

bigmo337

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Add to cart - without leaving Product listing?

I am still having problem with this. Any help?

20 Jun 2010, 11:20 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Add to cart - without leaving Product listing?

What you're asking for will require AJAX both to submit the content and to update the sidebox, all without redrawing the page.
Since there's not any built-in AJAX support in Zen Cart v1.x, you'll have to write that custom code yourself.

If you want to actually redraw the page, then you'll need to customize the existing code which handles the redirect after adding to cart, which is in /includes/init_includes/overrides/init_cart_handler.php