我正在使用https://github.com/witrin/magento-attribute-option-image/并尝试使用此代码获取产品视图页面图像和属性缩略图
$_product = $this->getProduct();
$_attribute = $_product->getResource()->getAttribute('color');
$_options = $_attribute->getSource()->getAllOptions(false);
foreach ($_options as $_option) {
echo $_option['image'];
echo $_option['thumbnail'];
}
所以它显示了该属性的所有选项,而不是分配给产品
如何显示仅分配给产品值的属性?
我真的很感激任何帮助!