-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
@vendure/coredesign 📐This issue deals with high-level design of a featureThis issue deals with high-level design of a featurestatus: research needed 🔍More in-depth research need to make a decisionMore in-depth research need to make a decisiontype: feature ✨
Milestone
Description
Is your feature request related to a problem? Please describe.
Requirement: a promotion like "for every N of Product A, add free gift B"
Currently this is not possible because the value of N (which would be calculated by the PromotionCondition and passed as state to the PromotionAction) is not available in the side-effect API methods onActivate and onDeactivate. Thus there is no way to know how many free gifts to add.
Describe the solution you'd like
Add a state arg to those functions, passing in the data object from the dependent promo condition(s).
Describe alternatives you've considered
Re-implement the logic in the action to calculate the number to add, but this is bad for efficiency and maintenance.
Metadata
Metadata
Assignees
Labels
@vendure/coredesign 📐This issue deals with high-level design of a featureThis issue deals with high-level design of a featurestatus: research needed 🔍More in-depth research need to make a decisionMore in-depth research need to make a decisiontype: feature ✨
Type
Projects
Status
📅 Planned