问题
How to repeat:
install prestashop 1.6.1.4
create a product JEANS - Wholesale price 53.87, Retail price 74.82 (Allow orders When out of stock, No Tax)
add specific price discount of 28% to JEANS
add product combinations - in my case I want the client to choose a size and a color:
Size - 29W x 30L, Color - Bleach Fade
andSize - 29W x 30L, Color - Buff
, both with aWholesale price
: 29.9, andImpact on price
-Decrease
33.29
result:
when I go to product page, if I choose the first combination
Size - 29W x 30L, Color - Bleach Fade
I get the price 29.9, which is what I expect.
BUT when I choose the second option
Size - 29W x 30L, Color - Buff
I get price $53.87 instead of the 29.9 I expected.
NOTE: when I add the product to the cart then it calculate the correct price (29.9) for both combination - thus this bug is only in the product display
How can I fix this?
I assume this is a bug in the code so any code fix will be welcome.
Background:
I'm upgrading my site from PrestaShop™ 1.4.5.1 to 1.6.1.4, I have a complicated site with a lot of proprietary code, however this scenario is not reproducible in the 1.4.5.1, i.e. repeating the same steps result with a correct price (29.9) in the second product.
Note: this is a minimized version of the bug, in a real product I have more combinations, some with the real '74.82' price.
回答1:
Apply this fix to correct the problem:
https://github.com/PrestaShop/PrestaShop/commit/56fe9925c2703ba07d13b6ba56a92494d38ba45e
replace the file in this fix with your prestashop installation
Note: if you are not using the default theme than copy the new tpl to your theme folder.
来源:https://stackoverflow.com/questions/37158790/prestashop-1-6-product-showing-wrong-price-combination-when-using-specific-price