shopware icon indicating copy to clipboard operation
shopware copied to clipboard

SwagCustomizedProducts Plugin Pricing Issue

Open shopwareBot opened this issue 2 years ago • 3 comments

Used Shopware Version: 6.5.5.0

The SwagCustomizedProducts plugin offers the capability to modify option prices based on rules defined in the Rule Builder. Here's the scenario we've identified:

We have a product named "Test Product" with three options: Option #1, Option #2, and Option #3. Each of these options has three advanced pricing rules, as shown in the attached screens labeled "Option 1," "Option 2," and "Option 3."

If the "Test Product" is in the cart with a quantity of less than 50, the option price is set to PLN 3 (See attached screen "0-50" for rule configuration). If the "Test Product" is in the cart with a quantity of less than 100 and greater than or equal to 50, the option price is set to PLN 2 (See attached screen "50-100" for rule configuration). If the "Test Product" is in the cart with a quantity of less than 300 and greater than or equal to 100, the option price is set to PLN 1 (See attached screen "100-300" for rule configuration).

Examples of correct behavior:

If "Test Product" is in the cart with a quantity of 20, and options 1 and 3 are selected, the price per option is correctly calculated as PLN 3 (See attached screen "product with option 1 and 3"). If "Test Product" is in the cart with a quantity of 120, and options 2 and 3 are selected, the price per option is correctly calculated as PLN 1 (See attached screen "product with option 2 and 3").

Issue:

However, if the cart contains "Test Product" with a quantity of 20 (options 1 and 3 selected) and a second "Test Product" with a quantity of 120 (options 2 and 3 selected), the price for option 3 is calculated as PLN 2, which is incorrect (See attached screen "both products"). Option 1 and option 2 seems to be calculated right for the quantity of line item.

Here is link for the video with our configuration: https://drive.google.com/file/d/12Bdd1ax_I_37mXnjAU1Kr-P2-NqAPGHQ/view?usp=drive_link

As I tried different approaches I found where the issue is. So a little bit about the config. Every option has defined 3 Advanced Pricing for different quantity of product: 0-50: PLN 3, 50-100: PLN 2, 100-300: PLN 1.

On the last section of the video it appears that the Option #1 and Option #2 have both good price for line item and only incorrect is Option #3 (which shows PLN 2). But in reality it takes the first row of advanced pricing (which for option #3 looks like on "option 3.png" file). When I edited Option #1 and make the first row 50-100 (just like in Option #3), then the price was displayed as PLN 2.

shopwareBot avatar Aug 14 '24 08:08 shopwareBot

[public] Automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/CUS-657.

[created from CUS-657, comment 484959]

shopwareBot avatar Aug 14 '24 08:08 shopwareBot

This issue was resolved by https://github.com/shopware/shopware/issues/9125

nguyenytran avatar Aug 15 '25 00:08 nguyenytran