Open azapotoczny-forte opened 1 year ago
Hello, @azapotoczny-forte ! Thank you for your appeal. The above code is legacy code. To implement the functionality you need, we can recommend two ways:
Hi @Dan-BV, when it comes to the first solution, do you mean just adding a coupon code to the cart and saving the whole cart object, right?
When adding the coupon to the shopping cart using
CartModuleController.AddCartCoupon
, the coupon code is not saved in the database.I checked the code and it looks like
ShoppingCartBuilder
sets the property valueShoppingCart.Coupon
. However, the conversion to the entity loses that value in the methodShoppingCart.FromModel
: