Commerce Product Add-On allows users to attach products as options to the add to cart form of another product. This is particularly useful for things like event sponsorship, optional accessories, and other up-sells.

It works by adding settings to the entityreference field if the field is attached to a product type, then modifying the Add to Cart form. It also adds a new view mode for product entities, so you can change how a product is displayed when it is functioning as an "add-on."

Adding the extra products to the cart are done with rules, so you can add conditions if required, so this can be compatible with modules like Commerce Stock. You'll just need to tweak the rule yourself.

Dependencies

Configuration

  1. Add an entityreference field to a product type. Optionally target it to only a certain product type.
  2. When editing the field, check the box next to "Offer products referenced with this field as add-on products on the Add to Cart form.
  3. Under "Manage Display" for this product type, you probably want to hide the entityreference field itself.
  4. Modify the Add-on view mode under "Manage Display" for each product types you want to use as "Add-Ons." Usually, some theming will be required to make it look decent.

Possibly coming in the future

  • Setting to allow only a single selection.
  • Dynamically update the price as products are added on by customer.
  • More granular settings for handling quantities (whether to always just add with a quantity of one, or use the same quantity as the parent product.)

NOTE: Due to the way entity uri's are currently being calculated, this module can cause a "warning" for accounts without sufficient permissions. It doesn't effect the functionality of the module, and is fixed by patching the entity API module with this patch: http://drupal.org/node/2003826 . We hope it will get in soon. It is a very simple patch that you can apply by hand, and does not touch any significant functionality.

Drupal 8 version

The Drupal 8 version is different in that it works on the product level, not on the product variation level. See README.md for more information.

Project information

Releases