Bundle items name & Cost get using Order Object in success.phtml page after complete place order.
Solved! Go to Solution.
Hi @Ashish_k_php,
Maybe using this?
foreach ($order->getAllItems() as $item) { echo $item->getName() . PHP_EOL; echo $item->getSku() . PHP_EOL; echo $item->getPrice() . PHP_EOL; echo $item->getQtyOrdered() . PHP_EOL; }
Hi @Ashish_k_php,
If you have the $order object you should be able to do something like this:
foreach ($order->getAllItems() as $item) { echo $item->getName() . PHP_EOL; echo $item->getSku() . PHP_EOL; echo $item->getPrice() . PHP_EOL; }
Thank you @Damian Culotta for the reply.
Yes, this is working fine on my end but not get selected bundle items Qty.
How can we get that Qty?
@Damian Culotta Yes.
Hi @Ashish_k_php,
Maybe using this?
foreach ($order->getAllItems() as $item) { echo $item->getName() . PHP_EOL; echo $item->getSku() . PHP_EOL; echo $item->getPrice() . PHP_EOL; echo $item->getQtyOrdered() . PHP_EOL; }