0
我有一個產品的多個版本,我將它們組合成一個分組產品。當我交叉銷售它們時,我希望所有簡單的產品都是可點擊的(而不是Magento選擇其中一種簡單產品的默認產品)。基本上是這樣的:將來自羣組產品的所有簡單產品交叉銷售。可能?
我有一個產品的多個版本,我將它們組合成一個分組產品。當我交叉銷售它們時,我希望所有簡單的產品都是可點擊的(而不是Magento選擇其中一種簡單產品的默認產品)。基本上是這樣的:將來自羣組產品的所有簡單產品交叉銷售。可能?
複製到您的本地存儲模板/app/design/frontend/base/default/template/checkout/cart/crosssell.phtml
<?php if($this->getItemCount()): ?>
<div class="crosssell">
.........
<?php foreach ($this->getItems() as $_item): ?>
<?php if ($_item->getTypeId() == 'grouped')
{
$associatedProducts = $_item->getTypeInstance(true)->getAssociatedProducts($_item);
<?php foreach ($associatedProducts as $ap): ?>
//display associated group products here
<li class="item">
......
copy existing html structure and replace $_item with $ap
<?php echo $this->htmlEscape($ap->getName()) ?>
</li>
<?php ?>
<?php }
else
{ ?>
<li class="item">
......
// copy existing code here
</li>
<?php } ?>
<?php endforeach; ?>
.................
見Magento - how do I get associated products of product Group?
看起來沒錯。謝謝 – Heraldmonkey
你在Magento Enterprise上嗎? TargetRule模塊可以幫助... –
不,社區版。 – Heraldmonkey