Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2011
    Posts
    42
    Plugin Contributions
    0

    Default Is there some way to trigger adding a specific product to an open cart?

    We want to run a "buy 2, get product x FREE" promotion, or a "spend y, and get product x FREE" promotion.

    We want product X to appear in the cart in response to the customer qualifying, and vanish from the cart if they edit their purchases so they no longer qualify.

    This was apparently a really popular request 5+ years ago, since a version of it "buy certain $ amount, get product x FREE added to cart" was the subject of this developers' tutorial:
    https://www.zen-cart.com/wiki/index...._World_Example
    under the heading "One of the most-often requested features is..."

    But I can't find any plugin or other notes since this tutorial was posted to indicate that anyone has successfully done it.

    So my two questions are:

    1) Is there some known way to do this?
    2) if not, is there some known issue with this developers' tutorial, so I shouldn't chase down that path?

    Thanks very much for any help. Seemed simple, ended up not. How often has that happened? :-)

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Best to take a look here:http://www.thatsoftwareguy.com/zencart.html
    He is the best when it comes to discounts.

  3. #3
    Join Date
    Oct 2011
    Posts
    42
    Plugin Contributions
    0

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Thanks for reaching out, I did start with him. He's great.

    But for now, anyway, he doesn't have any one thing or combination of things that does this.

    I was hoping someone had successfully executed the example they give in the developer's area, because I'm not a developer and it takes me so long to work my way through learning what I need to know to get one specific thing done... :-)

    But I'm guessing that since nobody -- not even thatsoftwareguy -- has done it, there must be some real hurdles.

    These forums have saved me countless times, so I haven't given up hope!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Quote Originally Posted by David R View Post
    for now, anyway, he doesn't have any one thing or combination of things that does this.
    Judging from http://www.thatsoftwareguy.com/zenca...o_bonanza.html it seems the majority of what you've said is indeed available with his plugins. Which specific feature is missing? Perhaps it's more prudent to supplement with something that specifically handles the missing requirement than writing everything from scratch.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Oct 2011
    Posts
    42
    Plugin Contributions
    0

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Quote Originally Posted by DrByte View Post
    Judging from http://www.thatsoftwareguy.com/zenca...o_bonanza.html it seems the majority of what you've said is indeed available with his plugins. Which specific feature is missing? Perhaps it's more prudent to supplement with something that specifically handles the missing requirement than writing everything from scratch.
    Thanks Dr. Byte, I thought so, too. But we corresponded about it a bit, and the upshot is that nothing he's currently got will address these things:
    a) add a product "Y" to the cart when two products of some type are purchased
    b) remove an item from the cart if the buyer changes cart contents and no longer qualifies.

    Do you know if anyone ever pushed that tutorial example far enough to know it will work? Has something in the 1.5x generation of Zen Cart made it not a good option?

    Thanks again,

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Quote Originally Posted by David R View Post
    Do you know if anyone ever pushed that tutorial example far enough to know it will work?
    I know I did, years ago. Not sure if I still have that code around anyplace.
    It's very challenging to also have an Admin interface to manage all the possible options. What I'd done was all handled in a PHP file, without any admin-side controls about what products qualified with other products etc. Very rigid implementation. But certainly doable. If you want nice admin controls and switches and fancy dialogs you'll be needing to invest more to provide that.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Note, too, that the example should be updated to show the use of the __construct function (that's going to be needed for PHP 7.0 compliance), e.g. changing references like:
    Code:
    <?php
     class myObserver extends base {
       function myObserver() {
         $this->attach($this, array('NOTIFIER_CART_ADD_CART_END'));
       }
    ...
     }
    to
    Code:
    <?php
     class myObserver extends base {
       function __construct() {
         $this->attach($this, array('NOTIFIER_CART_ADD_CART_END'));
       }
    ...
     }

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Quote Originally Posted by lat9 View Post
    Note, too, that the example should be updated to show the use of the __construct function (that's going to be needed for PHP 7.0 compliance), e.g. changing references like:
    Code:
    <?php
     class myObserver extends base {
       function myObserver() {
         $this->attach($this, array('NOTIFIER_CART_ADD_CART_END'));
       }
    ...
     }
    to
    Code:
    <?php
     class myObserver extends base {
       function __construct() {
         $this->attach($this, array('NOTIFIER_CART_ADD_CART_END'));
       }
    ...
     }
    Good point. Updated. Thanks.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Oct 2011
    Posts
    42
    Plugin Contributions
    0

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Quote Originally Posted by DrByte View Post
    Good point. Updated. Thanks.
    Thanks very much!

    We don't need any admin interface component to this, and I can repurpose some of the dialog functions we use now. I'll try to get it working from the tutorial as it stands, so I don't introduce any new troubleshooting issues with the __construct function for now.

  10. #10
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Is there some way to trigger adding a specific product to an open cart?

    Out of curiosity...is the idea to add the free product before or after shipping is calculated? And/or would the customer be able to remove the free item from their cart if they didn't want it, or if there was a shipping cost and they didn't want to pay?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Upgraded database, some customer orders there, some open to a blank page?
    By indigobnb in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 6 Sep 2010, 07:42 PM
  2. Looking for a specific cart organized a specific way.
    By cpt_owner in forum Basic Configuration
    Replies: 0
    Last Post: 5 Sep 2009, 03:34 AM
  3. Is there a way of adding a product but stopping it from adding to new products?
    By philpalmerdevon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Jan 2009, 02:07 PM
  4. Is there any way to have product-specific attributes instead of global ones?
    By Ibrahim in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 11 Aug 2008, 03:54 PM
  5. Is there a way to setup a open amount product?
    By jdsmith8 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 20 May 2007, 06:50 PM

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