Jump to content

[Solved] Limit the number of products to display to visiting users


dododo

Recommended Posts

All visitors only. They can view, for example, 12 products for each category and view links inviting them to register. Apparently the file should be product-list.tpl. For registered users, everything remains unchanged.

Link to comment
Share on other sites

Ok so I don't know this theme but if it is conceived like classic one you can modify the file "productlist.tpl" which is in the folder "templates >> catalog >> _partials" of your theme like this :

{foreach from=$products item="product" key="position" name="loop"}
	{if !$logged && $smarty.foreach.loop.iteration <= 12}
		{include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position productClasses=$productClasses}
	{/if}
{/foreach}

Add the name "loop" in the foreach and add the condition that check if user is logged and the number of products to display.

  • Thanks 1
Link to comment
Share on other sites

  • dododo changed the title to [Solved] Limit the number of products to display to visiting users

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