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

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

GrumPHP is the Automatic Code Quality Checker tool 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 the store in a javascript(JS) file for the frontend area using the 'mage/url' widgets.

You have to pass the '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?”