The question that I tried to find out was how do we set a Limit on a Collection, the answers that I found on Google was only available for the Catalog with a setPage($pageNum, $pageSize). That didn’t work on any other collections.
See the answer below.
The question that I tried to find out was how do we set a
Share
There are several ways to do this:
Will get first 20 records.
Here is the alternative and maybe more readable way:
This will call Zend Db limit. You can set offset as second parameter.