oc-mall-plugin
oc-mall-plugin copied to clipboard
Discount application ordering and priority
I think this is a problem with ordering and priority of application of discounts.
Let's say we have a discount 'FREE SHIPPING' for any order total above 50$. Let's say we have a cart containing items for a total price of 55$. So the free shipping will apply. Let's say the customer apply a discount code giving him back 10$. So the new order total is 45$.
But the FREE SHIPPING stills applies automatically, and I guess it shouldn't since the total is now 45$.
EDIT: using MALL 1.13.5
and October v1 (472)
Discount coupons are calculated for products total price not for whole order, I believe.
yes indeed but this is not the issue at play here. The issue is that the alternate shipping still applies when it should not.
my bad, I just realized my mistake.
It is not an alternate shipping discount that is applied, it is a shipping method that becomes available when the order is above a certain amount.
So, still the problem appears as the shipping method appears even after the application of the discount code.
any updates on this please?
Hi @chrisvidal
I've had a similar issue, ended up modifying this line of code here,
https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/98a5028b854699fca1bf7e07e36be9a6cd13db8c/models/ShippingMethod.php#L157
Where I've subtracted the discount total, so the correct shipping method will return.
Then, the $total variable is sent here,
https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/98a5028b854699fca1bf7e07e36be9a6cd13db8c/models/ShippingMethod.php#L196
Where it would return the correct shipping method.