Auto Add to Cart
Accessory products that add themselves to the cart, and remove themselves just as cleanly.
Getting an accessory like a paper bag or a warranty card into a shopper's cart usually means a developer wiring up a one-off script that breaks the moment someone uses the mini cart, a saved cart, or the REST API instead of the page it was built for. This module replaces that with configurable rules: any product, a SKU list, a category, or an attribute value can trigger an accessory at a fixed quantity or one scaled to what triggered it. Rules run on every quote save, the one point every cart flow passes through, so the behavior holds no matter how the shopper's cart actually changed.
Features
- Four trigger types: any product, a SKU list, a category, or an attribute value
- Three quantity modes: fixed, scaled to a ratio, or one unit per N trigger units
- Runs on every quote save, covering the cart page, mini cart, and REST API alike
- Per-rule control over whether a shopper can remove or change the quantity of an added item
One-time payment for the term you choose, covering updates & support for that long. It doesn't auto-renew; renew any time from your dashboard.
Compatibility
Magento 2.4.4 to 2.4.9
PHP 8.1, 8.2, 8.3, 8.4
Hyvä compatible
Lifetime access to source code
Free support & updates for 1 year
30-day money-back guarantee
More about Auto Add to Cart
The problem
A grocery store wants a paper bag added the moment anything lands in the cart, and a produce bag added whenever fruit or vegetables do, without a developer wiring up a one off script for each product launch. Doing this by hand, with observers scattered across the codebase, tends to break the first time a shopper adds items through the mini cart, a saved cart, or the REST API instead of the page the original script was written for.
How it works
A rule is four independent settings: what triggers it (any product, a SKU list, a category, or an attribute value), how much it adds (a fixed quantity, a ratio scaled to the trigger, or one unit per N trigger units), which product it adds, and whether a shopper is allowed to remove it or change its quantity. Rules are evaluated on every quote save, the one point every add, update and remove path in Magento eventually passes through, so a rule fires consistently no matter which storefront flow triggered the change.
What the store owner sees
Rules live in their own Auto Add Rules grid, not buried in Store Configuration, so building a new promotion (a free sample with every order over a category, a bag with every order) is a form to fill in, not a deployment. Each rule's shopper permissions are its own toggles, so a merchant can let shoppers remove a bag they do not want while still keeping a warranty card's quantity locked to what was actually purchased.
What the shopper sees
The accessory just appears in the cart when it should and disappears when it should not, at whatever quantity the rule calls for. If a rule allows it, removing the item themselves keeps it removed for that cart, so an unwanted accessory does not keep reappearing every time the shopper touches their cart again.
Configuration
Where to find it in the Magento admin
Stores > Configuration > Nextbyte > Auto Add to Cart holds exactly one setting, Enabled, the master switch for the entire feature. Turning it off stops every rule from running without deleting any of them, useful for a quick rollback during a promotion you want to pause.
Rules themselves are not store configuration. They live under Nextbyte > Auto Add to Cart > Auto Add Rules in the main admin menu:
| Field | What it controls |
|---|---|
| Trigger type and value | Which products count toward this rule firing: any product, a SKU list, a category, or an attribute value, plus the specific SKUs, category, or attribute value to match |
| Target SKU | The product this rule adds to the cart when its trigger is met |
| Quantity mode and ratio | Whether the added quantity is fixed, scaled to the trigger quantity by a ratio, or one unit per N trigger units |
| Shopper permissions | Whether a shopper may remove the auto added item and whether they may change its quantity, each its own toggle |
If you cannot find a rule you expect under Store Configuration, that is expected. Rules live in their own grid specifically so a merchant managing several of them does not have to scroll through an ever growing configuration page to find one.
Reviews
No reviews yet.
One-time payment for the term you choose, covering updates & support for that long. It doesn't auto-renew; renew any time from your dashboard.
Compatibility
Magento 2.4.4 to 2.4.9
PHP 8.1, 8.2, 8.3, 8.4
Hyvä compatible
Lifetime access to source code
Free support & updates for 1 year
30-day money-back guarantee