Back to Top

Get Custom Model Collection According to Page Number and Page Size..(In Magento )

Updated 27 February 2024

//salesperson is a custom model in magento

$pagenum=5;// pagenumber which you data want
$pagesize=10;// how many data display on a page

$collection=Mage::getModel('salesperson/salesperson')->getCollection();
$collection->addFieldtoFilter('phone2',array('eq'=>''));// condition for filter data
$collection->setCurPage($pagenum);
$collection->setPageSize($pagesize);

foreach($collection as $t){
echo $t->geCity();
}

Searching for an experienced
Magento Company ?
Find out More
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home