Jump to content

Limit number of products in productscategory module?


Rhobur

Recommended Posts

similar.bmp

Hi,

I have searched the forum to find how could one limit the number of products displayed by the productscategory module but found nothing usable.

There is a foreach construct which gives a number of <li> for the similar products found and I want to limit these <li>'s to the center column width.

Limiting the number of products found is not a solution since I want to display the correct number of similar products found, just want only 5 <li> generated.

I have also found this 

{if $smarty.foreach.myLoop.iteration > 3} {break}{/if}

but it doesn't work either.

I am using PS 1.5.6.0

I am attaching a pic showing the two lines productcategory whereas I need only one line of it.

example link : http://www.caprice-shop.ro/verighete-gerstner-clasic/9247-verighete-gerstner-ger20412.html

Any ideas, please?

Regards,

Link to comment
Share on other sites

Thanks for helping!

Apparently changing the above code to show only 5 doesn't work for me.

What am I doing wrong?

if ($sizeOfCategoryProducts > 9)
  {
   $categoryProducts = array_slice($categoryProducts, $middlePosition - 4, 9, true);
   $middlePosition = 4;
   }
Link to comment
Share on other sites

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...