Skip to main content
added 4 characters in body
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

I am a new developer of Magento 2.

I got an array of product items from order.

$products = $order->getAllVisibleItems();

However, getAllVisibleItems()getAllVisibleItems() get the array of products. I need to convert the array to collection so that I can render it by pager. what should I do ?

I am a new developer of Magento 2.

I got an array of product items from order.

$products = $order->getAllVisibleItems();

However, getAllVisibleItems() get the array of products. I need to convert the array to collection so that I can render it by pager. what should I do ?

I am a new developer of Magento 2.

I got an array of product items from order.

$products = $order->getAllVisibleItems();

However, getAllVisibleItems() get the array of products. I need to convert the array to collection so that I can render it by pager. what should I do ?

Source Link
Haze
  • 449
  • 1
  • 7
  • 21

Magento 2: How to convert product array into collection?

I am a new developer of Magento 2.

I got an array of product items from order.

$products = $order->getAllVisibleItems();

However, getAllVisibleItems() get the array of products. I need to convert the array to collection so that I can render it by pager. what should I do ?