How to resolved WARNING | Unescaped output detected of GrumPHP Magento 2.

When you use GrumPHP code sniffer tool to commit your code for the project to follow Magento Coding Standard.

GrumPHP is the Automatic Code Quality Checker tools for PHP based applications.
Continue reading “How to resolved WARNING | Unescaped output detected of GrumPHP Magento 2.”

How to get Custom, Base Url in JS file Magento 2?

You can get the custom or base URL of store in javascript(JS) file for frontend area using ‘mage/url’ widgets.

You have to pass ‘mage/url’ widget as a dependency in a define([]) or require([]) function of the javascript file. Continue reading “How to get Custom, Base Url in JS file Magento 2?”

How to override order/order_comments.phtml template in Magento 2?

You can override order_comments.phtml file using layout XML by creating a module or directly add template file to the theme level under Magento_Sales module.

order_comments.phtml file used to show the order comment in order details view page.

order_comments.phtml file is declared under the sales_order_view.xml file in Sales Module. Continue reading “How to override order/order_comments.phtml template in Magento 2?”