medusa
medusa copied to clipboard
[V.1.x] Product settings are not updating line items of already added items to "uncompleted" carts
Bug report
Describe the bug
When updating the product settings, such as changing a product from "discountable" to "not discountable", the line items in already existing "uncompleted" carts are not updated with the new settings. As a result, if a discount was previously applied to a product, it remains applied even after the product is set to "not discountable". This behavior is not consistent with standard ecommerce practices, where changes in product settings should reflect in all uncompleted carts.
System information
Medusa version (including plugins): 1.20.x Node.js version: 18/20 Database: postgresql Operating system: Ubuntu, MacOS, Linux Ami Browser (if relevant):
Steps to reproduce the behavior
- Set a product as "discountable".
- Add the product to a cart and apply a discount.
- Change the product setting to "not discountable".
- Retrieve the cart and observe that the previous discount is still applied.
Expected behavior
Uncompleted carts should reflect the updated product settings. If a product is set to "not discountable", the line items in uncompleted carts should also update to remove any previously applied discounts.