BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. HTML5 Canvas
  2. Ruby
  3. iPhone/iPad
  4. Spring Web Flow
  5. REST
  1. jQuery Selectors
  2. Spring Config.
  3. Java
  4. Ajax
  5. Java Concurrency

Link Details

Do we have to spell it out? Okay... V-O-T-E! Login and vote now.
Link 739957 thumbnail
User 760467 avatar

By webspeaks
via webspeaks.in
Published: Feb 05 2012 / 10:55

Adding simple products to cart through custom PHP code is pretty straight forward. You just need to call the '$cart->addProduct()' function with the product_id and quantity as parameters. But if you want to add grouped products to cart through your code, you will need to perform few additional steps. The process is very easy - create an '$super_group' array of the associated products with the specified quantities. Then you need to pass the array to the 'addProduct()' function. See the actual code below that makes it work:
  • 3
  • 1
  • 426
  • 249

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (3)



Voters Against This Link (1)