So I setup a test discount using the automatic type and works as expected.
I then setup another discount using code type and this does not have any effect on the cart. So I just though I will delete that maybe I did it wrong and setup a very simple one with no rule just subtract 5% from the total when the applicable code is applied.
The source code is the same as you have on the demo site only difference is that I apply this on the cart and not on checkout so before the order is finalized.
Is that the reason it is not being applied?
If so is there a work around?
I have the latest versions of vendr 1.2.5 and all the other related dependencies are up to date.
So it looks like we have a bug here due to the fact that we actually calculate discounts before the order total price is calculated and so any discounts that affect the Order Total Price aren't taking effect because at the time of their calculation, the order total price is 0 and so any percentage of 0 is still 0 and so the discount isn't applying.
We'll need to look into updating the flow such that the order total discounts can apply once the order total is known.
In the meantime, I believe amount discounts do work, and so should percentage discounts on the sub total so hopefully that is enough to work around the problem for now.
Code Discounts Not Taking Effect
Hi Matt
Bugging you again. Hope you are well.
So I setup a test discount using the automatic type and works as expected.
I then setup another discount using code type and this does not have any effect on the cart. So I just though I will delete that maybe I did it wrong and setup a very simple one with no rule just subtract 5% from the total when the applicable code is applied.
The source code is the same as you have on the demo site only difference is that I apply this on the cart and not on checkout so before the order is finalized.
Is that the reason it is not being applied? If so is there a work around?
I have the latest versions of vendr 1.2.5 and all the other related dependencies are up to date.
Thanks
Hey Francis,
So it looks like we have a bug here due to the fact that we actually calculate discounts before the order total price is calculated and so any discounts that affect the Order Total Price aren't taking effect because at the time of their calculation, the order total price is 0 and so any percentage of 0 is still 0 and so the discount isn't applying.
We'll need to look into updating the flow such that the order total discounts can apply once the order total is known.
I've created an issue for it here and will take a look as soon as I can https://github.com/vendrhub/vendr/issues/143
In the meantime, I believe amount discounts do work, and so should percentage discounts on the sub total so hopefully that is enough to work around the problem for now.
Matt
Okay cool no problem
I will use the subtotal instead close to the the same thing.
Thanks Matt
Just to let you know, I've found and fixed the bug. A fix will be released in 1.2.6 later this week.
https://github.com/vendrhub/vendr/issues/143
Thanks for reporting
Matt
That was quick thanks Matt!!!
Cool will just leave everything as is then on my side and wait for the update.
Still got a few more things to do on the site in any case.
Really appreciate it Matt.
Thanks
is working on a reply...