w3debugger
w3debugger

Reputation: 2102

Show Product's Custom Attributes to Homepage or static page

I want to echo the custom attributes to any other page, except Product Page or Category Listing

Upvotes: 1

Views: 520

Answers (1)

LapisLazuli
LapisLazuli

Reputation: 406

One way of getting custom attribute in nearly any page can be done as following (in PHP):

$product_id = $this->getProduct()->getId(); // note that this changes depending on how you load your product
$storeId = Mage::app()->getStore()->getStoreId();
$value = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product_id, 'your_power_attribute_id', $storeId);
echo $value;

Upvotes: 1

Related Questions