I need to get $collection->setPage(0, 10); to work on my non-EAV model and it doesn’t work. I’ve tried and $matches->getSelect()->setPage(0, 10); and it doesn’t help.
I need to get $collection->setPage(0, 10); to work on my non-EAV model and it
Share
The
setPage()method only works for EAV based collection in Magento because it is defined inMage_Eav_Model_Entity_Collection_Abstractclass…As you can see, its a nice shorthand utility that is available to EAV based collections. For your non EAV based collection you can create your own version of this in your collection class or use the more verbose syntax for setting the page number and size in your client code when initialising the collection: