Prestashop 1.6 Product Showing wrong price combination when using specific price discount

和自甴很熟 提交于 2020-01-07 02:01:11

问题


How to repeat:

  1. install prestashop 1.6.1.4

  2. create a product JEANS - Wholesale price 53.87, Retail price 74.82 (Allow orders When out of stock, No Tax)

  3. add specific price discount of 28% to JEANS

  4. add product combinations - in my case I want the client to choose a size and a color: Size - 29W x 30L, Color - Bleach Fade and Size - 29W x 30L, Color - Buff, both with a Wholesale price: 29.9, and Impact 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!