PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.22k stars 4.81k forks source link

Order discounts calculated in wrong way prestashop 1.7.6.1 #19936

Closed MohammedID closed 4 years ago

MohammedID commented 4 years ago

Dear Prestashop community;

Were getting issues with discount amounts on our shop, we did add cart rule applied to perfume category, each ordered product will get one mascara for free, this gift product cost 229.00 mad, if the client order more than one perfume for example two he will get 2 free mascaras, the issue is the discount total instead of displaying 229.00 * 2 which is 458.00 it displays 343.00.

I don't know where did he get this amount from, how did prestashop calculated the total amount of discounts.

In order to reproduce the error you can visit our prod version of the store : https://dev.infini.ma Go to perfume category choose any one, add it to the cart, then increase the quantity of the product, put for example 2, and you will be able to reproduce the issue.

Below attached a screen shot of the issue.

Best regards. 2020-06-25-13-47-dev infini ma

prestashop-issue-bot[bot] commented 4 years ago

Thanks for opening this issue! We will help you to keep its state consistent

florine2623 commented 4 years ago

Hi @MohammedID , First, you need to downgrade your PHP version. PS 1.7.6.1 is available with PHP 7.2 max. Second, I created a voucher that offers a free product when item from a specific category is in cart, I can't reproduce the issue. Can you send the exact steps to reproduce please ? Thanks!

MohammedID commented 4 years ago

Hi florine;

In order to reproduce the issue you have to specify more than one rule applied to the same categories and the same gift product.

Can you please visit this url : dev.infini.ma, and add any product to the cart, then use these coupon codes : 'mascara_again' and 'mascara_natif'.

Or you will find attached the steps that you can follow to reproduce the error in your BO. step_3 step_2 step_1

Best regrads.

florine2623 commented 4 years ago

Do you mean that you have 2 same discounts with the same category and same gift ?

MohammedID commented 4 years ago

Yes, it the same gift product. for the same categories.

florine2623 commented 4 years ago

Regarding the free product sent to customer issue with the wrong calculated price, it has be fixed in PS 1.7.7.0. I have 2 discounts with same configuration (same category restriction and same gift), they just have different names.

Please see my screenshot in PS 1.7.6.5 : NOK Capture d’écran 2020-06-26 à 11 47 14

In PS 1.7.7.0 : OK Capture d’écran 2020-06-26 à 11 44 54

I would advise yo to wait for the release candidate version of PS 1.7.7 and update your shop. For now I will close this issue as it is fixed. Thanks!