laravel-shop/tests/Unit/Product
Fabian @ Blax Software 2c31a23255 feat(pricing): percentage conditional prices + cheapest-effective resolver + authoring helper
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.
2026-08-26 15:52:24 +02:00
..
ConditionalPricingTest.php feat(pricing): percentage conditional prices + cheapest-effective resolver + authoring helper 2026-08-26 15:52:24 +02:00
ProductDuplicateTest.php BFI cart / orders 2026-01-05 10:30:21 +01:00
ProductPricingTest.php BFI cart / orders 2026-01-05 10:30:21 +01:00
ProductRelationsTest.php A prompts, I docs/readme, BF orders, R tests locations 2025-12-30 09:29:43 +01:00