alexper Posted June 10, 2016 Share Posted June 10, 2016 (edited) Ca fonctionnait jusque là, avec 20 références de test. Puis j'ai importé 500 produits via un CSV puis j'ai importé 7 prix spécifiques par produit via des requêtes SQL. Je les vois dans le back office, pour chaque article. Mais rien en front office ! J'ai vidé le cache, forcé la re-compilation, etc. Je n'ai pas touché au code des pages. J'ai vérifié la base de donnée, que les entrées ps_product et ps_specific_price se fassent bien écho. Tout a l'air bon, mais rien ne veut s'afficher. {if (isset($quantity_discounts) && count($quantity_discounts) > 0)} <!-- quantity discount --> <section class="page-product-box"> <!--h3 class="page-product-heading">{l s='Volume discounts'}</h3--> <div id="quantityDiscount"> <table class="std table-product-discounts"> <thead> </thead> <tbody> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'} {$realDiscountPrice=$productPriceWithoutReduction|floatval-$quantity_discount.real_value|floatval} {else} {$realDiscountPrice=$productPriceWithoutReduction|floatval-($productPriceWithoutReduction*$quantity_discount.reduction)|floatval} {/if} <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}" data-real-discount-value="{convertPrice price = $realDiscountPrice}" data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value|floatval}" data-discount-quantity="{$quantity_discount.quantity|intval}"> <td> À partir de {$quantity_discount.quantity|intval*{$dimensionPerBox[spam-filter] {if $productCategory eq 'carrelage' }m²{else if $productCategory eq 'plinthe'}mètre{if $quantity_discount.quantity|intval*{$dimensionPerBox}>1}s{else}{/if}{else}{/if} </td> <td> <span class="prixDiscount">{convertPrice price = $realDiscountPrice / $dimensionPerBox}</span> </td> </tr> {/foreach} </tbody> </table> </div> </section> {/if} Si je commente la première ligne ça me sort un tableau html vide <!-- quantity discount --> <section class="page-product-box"> <!--h3 class="page-product-heading">Remise sur la quantité</h3--> <div id="quantityDiscount"> <table class="std table-product-discounts"> <thead> </thead> <tbody> </tbody> </table> </div> </section> Quelque chose m'échappe, mais quoi ? Edited June 10, 2016 by alexper (see edit history) Link to comment Share on other sites More sharing options...
alexper Posted June 10, 2016 Author Share Posted June 10, 2016 Bon. J'ai un peu honte de clore ce sujet aussi rapidement mais ça s'est remis à marcher très bêtement. J'ai ajouté un nouveau prix spécifique à la main sur un article et tout s'est affiché, sur tous les articles. Après suppression de cet ajout temporaire, tout fonctionne. Il semblerait que l'ajout d'un prix spécifique via le BO lance une sorte d'indexation, alors que l'ajout via SQL, non. 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