Magento 2: Get Product collection filter using Service contract.

When you are looking for product collection filter in Magento 2, First thing in your mind come to go with ProductFactory approach.

With ProductFactory way, When you do use a Collection, use a Factory class to instantiate the Collection, as the getCollection() method is deprecated. Continue reading “Magento 2: Get Product collection filter using Service contract.”

List of Composite products in Magento.

What are Composite Products?
Composite Products can be used to create a product grouping(kits) and complex products by grouping existing simple or virtual products.

Composite products made using simple or virtual products combinations.

Magento Commerce contains total seven Native Products. Opensource contains only six product type except Gift Card. Continue reading “List of Composite products in Magento.”

Magento 2: Override addtocart.phtml file.

Add to cart button in product page coming from Catalog module with product/view/addtocart.phtml template file.
If you want to customization on addtocart template file in Magento 2, You can override addtocart.phtml file in your module by below way,

Create the catalog_product_view.xml file in your module,
Path: app/code/{VendorName}/{PackageName}/view/frontend/layout/catalog_product_view.xml Continue reading “Magento 2: Override addtocart.phtml file.”