I have an attribute cdn_image_namethat is great for about 90,000 products. Recently, content editors reported that there are about three products that do not contain images. I highlighted the problem for the Magento getData () method.
This is the same code for the source.
$cdnImageName = $product->getData('cdn_image_name');
I also tried:
$cdnImageName = $product->getCdnImageName();
$cdnImageName = $product->getAttributeText('cdn_image_name');
In the Magento admin interface, I see a field filled with the correct value. I checked the DB, it also matters in place. It just returns "null" with any of the ways I tried.
Note: there are no typo problems, I checked the "n" times, it works for almost all products, but several.
source
share