Krauser Posted September 3, 2013 Share Posted September 3, 2013 (edited) Buenas tardes comunidad, llevo un rato mirando por el foro y no veo nada referente a lo que busco. Me gustaria poner las marcas/fabricantes en Grid en vez de que se vea todo correlativo hacia abajo. Estuve mirando por los .css pero no me entero mucho y prefiero preguntarlo antes de que se me desvarate algo de la pagina. ¿Como podria colocarlo? Edited September 3, 2013 by Krauser (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted September 3, 2013 Share Posted September 3, 2013 En base a la plantilla por defecto en Prestashop 1.5.5 Fichero: /themes/default/manufacturer-list.tpl Esto: {* * 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 *} {capture name=path}{l s='Manufacturers:'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} <h1>{l s='Manufacturers:'}</h1> {if isset($errors) AND $errors} {include file="$tpl_dir./errors.tpl"} {else} <p class="nbrmanufacturer">{strip} <span class="bold"> {if $nbManufacturers == 0}{l s='There are no manufacturers.'} {else} {if $nbManufacturers == 1} {l s='There is %d manufacturer.' sprintf=$nbManufacturers} {else} {l s='There are %d manufacturers.' sprintf=$nbManufacturers} {/if} {/if} </span>{/strip} </p> {if $nbManufacturers > 0} <ul id="manufacturers_list"> {foreach from=$manufacturers item=manufacturer name=manufacturers} <li class="clearfix {if $smarty.foreach.manufacturers.first}first_item{elseif $smarty.foreach.manufacturers.last}last_item{else}item{/if}"> <div class="left_side"> <!-- logo --> <div class="logo"> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$manufacturer.name|escape:'htmlall':'UTF-8'}" class="lnk_img">{/if} <img src="{$img_manu_dir}{$manufacturer.image|escape:'htmlall':'UTF-8'}-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {if $manufacturer.nb_products > 0}</a>{/if} </div> <!-- name --> <h3> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{/if} {$manufacturer.name|truncate:60:'...'|escape:'htmlall':'UTF-8'} {if $manufacturer.nb_products > 0}</a>{/if} </h3> <p class="description rte"> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{/if} {$manufacturer.short_description} {if $manufacturer.nb_products > 0}</a>{/if} <br /> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{/if} <span>{if $manufacturer.nb_products == 1}{l s='%d product' sprintf=$manufacturer.nb_products|intval}{else}{l s='%d products' sprintf=$manufacturer.nb_products|intval}{/if}</span> {if $manufacturer.nb_products > 0}</a>{/if} </p> </div> <div class="right_side"> {if $manufacturer.nb_products > 0} <a class="button" href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{l s='view products'}</a> {/if} </div> </li> {/foreach} </ul> {include file="$tpl_dir./pagination.tpl"} {/if} {/if} Déjalo por ejemplo así: {* * 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 *} {capture name=path}{l s='Manufacturers:'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} <h1>{l s='Manufacturers:'}</h1> {if isset($errors) AND $errors} {include file="$tpl_dir./errors.tpl"} {else} <p class="nbrmanufacturer">{strip} <span class="bold"> {if $nbManufacturers == 0}{l s='There are no manufacturers.'} {else} {if $nbManufacturers == 1} {l s='There is %d manufacturer.' sprintf=$nbManufacturers} {else} {l s='There are %d manufacturers.' sprintf=$nbManufacturers} {/if} {/if} </span>{/strip} </p> {if $nbManufacturers > 0} <ul id="manufacturers_list"> {foreach from=$manufacturers item=manufacturer name=manufacturers} <li class="clearfix {if $smarty.foreach.manufacturers.first}first_item{elseif $smarty.foreach.manufacturers.iteration%2 == 0}last_item_of_line{elseif $smarty.foreach.manufacturers.last}last_item{else}item{/if}"> <div class="left_side"> <!-- logo --> <div class="logo"> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$manufacturer.name|escape:'htmlall':'UTF-8'}" class="lnk_img">{/if} <img src="{$img_manu_dir}{$manufacturer.image|escape:'htmlall':'UTF-8'}-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {if $manufacturer.nb_products > 0}</a>{/if} </div> <!-- name --> <h3> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{/if} {$manufacturer.name|truncate:45:'...'|escape:'htmlall':'UTF-8'} {if $manufacturer.nb_products > 0}</a>{/if} </h3> {* <p class="description rte"> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{/if} {$manufacturer.short_description} {if $manufacturer.nb_products > 0}</a>{/if} <br /> {if $manufacturer.nb_products > 0}<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{/if} <span>{if $manufacturer.nb_products == 1}{l s='%d product' sprintf=$manufacturer.nb_products|intval}{else}{l s='%d products' sprintf=$manufacturer.nb_products|intval}{/if}</span> {if $manufacturer.nb_products > 0}</a>{/if} </p> *} </div> <div> {if $manufacturer.nb_products > 0} <a class="button" href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}">{l s='view products'}</a> {/if} </div> </li> {/foreach} </ul> {include file="$tpl_dir./pagination.tpl"} {/if} {/if} Después, en el fichero: /themes/default/css/global.css Busca esto: ul#manufacturers_list li { margin-bottom: 14px; padding: 12px 8px; border: 1px solid #eee; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius:3px; } Y dejalo así: ul#manufacturers_list li { margin-bottom: 14px; padding: 12px 8px; border: 1px solid #eee; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; width: 244px; float: left; margin-right: 9px; overflow: hidden; height: 63px; } En el mismo fichero, busca esto: ul#manufacturers_list li h3 { padding: 0 0 10px; font-size: 13px; color: #000; } Y dejalo así: ul#manufacturers_list li h3 { padding: 0 0 10px; font-size: 13px; color: #000; height: 17px; width: 170px; overflow: hidden; } En el mismo fichero, añadimos esto: ul#manufacturers_list li.last_item_of_line { margin-right: 0px; } Esto es un ejemplo rapido... Link to comment Share on other sites More sharing options...
nadie Posted September 3, 2013 Share Posted September 3, 2013 (Mensaje actualizado) Link to comment Share on other sites More sharing options...
Krauser Posted September 3, 2013 Author Share Posted September 3, 2013 Muchas gracias, funciono perfecto en la 1.5.4!! Link to comment Share on other sites More sharing options...
nadie Posted September 3, 2013 Share Posted September 3, 2013 Muchas gracias, funciono perfecto en la 1.5.4!! 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. Saludos, Link to comment Share on other sites More sharing options...
Recommended Posts