📜  magento getcollection get first - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:27.397000             🧑  作者: Mango

代码示例1
// this gets all the products
$productCollection = Mage::getResourceModel('catalog/products_collection');
// this line gets just the first product
$firstItem = $productCollection->getFirstItem();