That Software Guy! eCommerce Starts Here!
Auto Add

Zen Cart Auto Add Plus Better Together

An upselling module for Zen Cart that automatically adds items to the customer's cart based on your Better Together configuration.

Auto Add is not a discounting module; it simply adds items to the cart.

Relevance: Zen Cart™ 1.3.8, 1.3.9, 1.5.x

Current Version: 1.8 (Zen Cart 1.3.9, 1.5.x)
Occasionally, new features are documented prior to being publicly available; please check the version history to ensure the feature you want is available in your version.

Support Thread: My commercial software is not supported on the Zen Cart forum. Please email me questions instead.

Cost: $60 (Note: this low price covers software only for self-installation.)

Buy Now

Would you like to ask me questions before buying? I'm happy to help likely purchasers make the right decision. Just email your inquiry to . Please be sure to include your cart type and version (e.g. Zen Cart 1.5.1, OpenCart 2.3.02, osCommerce 2.4, etc.) and the mod you want to buy.

Installed Cost: $120.00 (Professional installation by That Software Guy)

Installation Difficulty: Moderate (Some file merging)

Installation Instructions: click here

Buy: Buy Auto Add Plus Better Together! Or email your pre-purchase question to .

FAQ: click here

See it Live: You can see the base Auto Add functionality if you go to this test cart. Search for the DVD "The Matrix." If you add this DVD to your cart, a $5 gift certificate will automatically be added to your cart. (Typically you will also discount the auto added item; in this case, Combination Discounts is used to discount the gift certificate.)

Restrictions: click here. Please read this section carefully; if you have questions, please contact me before purchasing. Auto Add Plus Better Together uses your Better Together configuration; if you want the base module which is hand-configured in PHP, please see Auto Add.

Auto Add Plus Better Together is a Zen Cart module which allows you to automatically add items to the cart, with the idea that the items you are most likely going to want to add are your Better Together discounts. All of the configuration options from the base module Auto Add are available, plus configuration using your Better Together configuration, as follows:
  • Better Together native configuration (inside the setup function) or Better Together Admin may be used.
  • Add PROD to PROD discounts at 100% will result in the second product specified being automatically added.
  • Add CAT to PROD discounts at 100% will result in the product specified being automatically added.
  • Add two-for-one PROD discounts will result in an identical product being automatically added.
  • Add two-for-one CAT discounts will result in an identical product being automatically added.
These are all subject to the constraints noted below.

Please note the following qualifiers on Auto Add:
  1. Items which are to be automatically added must meet these criteria:
    1. The item does not have non-defaultable attributes.
    2. The item is in stock (or you permit out of stock sales).
    3. The item does not have a Product Qty Maximum which will be exceeded by the addition.
    (Note: Products with defaultable attributes may be used, if you have installed my Default Attribute mod.)
  2. Auto Add only adds items to the cart. It does not delete items. So in the example above, if product 12 was removed from the cart, product 32 would not be removed.
  3. Auto Add is not triggered by adds from the shopping cart page. All other places where product adds can occur are supported (category listing, product info, search results, featured products, etc.) but not the shopping cart page.
  4. Auto Add is not a discounting module. It simply adds the product to the cart.
  5. Auto Add does not cascade. If you configure "when product 11 is added, Auto Add product 10" and "when product 10 is added, Auto Add product 20", adding product 11 will not add product 20. You must add a product 10 to get a product 20.
  6. Auto Add only allows a single item to be a trigger. It does not support triggering "Buy 2 get one free" type discounts.
  7. Auto Add repeats for the quantity of items you add. If you have a trigger on product 2 to add product 3, and you add 5 product 2's, it will auto add 5 product 3's.
  8. Since you are using Better Together, you should consider using Discount Preview so your customers see their discounts ahead of time. Otherwise they might think you're upselling them.
  9. Interoperability with AJAX add to cart/shopping cart mods is uncertain. If you are using one of these mods, please contact me before purchasing.

Items which are set to Auto Add must be able to be added to the cart from a normal listing page. For example, if you search for the item, the search results page shows the item with "Add to Cart" functionality and not a "More Info..." link). What this means is:
  • The item does not have non-defaultable attributes.
  • The item is in stock (or you permit out of stock sales).
  • The item does not have a Product Qty Maximum which will be exceeded by adding the product to the cart.

Here are some examples, based on Better Together discounts.

Suppose you had Better Together configured with
         $this->add_prod_to_prod(12, 11, "%", 100); 
or in Better Together Admin, Zen Cart Auto Add Plus Better Together
Since you have Auto Add plus Better Together, product 11 will automatically be added when product 12 is added to the cart. No additional configuration is required.

Similarly, if your Better Together setup was:
         $this->add_cat_to_prod(4, 11, "%", 100); 
or in Better Together Admin, Zen Cart Auto Add Plus Better Together
product 11 will automatically be added when a category 4 item is added to the cart.

Installation Instructions:

  1. Back up everything! Try this in a test environment prior to installing it on a live shop.
  2. Copy the contents of the unzipped folder to the root directory of your shop.
  3. Note: If you have already installed the Default Attribute module, you must merge the changes in this mod to includes/classes/shopping_cart.php. It's just 4 lines of code; search for "hook for auto_add_to_cart".


Major Versions

  • 1.8 08/01/2016 - Updates for 1.5.5, updates for default attribute, added auto_add_ifnone feature.
  • 1.7 01/02/2015 - Updated for Zen Cart 1.5.4.
  • 1.6 01/01/2015 - First Release, based on Auto Add 1.6.


FAQ

Q: How do I turn Auto Add off?
A: Remove all the code from the body of the setup() function. It should look like this:
  function setup() {
  } 


Q: What do you mean by "defaultable attributes" or "single valued defaultable attributes?"
A: The two terms mean the same thing. They're just attributes for which a default value can be selected without needing input from the product info page. "Single valued" means the attribute has just one value. For example, a radio button with just one value (such as "PDF" or "ZIP file") is single valued. A radio button with two values (such as "red" or "green") would not be single valued. Similarly, "defaultable" means the single value can be easily set without needing additional input. For example, product with a single TEXT attribute would be single valued but not defaultable, since it's not known what the correct value would be. Similarly, a product requiring a file upload would not be defaultable.

Note that in order to take advantage of defaultable attributes, you need my Default Attribute contribution.

Q: What's the difference between Auto Add and Buy Both Now?
A: Buy Both Now allows you to have a single button add for two items with a prod_to_prod linkage in Better Together. However, both items must not have non-defaultable attributes. With Auto Add, you can have as the trigger an item which has attributes, and have as the Auto Add an item which does not, and you will get the same "one click buy" functionality.

Q: Are there any rules against using Auto Add?
A: Some interpretations of the EU Consumer Rights Directive are that Auto Add should not be used in the EU. You should only use Auto Add where it is permitted.

I charge a fee of $60 for Auto Add Plus Better Together. Buy Now!.
The fee covers software only; installation is extra if you require help.