2

I have been trying to get an option to appear, on the front end. I can see the attribute in the back end of Magento. It is a text field I have entered some default values in to the text field and saved it.

I have reindex the site and flushed the cache, and cleared my browser cache, but I cannot see my new attributes.

4 Answers 4

1

You have to print the attribute in the .phtml file ( for example:

$product->getData('attribute_code') or $product->getAttributeCode() )

1
  • Thanks, I will give this a try, as I am not sure why its not showing up in the front end, but this maybe the case.
    – Rob B
    Apr 14, 2016 at 7:39
1

go to catalog > manage attributes & click on the attribute you want to display in frontend , than you can see Frontend Properties below that you can see : Visible on Product View Page on Front-end to yes. enter image description here

1
  • I have check that and I had already set that to Yes
    – Rob B
    Apr 13, 2016 at 16:06
1

You can use these codes with label or without label:

Without label name:

<?php echo $_product->getAttributeText('brand'); ?>

With label name (Brand Name):

<?php $brandname = $_product->getAttributeText('brand');
 if (trim($brandname)) {
   echo "Brand Name" .$this->htmlEscape($brandname);
 }
?>
0

I know this is old, but I thought it would be helpful to post.

In this situation you need to edit the attribute labels accessed via the Associated Products tab in the configurable product settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.