xavyeii Posted June 28, 2013 Share Posted June 28, 2013 Bonjour à tous, J'ai un petit problème d'affichage dans ma liste des produits. J'utilise un thème personnalisé et je suis sous Prestashop 1.4.6.2. Mon problème : La colonne de droite ("prix réduit !", prix, "ajouter au panier", "voir le produit") s'affiche dans la colonne au centre mais ce que je ne comprend pas c'est que ça le fait que pour certains produits ! Mon fichier product-list.tpl et global.css semblent pourtant corrects. product-list.tpl : {if isset($products)} <!-- Products list --> <ul id="product_list" class="clear"> {foreach from=$products item=product name=products} <li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /></a> <div class="center_block"> <div class="product_flags"> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}{if isset($product.online_only) && $product.online_only} ({l s='Online only!'}){/if}</span>{/if} </div> <h3><a class="product_link" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <p class="product_desc"><a class="product_descr" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:400:'...'|strip_tags:'UTF-8'}</a></p> </div> <div class="right_block"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span> {/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if} {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if} <a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {if isset($comparator_max_item) && $comparator_max_item} <p class="compare checkbox"><input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked{/if}/> <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label></p> {/if} </div> </li> {/foreach} </ul> <!-- /Products list --> {/if} global.css : /* ————— product-list.tpl ————— */ ul#product_list {padding:20px 0 0 10px;border-bottom:1px solid #cacaca;} ul#product_list li {height:200px;padding:20px 0;border-top:1px solid #cacaca;} ul#product_list li a.product_img_link {width:130px;height:200px;display:block;float:left;} ul#product_list li a.product_img_link img {margin:35px 0 0 0;} ul#product_list li div.center_block {width:390px;float:left;margin:0 0 0 20px;} ul#product_list li div.center_block div.product_flags {height:26px;} ul#product_list li div.center_block div.product_flags span {height:20px;display:block;float:left;padding:6px 10px 0 10px;font-size:11px;font-weight:bold;text-transform:uppercase;} ul#product_list li div.center_block div.product_flags span.new {margin:0 10px 0 0;background:#dd8551;color:#fff;} ul#product_list li div.center_block div.product_flags span.availability {background:#f5f5f5;color:#333;} ul#product_list li div.center_block h3 {padding:17px 0 0 0;} ul#product_list li div.center_block p.product_desc {padding:13px 0 0 0;} ul#product_list li div.center_block div.right_block {width:120px;float:right;right:-100px;} ul#product_list li div.right_block {width:120px;float:right;} ul#product_list li div.right_block span.on_sale, ul#product_list li div.right_block span.discount {display:block;padding:5px 0 20px 0;} ul#product_list li div.right_block span.price {display:block;padding:5px 0 0 0;} ul#product_list li div.right_block .exclusive {margin:17px 0 5px 0;} ul#product_list li div.right_block p.compare {height:15px;padding:15px 0 0 0;} *+html ul#product_list li div.right_block p.compare input {margin-right:-4px;} Savez-vous d'où cela peut venir ? Merci d'avance. Link to comment Share on other sites More sharing options...
Rom Soul Posted June 29, 2013 Share Posted June 29, 2013 Bonjour Xavyeii, Il doit y avoir du CSS qui coince quelque part, mais ce serait bcp + simple à débuguer si ça pouvait tourner sur un serveur accessible quelque part ! Link to comment Share on other sites More sharing options...
coeos.pro Posted June 30, 2013 Share Posted June 30, 2013 +1 pour la remarque de Rom Soul, avec une URL ce serait plus simple. Link to comment Share on other sites More sharing options...
xavyeii Posted July 2, 2013 Author Share Posted July 2, 2013 Bonjour, Merci de vos réponses. Il est hébergé ici. Je trouve toujours pas la raison... Link to comment Share on other sites More sharing options...
coeos.pro Posted July 2, 2013 Share Posted July 2, 2013 (edited) ok, ça viens des "truncate" tu as certainement un module qui a te permet de mettre en forme les descriptions de catégories, mais ceci met des div, des span le problème avec le truncate ça coupe la chaine les descriptions avec des div et span ouvert et non fermés. Essaye en changeant le {$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'} par {$product.name|strip_tags|truncate:35:'...'|escape:'htmlall':'UTF-8'} Edited July 2, 2013 by coeos.pro (see edit history) Link to comment Share on other sites More sharing options...
xavyeii Posted July 2, 2013 Author Share Posted July 2, 2013 Merci pour la réponse. Hélas cela n'a rien changé. Ce qui est bizarre c'est qu'on voit bien l'erreur de code avec Firebug... Link to comment Share on other sites More sharing options...
coeos.pro Posted July 3, 2013 Share Posted July 3, 2013 tu as forcé la compilation smarty ? vidé le cache smarty ? Link to comment Share on other sites More sharing options...
xavyeii Posted July 3, 2013 Author Share Posted July 3, 2013 Oui Link to comment Share on other sites More sharing options...
coeos.pro Posted July 3, 2013 Share Posted July 3, 2013 il n'y avait qu'une modification à faire et elle n'est pas faite... Dans le fichier http://www.beautyhair.fr/themes/theme296/product-list.tpl : Essaye en changeant le {$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'} par {$product.name|strip_tags|truncate:35:'...'|escape:'htmlall':'UTF-8'} Link to comment Share on other sites More sharing options...
xavyeii Posted July 3, 2013 Author Share Posted July 3, 2013 (edited) Si. Je l'ai remis comme avant vu que ça ne change rien.. Et pour être précis je travaille ici (mais il est hors-ligne, accessible que par adresse ip). Merci. Edited July 3, 2013 by xavyeii (see edit history) Link to comment Share on other sites More sharing options...
coeos.pro Posted July 3, 2013 Share Posted July 3, 2013 Link to comment Share on other sites More sharing options...
xavyeii Posted July 3, 2013 Author Share Posted July 3, 2013 Pour pouvoir répondre à mon problème j'ai modifier le fichier sur le site en ligne. Aucun changement donc. Link to comment Share on other sites More sharing options...
xavyeii Posted July 4, 2013 Author Share Posted July 4, 2013 Up ! svp Link to comment Share on other sites More sharing options...
xavyeii Posted July 14, 2013 Author Share Posted July 14, 2013 Quelqu'un aurai une solution à me présenter svp ? Merci d'avance. Link to comment Share on other sites More sharing options...
Bondaty and Co Posted July 15, 2013 Share Posted July 15, 2013 dans le productlist.tpl après la balise </h3> et avant </li> remplacez tout par: <p class="product_desc"><a class="product_descr" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:400:'...'|strip_tags:'UTF-8'}</a></p> </div> <div class="right_block"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span> {/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{/if} {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if} <a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {if isset($comparator_max_item) && $comparator_max_item} <p class="compare checkbox"><input type="checkbox" class="comparator" id="comparator_item_{$product.id_product}" value="comparator_item_{$product.id_product}" {if isset($compareProducts) && in_array($product.id_product, $compareProducts)}checked{/if}/> <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label></p> {/if} </div> Link to comment Share on other sites More sharing options...
xavyeii Posted July 20, 2013 Author Share Posted July 20, 2013 Merci de la réponse. Néanmoins j'ai remplacé le code comme indiqué et hélas aucune modification visible... J'ai désactivé le cache smarty et forcé la compilation. Je ne désespère pas mais j'aimerai bien comprendre. Merci d'avance 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