I'm writing a payment module, and after the checkout process I'm doing the following to get the price for each product.
foreach($order-&g开发者_JS百科t;getAllVisibleItems() as $item)
{
//...
$price = (float)$item->getData('row_total_incl_tax');
//...
Afaik it works with any kind of product except configurable ones. How can I retrieve the row total for a configurable product?
It seems Mage_Sales_Model_Order_Item
has an isChildrenCalculated
method. If true you can use getChildrenItems
to either list the simple products individually or loop through them and add up their row totals.
精彩评论