Frankie1222 Posted June 30, 2022 Share Posted June 30, 2022 Buongiorno ho un problema al template base di Prestashop 1.7 , il riquadro delle subcategorie mi appare nella pagina, qualcuno Sto arrivando! come rimuoverlo? grazie in anticipo. allego screenshot Link to comment Share on other sites More sharing options...
juanrojas Posted June 30, 2022 Share Posted June 30, 2022 ciao dai un'occhiata a questo Link to comment Share on other sites More sharing options...
Alberto97 Posted June 30, 2022 Share Posted June 30, 2022 (edited) Io sono riuscito a risolvere facendo così: nel file themes/classic/templates/catalog/listing/product-list.tpl ho commentato il seguente codice: {block name='subcategory_list'} {if isset($subcategories) && $subcategories|@count > 0} {include file='catalog/_partials/subcategories.tpl' subcategories=$subcategories} {/if} {/block} Edited June 30, 2022 by Alberto97 (see edit history) Link to comment Share on other sites More sharing options...
Frankie1222 Posted June 30, 2022 Author Share Posted June 30, 2022 Caio Juanrojas , purtroppo il contenuto che hai postato non è visibile. Link to comment Share on other sites More sharing options...
Frankie1222 Posted July 1, 2022 Author Share Posted July 1, 2022 Grazie Alberto97 ho provato a seguire il tuo consiglio ma è esattamente come prima, non è cambiato nulla. Link to comment Share on other sites More sharing options...
Prestachamps Posted July 21, 2022 Share Posted July 21, 2022 Ciao @Frankie1222 Puoi quindi provare a commentare il codice in \themes\classic\templates\catalog\_partials\subcategories.tpl da questo: {if !empty($subcategories)} {if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) } <div id="subcategories" class="card card-block"> <h2 class="subcategory-heading">{l s='Subcategories' d='Shop.Theme.Category'}</h2> <ul class="subcategories-list"> {foreach from=$subcategories item=subcategory} <li> <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if !empty($subcategory.image.large.url)} <img class="replace-2x" src="{$subcategory.image.large.url}" alt="{$subcategory.name|escape:'html':'UTF-8'}" loading="lazy" width="141" height="180"/> {/if} </a> </div> <h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'}</a></h5> {if $subcategory.description} <div class="cat_desc">{$subcategory.description|unescape:'html' nofilter}</div> {/if} </li> {/foreach} </ul> </div> {/if} {/if} a questo: {* {if !empty($subcategories)} {if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) } <div id="subcategories" class="card card-block"> <h2 class="subcategory-heading">{l s='Subcategories' d='Shop.Theme.Category'}</h2> <ul class="subcategories-list"> {foreach from=$subcategories item=subcategory} <li> <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if !empty($subcategory.image.large.url)} <img class="replace-2x" src="{$subcategory.image.large.url}" alt="{$subcategory.name|escape:'html':'UTF-8'}" loading="lazy" width="141" height="180"/> {/if} </a> </div> <h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'}</a></h5> {if $subcategory.description} <div class="cat_desc">{$subcategory.description|unescape:'html' nofilter}</div> {/if} </li> {/foreach} </ul> </div> {/if} {/if} *} Se nessuno dei due funziona, puoi nascondere le sottocategorie aggiungendo questa regola alla fine del file CSS: https://giannino.com/themes/classic/assets/css/theme.css, #subcategories { display: none; } 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