neoweiter Posted March 23, 2015 Share Posted March 23, 2015 Bonjour, Je viens de faire une mise à jour de PS 1.6.0.11 vers 16.0.14, et je remarque le bug/problème suivant : Une réduction de 0,00€ s'applique systématiquement à mes produits dans le panier. Je n'ai aucune réduction, ou de regle panier configurée dans mon CMS. Cette réduction n'a aucun lieu d'être, et n’apparaît pas dans la liste et fiche produit Quelqu'un pourrait m'aider avec ceci ? Merci d'avance Thomas Link to comment Share on other sites More sharing options...
jcl17 Posted March 23, 2015 Share Posted March 23, 2015 Bonjour, Même problème constaté sur mon site : merci de vos réponses. Jean-Claude Link to comment Share on other sites More sharing options...
neoweiter Posted March 24, 2015 Author Share Posted March 24, 2015 Selon moi c'est encore un bug. Quelqu'un a une idée de comment retirer cette promotion ? merci Link to comment Share on other sites More sharing options...
jcl17 Posted March 24, 2015 Share Posted March 24, 2015 tout à fait d'accord up ! up ! up ! merci. Link to comment Share on other sites More sharing options...
neoweiter Posted April 7, 2015 Author Share Posted April 7, 2015 Toujours rien ? Link to comment Share on other sites More sharing options...
neoweiter Posted April 7, 2015 Author Share Posted April 7, 2015 Ok j'ai trouvé ceci : http://www.commentcamarche.net/forum/affich-25949162-prestashop-et-les-pourcentages-de-reduction Donc dans shopping-cart-product-line.tpl j'ai été rajouter && $product.e_pourcentage > 0 dans la condition ligne 56, 58 et 60 Link to comment Share on other sites More sharing options...
jcl17 Posted April 7, 2015 Share Posted April 7, 2015 Merci pour ta réponse, ne connaissant pas très bien le langage peux-tu m'indiquer là ou on met les conditions : {if !$priceDisplay} {if isset($product.reduction_type) && $product.reduction_type == 'amount'} {assign var='priceReduction' value=($product.price_wt - $product.price_without_specific_price)} {assign var='symbol' value=$currency->sign} {else} {assign var='priceReduction' value=(($product.price_without_specific_price - $product.price_wt)/$product.price_without_specific_price) * 100 * -1} {assign var='symbol' value='%'} {/if} {else} {if isset($product.reduction_type) && $product.reduction_type == 'amount'} {assign var='priceReduction' value=($product.price - $product.price_without_specific_price)} {assign var='symbol' value=$currency->sign} {else} {assign var='priceReduction' value=(($product.price_without_specific_price - $product.price)/$product.price_without_specific_price) * 100 * -1} {assign var='symbol' value='%'} {/if} {/if} {if $symbol == '%'} {$priceReduction|round|string_format:"%d"}{$symbol} {else} {$priceReduction|string_format:"%.2f"}{$symbol} {/if} jc Link to comment Share on other sites More sharing options...
neoweiter Posted April 8, 2015 Author Share Posted April 8, 2015 Remplace le code de la ligne 50 à 89 par ceci <td class="cart_unit" data-title="{l s='Unit price'}"> <span class="price" id="product_price_{$product.id_product}_{$product.id_product_attribute}{if $quantityDisplayed > 0}_nocustom{/if}_{$product.id_address_delivery|intval}{if !empty($product.gift)}_gift{/if}"> {if !empty($product.gift)} <span class="gift-icon">{l s='Gift!'}</span> {else} {if !$priceDisplay} <span class="price{if isset($product.is_discounted) && $product.is_discounted && $product.e_pourcentage > 0} special-price{/if}">{convertPrice price=$product.price_wt}</span> {else} <span class="price{if isset($product.is_discounted) && $product.is_discounted && $product.e_pourcentage > 0} special-price{/if}">{convertPrice price=$product.price}</span> {/if} {if isset($product.is_discounted) && $product.is_discounted && $product.e_pourcentage > 0} <span class="price-percent-reduction small"> {if !$priceDisplay} {if isset($product.reduction_type) && $product.reduction_type == 'amount'} {assign var='priceReduction' value=($product.price_wt - $product.price_without_specific_price)} {assign var='symbol' value=$currency->sign} {else} {assign var='priceReduction' value=(($product.price_without_specific_price - $product.price_wt)/$product.price_without_specific_price) * 100 * -1} {assign var='symbol' value='%'} {/if} {else} {if isset($product.reduction_type) && $product.reduction_type == 'amount'} {assign var='priceReduction' value=($product.price - $product.price_without_specific_price)} {assign var='symbol' value=$currency->sign} {else} {assign var='priceReduction' value=(($product.price_without_specific_price - $product.price)/$product.price_without_specific_price) * 100 * -1} {assign var='symbol' value='%'} {/if} {/if} {if $symbol == '%'} {$priceReduction|round|string_format:"%d"}{$symbol} {else} {$priceReduction|string_format:"%.2f"}{$symbol} {/if} </span> <span class="old-price">{convertPrice price=$product.price_without_specific_price}</span> {/if} {/if} </span> </td> Mon collègue a également réussi a retirer ce problème de réduction pour la plupart des produits, sans devoir remplacer ce code. Je vais lui demander comment il à fait. Il reste des produits résiduels pour lesquels les réductions persistaient, d'où l'utilité de ce code. On s'est rendu compte que la réduction était un bug lié à l'arrondi des prix TVAC. si tu changes ta règle d'arrondis dans les paramètres de Presta, tu verras que les réductions peuvent disparaitre. Link to comment Share on other sites More sharing options...
jcl17 Posted April 8, 2015 Share Posted April 8, 2015 Un grand merci, cela fonctionne. jc 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