How to add Cms Page Custom Layout Update file in Magento 2.3.4?

From Magento 2.3.4, For the security enhancements, default custom layout update Textarea removed from the CMS page admin section.

If you want to add XML code snippet for the CMS Page, You must have to create a CMS Page layout handle for the page.

If you want to add Custom layout update code for the About Us page, You need to create a unique XML handle for the CMS page. Continue reading “How to add Cms Page Custom Layout Update file in Magento 2.3.4?”

How to add Category Custom Layout Update XML file in Magento 2.3.4?

From Magento 2.3.4, Custom Layout Update Textarea removed from the admin panel category edit page, product edit page and cms edit page to remove the opportunity of Remote Code Execution (RCE). Replace Textarea with a selector.

Earlier you can add directly XML code snippet for the specific entity from the backend but from Magento 2.3.4 new feature was added. You need to create an XML file in your theme or module level and assign an XML file to the Custom Layout Update selector. Continue reading “How to add Category Custom Layout Update XML file in Magento 2.3.4?”

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