1

I have an attribute whose value when input was 1 & 0, 1 = yes and 0 = no.

I have just upgraded to Magento 1.9.2 and on the front end, it is showing 1 & 0, instead of Yes or No.

Is there a simple coding I can do that will put Yes and No on the frontend instead of 1 & 0?

Any help would be greatly appreciated.

1
  • Add you code which you have used for that. Oct 4, 2016 at 5:10

3 Answers 3

0
<?php echo $attrVal ? "Yes" : "No"; ?>
0

on frontend you have to write following code for that attribute.

echo $_product->getAttributeText('attribute_code');
0
if($data == "1"){
echo "Yes";
}else{
echo "No";
}

Your Answer

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

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