Syd Posted July 25, 2012 Share Posted July 25, 2012 (edited) Hola, - quisiera que la página de product-list muestre todos los productos existentes en la página sin utilizar pagination. - para ello también quisiera que el cuerpo de columns se prolongue con los productos - por último también me gustaría limitar el número de caracteres de la descripción del producto mostrados en el product-list Salu2 pongo url: http://www.asianexoticdream.com/category.php?id_category=27 Edited July 25, 2012 by Syd (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted July 25, 2012 Share Posted July 25, 2012 Para esta pregunta: Hola, - quisiera que la página de product-list muestre todos los productos existentes en la página sin utilizar pagination. Pestaña Preferencias/Productos -> Productos por página: y coloca en esa opción una cifra alta. 1 Link to comment Share on other sites More sharing options...
Syd Posted July 25, 2012 Author Share Posted July 25, 2012 Muchas gracias, esto ya lo hice, le puse 1000, y cuando tenga mil, pues 10000, jejeje, ahora bien, lo de prolongar el columns y limitar los caracteres de la descripción del producto? Saludos Link to comment Share on other sites More sharing options...
Syd Posted July 25, 2012 Author Share Posted July 25, 2012 Hola Syd, no te recomiendo que hagas una lista de productos de esa manera. A no ser que quieras que tus visitantes tengan tiempo de hacerce un cafe para esperar a que la página haya cargado... Saludos jeje, ya se, ya se, el caso es que no tendré muchos productos por categoría, e iré jugando con eso, por eso de momento quiero implementarlo así, Saludos Link to comment Share on other sites More sharing options...
nadie Posted July 26, 2012 Share Posted July 26, 2012 - por último también me gustaría limitar el número de caracteres de la descripción del producto mostrados en el product-list Para limitar los caracteres de la descripción del producto: En el fichero product-list.tpl de tu plantilla. Busca esto: {$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'} Y depende 360, le colocas un numero menor. Link to comment Share on other sites More sharing options...
Syd Posted July 26, 2012 Author Share Posted July 26, 2012 (edited) Muchas gracias, el caso es que estoy sorprendido, porque esto ya lo intenté, pero no me salió, y pensaba que tenía la compilación activa y todo eso... quizá no. Ahora intento que se me prolongue el columns, que al fin y al cabo es como lo tenía antes. Saludos Otra cosa que no entiendo es que si quito totalmente (por ejemplo, poniéndolo como comentarios en el tpl) la descripción, los campos de abajo de precio y demás se pegan hacia arriba, pero si limito los caracteres no. Me gustaría subir un poco el precio y pegarlo más a la descripción Edited July 26, 2012 by Syd (see edit history) Link to comment Share on other sites More sharing options...
Syd Posted July 27, 2012 Author Share Posted July 27, 2012 Alguna ayudilla para prolongar el columns? Saludos Link to comment Share on other sites More sharing options...
nadie Posted July 27, 2012 Share Posted July 27, 2012 Hola Syd, ¿a que te refieres por prolongar columns?... Saludos Creo que se refiere, efectivamente a eso, a que se vea toda la columna de alta, como alto sea el contenido. Link to comment Share on other sites More sharing options...
Syd Posted July 27, 2012 Author Share Posted July 27, 2012 (edited) Muy buenas! Funcionó esto que me pusiste, sin embargo, 2 cosas: - el footer, por un lado desapareció (contacto, etc,) y por otro se me quedó arriba (© Asian Exotic Dream ® 2012). - no entiendo por qué no se me pone el background del color que tengo elegido en las subcategorías, por ejemplo: #categoria7, #categoria16, #categoria17, #categoria18, #categoria19, #categoria20, #categoria21, #categoria22 { background-color: #ffff99; height: 570px; width: 652px; background-image:url(../../..//img/7.jpg); background-repeat:no-repeat; font-family: Verdana, Arial, Helvetica, Sans-Serif; color: #663366; . . . url: http://www.asianexoticdream.com/category.php?id_category=26 Saludos Edited July 27, 2012 by Syd (see edit history) Link to comment Share on other sites More sharing options...
Syd Posted July 28, 2012 Author Share Posted July 28, 2012 Hola! Muchas gracias, pero lo que yo tengo es un color de background por cada subcategoría, y lo tengo especificado por ejemplo así: #categoria7, #categoria16, #categoria17, #categoria18, #categoria19, #categoria20, #categoria21, #categoria22 { background-color: #ffff99; height: 570px; width: 652px; background-image:url(../../..//img/7.jpg); background-repeat:no-repeat; font-family: Verdana, Arial, Helvetica, Sans-Serif; color: #663366; . . . Luego lo del footer, están todos los campos, no desaparecieron solo que están dentro de la center column, y algunos no se ven por el color, Buen fin de semana pues!! Link to comment Share on other sites More sharing options...
Syd Posted August 2, 2012 Author Share Posted August 2, 2012 Alguna ayuda con esto? Gracias, Saludos Link to comment Share on other sites More sharing options...
Syd Posted August 3, 2012 Author Share Posted August 3, 2012 Alguna ayuda? Saludos Link to comment Share on other sites More sharing options...
4webs.es Posted August 3, 2012 Share Posted August 3, 2012 Hola Syd, no te recomiendo que hagas una lista de productos de esa manera. A no ser que quieras que tus visitantes tengan tiempo de hacerce un cafe para esperar a que la página haya cargado... Saludos Depende como lo hagas, pronto os enseñaremos algo similar en una tienda que estamos desarrollando con un scroll infinito, los productos se van cargando conforme vamos desplazando la barra del explorador....una chulada.. , por lo que no tienen que esperar nada. Link to comment Share on other sites More sharing options...
nadie Posted August 3, 2012 Share Posted August 3, 2012 (edited) Alguna ayuda? Saludos En tu fichero product-list.tpl category.tpl creo te has comido alguna etiqueta, por que el pie de pagina, te lo esta situando dentro del div, referente en ese momento. Edited August 3, 2012 by nadie (see edit history) Link to comment Share on other sites More sharing options...
Syd Posted August 3, 2012 Author Share Posted August 3, 2012 mmm, yo tenía otro product-list, que me mostraba los productos uno encima de otro, pero lo he probado, y me sigue saliendo igual el footer, era este: /* product-list.tpl */ /*ul#product_list { margin-top: 2em; list-style-type: none;} ul#product_list li { background: none; border: none; padding: 6px; min-height: 130px; height: auto; clear: both; margin-bottom: 10px; } * html ul#product_list li { height: auto !important; height: 130px } ul#product_list li a { text-decoration: none; color: #374853 } ul#product_list a.product_img_link { border: solid 1px #d0d3d8; float: left; margin-right: 0.6em } ul#product_list a.product_img_link img { vertical-align: bottom; display: block } ul#product_list li h3 { margin: 0.4em 0 } ul#product_list li .new { background: transparent url(../img/flag_new_bg.jpg) repeat-x scroll 0%; border: 1px solid #488C40; color: white; font-size: 0.6em; font-weight: bold; margin: 0 1em 0 0; padding: 0 0.4em; text-transform: uppercase; vertical-align: 0.3em } ul#product_list li p.product_desc { margin-bottom: 0; font-size: 0.92em } ul#product_list li div.center_block { float: left; width: 80% } ul#product_list li div.right_block { float: right; width: 11em; text-align: right; margin-left: 1em; margin-top: 0 } ul#product_list li .discount, ul#product_list li .on_sale, ul#product_list li .online_only { color: #da0f00; text-transform: uppercase; font-weight: bold; display: block } ul#product_list li .reduction { display: block; margin-bottom: 0.3em } ul#product_list li .price { display: block; font-size: 12px; color: #484848; margin-bottom: 0.2em } ul#product_list li span.availability { color: #488c40; font-size: 0.9em } ul#product_list li a.button { margin-top: 0.5em } ul#product_list li p.compare input { vertical-align: text-bottom }*/ Luego este es el actual con todos sus comentarios: /* product-list.tpl */ ul#product_list{ /*margin-top:0.1em; */list-style-type:none; height:100%; width: 750px; } ul#product_list li { background: url("../img/block_category_item_bg.png") no-repeat scroll 0 0 transparent; float: left; height: 260px; margin-bottom: 27em; margin-left: 10px; padding-right: 65px; position: relative; width: 140px; text-align:center; } ul#product_list li:hover { background:url("../img/block_category_item_bg2.png") no-repeat scroll 0 0 ; } ul#product_list li a { text-decoration:none; /*color:#374853;*/ } ul#product_list a.product_img_link{ border: solid 1px #663366; float:left; margin-right:0.6em; } ul#product_list a.product_img_link img{ vertical-align:bottom; } ul#product_list li h3{ background:/* url("../img/tag.png")*/ no-repeat scroll 0 0 transparent; display: table-cell; float: left; height: 40px; margin: 10px 0 0 -10px; min-height: 40px; padding-left: 13px; position: relative; vertical-align: bottom; width: 128px; font-size:13px } ul#product_list li .new{ background:transparent url(../img/flag_new_bg.jpg) repeat-x scroll 0%; border:1px solid #555; color:white; font-size:0.6em; font-weight:bold; margin:0pt 1em 0pt 0pt; padding:0pt 0.4em; text-transform:uppercase; vertical-align:0.3em; } ul#product_list li p.product_desc{ /* float: left;*/ font-size: 0.92em; max-height: 131px; min-height: 130px; overflow: hidden; position: relative; width: 136px; } ul#product_list li div.center_block{ float:left; width:100%; } ul#product_list li div.right_block{ float:left; width: 11em; margin-left:1em; margin-top:0; } ul#product_list li .discount{ color:#da0f00; text-transform:uppercase; font-weight:bold; display: block; margin-top: 0.7em; } ul#product_list li .on_sale{ color:#da0f00; text-transform:uppercase; font-weight:bold; display: block; } ul#product_list li .reduction { display: block; margin-bottom: 0.3em; } ul#product_list li .price{ display: block; font-size: 170%; margin-bottom: 0.2em; } ul#product_list li span.availability{ /*float: right;*/ color:#555; font-size:0.9em; } ul#product_list li a.button{ /*margin-left: 15px;*/ margin-top: 0.5em; }*/ Link to comment Share on other sites More sharing options...
nadie Posted August 3, 2012 Share Posted August 3, 2012 mmm, yo tenía otro product-list, que me mostraba los productos uno encima de otro, pero lo he probado, y me sigue saliendo igual el footer, era este: /* product-list.tpl */ /*ul#product_list { margin-top: 2em; list-style-type: none;} ul#product_list li { background: none; border: none; padding: 6px; min-height: 130px; height: auto; clear: both; margin-bottom: 10px; } * html ul#product_list li { height: auto !important; height: 130px } ul#product_list li a { text-decoration: none; color: #374853 } ul#product_list a.product_img_link { border: solid 1px #d0d3d8; float: left; margin-right: 0.6em } ul#product_list a.product_img_link img { vertical-align: bottom; display: block } ul#product_list li h3 { margin: 0.4em 0 } ul#product_list li .new { background: transparent url(../img/flag_new_bg.jpg) repeat-x scroll 0%; border: 1px solid #488C40; color: white; font-size: 0.6em; font-weight: bold; margin: 0 1em 0 0; padding: 0 0.4em; text-transform: uppercase; vertical-align: 0.3em } ul#product_list li p.product_desc { margin-bottom: 0; font-size: 0.92em } ul#product_list li div.center_block { float: left; width: 80% } ul#product_list li div.right_block { float: right; width: 11em; text-align: right; margin-left: 1em; margin-top: 0 } ul#product_list li .discount, ul#product_list li .on_sale, ul#product_list li .online_only { color: #da0f00; text-transform: uppercase; font-weight: bold; display: block } ul#product_list li .reduction { display: block; margin-bottom: 0.3em } ul#product_list li .price { display: block; font-size: 12px; color: #484848; margin-bottom: 0.2em } ul#product_list li span.availability { color: #488c40; font-size: 0.9em } ul#product_list li a.button { margin-top: 0.5em } ul#product_list li p.compare input { vertical-align: text-bottom }*/ Luego este es el actual con todos sus comentarios: /* product-list.tpl */ ul#product_list{ /*margin-top:0.1em; */list-style-type:none; height:100%; width: 750px; } ul#product_list li { background: url("../img/block_category_item_bg.png") no-repeat scroll 0 0 transparent; float: left; height: 260px; margin-bottom: 27em; margin-left: 10px; padding-right: 65px; position: relative; width: 140px; text-align:center; } ul#product_list li:hover { background:url("../img/block_category_item_bg2.png") no-repeat scroll 0 0 ; } ul#product_list li a { text-decoration:none; /*color:#374853;*/ } ul#product_list a.product_img_link{ border: solid 1px #663366; float:left; margin-right:0.6em; } ul#product_list a.product_img_link img{ vertical-align:bottom; } ul#product_list li h3{ background:/* url("../img/tag.png")*/ no-repeat scroll 0 0 transparent; display: table-cell; float: left; height: 40px; margin: 10px 0 0 -10px; min-height: 40px; padding-left: 13px; position: relative; vertical-align: bottom; width: 128px; font-size:13px } ul#product_list li .new{ background:transparent url(../img/flag_new_bg.jpg) repeat-x scroll 0%; border:1px solid #555; color:white; font-size:0.6em; font-weight:bold; margin:0pt 1em 0pt 0pt; padding:0pt 0.4em; text-transform:uppercase; vertical-align:0.3em; } ul#product_list li p.product_desc{ /* float: left;*/ font-size: 0.92em; max-height: 131px; min-height: 130px; overflow: hidden; position: relative; width: 136px; } ul#product_list li div.center_block{ float:left; width:100%; } ul#product_list li div.right_block{ float:left; width: 11em; margin-left:1em; margin-top:0; } ul#product_list li .discount{ color:#da0f00; text-transform:uppercase; font-weight:bold; display: block; margin-top: 0.7em; } ul#product_list li .on_sale{ color:#da0f00; text-transform:uppercase; font-weight:bold; display: block; } ul#product_list li .reduction { display: block; margin-bottom: 0.3em; } ul#product_list li .price{ display: block; font-size: 170%; margin-bottom: 0.2em; } ul#product_list li span.availability{ /*float: right;*/ color:#555; font-size:0.9em; } ul#product_list li a.button{ /*margin-left: 15px;*/ margin-top: 0.5em; }*/ Me refiero al *.tpl, no al *.css Link to comment Share on other sites More sharing options...
Syd Posted August 3, 2012 Author Share Posted August 3, 2012 Ah, perdón, este es el tpl {* * 2007-2011 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-2011 PrestaShop SA * @version Release: $Revision: 6909 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if isset($products)} <!-- Products list --> <ul id="product_list" class="clear"> {foreach from=$products item=product name=products} <li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix"> <div class="center_block"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'productlist')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$productlistSize.width}" height="{$productlistSize.height}"{/if} /></a><!--AQUÍ CAMBIÉ EL TAMAÑO DE LAS IMÁGENES--> <h3>{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <!--AQUÍ ELIMINÉ LA DESCRIPCIÓN DEL PRODUCTO--> <p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:150:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:150:'...'|strip_tags:'UTF-8'}</a></p><!----> </div> <div class="right_block"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span>{/if} {if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only!'}</span>{/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>{/if} </div> {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if} <!--<a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {if isset($comparator_max_item) && $comparator_max_item} <p class="compare"><input type="checkbox" onclick="checkForComparison({$comparator_max_item})" class="comparator" id="comparator_item_{$product.id_product}" value="{$product.id_product}" /> <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label></p> {/if} --> </div> </li> {/foreach} </ul> <!-- /Products list --> {/if} Link to comment Share on other sites More sharing options...
Syd Posted August 3, 2012 Author Share Posted August 3, 2012 Me he dado cuenta de que también me sale cuando no hay productos en una categoría, por ejemplo: http://www.asianexoticdream.com/category.php?id_category=19 En función de que el carrito se encuentre desplegado o no, el footer se desplaza y el background no se rellena Link to comment Share on other sites More sharing options...
nadie Posted August 3, 2012 Share Posted August 3, 2012 Después de verlo, parece que el problema de que el pie de pagina no te salga fuera del contenedor, como en el resto de la web, te viene del fichero category.tpl de tu plantilla. (Como te dije revisalo, por que parece te has comido algo seguramente, sin darte cuenta). Link to comment Share on other sites More sharing options...
Syd Posted August 4, 2012 Author Share Posted August 4, 2012 Hola, gracias por la respuesta, lo he revisado, y según lo que yo veo no veo nada que pueda alterar el footer. Sí que comenté cosas y eliminé, por ejemplo, la descripción de categoría o el product-compare. Lo pego aquí, por si acaso: <div id="categoria{$smarty.get.id_category}"><!--INCLUYO EL CSS DE CATEGORIA--> {* * 2007-2011 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-2011 PrestaShop SA * @version Release: $Revision: 6677 $ * @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'}<!--AQUÍ MUESTRA el nombre de la categoría Y SI HAY PRODUCTOS Y CUANTOS HAY--> <!--<span> {if $category->id == 1 OR $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} </span>{/strip} </h1>--> {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')}" 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} <!--<img src="/img/{$smarty.get.id_category}.jpg" alt="" />--> <!--{if ($category->id_category == $smarty.get.id_category)} <img src="/img/{$smarty.get.id_category}.jpg" alt="" /> {/if} --> <!--<img src="/img/6.jpg" alt="" />--> <!--{if $category->description} <div class="cat_desc">{$category->description}</div>--><!--AQUÍ MOSTRABA LA DESCRIPCIÓN DE CATEGORÍA--> <!--{/if}--> {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <br /> <!--<h3>{l s='Subcategories'}</h3>--><!--AQÍ MOSTRABA LITERALMENTE 'SUBCATEGORÍAS'--> <ul class="img_sub"><!--AQUÍ LE ESPECIFIQUÉ EL CSS PARA LAS IMÁGENES--> {foreach from=$subcategories item=subcategory} <li> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategorias')}" alt="" width="{$subcategoriasSize.width}" height="{$subcategoriasSize.height}" /> {else} <img src="{$img_cat_dir}default-subcategorias.jpg" alt="" width="{$subcategoriasSize.width}" height="{$subcategoriasSize.height}" /> {/if} </a><br /> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> <br class="clear"/> </div> </div> {/if} {if $products} <div class="img_prod"> <!--{include file="$tpl_dir./product-compare.tpl"}--> {include file="$tpl_dir./product-list.tpl" products=$products} {include file="$tpl_dir./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl"} {elseif !isset($subcategories)} <p class="warning">{l s='There are no products in this category.'}</p> {/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 August 4, 2012 Share Posted August 4, 2012 Coloca al final del documento esto: </div> Link to comment Share on other sites More sharing options...
Syd Posted August 4, 2012 Author Share Posted August 4, 2012 Lo he puesto al final, pero no funcionó (forzar compilación activada), también probé a poner el </div> así, y nada <div class="img_prod"> <!--{include file="$tpl_dir./product-compare.tpl"}--> {include file="$tpl_dir./product-list.tpl" products=$products} {include file="$tpl_dir./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl"} </div> Link to comment Share on other sites More sharing options...
nadie Posted August 4, 2012 Share Posted August 4, 2012 Lo has puesto, asi: <div id="categoria{$smarty.get.id_category}"><!--INCLUYO EL CSS DE CATEGORIA--> {* * 2007-2011 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-2011 PrestaShop SA * @version Release: $Revision: 6677 $ * @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./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'}<!--AQUÍ MUESTRA el nombre de la categoría Y SI HAY PRODUCTOS Y CUANTOS HAY--> <!--<span> {if $category->id == 1 OR $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} </span>{/strip} </h1>--> {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')}" 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} <!--<img src="/img/{$smarty.get.id_category}.jpg" alt="" />--> <!--{if ($category->id_category == $smarty.get.id_category)} <img src="/img/{$smarty.get.id_category}.jpg" alt="" /> {/if} --> <!--<img src="/img/6.jpg" alt="" />--> <!--{if $category->description} <div class="cat_desc">{$category->description}</div>--><!--AQUÍ MOSTRABA LA DESCRIPCIÓN DE CATEGORÍA--> <!--{/if}--> {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <br /> <!--<h3>{l s='Subcategories'}</h3>--><!--AQÍ MOSTRABA LITERALMENTE 'SUBCATEGORÍAS'--> <ul class="img_sub"><!--AQUÍ LE ESPECIFIQUÉ EL CSS PARA LAS IMÁGENES--> {foreach from=$subcategories item=subcategory} <li> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategorias')}" alt="" width="{$subcategoriasSize.width}" height="{$subcategoriasSize.height}" /> {else} <img src="{$img_cat_dir}default-subcategorias.jpg" alt="" width="{$subcategoriasSize.width}" height="{$subcategoriasSize.height}" /> {/if} </a><br /> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> <br class="clear"/> </div> </div> {/if} {if $products} <div class="img_prod"> <!--{include file="$tpl_dir./product-compare.tpl"}--> {include file="$tpl_dir./product-list.tpl" products=$products} {include file="$tpl_dir./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl"} {elseif !isset($subcategories)} <p class="warning">{l s='There are no products in this category.'}</p> {/if} {elseif $category->id} <p class="warning">{l s='This category is currently unavailable.'}</p> {/if} </div> {/if} ? Link to comment Share on other sites More sharing options...
Syd Posted August 4, 2012 Author Share Posted August 4, 2012 Sí, así lo puse, al final del todo Link to comment Share on other sites More sharing options...
Syd Posted August 16, 2012 Author Share Posted August 16, 2012 Hola, pues me he quedado estancadísimo con esto, no consigo solucionar este problema, espero que alguien me pueda ayudar, gracias Link to comment Share on other sites More sharing options...
Syd Posted August 25, 2012 Author Share Posted August 25, 2012 Hola, llevo un buen rato mirando esto, y no tengo éxito. Me tiene muy mosqueado el tema de que parece que sólo falla cuando se muestran la lista de productos (no falla cuando no hay ningún producto, al final del código del category.tpl, no falla cuando se pincha en una categoría, ni dentro de producto). Solo falla cuando se despliega el product list dentro de una subcategoría. Puede ser que falle el product-list.tpl? {* * 2007-2011 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-2011 PrestaShop SA * @version Release: $Revision: 6909 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if isset($products)} <!-- Products list --> <ul id="product_list" class="clear"> {foreach from=$products item=product name=products} <li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix"> <div class="center_block"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'productlist')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$productlistSize.width}" height="{$productlistSize.height}"{/if} /></a><!--AQUÍ CAMBIÉ EL TAMAÑO DE LAS IMÁGENES--> <h3>{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <!--AQUÍ ELIMINÉ LA DESCRIPCIÓN DEL PRODUCTO--> <p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:150:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:150:'...'|strip_tags:'UTF-8'}</a></p><!----> </div> <div class="right_block"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span>{/if} {if isset($product.online_only) && $product.online_only}<span class="online_only">{l s='Online only!'}</span>{/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}<span class="availability">{if ($product.allow_oosp || $product.quantity > 0)}{l s='Available'}{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span>{/if} </div> {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if} <!--<a class="button" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {if isset($comparator_max_item) && $comparator_max_item} <p class="compare"><input type="checkbox" onclick="checkForComparison({$comparator_max_item})" class="comparator" id="comparator_item_{$product.id_product}" value="{$product.id_product}" /> <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label></p> {/if} --> </div> </li> {/foreach} </ul> <!-- /Products list --> {/if} Link to comment Share on other sites More sharing options...
Recommended Posts