Hi, I have created a discount for product variant, and applied for the same discount coupon for a product in the admin panel by clicking on Catalog --> Product --> Bulk edit product variants.
So in my web, i have selected the same product, to which the discount coupon is applied, and in the cart, when i tried to give the same Coupon Code, it is given me a message like "The coupon code you entered couldn't be applied to your order " . Can some one please help me how to apply a discount coupon for a product variant.
var discount = _discountService.GetDiscountByCouponCode(_workContext.CurrentCustomer.DiscountCouponCode);
This is in ShoppingCartController, PrepareShoppingCartModel Method.
I have checked where actually the code is setting 'DiscountCouponCode' property of customer class, no where am seeing it is setting the value, except when u apply the discount coupon post action.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Vous avez encore des questions ou avez besoin d'aide?