Zen Cart Logo
Forums / General Questions / Shopping Cart Session Information

Shopping Cart Session Information

Views: 382

Results 1 to 2 of 2
3 Aug 2012, 3:01 PM
#1
webhorizons avatar

webhorizons

New Zenner

Join Date:
Nov 2009
Posts:
4
Plugin Contributions:
0

Shopping Cart Session Information

Hello,

I'm developing a shop system where an external application posts information (in a GET url format) to Zen Cart - the external application is doing this fine but I'm having trouble getting this information into the shopping cart.

I'm a reasonably competent PHP programmer but looking for some understanding on how this process works.

Is there details anywhere of how cart information is stored as a session? (a structure document of the session array?) or ideally it would be useful if someone could provide some general code of how an item could be placed into the cart through the use of a script i.e what information needs to be stored each time in the cart session and assigned to which variables

Many Thanks

3 Aug 2012, 4:51 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Shopping Cart Session Information

Using GET won't work if you're doing anything other than adding a non-attribute product to cart as described below:

If you're trying to merely tell it to add-to-cart for an existing product, a GET request with action=buy_now and products_id=xxxx will suffice.

If your situation involves more than simply specifying a product ID number to add to cart, then please explain the bigger picture of what your external application is actually doing. What's its purpose? Why is it needed instead of using the built-in product pages? What's it doing differently? Are attributes involved? Why or why not? What version of Zen Cart?