Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

magento getcollection get first

// this gets all the products
$productCollection = Mage::getResourceModel('catalog/products_collection');
// this line gets just the first product
$firstItem = $productCollection->getFirstItem(); 
Source by magento.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #magento #getcollection
ADD COMMENT
Topic
Name
1+3 =