emily_d Posted April 4, 2013 Share Posted April 4, 2013 (edited) Dans la 1.5.4, sur une page produit le montant de la réduction est calculé sur le prix déjà réduit. Par exemple, un produit à 18€ avec une réduction de 10% devrait être de 16,2€. Mais on obtient, 16,38€ la réduction de 10% a été calculé sur 16,2 et pas 18. L'erreur se trouve dans themes\default\js\product.js : if (selectedCombination['specific_price'].reduction_price || selectedCombination['specific_price'].reduction_percent) { reduction_price = (specific_currency ? selectedCombination['specific_price'].reduction_price : selectedCombination['specific_price'].reduction_price * currencyRate); reduction = productPriceDisplay * (parseFloat(selectedCombination['specific_price'].reduction_percent) / 100) + reduction_price; if (reduction_price && (displayPrice || noTaxForThisProduct)) reduction = ps_round(reduction / tax, 6); } else if (product_specific_price.reduction_price || product_specific_price.reduction_percent) { reduction_price = (specific_currency ? product_specific_price.reduction_price : product_specific_price.reduction_price * currencyRate); reduction = productPriceDisplay * (parseFloat(product_specific_price.reduction_percent) / 100) + reduction_price; if (reduction_price && (displayPrice || noTaxForThisProduct)) reduction = ps_round(reduction / tax, 6); } C'est pas productPriceDisplay qu'il faut utiliser mais productPriceWithoutReductionDisplay. Erreur introduite dans ce commit https://github.com/P...be8f0099f1b1da2 Edited May 16, 2013 by emily_d (see edit history) 2 Link to comment Share on other sites More sharing options...
licteur Posted May 2, 2013 Share Posted May 2, 2013 (edited) merci échangé à la ligne 313 et ligne 320 mais il y a un bug encore avec les prix spécifiques Edited May 2, 2013 by licteur (see edit history) Link to comment Share on other sites More sharing options...
emily_d Posted May 16, 2013 Author Share Posted May 16, 2013 A priori, je n'arrive pas à reproduire ce bug dans la version 1.5.4.1. Link to comment Share on other sites More sharing options...
Atch Posted May 16, 2013 Share Posted May 16, 2013 C'est pas productPriceDisplay qu'il faut utiliser mais productPriceWithoutReductionDisplay. Erreur introduite dans ce commit https://github.com/P...be8f0099f1b1da2 Oui le problème est visible quand on utilise un theme < à la 1.5.4.1 !!! Ce qui oblige (Sur Prestashop 1.5.4.1) d'avoir un thème 1.5.4.1 ... Aurons-nous un jour un thème compatible 1.5.x ? V++ Atch Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now