0

I want get number of product order in order success page. This found solution magento 1.9 visit Get ordered product count in magento

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

but I didn't get any solution in Magento 2

If anyone know Get order product item count in order success page phtml file, please share with me,Thanks for advance

1 Answer 1

0

Add a custom block for onepage which calculates & returns the product count.

app/code/Mageplaza/HelloWorld/Block/Onepage/Success/productitemcount

Then you'd be able to grab it on the success page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.