ProductPrice gains meta.percent_off support: percentOff()/isPercentage() and effectiveAmount($base) — a percentage price resolves against a base (the product's cheapest standalone price), so it can express e.g. '90% off with Full Seat' rather than a fixed amount. Product::resolvePriceFor now ranks the eligible prices by EFFECTIVE amount (percentage-aware) and returns the cheapest, so a product linked to multiple prerequisites with different fixed/percentage discounts always resolves to the cheapest the buyer qualifies for. Adds ProductPrice::setConditionalPricing($requires, $percentOff, $label) — a merge-safe authoring seam host admin UIs can call instead of hand-poking meta. |
||
|---|---|---|
| .. | ||
| Feature | ||
| Unit | ||
| TestCase.php | ||
| bootstrap.php | ||