I’m Using Magento EE 2.2.2. I am trying to change the head title of wishlist “My Wish List” to “My Favourites”. I am trying in XML wishlist_index_index.xml
and added the below lines.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>My Favourites</title>
</head>
</page>
But it is not working.
2
Answers
Two way to change Wish-list head title:
Override “MagentoWishlistBlockCustomerWishlist” and set title in “_prepareLayout” function.
Use csv or inline translation.
It’s work for me.
Create di.xml file in your module app/code/[Vendor]/[Module]/etc/frontend/di.xml
Create Wishlist.php file app/code/[Vendor]/[Module]/Block/Customer/Wishlist.php
After that run setup:di:compile command and cache flush command.