Jump to content

[Solved] Numbers of products in grid view


Recommended Posts

Update that was easy:

Just change line from {if $smarty.foreach.products.index%3==2}

to {if $smarty.foreach.products.index%3==3}


I have made my own "hack" for the product-list view.

So I have a grid / column layout.

But how can change the columns from 3 to 5 columns any suggestions?

I have made the left and right column in the layout to only 26px wide so there should be room for 5 products.

This is my code:

<!-- MODULE Home Featured Products -->
{if isset($products)}
   <!-- Products list -->




               {if $product.on_sale}
     
               {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))}

               {/if}


               {if $product.new == 1} 
{/if}
getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />






{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}


{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
                   {if $product.price_tax_exc|string_format:"%.2f" < $product.price|string_format:"%.2f"}{convertPrice price=$product.price} {l s='including tax'}
{/if}
{convertPrice price=$product.price_tax_exc} {l s='excluding tax'}





               {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
               {else}

               {/if}









   <!-- /Products list -->
{/if}
<!-- /MODULE Home Featured Products -->

Link to comment
Share on other sites

×
×
  • Create New...