PrestaShop / PrestaShop

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

Catalog price rules are not behaving as expected #35122

Open BlacklineCloud opened 9 months ago

BlacklineCloud commented 9 months ago

Prerequisites

Describe the bug and add attachments

In my store, I allow local and international orders. For both cases, I offer free shipping and logistics costs are included in the price. Since international logistics prices are higher than local logistics prices, I set the base price of my products globally (where international logistics costs are included) and then add "specific prices" for local buyers on a country-specific basis.

The problem is; I wanted to define a discount for a customer group. I added the catalog price rule. So far everything is normal. This is what I noticed when I checked with my test customer account.

If more than one address is registered in the customer's account (in the current case, there was one local address and one international address), the catalog price rule does not calculate correctly.

For example; If the "specific price" is $10 (for local buyers) and the base price is $20 (for international buyers), it calculates the price at $20 even if the local address is selected in the shopping cart.

In short, when the product is added to the cart, it should be 10$, but since I have defined a 10 percent discount for purchases of 2 or more items, it should be calculated as 9x2=18$, but it is calculated as 18x2=36$

Expected behavior

No response

Steps to reproduce

Add a catalog price rule with 10% discount for 2 or more items. Add a specific price rule in a product for specific country. Add one local and another international address to customer account. Check discounts on cart.

PrestaShop version(s) where the bug happened

8.1.2

PHP version(s) where the bug happened

8.2

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

AureRita commented 9 months ago

Hi @BlacklineCloud ,

Thank you for your report, I reproduce the issue with PrestaShop version 8.1.x, as you can see :

recording(68).webm

I'll add this to the backlog so it can be fixed.

Please be aware that some issues might take a very long time to be resolved. If this one is important to you and you cannot wait for it to be fixed on the project’s own time, we strongly suggest you consider contacting a professional to help you.

If you fix the issue on your end, please contribute it back to the project. Remember that the more people contribute, the better PrestaShop becomes for everyone.

Thank you for your first issue ! This one is clear and we can reproduce the issue on the first try !

On the video, we see that two discount doesn't seems to fit.

Thanks