Not enough data in Product\CollectionFactory, how can I get the rest?
I need to get several info from each single product in the catalog, so I used the Magento\Catalog\Model\ResourceModel\Product\CollectionFactory to get a collection of products.
Iterating through them I notice I cannot get all the data related to each product.
$product->getData('name') returns the Product Tile
$product->getData('qty') dosen't work
$product->getData('quantity_and_stock_status') returns 1 (just the number like a string)
In the last example $product->getData('quantity_and_stock_status'), if I load the product with Magento\Catalog\Model\Product, then instead of returning 1, I get an array with 2 values qty and is_in_stock, which is what I want.
Just a quick note, loading each product with `Magento\Catalog\Model\Product` is taking ages, so I'd avoid it.
Is it possible having all the info related to the product with the Product\CollectionFactory?
Re: Not enough data in Product\CollectionFactory, how can I get the rest?
Hey Rakesh, Thanks for your reply.
Unfortunately, loading products one by one, will take ages for loading and processing a big catalog. As far as you know, is there any way I can do get all the info of all the products with less DB calls as possible?