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.”

How to add Datepicker for Custom option Date field in Magento 2?

In Magento 2 you can add Datepicker for a custom option Date Field in Product detail page using enable Javascript Calander. Native Magento doesn’t display Date picker for Date Custom Option field. They just show as a Dropdown option for Day, Month and Year.

You have to enable Javascript Calander from System Configuration.

Continue reading “How to add Datepicker for Custom option Date field in Magento 2?”

What is Unit Testing in Magento 2?

Unit Testing Definition:

— UNIT TESTING is a software development process where individual units from a functional(programming) file or components of the software are tested automatically using code level.
— Main Intention for a Unit test is to validate each unit of the software performs as logic designed.
— The unit testing process is completely automatic without any manual testing for functionality.

Continue reading “What is Unit Testing in Magento 2?”