Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / How do I pass attributes to add_cart?

How do I pass attributes to add_cart?

Locked

Views: 2,232

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
19 Sep 2007, 9:17 PM
#1
audleman avatar

audleman

New Zenner

Join Date:
Jul 2007
Posts:
69
Plugin Contributions:
0

How do I pass attributes to add_cart?

Hey folks,

I'm attempting to write some code that will add products to my cart. I can add a product with the function $_SESSION['cart']->add_cart() no problem. However I can't figure out what the correct syntax is for passing in parameters. I'm trying this:

$_SESSION['cart']->add_cart(GIFT_PRODUCT_ID, '1', array(12 => 'Kevin'));

...but the attribute is coming in as

TEXT

Any help appreciated,

Kevin

9 Jul 2009, 1:06 PM
#2
benfaust avatar

benfaust

New Zenner

Join Date:
Mar 2005
Posts:
5
Plugin Contributions:
0

Re: How do I pass attributes to add_cart?

Did you ever find the answer to how to pass attributes to the cart? I'm looking for the same information; plus, when I use add_cart, I see the products added in the session until I go to view cart, and it doesn't seem to have stuck. What am I missing?