Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce with Zen Cart!

Zen Cart Auto Add plus Better Together

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.9, 1.5.x

Current Version: 1.9 (version history)

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. Please use my contact form.

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

Installation Difficulty: Moderate (Some file merging)

Installation Instructions: click here

Buy: Buy Auto Add Plus Better Together!
Pre-purchase questions? No problem! Just Please contact me with your question.

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. cd to the directory appropriate for your Zen Cart version (closest to but not higher than your version), and upload those files. Note that you will have to merge any modified files.
  3. cd to the common_files directory, and upload those files.
  4. If you want to do more Auto Adds than what are specified in your Better Together configuration, then add them to the setup() method of includes/modules/auto_add.php
  5. 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.9 12/24/2018 - Updates for 1.5.6.
  • 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 if your Zen Cart version is lower than 1.5.7. (It has been built in since Zen Cart 1.5.7.)

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.