Elo062 Posted May 11, 2020 Share Posted May 11, 2020 (Version Prestashop : 1.6.1.23) Bonjour tout le monde, J'ai un problème sur mes fiches produits, le bloc "accessoires" n'apparaît pas. Les produits sensés y être sont bien visibles et disponibles à la vente. J'ai lu que le pb pouvait venir de la page product.tpl donc je la mets en pièce jointe, mais voici plus particulièrement le code concerné : {*if isset($accessories) && $accessories} <!--Accessories --> <div class="accessories_block product_block_container"> <div class="header_title_out"> <h3>{l s='Accessories'}</h3> <p>{l s='Find your unique accessories here.'}</p> </div> <div class="product_content block_content"> <div class="navi"> <a class="prevtab"><i class="arrow_carrot-left"></i></a> <a class="nexttab"><i class="arrow_carrot-right"></i></a> </div> <div class="row"> <div class="accessories_sld"> {foreach from=$accessories item=accessory name=myLoop} {if $smarty.foreach.myLoop.index % 1 == 0 || $smarty.foreach.myLoop.first } <div class="item_out"> {/if} <div class="item"> <div class="left-block"> <a href="{$accessory.link|escape:'html':'UTF-8'}" title="{$accessory.legend|escape:'html':'UTF-8'}" class="img_content"> <img class="img-responsive" src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$accessory.legend|escape:'html':'UTF-8'}" /> </a> </div> <div class="right-block"> <h5> <a class="product-name" href="{$accessory.link|escape:'html':'UTF-8'}"> {$accessory.name|escape:'html':'UTF-8'} </a> </h5> <div class="price-box"> <span class="price fontcustom1"> {if $priceDisplay != 1} {displayWtPrice p=$accessory.price} {else} {displayWtPrice p=$accessory.price_tax_exc} {/if} {hook h="displayProductPriceBlock" product=$accessory type="price"} </span> {hook h="displayProductPriceBlock" product=$accessory type="after_price"} </div> <div class="transfer"> {if ($accessory.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $accessory.available_for_order && !isset($restricted_country_mode) && $accessory.minimal_quantity <= 1 && $accessory.customizable != 2 && !$PS_CATALOG_MODE} {if ($accessory.allow_oosp || $accessory.quantity > 0)} {if isset($static_token)} <a class="exclusive ajax_add_to_cart_button btn btn-default fontcustom1" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$accessory.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart' mod='posfeatureproduct'}" data-id-product="{$accessory.id_product|intval}"> {l s='+ Add to cart' mod='posfeatureproduct'} </a> {else} <a class="exclusive ajax_add_to_cart_button btn btn-default fontcustom1" href="{$link->getPageLink('cart',false, NULL, 'add=1&id_product={$accessory.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart' mod='posfeatureproduct'}" data-id-product="{$accessory.id_product|intval}"> {l s='+ Add to cart' mod='posfeatureproduct'} </a> {/if} {else} <span class="exclusive ajax_add_to_cart_button btn btn-default fontcustom1 disabled"> {l s='+ Add to cart' mod='posfeatureproduct'} </span> {/if} {/if} </div> </div> </div> {if $smarty.foreach.myLoop.iteration % 1 == 0 || $smarty.foreach.myLoop.last} </div> {/if} {/foreach} </div> </div> </div> </div> <!--end Accessories --> Est-ce que quelqu'un voit d'où pourrait venir le pb s'il vous plaît ? Merci d'avance ! Elo product.tpl Link to comment Share on other sites More sharing options...
Eolia Posted May 11, 2020 Share Posted May 11, 2020 Normal le bloc est commenté {* ..... *} enlevez les * (pas les accolades) de début et de fin et vous verrez votre bloc Link to comment Share on other sites More sharing options...
Elo062 Posted May 12, 2020 Author Share Posted May 12, 2020 Super ça fonctionne ! Merci beaucoup 😉 Link to comment Share on other sites More sharing options...
Eolia Posted May 12, 2020 Share Posted May 12, 2020 Oui, je sais^^ 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