Question

I try to limit the number of products shown in a static cms block as follows

{{block type="catalog/product_list" name="product_list" category_id="4193" limit="4" mode="grid" template="catalog/product/list_custom_cat-grid.phtml"}}

I have tried others like

num_products="4" and columnCount="4" and some others but nothing works.

Was it helpful?

Solution

I skipped through the source and did not see a way to pass in a limit property. Think about deriving your own block that respects that parameter.

There are also approaches to modify the Catalog New Products List widget which comes pretty close to your requirements. But I guess the former is a little easier to implement.

OTHER TIPS

{{block type="catalog/product_list" name="product_list" category_id="4193"  mode="grid" template="catalog/product/list_custom_cat-grid_extra.phtml"}}

And then limit it in the pthml file. So have a for while in the phtml

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top