Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
割引が適用された注文から商品の単価を取得することはできますか?
たとえば、注文番号 #12345 には、通常単価が 3.00 ポンドの 4 つの製品が含まれています。各アイテムが 25% オフになる割引が適用されます。
からの各注文からそのコストにアクセスするにはどうすればよい$order->getAllItems()ですか?
$order->getAllItems()
あなたはこのようにそれを行うことができます
foreach($items as $item) { $productid = $item->getProductId(); $products = Mage::getModel('catalog/product')->load($productid); }
このようにして、注文した商品の単価を取得できます。