Get Backend Base Url in JS file Magento 2?

You can get base URL of the backend/admin panel in javascript(JS) file to fetch Custom URL of a site to call ajax request in backend area.

‘mage/url’ widget is not used to fetch backend base URL in Magento 2.

You need to create a template file using layout XML and define the base URL of backend under the template file. Continue reading “Get Backend Base Url in JS file Magento 2?”

How to override cart/item/renderer/actions/edit.phtml template in Magento 2?

You can override cart/item/renderer/actions/edit.phtml file using layout XML way or directly add template file to the theme level under Magento_Checkout theme module.

  • Theme level Override,

edit.phtml file used to display edit link for every cart item within the last column in cart table. Continue reading “How to override cart/item/renderer/actions/edit.phtml template in Magento 2?”

How to override login.phtml template in Magento 2?

You can override login.phtml file using layout XML way or directly add template file to the theme level under Magento_Customer theme module.

login.phtml file used to display login form in Frontend area.

Theme Level Override,

Module Level Override,

You can see a base definition for define login.phtml file at customer module, Magento_Customer/view/frontend/layout/customer_account_login.xml location. Continue reading “How to override login.phtml template in Magento 2?”