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

Add to cart - without leaving Product listing?

Locked

Started by bigmo337 on 17 Jun 2010, 3:10 PM · Views: 661

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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

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,515
Plugin Contributions:
176

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

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.