Question

$attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $code);
         $options = $attribute_details->getSource()->getAllOptions(false);
       foreach($options as $option){
          echo '<p class="question"></p>';
          echo '<input type="radio" id="'.$code.$option["value"].'" value="' . $option["value"] .'"  class="styled" name=" '.  $code . ' " />';
          echo '<label for="'.$code.$option["value"].'">';
          echo $option["label"];
          echo '</label>';
         }  

Is there a way to get question front end label ? $option[value] is 1/0 and $option[label] is Yes/No - i need to get the "question text"

Was it helpful?

Solution

The attribute has frontend_label value, you can get it by doing:

echo $attribute_details->getFrontendLabel();

if i understand your question :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top