2016-06-29 1 views
0

は、小計から離れて自分のコードは、Magentoの1.9.2コミュニティ版に注文項目のコレクションから小計を取得するためにどのように私はちょうどバックエンドここ <a href="https://i.stack.imgur.com/MmuyP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MmuyP.png" alt="enter image description here"></a></p> <p>のようなフロントエンドの注文の詳細を表示しようとしています

$orderData = Mage::getSingleton('sales/order')->loadByIncrementId($incrementId); 
$itemCollection = $orderData->getItemsCollection(); 

foreach($itemsCollection as $_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(); 
} 

です私もこれを試したすべて:

echo $_items->getBaseSubtotal(); 

しかし、私はまだnull値を得ています。 助けを歓迎します

+0

同じ質問:http://magento.stackexchange.com/questions/123358/how-to-get-subtotal-from-order-items-collection-in-magento-1-9-2-コミュニティ編集 –

答えて

0

base_subtotalは注文フィールドテーブルです。

それはコードの下、販売アイテムベースの総試しを得るためにあなたが$ _items-> getBaseSubtotal(からデータを取得していないtable..So受注明細)

にフィールドではありません。

$items->getBaseRowTotal(); 

Source Link

関連する問題

 関連する問題