Jump to content

Homefeatured- Cambio total


carlosgc

Recommended Posts

Buenas;

Este es mi primer post y he empezado en este mundo obscuro de Prestashop y la programación hace como un mes, espero ser capaz de explicarme.

Resulta que tengo una tienda con muy pocos productos por lo que quiero que el modulo de Home featured sea totalmente distinto al que normalmente se presenta. He modificado algunos css y anchuras y he conseguido que se parezca bastante a mi idea inicial. Pero como veréis en la imagen que adjunto, tengo la tienda en mantenimiento y por eso no pongo url, se me descuadran el añadir al carrito y el ver, quería que me aparecieran debajo. Supongo que es porque para conseguir la posición del titulo y de la descripción corta he jugado con los css.

 

tengo la versión 1.5.5.0

y el theme original lo encontré por internet s llama fashionbird

 

post-710435-0-07773700-1380118224_thumb.jpg
 
<!-- MODULE Home Featured Products -->
<section class="block homefeatured">
  <h4>{l s='' mod='homefeatured'}</h4>
  {if isset($products) AND $products}
  <ul class="products row">
    {foreach from=$products item=product name=homeFeaturedProducts}
    <li class="ajax_block_product span12 "> <a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}"  alt="{$product.name|escape:html:'UTF-8'}" /> </a>
      <h5><a  class="product_link" href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}</a></h5>
      {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
      <p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>
      {else}{/if}
      <p class="product_descr" href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:400:'...'}</p>
      {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
      {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if}
      {else}
      {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='homefeatured'}"><span>{l s='View' mod='homefeatured'}</span></a> 
     </li>
    {/foreach}
  </ul>
  {else}
  <p>{l s='No featured products' mod='homefeatured'}</p>
  {/if} 
</section>
<!-- /MODULE Home Featured Products --> 
 
y los css
h5 {font-size: 12px;line-height:1.5;margin-left:200px;margin-top:-180px;margin-bottom:190px;color:#1c1c1c; overflow:visible;}
 
/* ************************************************************************************************
HOMEFEATURED and Home Block best sellers
************************************************************************************************ */
.homefeatured{padding:10px 0; }
.homefeatured h5{ padding:0; margin:0 0 0px 0; font-size:px; border-bottom:0px solid #000000}
.homefeatured:before, .homefeatured:after {content:"";display:table}
.homefeatured:after {clear:both}
.homefeatured ul {list-style-type:none;}
.homefeatured ul li {}
.homefeatured img {margin-right:0px;display:block;max-width:100%}
.homefeatured p {overflow:visible; padding:0 0 0 0; margin:-190px 0 190px 200px;}
.homefeatured .price {display:block;padding-bottom:1em}
.homefeatured .label {margin:-100  0 200px;padding:0 0 0 0;}
 
#viewed-products_block_left ul li.last{ border:none; padding-bottom:0;}
/* ************************************************************************************************

 

 

Muchas gracias antes de nada

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...