<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection */
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
/** Apply filters here */
$collection = $productCollection->addAttributeToSelect('*')->load();
foreach ($collection as $product){
// echo 'Name = '.$product->getName().'<br>';
echo '<pre>';
//print_r($product->getData());
print_r($product['sw_featured']);
echo '</pre>';
}
?>
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection */
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
/** Apply filters here */
$collection = $productCollection->addAttributeToSelect('*')->load();
foreach ($collection as $product){
// echo 'Name = '.$product->getName().'<br>';
echo '<pre>';
//print_r($product->getData());
print_r($product['sw_featured']);
echo '</pre>';
}
?>
Comments
Post a Comment