Hi All
I am after a little help please. I have added line in the ShoppingCartController to add or remove a discount coupon when someone clicks on a checkout attribute. This works exactly as i hoped, however the cart needs to be refreshed before the prices will reflect the discount coupon rules. Is there a way i can trigger the "Update Cart" button from this controller, or alternatively just refresh the page.
My code looks as follows:
if (conditionMet.HasValue)
{
if (conditionMet.Value)
{
enabledAttributeIds.Add(attribute.Id);
_customerService.ApplyDiscountCouponCode(_workContext.CurrentCustomer, "MEMBER");
}
else
{
disabledAttributeIds.Add(attribute.Id);
_customerService.RemoveDiscountCouponCode(_workContext.CurrentCustomer, "MEMBER");
}
}
Any help would be greatly appreciated.