Can someone tell me how I can get the current product attribute so I can save it to a variable to use anywhere in my website?
If you are saying you have the Product Object Loaded in any variable say $product, then you can get it like -
The attribute code is custom_attribute
$product->getCustomAttribute();
Or
$product->getData('custom_attribute');
@gagand_magento wrote:If you are saying you have the Product Object Loaded in any variable say $product, then you can get it like -
The attribute code is custom_attribute
$product->getCustomAttribute();
Or
$product->getData('custom_attribute');
How could I pull in the Product Object so that I could use $product->getData('custom_attribute');