Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Add Items To Cart Programmatically?

    Hi,

    Though I'm fluent with db and php, I'm no Zen Master so forgive me if this is a 'noob' question.

    I was wondering what is involved in adding -multiple- items to the cart from a single page.

    IOW: Buyers of product 'A' =usually= buy product 'B' as well... they work well together. It would be -great- if, when the user goes to add Product 'A', we could add 'A' -and- 'B' at the same time from the same 'add' click.

    I'm assuming there are classes which govern this, but before I start digging around I figured I'd post here and (hopefully) save some time. Surely many people need to do -something- like this.

    Suggestions?

    TIA,

    ---JC

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Add Items To Cart Programmatically?

    Indeed, many people do need to do something like that. Did you look at Free Software Add Ons (link, top-left on any forum page)? I'm pretty sure you'll find something there, perhaps called Better Together. (That's a hint. ;-) )

    Rob

  3. #3
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Re: Add Items To Cart Programmatically?

    Schweet. I wish the Add-Ons section was organised a bit better. Without your hint, I -never- woulda found it.

    Thanks,

    ---JC

    Quote Originally Posted by rstevenson View Post
    Indeed, many people do need to do something like that. Did you look at Free Software Add Ons (link, top-left on any forum page)? I'm pretty sure you'll find something there, perhaps called Better Together. (That's a hint. ;-) )

    Rob

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,829
    Plugin Contributions
    31

    Default Re: Add Items To Cart Programmatically?

    You can use notifiers to do it too, if its something they must have:
    http://www.zen-cart.com/wiki/index.p...er_is_watching

    I use it to add an optional (free) part to a product purchase automatically.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  5. #5
    Join Date
    Nov 2010
    Posts
    68
    Plugin Contributions
    0

    Default Re: Add Items To Cart Programmatically?

    Quote Originally Posted by torvista View Post
    You can use notifiers to do it too, if its something they must have:
    http://www.zen-cart.com/wiki/index.p...er_is_watching

    I use it to add an optional (free) part to a product purchase automatically.
    Schweet! Thanks.

    ---JC

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,514
    Plugin Contributions
    126

    Default Re: Add Items To Cart Programmatically?

    Note that Better Together does not actually add "B" to the cart when "A" is added - it simply discounts the combination A+B when they are bought together.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 2 Aug 2016, 01:03 PM
  2. v139h when i add an item to cart, sometimes it show no items in cart...
    By weber in forum Managing Customers and Orders
    Replies: 2
    Last Post: 9 Apr 2012, 08:23 AM
  3. Add multiple items to cart
    By pharry in forum General Questions
    Replies: 3
    Last Post: 18 Jun 2009, 10:02 PM
  4. Replies: 4
    Last Post: 14 Dec 2007, 01:04 AM
  5. Add add to cart button to main page items?
    By ekat in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 11 Oct 2006, 02:51 AM

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