//购物车中产品个数:
$totalItemsInCart = Mage::helper('checkout/cart')->getItemsCount(); //total items in cart
//
$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals(); //Total object
//产品总额小计
$subtotal = $totals["subtotal"]->getValue(); //Subtotal value
echo "subtotal:".$subtotal."<br>";
//订单总额(打折,优惠后的价格)
$grandtotal = $totals["grand_total"]->getValue(); //Grandtotal value
//折扣
$discount = $totals['discount']->getValue(); //Discount value if applied

//tax
$tax = $totals['tax']->getValue(); //Tax value if present
//shipping amount
Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShipping_amount();
Logo

Agent 垂直技术社区,欢迎活跃、内容共建,欢迎商务合作。wx: diudiu5555

更多推荐