2026 Executive BenchmarkMid-Market Enterprise Modernization: How leaders across unify Commerce, Odoo ERP & AI in 90 days.
MAGENTO COMMERCE

Get justin product using magento

get your collection $_productCollection=$this->getLoadedProductCollection(); $_productCollection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect('*')...

Akshar Group Technologies
Dec 25, 2020
1 min read
Verified Source

get your collection

php
<?php
getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

$_productCollection=$this->getLoadedProductCollection();
$_productCollection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))
->addAttributeToFilter('news_to_date', array('or'=> array(
0 => array('date' => true, 'from' => $todayDate),
1 => array('is' => new Zend_Db_Expr('null')))
), 'left');

$now = date("Y-m-d");
$newsFrom= substr($_productCollection->getData('news_from_date'),0,10);
$newsTo= substr($_productCollection->getData('news_to_date'),0,10);?>
Share this playbook
LET'S BUILD WHAT'S NEXT

What's Holding Your Business Back?

Tell us where you want to go, what's getting in the way, and we'll help you figure out the technology to get there.

No sales pitch. Confidential strategic advisory.