fumagare Posted August 5, 2016 Share Posted August 5, 2016 I have a problem on the site it shows No subcategories of products, already checked that option to "show / hide subcategories" that exists in most settings it's all right. I do not know WHAT more can be, someone help me? website link http://www.paixaocameras.com.br/ Link to comment Share on other sites More sharing options...
endriu107 Posted August 5, 2016 Share Posted August 5, 2016 Check in file category.tpl if is there any code of subcategories. Link to comment Share on other sites More sharing options...
fumagare Posted August 5, 2016 Author Share Posted August 5, 2016 Check in file category.tpl if is there any code of subcategories. more sorry I do not know much about programming. The file you said (category.tpl) is within the theme right prestaphop folder? I opened this file and not found anything talking about subcategory. this is the contents of the file "category.tpl": ---------------------------------------------------------------------------------------------------------------------------- {* * 2007-2015 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2015 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {include file="$tpl_dir./errors.tpl"} {if isset($category)} {if $category->id AND $category->active} {if $products} {include file="$tpl_dir./sub/product/product-list-form.tpl"} {/if} {elseif $category->id} <p class="alert alert-warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} ----------------------------------------------------------------------------------------- can you help me please? Link to comment Share on other sites More sharing options...
endriu107 Posted August 5, 2016 Share Posted August 5, 2016 This is all code from this file? If it is try switch it to this code: {* * 2007-2015 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.or...ses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2015 PrestaShop SA * @license http://opensource.or...ses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {include file="$tpl_dir./errors.tpl"} {if isset($category)} {if $category->id AND $category->active} {if isset($subcategories)} {if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) } <!-- Subcategories --> <div id="subcategories"> <p class="subcategory-heading">{l s='Subcategories'}</p> <ul class="clearfix"> {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 $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/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}</div> {/if} </li> {/foreach} </ul> </div> {/if} {/if} {if $products} {include file="$tpl_dir./sub/product/product-list-form.tpl"} {/if} {elseif $category->id} <p class="alert alert-warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} Link to comment Share on other sites More sharing options...
fumagare Posted August 5, 2016 Author Share Posted August 5, 2016 I did something here that worked: I took the file "category.tpl" another theme and replace the file that was giving trouble, and apparently solved the problem. What I did is wrong? this may give problem or can I use so often? Link to comment Share on other sites More sharing options...
endriu107 Posted August 5, 2016 Share Posted August 5, 2016 It is better not switch all file but just add code to display subcategories. Sometimes themes using different files to show something on shop, so for you it will be better to try my code frome previous post. 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