In some situations, custom
catalog_product attributes that I've created aren't loaded with the rest of the product data. So take the custom attribute,
I want to display the
multiplier attribute right next to the
price attribute in the
Mage_Catalog_Block_Product_Price block. However, the instance of the model that I get from
$_product = $this->getProduct(); doesn't include this custom attribute.
Now I know there are some tricks to get it to load, for instance:
$_product = $this->getProduct(); $_product = $_product->load($_product->getId());
Or I can add the attribute when selecting the product
Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('multiplier')
But I'd rather avoid this. Instead, I think I've done something wrong to cause my custom attributes to not be loaded by default along with system attributes. I'd like to correct the problem at the root, but I don't know how to do that.
I have found that setting
Use in Product Listings to
Yes for this attribute fixes the problem. However, I'm not sure if that's a good idea. Won't some themes end up listing this with other attributes like Color and Size?