3
我想在購物車中顯示每種產品的總價格(通過ID)。Magento - 如何獲得購物車中單個產品的小計?
qty | single price | total
2 | $ 2.00 | $ 4.00 <-- that's what i need
3 | $ 5.00 | $ 15.00
| Subtotals: | $ 19.00 <-- that's what i get with the code below
$totals = Mage::getSingleton("checkout/cart")->getQuote()->getTotals();
$subtotal = $totals["subtotal"]->getValue();
echo Mage::helper('checkout')->formatPrice($subtotal);
任何幫助是值得歡迎的。
這就是它!非常感謝你 :-) – tecmec