我在Magento的應用程序有這樣的代碼產品詳情
<?php
$order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order_details = Mage::getModel('sales/order')->loadByIncrementId($order_id);
foreach ($order_details->getAllItems() as $item) {
//here i know we can get item name as $item->getName(), sku as $item->getSku()
//but how do we get the following details
//1.category name,2.store,3.tax,city,country,state
<?php } ?>
我知道通過簡單的print_r($order_details->getAllItems())
將得到陣列list.but IM在任何情況下做到這一點
你試過用魔法吸氣劑嗎? $ item-> getCountry()例如,沒有工作? – VladH
或者只是'$ details = $ order_details-> getAllItems(); $ items = $ details-> getData(); print_r($ items);' – VladH