<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection =
$objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$collection = $productCollection->addAttributeToSelect('*')->load();
foreach ($collection as $product){
echo 'Name = '.$product->getName().'<br>';
}
?>
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection =
$objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$collection = $productCollection->addAttributeToSelect('*')->load();
foreach ($collection as $product){
echo 'Name = '.$product->getName().'<br>';
}
?>
Post a Comment
Post a Comment