×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: bejoy balan
Added: Sep 25, 2014 6:50 AM
Views: 36
pagination to magento varien collection
  1. <?php
  2. $collection = new Varien_Data_Collection();
  3. foreach($array_of_products as $productId){
  4.     $product = Mage::getModel('catalog/product')->load($productId);
  5.     $_rowObject = new Varien_Object();
  6.     $_rowObject->setData($product->getData());
  7.     $collection->addItem($_rowObject);
  8. }