Check the value of an attribute in magento

后端 未结 1 1068
失恋的感觉
失恋的感觉 2020-12-21 17:46

I have a custom attribute yes/no and what i want to do is on the product detail page of my magento site show or hide an image based on wether the value of this attribute is

相关标签:
1条回答
  • 2020-12-21 18:22

    If your attribute was called, say, show_image then you read it back like this:

    <?php if ($_product->getShowImage()) : ?>
        <img .... /><!-- PUT WHATEVER ELSE HTML YOU NEED HERE -->
    <?php endif; ?>
    
    0 讨论(0)
提交回复
热议问题