Describe the bug
When 2 cart rules with a free gift are applied, discount is not computed correctly in cart summary
To Reproduce
Steps to reproduce the behavior:
Screenshots
Cart rule example
Cart problem
Additionnal information
PrestaShop version: Reproduced in PS 1.7.4.4 and PS 1.7.5 RC1
Hi @idnovate,
Thanks for your report.
I manage to reproduce the issue with PS1.7.5.0rc1.
In the shopping cart page => NOK
In the order confirmation
In the order detail BO => NOK
The discount should be 68,92€
In the invoice => NOK
Thanks!
Related to #9757
Hi,
This issue occurs also when we have two cart rules with free shipping vouchers as reported here #12024
Thanks!
Hi!
Its an important bug, any solution?
Hi @webstartconsulting,
Sorry, not yet.
Hi!
Same problem when 2 cart rules with free gift is applied.
+1 on the urgency this issue. We are experiencing it on a live site and daily manual corrections, and emails to customers, are necessary because of it.
This is fixed by us in PR-13704 (Tomlev rebranched it ;))
https://github.com/PrestaShop/PrestaShop/pull/13704
(Tested on site of lijndiensten)
@venditdevs this issue is not fixed by #13704
If you have a fix, please make a pull request on GitHub with your code suggestion
https://github.com/PrestaShop/PrestaShop/tree/develop
Thank you!
This is fixed by us in PR-13704 (Tomlev rebranched it ;))
13704
(Tested on site of lijndiensten)
Maybe in your case 🤔 but it seems there might be more cases where the bug still happens 😢 according to marionf
If i can find some time in the coming weeks i will take a look if i can fix this problem too
.
The cartrule code is mess. This wasn't tested before releasing 1.7.x , it just can 't be. So many errors and odd behaviours.
We and some of our merchants in 1.7 are concerned by this issue.
Hi,
Still no solution ? It's not a minor bug for us...
Any forecasted milestone ?
Hi,
any update for this bug?
Thank you :)
Hi @ladisbot,
Sorry not yet.
PrestaShop is an open-source project, so it can be solved before if someone submits a pull request to solve it.
Thanks!
@marionf @colinegin @khouloudbelguith @jf-viguier
Made a PR with a fix guys #16635. Test it please, should work fine.
@marionf @colinegin @khouloudbelguith @jf-viguier
Made a PR with a fix guys #16635. Test it please, should work fine.
This PR fixes https://github.com/PrestaShop/PrestaShop/issues/11722#issuecomment-499413873. Tested with 1.7.6.2 which already includes https://github.com/PrestaShop/PrestaShop/pull/13704
Thank you very much @Hlavtox !
Unfortunately there is still some issue:
Issue 1:
Create the following rules:
Rule 1
Amount discount:
Rule 2
Free gift
Rule 3
Free gift
Cart:
Issue 2:
@idnovate What if you set priority to gift rules to 1 and the discount rules to 2?
Then all is OK:
@Robin-Fischer-PS could you check @idnovate comments ?
Thanks !
@colinegin
@idnovate is right, I didn't think of this situation. :-(
Order of cart rules must be - gifts first, discounts second, in order for the fix to work. Perhaps if you guys fixed this cart rule order as I proposed in #16642?
Because now, if you simulate @idnovate's situation:
Hi @idnovate, @colinegin, @Robin-Fischer-PS,
I manage to reproduce the issue described by @idnovate with the develop branch.
I will create a new issue.
Thanks!
Hi @colinegin,
Issue created: https://github.com/PrestaShop/PrestaShop/issues/16673
I added the label Regression because, in the PS1.7.6.2 => the total is well calculated.
@colinegin what do you think?
Thanks!
Yes @khouloudbelguith , I agree with you. I add it to the 1.7.7 kanban.
Most helpful comment
We and some of our merchants in 1.7 are concerned by this issue.