Yoni.Saadoun Posted November 2, 2016 Share Posted November 2, 2016 Bonjour, Nous avons rajouter des produits en accessoire sur une page produit. Celui-ci s'affiche correctement sous l'onglet 'En savoir plus' ... Mais je voudrais que l'onglet soit automatiquement développer. Actuellement il est obligé de cliquer sur 'accessoire' pour voir le contenu. Est-il possible de les afficher directement sans cliquer dessus. Merci pour votre aide Link to comment Share on other sites More sharing options...
Eolia Posted November 2, 2016 Share Posted November 2, 2016 oui dans le tpl de la page (themes/votre_theme/product.tpl) trouvez la ligne qui ressemble à {if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if} et ajoutez la classe selected Ce qui donne {if isset($accessories) AND $accessories}<li><a href="#idTab4" class="selected">{l s='Accessories'}</a></li>{/if} Link to comment Share on other sites More sharing options...
Yoni.Saadoun Posted November 2, 2016 Author Share Posted November 2, 2016 Merci pour ta réponse rapide. Je ne trouve pas ou je dois changer, voici le contenu de mon block Accessories: {if isset($accessories) && $accessories} <!--Accessories --> <section class="page-product-box accessories"> <h3 class="page-product-heading"><span>{l s='Accessories'}</span></h3> <div class="products_block page-product-content accessories-block clearfix"> <div class="block_content"> <ul id="slider_accessories" class="row" > {foreach from=$accessories item=accessory name=accessories_list} {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) && $accessory.available_for_order && !isset($restricted_country_mode)} {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} <li class="item ajax_block_product col-xs-12 col-sm-4 col-md-3{if $smarty.foreach.accessories_list.first} first_item{elseif $smarty.foreach.accessories_list.last} last_item{else} item{/if} product_accessories_description"> <div class="product_desc"> <a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{$accessory.legend|escape:'html':'UTF-8'}" class="product-image product_image"> <img class="lazyOwl" src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$accessory.legend|escape:'html':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}"/> </a> <div class="block_description"> <a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{l s='More'}" class="product_description"> {$accessory.description_short|strip_tags|truncate:25:'...'} </a> </div> </div> <div class="s_title_block"> <h5 class="product-name"> <a href="{$accessoryLink|escape:'html':'UTF-8'}"> {$accessory.name|truncate:20:'...':true|escape:'html':'UTF-8'} </a> </h5> {if $accessory.show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} <span class="price"> {if $priceDisplay != 1} {displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc} {/if} </span> {/if} </div> <div class="clearfix" style="margin-top:5px"> {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)} <div class="no-print"> <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add")|escape:'html':'UTF-8'}" data-id-product="{$accessory.id_product|intval}" title="{l s='Add to cart'}"> <span>{l s='Add to cart'}</span> </a> </div> {/if} </div> </li> {/if} {/foreach} </ul> <a id="prev-accessories" class="bt prev" href="#"><</a> <a id="next-accessories" class="bt next" href="#">></a> </div> </div> </section> <!--end Accessories --> Link to comment Share on other sites More sharing options...
Yoni.Saadoun Posted November 2, 2016 Author Share Posted November 2, 2016 J'ai trouvé un CSS à changer de Display: none à Display: block Mais je ne trouve pas la ligne non plus Link to comment Share on other sites More sharing options...
Eolia Posted November 2, 2016 Share Posted November 2, 2016 Quelle version Prestashop et quel thème ? Link to comment Share on other sites More sharing options...
Yoni.Saadoun Posted November 2, 2016 Author Share Posted November 2, 2016 Version 1.6, avec un theme acheté Lien vers une page produit: http://visiondesign-opticien.fr/victoria/282-lgr-victoria.html Merci Link to comment Share on other sites More sharing options...
Eolia Posted November 2, 2016 Share Posted November 2, 2016 Ok, sur votre thème c'est géré en javascript et le 1er onglet est ouvert par défaut Il faut donc regarder du côté du fichier product.js ou global.js de votre thème 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