AlCh Posted September 20, 2015 Share Posted September 20, 2015 Bonjour, C'est mon premier post ici. Il me semble qu'il y un problème avec l'affichage des réductions de groupe dans PrestaShop 1.6.1.1 pendant le choix d'une déclinaison. Le prix affiché mis à jour par Ajax n'est pas juste. Il ne prend pas en compte la réduction de groupe. Je propose une correction. Voici mon product.js à partir de la ligne 700: if (combination.specific_price && combination.specific_price.reduction > 0) { if (combination.specific_price.reduction_type == 'amount') { if (typeof combination.specific_price.reduction_tax === 'undefined' || (typeof combination.specific_price.reduction_tax !== 'undefined' && combination.specific_price.reduction_tax === '1')) { var reduction = combination.specific_price.reduction; if (typeof specific_currency !== 'undefined' && specific_currency && parseInt(combination.specific_price.id_currency) && combination.specific_price.id_currency != currency.id) reduction = reduction / currencyRate; else if(!specific_currency) reduction = reduction * currencyRate; priceWithDiscountsDisplay -= reduction; // We recalculate the price without tax in order to keep the data consistency priceWithDiscountsWithoutTax = priceWithDiscountsDisplay - reduction * ( 1/(1+taxRate/100) ); } } } if ( typeof groupReduction !== 'undefined' && groupReduction > 0) { priceWithDiscountsDisplay *= ( 1 - parseFloat(groupReduction) ); priceWithDiscountsWithoutTax = priceWithDiscountsDisplay/(1+taxRate/100) ; } Cela semble fonctionner, jusqu'ici. J'espère que c'est correct et que ça aidera. Cordialement, AC product.js.txt 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