Magento Order Item information finding

$order = Mage::getModel(‘sales/order’)->loadByIncrementId($orderIncrementId);
 
        // Get Order Items
        $order_items = $order->getItemsCollection();
        
        
        
        $orderItems = $order->getItemsCollection();

foreach ($orderItems as $item){

    echo $product_id = $item->product_id;
    echo $product_sku = $item->sku;
 echo “<br>”;
    echo $product_name = $item->getName();
    echo $_product = Mage::getModel(‘catalog/product’)->load($product_id);
    echo $cats = $_product->getCategoryIds();
 
 
 }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s