Forums / General Questions / Adding multiple items and quanties to cart in one click

Adding multiple items and quanties to cart in one click

Views: 701

Results 1 to 3 of 3
14 Apr 2014, 5:06 PM
#1
gigasaurus avatar

gigasaurus

New Zenner

Join Date:
Apr 2014
Location:
San Diego
Posts:
1
Plugin Contributions:
0

Adding multiple items and quanties to cart in one click

If I know my product_id(s) and cart_quantity(s) is it possible for me to concatenate a URL (or do a form post) to a Zen Cart page that populates the user's shopping cart with multiple items/quanitites simultaneously? Or perhaps a plugin that enables me to do this?

Something along these lines:

http://shop.MyZenCart.com/index.php?main_page=shopping_cart &
action=add_product &
products_id1=1111 &
cart_quantity1=7 &
products_id2=2222 &
cart_quantity2=8 &

My client has a Zen Cart and has asked us to create an application that allows users to create their own design (using the clients products) and when they are done, they want the user to be able to click a button and be brought to their zen cart that is populated with all the selected items and quantities.

15 Apr 2014, 2:19 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Adding multiple items and quanties to cart in one click

gigasaurus:

If I know my product_id(s) and cart_quantity(s) is it possible for me to concatenate a URL (or do a form post) to a Zen Cart page that populates the user's shopping cart with multiple items/quanitites simultaneously? Or perhaps a plugin that enables me to do this?

Something along these lines:

http://shop.MyZenCart.com/index.php?main_page=shopping_cart &
action=add_product &
products_id1=1111 &
cart_quantity1=7 &
products_id2=2222 &
cart_quantity2=8 &

My client has a Zen Cart and has asked us to create an application that allows users to create their own design (using the clients products) and when they are done, they want the user to be able to click a button and be brought to their zen cart that is populated with all the selected items and quantities.

I kind of thought that there would have already been some offers of ideas for this. I've come up with a few things, but there are still unknowns that you may have to figure out through another way.

Could possibly populate the cart with the choices being made through SQL as they are being chosen. I believe this takes the sessionid as part of assigning to the cart and/or if they are logged in, then that may also be some useful information to use.

The other thing I was thinking was that it may be easier to use a post type action to go to a main_page that would process the array(s) that are to be created and then forward on to the shopping cart itself or another location. I think trying to process the link shown as an example if for no other reason then having to figure out how many such groupings would be involved and when to stop, etc...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...