Class: Spree::PriceAdjustmentTier

Inherits:
Object
  • Object
show all
Includes:
CanonicalDecimals
Defined in:
app/models/spree/price_adjustment_tier.rb

Overview

One band of a price list's percentage adjustment: from this quantity up, the list adjusts base prices by this percentage instead of the one on its own price_adjustment_percentage column.

The column stays the list's quantity-1 value, so a list carrying no tiers prices exactly as it did before bands existed. A band adjusts the base price, like the column does — never a previous band's result — so a merchant reading "-20% from fifty" gets twenty percent off the shop price and not twenty percent off an already-discounted number (docs/plans/6.0-volume-pricing.md).

Constant Summary collapse

MAXIMUM_TIERS_PER_LIST =

How many bands one list may carry, matching the break cap so a merchant meets one number rather than two.

Spree::Price::MAXIMUM_BREAKS_PER_VARIANT