
Where $limit will be the number of results we want, $starting_from will be the index of the result set to be considered as starting point (note is the index of first row) -this will output 5 records starting from 3rd record.
<?php
getCollection()->setOrder('name', 'asc'); //getting the product collection, results are ordered by product name
$product_collection->getSelect()->limit($limit,$starting_from);
foreach($product_collection as $_product)
{
echo $_product->getName().'';
}
?>
is the index of first row) -this will ouptput 5 records starting from 3rd record,
getCollection()->setOrder('name', 'asc'); //getting the product collection, results are ordered by product name
$product_collection->getSelect()->limit($limit,$starting_from);
foreach($product_collection as $_product)
{
echo $_product->getName().'';
}
?>
Let’s Make Things Happen
Transforming your ideas into reality is our expertise. Share your vision without hesitation, and let our skilled team bring it to life.
“Akshar Group Technologies did such a great job at resolving the initial problem that the partnership expanded to include further development and is still ongoing. Diligent and committed, the team goes above and beyond to deliver their work promptly. They have an extensive knowledge base.”
Digital Engage, US