Remove dependency between Cart and Promotion module - addLineAdjustments
#10514
radoslaw-sz
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
When working on some feature, we were searching for the method which can apply some discounts on the line items. We have noticed that there is method called
addLineAdjustments
(https://docs.medusajs.com/resources/references/cart/addLineItemAdjustments#addlineitemadjustments---cart-module-reference) which doing exactly what we wanted - adjust the price of the line item. However, it looks like it has strict dependency to the Promotion module, because it requires the code which is then being searched by the Promotion module.Could you please consider remove this dependency? Maybe it would be possible to just use Promotion module to generate the actions (like
computeActions
- https://docs.medusajs.com/resources/references/promotion/types/promotion.ComputeActions) by the code, however gives possibility to putaddLineAdjustments
without the code? Or maybe with the code but then Promotion module if can't find it then does nothing instead of raising an error?Beta Was this translation helpful? Give feedback.
All reactions