Php 不同制造商的Magento multistore

Php 不同制造商的Magento multistore,php,magento,magento-1.7,Php,Magento,Magento 1.7,我的magento 1.7运行多个商店,我需要为不同的商店展示不同的品牌/制造商 目前,我使用以下代码: <?php $product = Mage::getModel('catalog/product'); $attributes = Mage::getResourceModel('eav/entity_attribute_collection') ->setEntityTypeFilter($product->getResource()->getTypeId()) -

我的magento 1.7运行多个商店,我需要为不同的商店展示不同的品牌/制造商

目前,我使用以下代码:

<?php
$product = Mage::getModel('catalog/product');
$attributes = Mage::getResourceModel('eav/entity_attribute_collection')
->setEntityTypeFilter($product->getResource()->getTypeId())
->addFieldToFilter('attribute_code', 'manufacturer');
$attribute = $attributes->getFirstItem()->setEntity($product->getResource());
$manufacturers = $attribute->getSource()->getAllOptions(false);
?>

<?php foreach ($manufacturers as $manufacturer): ?>
<a href="/manufacturer/<?php echo $manufacturer['label'] ?>"> <?php echo $manufacturer['label'] ?> </a>
<?php endforeach; ?>

在前端显示制造商,但在所有站点显示相同的品牌

如何让magento在不同的网站上展示不同的品牌

多谢各位

试试看

$attribute->getSource()->setStoreId($yourStoreId);
$manufacturers = $attribute->getSource()->getAllOptions(false);

检查属性“manufacturer”的范围是否设置为“storeview”

很遗憾,它不起作用。我认为问题的很大一部分是在后端,我的意思是没有选项,你可以定义哪个制造商在哪里显示。。。这太可悲了!