I wonder how I can get value of an yes/no attribute for a specifical store view in magento.

I've tried that way:

$store_vies_val = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product_id, 'store_view_attr', $store_id);

but it returns nothing on displaying.

Thanks a lot for your answers!

  • By value due you mean to say the attribute label or the actual value ie: yes/no ?
    – Dexter
    May 20, 2015 at 7:42
  • I mean its actual value. Yes/No, or, at least, 1/0
    – montie
    May 20, 2015 at 7:48
  • For Yes/No type its actual value will be 1 and 0.. do you need that? I guess you mean to say the attribute label right?
    – Dexter
    May 20, 2015 at 7:49
  • The code I wrote earlier doesn't return 1/0 neither true/false. I want to detect, if this atttribute's value is 'Yes' for this product in actual store view.
    – montie
    May 20, 2015 at 7:52
  • what about the attribute having set "visible on frontend" to yes?
    – BENN1TH
    Oct 8, 2015 at 3:16

1 Answer 1


I've found a solution:

$custom = Mage::getModel('catalog/product')->load($prod_id);
$store_vies_val = $custom->getAttributeText('store_view_attr');
if (($store_vies_val == 'No'){

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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