Search the Community
Showing results for tags 'Blockcategories'.
-
Hola a todos, Estoy trabajando en la web de un cliente sobre una plantilla de templatemonster. En la plantilla por default muestra todas las categorías y todas las subcategorias en el modulo blockcatgories y este está posicionado en la columna de la izquierda. El problema es que son demasiadas y la mejor opción que veo es solo mostrar las mas importantes. viendo el código que las genera es el siguiente: <li {if isset($last) && $last == 'true'}class="last"{/if}> <a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if}>{$node.name|escape:html:'UTF-8'}</a> {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child last='false'} {/if} {/foreach} </ul> {/if} </li> Yo quiero cambiar en el foreach de las subcategorias que haga algo como "if @count < 5 { que muestre las primeras 5 subcategorias}" y cuando llegue a la 6ta que ya solo me agregue algo como "<li><a href="link de esa categoría padre">Mostrar todas</a></li>". Alguien me podría dar ideas de como empezar a moverle? Estuve pensando en tratar de obtener el id de la categoría en cada iteración del foreach y si el id es el que quiero mostrar que lo haga, si no pues no, pero me gustaría que fuera mas automático como eso de las primeras 5, etc. saludos!
- 2 replies
-
- categorias
- subcategorias
-
(and 1 more)
Tagged with:
-
Witam, W pliku blockcategories.tpl znajdującym się w folderze themes/nazwa_tematu/modules/blockcategories można znaleźć następująca linię kodu: {include file="$branche_tpl_path" node=$child last='true'}. Chciałem się was zapytać w jakim pliku znajdę zmienną branche_tpl_path? Szukam już sporo czasu i niestety nie potrafię jej zlokalizować. Pozdrawiam Patryh111
-
Hello out there, I've been stuck with a problem for days now. I wish to have submenus under my block category to have some left style (CSS). As shown on the image, I want to for better navigation for the customer to get the submenues to expand to the right (unfolding the menu). This is because we have models and then different models to each model. In fact it is pretty easy to style, if I had the class of the 'ul' - but since the 'ul' list dont have a class name I cannot style it. So maybe someone knows how to make a class for this level of the menu? Regards Benjamin
-
- blockcategories
- css
-
(and 2 more)
Tagged with:
-
Hello. Theres a problem only on homepage of the shop we were building for client. In the blockcategories menu theres an item with id 151, which was earlier deleted and doesnt exist in database nor backend category hierarchy. Fun fact is, that on the category id 148 doesn't show. These two had the exact name and I think maybe its something with alug and rewrites, but cleared cache should fix that. But when you enter any category or product page, categories are then fine. I cleared the cache many times and have no idea where to look at. The shop is at http://naturaltop.pl
-
Bonjour impossible d'ajouter et activer le module BlockCategories quand je clic sur installation j'ai ce message, Que faire ? Merci de votre aide si vous avez une idée [PrestaShopDatabaseException] Duplicate entry '343-1' for key 'PRIMARY' INSERT INTO `ps_tab_lang` (`id_tab`, `name`, `id_lang`) VALUES ('343', 'BlockCategories', '1') at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 790. if ($sql) { 791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 792. } 793. 794. throw new PrestaShopDatabaseException($this->getMsgError()); 795. } 796. }
-
- blockcategories
- categories
-
(and 3 more)
Tagged with:
-
I'm running PrestaShop 1.5.2 and have more than 3,000 products in the shop. Recently, the cache has been growing out of control and has taken down the site twice and I've had to turn it off. It grows to about 12GB and then kills the site until the contents of the cache folder are deleted. I found a post about a similar issue here: http://www.prestashop.com/forums/topic/176681-slow-blockcategoriestpl/ I followed the directions and changed the blockcategories files, but the problem still exists. It seems to be more ADTM files than blockcategories. My Performance settings are: Smarty: Never recompile, Cache off (was on until last night) CCC: CCC for CSS, CCC for Javascript, minify HTML, compress inline Javascript, Keep W3C Validation, Appache optimization is off (CCC needs to be on or the pages are broken Caching: off (not available on my hosting server) Anyone have any ideas/solutions for this problem?
- 8 replies
-
- cache
- blockcategories
-
(and 1 more)
Tagged with:
-
Hello. I'm trying to get only subcategories of selected category. I have this code in category-tree-branch.tpl {foreach $node.id as $value} {if $value == $currentCategoryId} <li> <a id="cat-{$node.id}" href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} <span class="numbers-prod-count">({$node.products})</span></a> {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {include file=$branche_tpl_path_sub node=$child last='false'} {/foreach} </ul> {/if} </li> {break} <li> <a id="cat-{$node.id}" href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} <span class="numbers-prod-count">({$node.products})</span></a> </li> {/if} {/foreach} I can see right the 3th level subcategory if I click on 2nd level category, but i'm unable to see other categories. See screenshots attached. Thank you.
-
Hi I am trying to make a change to the blockcategories menu. As for now the currently active category link ( li > a ) gets "class=selected". This is the original code from category-tree-branch.tpl: <a href="{$node.link|escape:'html':'UTF-8'}"{if isset($currentCategoryId) && $node.id == $currentCategoryId} class="selected"{/if} title="{$node.desc|strip_tags|trim|escape:'html':'UTF-8'}"> {$node.name|escape:'html':'UTF-8'} </a> What I am trying to achieve is to have EVERY parent category of the current category also get a "class=selected" or similar. (I have a 4-level deep category tree) I already found a snippet of code in this forum and currently have changed the above code to this: <a href="{$node.link|escape:'html':'UTF-8'}"{if isset($currentCategoryId) && $node.id == $currentCategoryId} class="selected"{/if} {foreach from=$node.children item=child name=categoryTreeBranch}{if $child.id == $currentCategoryId}class="selected-parent"{/if}{/foreach} title="{$node.desc|strip_tags|trim|escape:'html':'UTF-8'}"> {$node.name|escape:'html':'UTF-8'} </a> (so I added the part with foreach...) This gives me a "class=selected-parent" on the DIRECT parent category, which is already quite nice and close to what I want to achieve. The only thing I would like to change, is that EACH and EVERY parent category above my current category is marked with "class=selected-parent", not only the direct parent. Can anyone point me in the right direction on how I should change this part of the code...? {foreach from=$node.children item=child name=categoryTreeBranch}{if $child.id == $currentCategoryId}class="selected-parent"{/if}{/foreach} Thanks very much.
- 1 reply
-
- blockcategories
- parents active
- (and 7 more)
-
Hi There, I have got many categories and subcategories on my shop. I have duplicated the Category Block several times to have a different Category module for each category, and to fit in each module its subcategories. What I would like to do is, when we are on a category page, to hide all the other category blocks which are not related to this category, so the result would be that only the category module with subcategories will be visible in that category page. This shop is an example http://www.ferrshop.com/ I have found other topics about hiding categories or subcategories, but they work for one category block, for example: this code {if$node.id ! =1} hides a category but within the same category block. What I need is to hide the full category block. I am using version 1.5.4 of Prestashop. Thanks in advance for your help.
-
Please help me. I'm using Prestashop 1.6. I want to display a certain/specific subcategory as the main category in my Categories Block. For example: This is my current category tree: Products <--------------root category Shop by Category <----------category under Products Fountain Pens <-------------- category under Shop by Category 2000 <--------------------------- category under Fountain Pens And I want this: Fountain Pen <-----------first category to show 2000 <--------------------- category under Fountain Pen Just like that. Please help. I want to remove root and specific parent category in Categories block.
- 6 replies
-
- blockcategories
- subcategory
- (and 4 more)
-
Witam, Może ktoś mi podpowie jak wyróżnić (np. pogróbić) wybrane pozycje w bloku kategorii? Chodzi oczywiście o drzewo kategorii w panelu bocznym. Z góry dziękuję
-
- blockcategories
- lista
-
(and 1 more)
Tagged with:
-
Hi, I have upgraded my store recently to 1.6.0.9 from 1.6.0.6 using One Click Upgrade module. We have created a new theme also. I have overridden template of some basic modules like blockcategories. Now under home page modules work perfectly with overridden template but its not working on other pages. It was working fine but it didn't after I rest the module. I noticed this issue with socialsharing, contact info. I didn't check with other modules because I am afraid to do it.
-
Bonjour, je dispose d'un site prestashop pas compliqué, avec des catégories et des sous-catégories. Lorsque je clique sur une catégorie, j'obtiens bien mes sous categories en page centrale et la liste des sous catégories dans la colonne de gauche. Mais quand je clique sur une sous categorie pour afficher les produits, la liste des sous catégories dans la colonne de gauche disparaît ! Du coup, pour aller voir les produits des autres sous catégories, il faut faire "précédent", attendre que la page recharge, cliquer... bref pas très ergonomique tout ça. Je voudrais donc que, quand on est dans une sous catégorie, la liste des sous catégories dans la colonne de gauche reste visible. Je pense qu'il faut modifier le blockcategories.tpl mais je n'y connais rien en smarty. Quelqu'un a une idée du bout de code à ajouter pour que cela fonctionne comme je le souhaite ? Merci d'avance de votre aide Greg
-
Buenas comunidad! Tengo un problema que por más que busco no logro encontrar la solución ni por internet ni leyendo y releyendo los ficheros php y tpl Tengo puesto el bloque de categorías básico que viene por defecto en prestashop con la opción dinamizada. Cuando entro al home aparecen todas las categorías de primer nivel contraídas. Cuando entro en cualquier categoría, aparece esa categoría desplegada en el bloque. Lo que quiero es que en el home aparezca por defecto la primera categoría y subcategoría desplegadas como si fuera una categoría más. Pongo un ejemplo, Cuando entro al home se ve así: - Informática - Redes - Software - Mantenimiento Lo que busco es que aparezca así (como aparece cuando entro en componentes): -Informática - Componentes - Memorias - Placas base ...... - Perifericos - Merchandising ...... - Redes - Software - Mantenimiento Espero haberme explicado bien. Entiendo que si cuando entras en una categoría lo hace, debe existir alguna forma de decírselo para que lo haga también en el home. Supongo, por lógica, que debo consultar de alguna forma si si estoy en el home o dentro de alguna categoría y con un if si estoy en el home igualar el id de la categoría a la de componentes para que haga esa rutina, pero no se cómo ni dónde hacerlo. Muchas gracias de antemano. Un saludo.
- 4 replies
-
- blockcategories
- menu
-
(and 3 more)
Tagged with:
-
Witam ponownie, mam pytanie dotyczące poziomów menu w blockcategories. Otóż menu jest skonfigurowane tak aby wyświetlać maksymalnie 3 poziomy menu w stylu: UBIORY (kategoria główna) + Dla Pań (subkategoria #1) + Sukienki (subkategoria #2) W jaki sposób wyświetlić (w panelu jest dodana) subkategorię dla Sukienki ? CSS wygląda następująco: #categories_block_left{padding-bottom:0!important;} div#categories_block_left ul.tree{padding:0;} div#categories_block_left ul.tree li{font-size:17px;font-weight:normal;line-height:13px;padding-bottom:12px;padding-top:12px;text-align:left;} div#categories_block_left ul.tree li a{padding-left:15px;margin-left:5px;} div#categories_block_left ul.tree li.last{background:none;border-bottom:none;} div#categories_block_left ul.tree li ul{margin-top:12px;padding-bottom:0;} div#categories_block_left ul.tree li ul li{font-size:16px;font-weight:normal;} div#categories_block_left ul.tree li ul li a{margin-left:15px;} div#categories_block_left ul.tree li ul li ul li a{margin-left:25px;} div#categories_block_left ul.tree li ul li.last{padding-bottom:0;} div#categories_block_left ul.tree li ul li ul li{font-size:14px;} div#categories_block_left ul.tree a{padding-left:0;} div#categories_block_left ul.tree a:hover{text-decoration:none;} div#categories_block_left span.grower{display:block;float:right;background-position:0 5px;background-repeat:no-repeat;width:9px;height:15px;margin:0 0 0 -12px!important;margin:0 0 0 -8px;padding:0 5px 0 0;cursor:pointer;} #productscategory_list img:hover{opacity:0.8} Czy wystarczą zmiany jedynie w CSS czy będą również potrzebne zmiany w plikach modułu ?
-
Bonjour, Lorsque le blockcategories est positionné sur la colonne gauche en 1er élément, il n'est pas aligné avec les éléments de la colonne centrale : Si on place par exemple le block "Nos magasins", l'alignement est correct. Comment supprimer cet espace/marge avant le blockcategories ? Merci ! Alex
-
- espace
- blockcategories
-
(and 3 more)
Tagged with:
-
Hello all, Having trouble with the blockcategories on the new 1.6 When ever I login the header of the module changes from "HOME" to the name of subject number 5, which it highlights aswell.. As soon as I log out it returns to normal Any ideas?? Kind regards, Lau
- 2 replies
-
- login
- categories
-
(and 2 more)
Tagged with:
-
blockcategories Hola busco poder ocultar las subcategorias que no pertenescan a la categoria seleccionada. ejemplo: 1 si tengo el menú 1 AAAAA --1.1 AA --1.2 AAA 2 BBBB --2.1 BB --2.2 BBB 3 CCC --3.1 CC --3.2 CCC y se elige la opción 3 CCC solo desplegar 3 CCC --3.1 CC --3.2 CCC encontré esta documentación pero provoca que el servidor apache consuma el 99% de memoria del servidor. esto es para la version 1.5.6.2 http://www.prestashop.com/forums/topic/144892-module-blockcategories-modifie-pour-nafficher-que-la-categorie-mere-de-la-categorie-active/page-2?do=findComment&comment=1366779 alguna idea?
-
Hi guys, Need help! How can I removed the closed category tree and its subcategories as well? For example:- Parent Category A - Sub category A1 - Sub category A2 - Sub category A3 - Sub category A4 Parent Category B - Sub category B1 - Sub category B2 <---eg. if this category is selected, it will automatically hide Parent Category A, Parent Category B along with their subcategories as well - Sub category B3 Parent Category C - Sub category C1 - Sub category C2 - Sub category C3 - Sub category C4 - Sub category C5 How can i do that? Right now my category-tree-branch.tpl looks like this <li class="menu-{$node.id} {if $last == 'true'}last{/if}"> <a href="{$node.link|escape:html:'UTF-8'}" {if $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {if $smarty.foreach.categoryTreeBranch.last} {include file=$branche_tpl_path node=$child last='true'} {else} {include file=$branche_tpl_path node=$child last='false'} {/if} {/foreach} </ul> {/if} </li>
-
Hi, I am unable to find the css for the categories menu (blockcategories module), where I want to change so that on a:hover the background color of the <td> changes, or at least the color of the text. By default, a:hover in the sub menues seem to be light gray, as per the attached screenshot. I just cannot find this in the global.css or anywhere else. Any help appreciated. Thanks. /Jens
- 6 replies
-
- blockcategories
- module
-
(and 1 more)
Tagged with:
-
Bonjour à tous, J'utilise le bloc catégories (et la version 1.5.3.1 de Prestashop) pour mon futur site. Par défaut, les sous-catégories se déploient lorsque l'on clique sur la catégorie parente. J'aimerais qu'elles se déplient au survol. J'ai cherché sur le forum mais je ne vois pas la solution. J'imagine qu'il va falloir mettre un onmouseover dans blockcategories.tpl, ou quelque chose comme ça, non ? Si quelqu'un a une idée, ça m'aiderait beaucoup ! Merci
- 15 replies
-
- blockcategories
- bloc categories
-
(and 4 more)
Tagged with:
-
We have a blockcategories menu with about 400 categories total including all the subcategories, and this is creating too many links on each of our page, resulting in not-optimal onpage SEO. I want to add rel="nofollow" and some Javascript to all links except the root and the selected category and it's children and siblings. Example: - Subcategory A (Root, dofollow) - Subcategory A-1(Sibling of selected, dofollow) - Subcategory A-2 (Selected, dofollow) - Subcategory A-2-a (Child of selected, dofollow) - Subcategory A-2-b (Child of selected, dofollow) - Subcategory A-2-c (Child of selected, dofollow) - Subcategory A-3 (Sibling of selected, dofollow) - Subcategory B (Root, dofollow) - Subcategory B-1 (Nofollow) - Subcategory B-2 (Nofollow) - Subcategory B-2-a (Nofollow) - Subcategory B-2-b (Nofollow) - Subcategory B-3 (Nofollow) - Subcategory C (Root, dofollow) - Subcategory D (Root, dofollow) I have been successful with Selecting the Root, the Selected and the Children of the selected. However I've been unsuccessful with selecting the Siblings of the selected (That share the same Parent). How do I Select the Siblings of the Selected Category within the Blockcategories .tpl files?
- 1 reply
-
- Smarty
- blockcategories
-
(and 2 more)
Tagged with:
-
Buenos días, Tengo un problema con el módulo blockcategories. El problema es que en chrome y firefox funciona correctamente pero en internet explorer no. La web es catalinalunares.com y es el menú desplegable de la izquierda. El problema está en que cuando pulsamos en internet explorer, en la primera categoría encima de el texto no despliega. En cambio si pulsamos en el mismo recuadro sin tocar el texto, si despliega. En Chrome aparece como si fuese un botón todo entero, por lo que despliega perfectamente. El texto no aaprece seleccionable. Me da igual si el texto es seleccionable o no, pero lo que intento es que despliegue siempre cuando pulsemos en cualquier lugar del botón en internet explorer...¿Alguien me puede ayudar? Un saludo y muchas gracias, Carlos
- 1 reply
-
- blockcategories
- categorías
-
(and 1 more)
Tagged with:
-
Warning: I'm terrible at php and really new to prestashop as well, this is in no way a good solution and i CANNOT guarantee either functionality or that it won't break anything anywhere else. This being said, I have seen this asked a bunch of times and never answered, so i hope this can be useful to someone. I needed it for a shop with just a few products, where the customer wasn't satisfied with only the productscategory module way of displaying the products. Adding products to the category-tree-branch for the product page in blockcategories module, quick and dirty: find blockcategories.php in modules/blockcategories and add if (Tools::isSubmit('id_product')) { if (isset($params['category']->id_category)) $category = $params['category']; else { if (isset($product->id_category_default) AND $product->id_category_default > 1) $category = New Category((int)($product->id_category_default)); } if (!Validate::isLoadedObject($product) OR !$product->active) return; $categoryProducts = $category->getProducts($this->context->language->id, 1, 100); /* 100 products max. */ $this->smarty->assign(array( 'categoryProducts' => $categoryProducts)); } right after $idProduct = (int)(Tools::getValue('id_product')); $product = new Product((int)($idProduct)); (should be around line 220) then find category-tree-branch.tpl in [YOUR_THEME]/modules/blockcategories and add: {if isset($currentCategoryId) && $node.id == $currentCategoryId && $page_name == 'product'} <ul> {foreach from=$categoryProducts item='categoryProduct' name=categoryProduct} <li><a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)}" title="{$categoryProduct.name|htmlspecialchars}">{$categoryProduct.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</a></li> {/foreach} </ul> {/if} right after <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a> (should be around line 27) Let me know if it works, or what horrible sins i have commited with this
-
Buenos días, Necesito meter un link de CMS que ya tengo definido después de la última categorías de productos que tengo definida (ver imagen). Manualmente en el blockcategories.tpl he probado después del foreach lo siguiente: <ul> <li><a href="{$link->getCMSLink('1', 'otros')}" title="{l s='Otros'}">{l s='Otros' mod='blockcategories'}</a></li> </ul> No funciona, no muestra nada. Que tengo que hacer ? Gracias!