I am setting up Google trusted stores and I am stuck on one problem which is not compulsory but I would rather it was working.
I need to get the product ID of the item the customer has ordered
So far I have this:
$orderId = $this->getOrderId();
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
and I guess I need to get the product ID with something like…$order->get**productID**()
Also what would happen if there is multiple products?
Best Answer
You can do the following after your code:
The
$productIds
array will contain all the product ids from the order.