php - How to get subtotal from order items collection in magento 1.9.2 community edition -
i trying show order details on frontend backend
here code
$orderdata = mage::getsingleton('sales/order')->loadbyincrementid($incrementid); $itemcollection = $orderdata->getitemscollection(); foreach($itemscollection $_items) { echo $_items->getname(); echo $_items->getstatus(); echo $_items->getoriginalprice(); echo $_items->getprice(); echo $_items->getqtyordered(); echo $_items->getsubtotal(); echo $_items->gettaxamount(); echo $_items->getpercent(); echo $_items->getdiscountamount(); echo $_items->getrowtotal(); }
apart subtotal getting tried too:
echo $_items->getbasesubtotal();
but still getting null value. appreciable
base_subtotal field of order table.
it not field sales order item table..so did not data $_items->getbasesubtotal()
in order sales item base total try below code:
$items->getbaserowtotal();
Comments
Post a Comment