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

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

recent.phtml file used to show recently placed orders, on My Account Dashboard for registred customer with Section Name, Recent Orders at bottom of the page.

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

Get Base Url in Model or Plugin file Magento 2.

You can get the base URL of the store in the controller file using Store Manager Interface.

To Retrieve the Base URL of the current store, You need to instantiate constructor in your controller file,

Check below code snippet for getting base URL, Continue reading “Get Base Url in Model or Plugin file Magento 2.”

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

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

History.phtml file initiated by History.php Block class. Continue reading “How to override order/history.phtml template in Magento 2?”