我需要知道哪些属性"在产品列表中使用"选中为YES,但没有找到任何函数,例如$ attribute-> getIsVisibleOnFront()
事实上,我不知道如何从属性的"前端属性"中获取选项值(在快速搜索中使用,在高级搜索中使用,...)
我的代码是这样的:
<?php $attributes = $_product->getAttributes();
foreach ($attributes as $attribute) {
if ($attribute->getIsUsedInProductListing()) {
echo $attribute->getStoreLabel();
}
}
?>
Run Code Online (Sandbox Code Playgroud)
getIsUsedInProductListing()不存在;-)
谢谢...