且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检查magento中的属性值

更新时间:2023-11-30 09:56:52

如果调用了您的属性,例如show_image,则您可以像这样读回它:

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; ?>