Magento 2 – How To Get Product Collection?
Today we will learn very interesting things. which is getting product collection with two ways, Let’s see how they work. With Dependency Injection: We will get the list of products in our Magento 2 store using Dependency Injection. First, we need to inject the object of \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory class in the constructor of your module’s block class and […]