最终价格包括magento税

时间:2016-09-19 10:13:15

标签: php magento

您好我正在尝试获取Magento当前订单中所有项目的详细信息 所有的价值都还可以。但是这里AMT的价值不含税。我怎样才能获得含税的价值?

function getOrderProductsList($order) {
        $orderItems = $order->getAllItems();
        $purchasedSkus = array();
        $count_orderItems = count($orderItems);
        for($i = 0; $i < $count_orderItems; $i++) {
            $purchasedSkus[$i] = array(
              'ITEM' => $orderItems[$i]['sku'],
                'QTY' => number_format($orderItems[$i]['qty_ordered'],0), // no decimals
                'AMT' => number_format($orderItems[$i]['price'],2), // 2 decimal places
                'DCNT' => number_format(abs($orderItems[$i]['discount_amount']),2) 
            );
        }
        return $purchasedSkus;
    }

0 个答案:

没有答案