magento getcollection get first

Solutions on MaxInterview for magento getcollection get first by the best coders in the world

showing results for - "magento getcollection get first"
Allan
05 Mar 2017
1// this gets all the products
2$productCollection = Mage::getResourceModel('catalog/products_collection');
3// this line gets just the first product
4$firstItem = $productCollection->getFirstItem();