Magento 1.9 Sales Order – Get Ordered Product Count

magento-1.9sales-order

We are using magento 1.9. In that

How to get ordered product count not order qty of product. I want to how many product is there in that order?

I am using this but it showing ordered qty only

 <?php 
        $_order = $this->getOrder(); //call the order
        echo $order_qty = floor($_order->getData('total_qty_ordered')); //get qty of all items rounded to full number (without 3.0000 or so)
        //echo $order_qty;
    ?>

Best Answer

Try this

    <?php $_order = $this->getOrder() ?>
<?php echo $_order->getTotalItemCount();?>

For eg.

enter image description here

Related Topic