Magento显示分层价格
我浏览了Magento论坛和这里的其他论坛,但没有找到正确的答案 我只需要将产品页面(以及类别页面)上显示的正常价格替换为最低层价格 想替换price.phtml~第59行:Magento显示分层价格,magento,Magento,我浏览了Magento论坛和这里的其他论坛,但没有找到正确的答案 我只需要将产品页面(以及类别页面)上显示的正常价格替换为最低层价格 想替换price.phtml~第59行: $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) 与: (在上面声明$_tierPrices=$this->getTierPrices时) 欢迎任何建议 已解决: 在以下位置找到解决方案: 为此找到了另一种方法,基本上需要:
$_price = $_taxHelper->getPrice($_product, $_product->getPrice())
与:
(在上面声明$_tierPrices=$this->getTierPrices时)
欢迎任何建议
已解决: 在以下位置找到解决方案:
为此找到了另一种方法,基本上需要:
$_tierPrices = $this->getTierPrices();
…并拼接阵列以获得第一层
$_firstTier = array_slice($_tierPrices, 0, 1);
然后,您可以循环浏览$\u Firstier并获取“价格”值:
$c = count($_firstTier);
for ($i = 0; $i < $c; $i++) {
$_firstTierPrice = Mage::helper('core')->currency($_firstTier[$i]['price']);
}
echo $_firstTierPrice;
$c=计数($\u第一层);
对于($i=0;$i<$c;$i++){
$\u firstTierPrice=Mage::helper('core')->currency($\u firstTier[$i]['price']);
}
echo$\u Firstierprice;
$c = count($_firstTier);
for ($i = 0; $i < $c; $i++) {
$_firstTierPrice = Mage::helper('core')->currency($_firstTier[$i]['price']);
}
echo $_firstTierPrice;