victorgomez36 Posted October 20, 2013 Share Posted October 20, 2013 Hola, he instalado un tema nuevo hace un mes y no se si he hecho algo raro porque cuando a través del árbol de categorías, pinchas en una principal, te manda a una pagina donde salen todos los artículos de esa categoría y no se como poner la clasificación de subcategorias para poder guiar al cliente en la seleccion. Por ejemplo: La pagina es esta: www.mueblesdebañoweb.es si pinchas en la categoria de "ACCESORIOS DE BAÑO" te salen TODOS los que hay, sin embargo se puede ver que la categoria tiene subcategorias y me gustaria presentarlas en la pagina de la CATEGORIA para que la gente no se lie. No se si esto mismo es un lio. pero espero haberme explicado bien. P.D.: el tema original esta aqui http://demo.templatin.com/switcher/?theme=megashop Podeis ver que ese lo hace bien. Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Lo primero de todo es que ve que tienes en activado el modulo llamado "Navegacion por facetas", por lo que si no quieres que te presente todos los productos las subcategorias en la categoria principal a la que pertenece las 'x' subcategorias, tienes que ir a la pestaña modulos -> modulos, y en la configuración del modulo: Bloque navegación por facetas señalar: Mostrar productos de subcategorías => NO --- Lo segundo, dime si en el fichero: category.tpl de tu plantilla, tienes algo asi: {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li class="clearfix"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} </li> {/foreach} </ul> <br class="clear"/> </div> {/if} y no esta comentado. Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 En Navegacion por Facetas, si pongo NO, no aparecen los articulos, le tengo puesto SI para que salga algo almenos, como no me san las subcegorias, al menos salen los articulos. ahora lo he puesto en NO por si quieres verlo. El archivo category.tpl que tengo es este: * 2007-2013 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-2013 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./breadcrumb.tpl"} {include file="$tpl_dir./errors.tpl"} {if isset($category)} {if $category->id AND $category->active} <h1> {strip} {$category->name|escape:'htmlall':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'htmlall':'UTF-8'} {/if} {/strip} </h1> <div class="resumecat category-product-count"> {include file="$tpl_dir./category-count.tpl"} </div> {if $scenes || $category->description || $category->id_image} <div class="content_scene_cat"> {if $scenes} <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {else} <!-- Category image --> {if $category->id_image} <div class="align_center"> <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> </div> {/if} {/if} {if $category->description} <div class="cat_desc"> <p>{$category->description}</p> </div> {/if} </div> {/if} {if $products} <div class="content_sortPagiBar"> <div class="PagiNbr clearfix"> {include file="$tpl_dir./pagination.tpl"} {include file="./nbr-product-page.tpl"} </div> <div class="sortPagiBar clearfix"> {include file="./product-compare.tpl"} {include file="./product-sort.tpl"} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar clearfix"> {include file="./pagination.tpl"} </div> {/if} {elseif $category->id} <p class="warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Pues vaya kaka no tienes este codigo: {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li class="clearfix"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} </li> {/foreach} </ul> <br class="clear"/> </div> {/if} añadelo despues de esto: {if $category->description} <div class="cat_desc"> <p>{$category->description}</p> </div> {/if} </div> {/if} Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 (edited) Pues vaya kaka no tienes este codigo: {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li class="clearfix"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} </li> {/foreach} </ul> <br class="clear"/> </div> {/if} añadelo despues de esto: {if $category->description} <div class="cat_desc"> <p>{$category->description}</p> </div> {/if} </div> {/if} Vaya, pues lo he puesto pero no me sale nada, sigue igual... habra que hacer alo con la cache de la plantila? Edited October 20, 2013 by victorgomez36 (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Vaya, pues lo he puesto pero no me sale nada, sigue igual... habra que hacer alo con la cache de la plantila? ¿Has forzado compilacion en Parametros Avanzados -> Rendimiento? Realiza lo del flush compile de statictic: http://www.prestashop.com/forums/topic/238282-modulo-flush-caches-compile-ps15/ Escribe "Hola mundo" en el tpl, para ver si lo imprime o no. Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Ahora funciona, tan solo que me gustaria poner las fotos mas grandotas y mejor ordenadas.... es mucho pedir? Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Ahora funciona, tan solo que me gustaria poner las fotos mas grandotas y mejor ordenadas.... es mucho pedir? La verdad es que te queda horroso, vamos a ver que podemos hacer para que quede hermoso como la vida misma. Lo primero, en tu caso esto: {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} Dejalo asi: {* {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} *} para comentar la descripcion de las subcategorias y que no se vean, que se vea solo el nombre de la subcategoria, asi en tu caso quedara mejor. Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 La verdad es que te queda horroso, vamos a ver que podemos hacer para que quede hermoso como la vida misma. Lo primero, en tu caso esto: {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} Dejalo asi: {* {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} *} para comentar la descripcion de las subcategorias y que no se vean, que se vea solo el nombre de la subcategoria, asi en tu caso quedara mejor. Como dijo Jack el Destripador.... "vamos por partes", lo primero ya esta hecho..... UN EXITO..... y supongo que ahora vendrá lo difícil no? Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Lo segundo, te vas a crear un nuevo tipo de imagen en la pestaña Preferencias -> Imagenes llamado: subcategorias con estas medidas: ancho: 120px alto: 120px y señalas que solo se aplique a las categorias. Despues en la misma pestaña Preferencias -> Imagenes, regenera las miniaturas solo Tipo Categoria -> Formato subcategorias Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Cuando termines el 2º Paso, pasaremos al tercer paso y asi progresivamente. Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Hombre te has creado el tipo a 250x250, veo aquí: http://www.xn--mueblesdebaoweb-8qb.es/c/46-subcategorias/serie-edera.jpg es demasiado grande, hazlo como te dije. ¿O es que ya tenias un tipo con el nombre que te he comentado? Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 (edited) Hombre te has creado el tipo a 250x250, veo aquí: http://www.xn--mueblesdebaoweb-8qb.es/c/46-subcategorias/serie-edera.jpg es demasiado grande, hazlo como te dije. ¿O es que ya tenias un tipo con el nombre que te he comentado? si, tenia un tipo ya pero lo hice hace mucho y ya no creo que sirva, lo he reconfigurado como me has dicho, a 120 x 120 y he hecho la redimension de imagenes el segundo paso ya esta. Edited October 20, 2013 by victorgomez36 (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 si, tenia un tipo ya pero lo hice hace mucho y ya no creo que sirva, lo he reconfigurado como me has dicho, a 120 x 120 y he hecho la redimension de imagenes Ummm si ya tenias un tipo creado, para no pifiarla (que nunca se sabe), deja ese tipo que tenias antes como estaba, y create uno que se llame: subcategorias_actual Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 (edited) Ummm si ya tenias un tipo creado, para no pifiarla (que nunca se sabe), deja ese tipo que tenias antes como estaba, y create uno que se llame: subcategorias_actual a sus ordenes, Ya esta hecho. Edited October 20, 2013 by victorgomez36 (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Tercer paso. Cambia esto: {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} por {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategorias_actual')|escape:'html'}" alt="" width="120px" height="120px" /> {else} <img src="{$img_cat_dir}default-subcategorias_actual" alt="" width="120px" height="120px" /> {/if} Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 (Actualizacion de mi ultimo mensaje) Volver a revisar) Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Hecho Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Siguiente paso. En tu fichero: http://www.xn--mueblesdebaoweb-8qb.es/themes/MegaShop/css/category.css Cambia esto: #subcategories ul li{ border: medium none; float: left; padding: 0 5px 10px; text-align: center; width:80px; } por #subcategories ul li { border: medium none; float: left; padding: 0 5px 10px; text-align: center; width: 120px; height: 165px; overflow: hidden; } Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Hecho, esto mejora por momentos. si parezco un programador.... Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Hecho, esto mejora por momentos. si parezco un programador.... Siguiente paso: Esto: <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> por esto <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}</a> Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Siguiente paso: Esto: <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> por esto <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}</a> en el TPL ? Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 en el TPL ? Si, claro, en el category.tpl Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Si, claro, en el category.tpl ya esta hecho Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 ya esta hecho Siguiente paso, remodelación de unos de los pasos anteriores, en el http://www.xn--mueblesdebaoweb-8qb.es/themes/MegaShop/css/category.css Esto que has puesto: #subcategories ul li{ border: medium none; float: left; padding: 0 5px 10px; text-align: center; width: 120px; height: 165px; overflow: hidden; } por #subcategories ul li{ border: medium none; float: left; padding: 0 5px 10px; text-align: center; width: 119px; height: 165px; overflow: hidden; } --- Y el nuevo tipo de imagen que has creado antes, depende a 120 por 120 ponlo a 119 por 119 Saludos, Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 ESTUPENDO, Muchas Gracias, de nuevo,Víctor. Leo en tu firma que son tus últimos días en el foro, espero que sea un cambio para mejor y que te vaya muy bien, por mi parte si necesitas muebles de baño o accesorios, ya sabes..... tendrás tratamiento especial. Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 50º Paso En el mismo fichero css que hemos estado modificando, cambia esto: .inline_list li .cat_name { } por .inline_list li .cat_name { height: 32px; display: block; overflow: hidden; } Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 50º Paso En el mismo fichero css que hemos estado modificando, cambia esto: .inline_list li .cat_name { } por .inline_list li .cat_name { height: 32px; display: block; overflow: hidden; } Ya lo he hecho Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 100º Paso Cambia en el mismo fichero: http://www.xn--mueblesdebaoweb-8qb.es/themes/MegaShop/css/category.css Esto: #subcategories h3 { font-size:14px; font-weight:normal; padding:0; } por #subcategories h3 { border-bottom: 1px solid #E5E5E5; padding: 0 0 5px; margin: 0 0 5px; font-size: 12px; } Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 (edited) 100º Paso Cambia en el mismo fichero: http://www.xn--mueblesdebaoweb-8qb.es/themes/MegaShop/css/category.css Esto: #subcategories h3 { font-size:14px; font-weight:normal; padding:0; } por #subcategories h3 { border-bottom: 1px solid #E5E5E5; padding: 0 0 5px; margin: 0 0 5px; font-size: 12px; } Me has leido el pensamiento, te iba a preguntar donde cambiar el tipo de letra de SUBCATEGORIAS, Me he permitido pornerlo en tamaño 16 y en español, jeje Edited October 20, 2013 by victorgomez36 (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Penultimo paso. Escriba "Hola Mundo" al principio del category.tpl y avisame, cuando lo vea y te diga que lo borres, borralo. (Todo tiene su fin) Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Penultimo paso. Escriba "Hola Mundo" al principio del category.tpl y avisame, cuando lo vea y te diga que lo borres, borralo. (Todo tiene su fin) ya Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Ok, ya veo el "Hola Mundo", ahora quitalo. Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Ok, ya veo el "Hola Mundo", ahora quitalo. Ya esta quitado Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Estoy viendo que has ampliado el tamaño del titulo "subcategorias" (o es mi imaginacion) ¿? Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Yo ahora mismo veo tu tienda, como muestro en la siguiente imagen: ¿Tu lo ves igual? Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Estoy viendo que has ampliado el tamaño del titulo "subcategorias" (o es mi imaginacion) ¿? Si, te lo he puesto en el post anterior, pero lo edite y quizas no lo hayas visto. tambien lo he puesto en español, estaba en ingles Yo ahora mismo veo tu tienda, como muestro en la siguiente imagen: ¿Tu lo ves igual? Yo ahora mismo veo tu tienda, como muestro en la siguiente imagen: ¿Tu lo ves igual? SI, ha quedado Genial Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Si, te lo he puesto en el post anterior, pero lo edite y quizas no lo hayas visto. tambien lo he puesto en español, estaba en ingles SI, ha quedado Genial ¿Solucionado? Link to comment Share on other sites More sharing options...
victorgomez36 Posted October 20, 2013 Author Share Posted October 20, 2013 Si, te reitero mi agradecimiento, y mi deseo de que te vaya bien en el nuevo proyecto que estes... Un saludo. Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Si, te lo he puesto en el post anterior, pero lo edite y quizas no lo hayas visto. tambien lo he puesto en español, estaba en ingles SI, ha quedado Genial Por cierto, las traduccion del titulo 'subcategorias', tienes que hacerla en la pestaña "Localizacion -> Traducciones -> Traducciones del Front-Office" (en el cuadro de traducciones) no en el category.tpl a mano. Link to comment Share on other sites More sharing options...
nadie Posted October 20, 2013 Share Posted October 20, 2013 Si, te reitero mi agradecimiento, y mi deseo de que te vaya bien en el nuevo proyecto que estes... Un saludo. Un placer ayudarte y servirte! Un saludo y recuerda que estaremos en el foro, para guiarte por este mundo oscuro y tenebroso. PD: Cierro tema y te añado la palabra "Solucionado" al título del tema. Para cualquier otra duda, no dudes en crear un tema nuevo. Link to comment Share on other sites More sharing options...
Recommended Posts