Describe the bug
Currently, when a product is added to the cart (draft order), its price, discounts, shipping cost, and eligibility are stored at that moment.
If any of the following are later updated:
Product base price
Discount rules (e.g., promotions, coupons)
Shipping rates or conditions
Eligibility rules (e.g., minimum order value for discount, customer group conditions)
The cart does not reflect these updates.
This leads to outdated and incorrect carts, resulting in incorrect prices, invalid discounts, wrong shipping fees, and eligibility violations at checkout.
Environment details:
@vendure/core version: 3.2.2
Node.js version: 20.18.3
Database: Postgres
To Reproduce
Add a product to the cart with an active promotion (e.g., 10% off if cart > $100).
Change the promotion rule to a different threshold or deactivate it.
Update shipping rules (e.g., free shipping threshold moves from $50 to $75).
View the cart — it still shows the old promotions and shipping, even if the cart no longer meets the new eligibility.
Also can checkout with the old pricing, expired promotion and not eligible update shipping rule!.
Expected behavior
The cart should always reflect the current real-time:
Product pricing
Discount rules and calculations
Shipping options and rates
Tax calculations (if any)
Eligibility rules for discounts, shipping, and other promotions
Eligibility must be re-evaluated dynamically whenever:
The cart is viewed.
Cart items are added, removed, or updated.
The user proceeds to checkout.
Additional context
Without real-time validation:
Users might wrongly receive discounts they should no longer be eligible for.
Orders could be placed under wrong shipping or tax conditions.
Admins could lose revenue due to invalid promotions still applying.
Customers could experience checkout errors if eligibility fails at final payment stage.
How major platforms handle this:
Shopify, Magento, and Saleor all re-calculate prices, shipping, and discounts dynamically in the cart.
Eligibility for promotions is re-checked live each time the cart is loaded, updated, or checkout is started.
Systems often warn users immediately if a cart no longer meets a condition (e.g., "Your discount is no longer available").
Recommended Solutions
Dynamic Cart Recalculation: Refresh product pricing, discounts, shipping, taxes, and eligibility every time the cart is accessed, modified, or checked out.
Validation Hooks: Introduce hooks so custom apps or external promo engines can also validate eligibility live.
Error and Notification System: If a cart becomes invalid (e.g., discount removed), notify the customer in the cart view immediately.
Describe the bug
Currently, when a product is added to the cart (draft order), its price, discounts, shipping cost, and eligibility are stored at that moment.
If any of the following are later updated:
Product base price
Discount rules (e.g., promotions, coupons)
Shipping rates or conditions
Eligibility rules (e.g., minimum order value for discount, customer group conditions)
The cart does not reflect these updates.
This leads to outdated and incorrect carts, resulting in incorrect prices, invalid discounts, wrong shipping fees, and eligibility violations at checkout.
Environment details:
@vendure/core version: 3.2.2
Node.js version: 20.18.3
Database: Postgres
To Reproduce
Add a product to the cart with an active promotion (e.g., 10% off if cart > $100).
Change the promotion rule to a different threshold or deactivate it.
Update shipping rules (e.g., free shipping threshold moves from $50 to $75).
View the cart — it still shows the old promotions and shipping, even if the cart no longer meets the new eligibility.
Also can checkout with the old pricing, expired promotion and not eligible update shipping rule!.
Expected behavior
The cart should always reflect the current real-time:
Product pricing
Discount rules and calculations
Shipping options and rates
Tax calculations (if any)
Eligibility rules for discounts, shipping, and other promotions
Eligibility must be re-evaluated dynamically whenever:
The cart is viewed.
Cart items are added, removed, or updated.
The user proceeds to checkout.
Additional context
Without real-time validation:
Users might wrongly receive discounts they should no longer be eligible for.
Orders could be placed under wrong shipping or tax conditions.
Admins could lose revenue due to invalid promotions still applying.
Customers could experience checkout errors if eligibility fails at final payment stage.
How major platforms handle this:
Shopify, Magento, and Saleor all re-calculate prices, shipping, and discounts dynamically in the cart.
Eligibility for promotions is re-checked live each time the cart is loaded, updated, or checkout is started.
Systems often warn users immediately if a cart no longer meets a condition (e.g., "Your discount is no longer available").
Recommended Solutions
Dynamic Cart Recalculation: Refresh product pricing, discounts, shipping, taxes, and eligibility every time the cart is accessed, modified, or checked out.
Validation Hooks: Introduce hooks so custom apps or external promo engines can also validate eligibility live.
Error and Notification System: If a cart becomes invalid (e.g., discount removed), notify the customer in the cart view immediately.