小编Rua*_*ova的帖子

Magento的.我如何知道产品清单中是否使用了属性?

我需要知道哪些属性"在产品列表中使用"选中为YES,但没有找到任何函数,例如$ attribute-> getIsVisibleOnFront()

事实上,我不知道如何从属性的"前端属性"中获取选项值(在快速搜索中使用,在高级搜索中使用,...)

我的代码是这样的:

<?php $attributes = $_product->getAttributes();             
    foreach ($attributes as $attribute) {
        if ($attribute->getIsUsedInProductListing()) {
                       echo $attribute->getStoreLabel();
                    }
            }
    ?>
Run Code Online (Sandbox Code Playgroud)

getIsUsedInProductListing()不存在;-)

谢谢...

attributes magento

4
推荐指数
1
解决办法
2123
查看次数

标签 统计

attributes ×1

magento ×1