Interchange6::Schema::Result::PriceModifier
Use cases:
group pricing based on roles
tier pricing (volume discounts)
promotion/action pricing using "start_date" and "end_date"
Primary key.
FK on "sku" in Interchange6::Schema::Result::Product.
Minimum quantity at which price modifier applies (tier pricing).
Defaults to 0.
FK on "roles_id" in Interchange6::Schema::Result::Role.
Can be used for role-based pricing.
Is nullable.
Price.
Percent rate of discount. This is an alternative to setting "price" directly.
NOTE: It is not possible to create a new PriceModifier record with both "price" and </percent> set in new/insert.
PriceModifier
When "discount" is set or updated the value of "price" will be updated accordingly based on the related "price" in Interchange6::Schema::Result::Product.This is done using the method discount_changed.
discount_changed
If related "price" in Interchange6::Schema::Result::Product changes then the modified "price" will be updated.
The first date from which this modified price is valid. Automatic inflation/deflation to/from DateTime.
The last date on which this modified price is valid. Automatic inflation/deflation to/from DateTime.
Type: belongs_to
Related object: Interchange6::Schema::Result::Role
Related object: Interchange6::Schema::Result::Product
Throw exception if both "price" and "discount" have been supplied.
If "discount" has been supplied then set "price" based on related <Interchange6::Schema::Result::Product/price>.
Called when "discount" is updated.
To install Interchange6::Schema, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Interchange6::Schema
CPAN shell
perl -MCPAN -e shell install Interchange6::Schema
For more information on module installation, please visit the detailed CPAN module installation guide.