Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    69
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Mar 2005
    Posts
    5
    Plugin Contributions
    0

    Default 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?

 

 

Similar Threads

  1. shoppingCart->add_cart quantity?
    By tlahtine in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 20 Feb 2011, 05:15 PM
  2. Whats wrong with my add_cart code?!
    By enigmabomb in forum General Questions
    Replies: 3
    Last Post: 1 Feb 2008, 11:58 PM
  3. How To Pass Search Keywords To metatags.php
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 1
    Last Post: 11 Sep 2007, 09:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR