I already searched here, but none answers have work.
I have a custom module, where I get a list of products from one category setted by user, it is coded in a Helper class:
public function getConfigCategory()
{
$category = $this->_categoryFactory->create()->load('CONFIGURATION');
return $category;
}
public function getFilteredProducts()
{
return $this->getConfigCategory()->getProductCollection()->addAttributeToSelect('*');
}
So, with this I have a list of products, wich one foreach (in a Model class), but when I try to get the manufacturer attribute, it always return null.
$brand = $product->getAttributeText('manufacturer');
$brand is always null, I have tried to reload $product with this:
$product = $this->objectManager->get('Magento\Catalog\Model\Product')->load($product->getId());
But the result is always the same, any ideia? Thanks in advance.
I'm using the sample data, and I have bundle items
manufacture
in$product
object? – Abhishek Panchal Nov 17 '17 at 15:55getAttributeText
method. – lpFranz Nov 17 '17 at 15:58