Query to display just arrived product

0
37
views
Advertisement

$_parent_category = Mage::app()->getStore()->getRootCategoryId();
$storeId = Mage::app()->getStore()->getStoreId();

$_productCollection = Mage::getResourceModel(‘catalog/product_collection’)
->addAttributeToSelect(‘*’)
->setStoreId($storeId)
->addStoreFilter($storeId)
->addAttributeToFilter(‘status’,’1′)
->setOrder(‘created_at’, ‘desc limit 1’)
->load();