Arthas Posted January 11, 2017 Share Posted January 11, 2017 (edited) Buenos días, necesitaría una solución a este problemilla, y es que al entrar en esta pagina "Pagina" tendría que aparecer las fotos directamente en vez la opción desplegable "Leer mas", esta opción aparece en todas las paginas similares, pero solo querría quitarla de esta pagina en concreto. Como dato diré que esta pagina está creada desde "Categorias", no se donde puedo encontrarla por FileZilla para intentar incidir por programación, seria de gran ayuda incluso saber la ubicación de esta pagina en FTP. ¿Me podríais ayudar a resolver este enigma? LINK PAGINA DE PROBLEMA Gracias de antemano! Edited January 11, 2017 by Arthas (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2017 Share Posted January 11, 2017 Es generico para todas las categorías que crees del catalogo, es el fichero: /themes/tu-plantilla/category.tpl Por ejemplo, en la plantilla por defecto de Prestashop 1.6, ese fichero con tiene entre otras cosas este código: {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} Esta linea: <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> corresponde al botón "mas" Y la descripcion se corta porque aqui: {if Tools::strlen($category->description) > 350} Dice si la descripcion de la categoria, tiene mas de 350 caracteres, imprimo: <div id="category_description_short" class="rte">{$description_short}</div> Si no tiene mas de 350 caracteres imprimo directamente la completa: <div class="rte">{$category->description}</div> Lo que estoy viendo en la sección que comentas, es que has metido directamente imagenes y enlaces en la misma descripcion de la categoria "131--colecciones-de-muebles" Si quieres que se vea solamente completa la descripcion en esa categoria y el resto de categorías dejarlas como estan, pues dejalo asi: {if $category->id_category!='131'} {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} {else} <div class="rte">{$category->description}</div> {/if} 1 Link to comment Share on other sites More sharing options...
Arthas Posted January 11, 2017 Author Share Posted January 11, 2017 (edited) Es generico para todas las categorías que crees del catalogo, es el fichero: /themes/tu-plantilla/category.tpl Por ejemplo, en la plantilla por defecto de Prestashop 1.6, ese fichero con tiene entre otras cosas este código: {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} Esta linea: <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> corresponde al botón "mas" Y la descripcion se corta porque aqui: {if Tools::strlen($category->description) > 350} Dice si la descripcion de la categoria, tiene mas de 350 caracteres, imprimo: <div id="category_description_short" class="rte">{$description_short}</div> Si no tiene mas de 350 caracteres imprimo directamente la completa: <div class="rte">{$category->description}</div> Lo que estoy viendo en la sección que comentas, es que has metido directamente imagenes y enlaces en la misma descripcion de la categoria "131--colecciones-de-muebles" Si quieres que se vea solamente completa la descripcion en esa categoria y el resto de categorías dejarlas como estan, pues dejalo asi: {if $category->id_category!='131'} {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} {else} <div class="rte">{$category->description}</div> {/if} Muchas gracias por la respuesta, he intentado lo que me has recomendado hacer para dejar las otras como estan y solo quitar el "Leer mas" en esa pagina, pero no consigo hacerlo bien al parecer. Mira esto es lo que le contiene el archivo Category.tpl: {* * 2007-2014 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-2014 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 $scenes || $category->description || $category->id_image} <div class="content_scene_cat"> {if $scenes} <div class="content_scene"> <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {if $category->description} <div class="cat_desc rte"> {if Tools::strlen($category->description) > 500} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" class="unvisible">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} </div> {else} <!-- Category image --> <div class="content_scene_cat_bg"> <div class="cat_desc"> <h1 class="title_main_section category-name"> <span> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> </h1> {if $category->description} {if Tools::strlen($category->description) > 500} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div class="rte">{$category->description}</div> {/if} {/if} </div> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" class="img-responsive" alt=""/> {/if} </div> {/if} </div> {/if} {*<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span>{include file="$tpl_dir./category-count.tpl"}</h1>*} {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 row"> {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="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" 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'|truncate:350}</a></h5> {if $subcategory.description} <div class="cat_desc">{$subcategory.description}</div> {/if} </li> {/foreach} </ul> </div> {/if} {/if} {if $products} <div class="content_sortPagiBar clearfix"> <div class="sortPagiBar clearfix"> {*{include file="./product-compare.tpl"}*} {include file="./nbr-product-page.tpl"} {include file="./product-sort.tpl"} </div> <div class="top-pagination-content clearfix"> {include file="$tpl_dir./pagination.tpl"} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar clearfix bottom_pagi"> <div class="sortPagiBar clearfix"> {include file="./product-compare.tpl" paginationId='bottom'} {include file="./product-sort.tpl"} {*{include file="./nbr-product-page.tpl"}*} </div> <div class="bottom-pagination-content clearfix"> {include file="./pagination.tpl" paginationId='bottom'} </div> </div> {/if} <div class="ban_category_container clearfix"> {hook h='displayCustomBanners2'} </div> {elseif $category->id} <p class="alert alert-warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} ¿Como deberia quedar? Muchas gracias!! Edited January 11, 2017 by Arthas (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2017 Share Posted January 11, 2017 Muchas gracias por la respuesta, he intentado lo que me has recomendado hacer para dejar las otras como estan y solo quitar el "Leer mas" en esa pagina, pero no consigo hacerlo bien al parecer. Mira esto es lo que le contiene el archivo Category.tpl: {* * 2007-2014 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-2014 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 $scenes || $category->description || $category->id_image} <div class="content_scene_cat"> {if $scenes} <div class="content_scene"> <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {if $category->description} <div class="cat_desc rte"> {if Tools::strlen($category->description) > 500} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" class="unvisible">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div>{$category->description}</div> {/if} </div> {/if} </div> {else} <!-- Category image --> <div class="content_scene_cat_bg"> <div class="cat_desc"> <h1 class="title_main_section category-name"> <span> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> </h1> {if $category->description} {if Tools::strlen($category->description) > 500} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div class="rte">{$category->description}</div> {/if} {/if} </div> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" class="img-responsive" alt=""/> {/if} </div> {/if} </div> {/if} {*<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span>{include file="$tpl_dir./category-count.tpl"}</h1>*} {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 row"> {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="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" 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'|truncate:350}</a></h5> {if $subcategory.description} <div class="cat_desc">{$subcategory.description}</div> {/if} </li> {/foreach} </ul> </div> {/if} {/if} {if $products} <div class="content_sortPagiBar clearfix"> <div class="sortPagiBar clearfix"> {*{include file="./product-compare.tpl"}*} {include file="./nbr-product-page.tpl"} {include file="./product-sort.tpl"} </div> <div class="top-pagination-content clearfix"> {include file="$tpl_dir./pagination.tpl"} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar clearfix bottom_pagi"> <div class="sortPagiBar clearfix"> {include file="./product-compare.tpl" paginationId='bottom'} {include file="./product-sort.tpl"} {*{include file="./nbr-product-page.tpl"}*} </div> <div class="bottom-pagination-content clearfix"> {include file="./pagination.tpl" paginationId='bottom'} </div> </div> {/if} <div class="ban_category_container clearfix"> {hook h='displayCustomBanners2'} </div> {elseif $category->id} <p class="alert alert-warning">{l s='This category is currently unavailable.'}</p> {/if} {/if} ¿Como deveria quedar? Muchas gracias!! Esta parte de tu codigo: {if Tools::strlen($category->description) > 500} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" class="unvisible">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div>{$category->description}</div> {/if} Asi: {if $category->id_category!='131'} {if Tools::strlen($category->description) > 500} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" class="unvisible">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div>{$category->description}</div> {/if} {else} <div>{$category->description}</div> {/if} Recuerda limpiar cache en Parametros Avanzados -> Rendimiento 1 Link to comment Share on other sites More sharing options...
Arthas Posted January 11, 2017 Author Share Posted January 11, 2017 Siento gastar tu tiempo pero no consigo hacerlo funcionar, esto es lo que he aplicado: {if isset($category)} {if $category->id AND $category->active} {if $scenes || $category->description || $category->id_image} <div class="content_scene_cat"> {if $scenes} <div class="content_scene"> <!-- Scenes --> {include file="$tpl_dir./scenes.tpl" scenes=$scenes} {if $category->description} <div class="cat_desc rte"> {if $category->id_category!='131'} {if Tools::strlen($category->description) > 500} <div id="category_description_short">{$description_short}</div> <div id="category_description_full" class="unvisible">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='Leer más'}</a> {else} <div>{$category->description}</div> {/if} {else} <div>{$category->description}</div> {/if} </div> {/if} </div> {else} <!-- Category image --> He limpiado el cache incluso pero no hace efecto. LINK Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2017 Share Posted January 11, 2017 Subeme tu category.tpl sin modificar (que estoy en el movil y no aprecio bien el codigo) y te lo mando de vuelta modificado. Saludos, Link to comment Share on other sites More sharing options...
Arthas Posted January 11, 2017 Author Share Posted January 11, 2017 Subeme tu category.tpl sin modificar (que estoy en el movil y no aprecio bien el codigo) y te lo mando de vuelta modificado. Saludos, Ok! Muchísimas gracias! https://drive.google.com/open?id=0ByVf-qkkEuOgUWxwQ3hhMmdTb2c Aquí tienes. Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2017 Share Posted January 11, 2017 Ok! Muchísimas gracias! https://drive.google.com/open?id=0ByVf-qkkEuOgUWxwQ3hhMmdTb2c Aquí tienes. category.zip 1 Link to comment Share on other sites More sharing options...
Arthas Posted January 11, 2017 Author Share Posted January 11, 2017 (edited) Ok! Muchísimas gracias! https://drive.google.com/open?id=0ByVf-qkkEuOgUWxwQ3hhMmdTb2c Aquí tienes. Ya está incorporado, y parece que FUNCIONA!! Te doy la gracias de nuevo. Un saludo!! Edited January 11, 2017 by Arthas (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2017 Share Posted January 11, 2017 Ya está incorporado, y parece que FUNCIONA!! Te doy la gracias de nuevo. Un saludo!! Un placer ayudarte y servirte ! No se te olvide añadir la palabra "Solucionado": https://www.prestashop.com/forums/topic/269515-solucionado-%C2%BFcomo-poner-la-palabra-solucionado-en-el-titulo-del-tema/ al titulo del tema. Saludos ! 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