Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Adds pricing support for custom product (custom line item type) field options. Only option-based fields are supported.
Included modules
- Customizable Products Pricing (commerce_custom_product_pricing)
Core API - Customizable Products Pricing UI (commerce_custom_product_pricing_ui)
Provides UI for defining the wrapper and symbol used when displaying prices. - Customizable Products Pricing - Entity Reference (commerce_custom_product_pricing_er)
Add support for Entity Reference fields. - Customizable Products Pricing - Entity Reference UI (commerce_custom_product_pricing_er_ui)
UI for adding pricing rules.
How it works
Option-based fields may implement hook_commerce_custom_product_pricing_calculate_option_price_alter() to determine a line item field option's price.
This allows one function call to be used both for getting the price when displaying on the Add to Cart form and potentially also when calculating the line item's price.
The core module does not implement anything, so prices will be 0 unless you create a module that implements that alter.
Customizable Products Pricing - Entity Reference
Implements the hook to support Entity Reference fields. A new rule event is added where you define what an option's price should be. This value will be used on the Add to Cart form.
Additionaly, it provides a new property on line items which contains the total price for all the selected Add to Cart entity reference options. This property can be used to add to change the line item's unit price.
Example rules are included for both the option price and the line item price calculation. Enable the rules at:
- admin/commerce/config/custom-product-pricing-entityreference (Rule: Commerce Product Option Price)
- admin/commerce/config/product-pricing (Rule: Add line item selected entities total price)
Project information
Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projectsNo further development
No longer developed by its maintainers.- Created by malberts on , updated