Drupal Association members fund grants that make connections all over the world.
This is a contributed module for Drupal Commerce that allows you to use a secondary price field to supply an alternate price for a product based on the quantity of that product on the line item. It also provides a field formatter to display the price/quantity values as a table.
- Enable the Commerce Price Table module.
- Add a new price table field to a product type using the label Price table with an unlimited number of values.
- Create new products or edit existing products of that type using as many prices in the price table as you want. When setting your quantity ranges, use -1 for "Unlimited" (e.g. "$5 for 6 or more of this product").
You can hide the base price field on the product edit form by checking the appropriate checkbox in the field configuration form. Additionally, you can display the price table horizontally or vertically by just changing the display formatter setting.
Recommended: enable the quantity field for the add to cart display formatter in the product display settings.
New feature in 7.x-1.x-dev (post 7.x-1.2)
Sometimes you want all of the product variants from a single product display to count toward the total quantity for determining the price from the price table. To configure this, you need to edit the default pricing rule provided by this module, Override price with price table. Before the Set the unit price to a table based price action, you should add a Sum quantities for products sharing a display action and then update the other action's quantity setting to use the Combined product sum value provided by the sum action. This will also work in the case of the same product being referenced by multiple line items.
Watch the screencast of this module featured in the Commerce Module Tuesday.
- Maintenance status: Minimally maintained
- Development status: Maintenance fixes only
- Module categories: E-commerce
- Reported installs: 1,033 sites currently report using this module. View usage statistics.
- Downloads: 10,445
- Last modified: February 19, 2016
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.