Jump to content

Change from 3 to 4 products on a row


Recommended Posts

I changed the homefeatured.tpl like below but still not showing 4 on a row….

What am i doing wrong?





{l s=‘Featured products’ mod=‘homefeatured’}—> {if isset($products) AND $products}

{assign var=‘liHeight’ value=342} {assign var=‘nbItemsPerLine’ value=4} {assign var=‘nbLi’ value=$products|@count} {assign var=‘nbLines’ value=$nbLi/$nbItemsPerLine|ceil} {assign var=‘ulHeight’ value=$nbLines*$liHeight}
  • {foreach from=$products item=product name=homeFeaturedProducts}
  • ($smarty.foreach.homeFeaturedProducts.total – ($smarty.foreach.homeFeaturedProducts.total % $nbItemsPerLine))}last_line{/if}”> {$product.description_short|strip_tags|truncate:130:’…’}—> getImageLink($product.link_rewrite, $product.id_image, ‘home’)}” height=”{$homeSize.height}” width=”{$homeSize.width}” alt=”{$product.name|escape:html:‘UTF-8’}” >

    {$product.name|truncate:27:’…’|escape:‘htmlall’:‘UTF-8’}

    {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} {if !$priceDisplay} {assign var=‘off’ value=$product.price_without_reduction-$product.price} {assign var=‘off’ value=$off/$product.price_without_reduction*100} {assign var=‘off’ value=$off|round} {else} {assign var=‘off’ value=$product.price_without_reduction-$product.price_tax_exc} {assign var=‘off’ value=$off/$product.price_without_reduction*100} {assign var=‘off’ value=$off|round} {/if} {if $off > 0} -{$off}% {/if} {l s=‘View’ mod=‘homefeatured’} 0 OR $product.allow_oosp) AND $product.customizable != 2}
Link to comment
Share on other sites

Since I am not a coder, I changed my featured products columns in the global.css On about line 975, I changed the middle padding to a larger number (22px) for 3 columns, and a smaller number (2px) for 4 columns - I think it depends on your image size.

My current settings for 3 columns:

padding: 0 22px 1px;

27423_LKZiu2LZcCCxcvNpFjRD_t

Link to comment
Share on other sites

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...