0

I have third party module where I want override its layout file.

Third party module file: /app/code/Magecomp/Savecartpro/view/frontend/layout/savecartpro_customer_viewcart.xml

<?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"> <update handle="customer_account"/> <head> <title>Cart Detail</title> <css src="Magecomp_Savecartpro::css/savecart.css"/> </head> <body> <referenceBlock name="page.main.title" remove="true" /> <referenceContainer name="content"> <block class="Magecomp\Savecartpro\Block\Customerviewcart" template="Magecomp_Savecartpro::customerview.phtml" name="customerviewcart" cacheable="false" /> </referenceContainer> </body> </page> 

The file I created to override is: /app/design/frontend/LLW/amp/Magecomp_Savecartpro/view/frontend/layout/savecartpro_customer_viewcart.xml

<?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"> <update handle="customer_account"/> <head> <title>Cart Details</title> <css src="Magecomp_Savecartpro::css/cartlist.css"/> <css src="Magecomp_Savecartpro::css/savecart.css"/> <css src="Magecomp_Savecartpro::css/font-awesome-4.7.0/css/font-awesome.css"/> <css src="Magecomp_Savecartpro::css/font-awesome-4.7.0/css/font-awesome.min.css"/> </head> <body> <referenceContainer name="content"> <block class="Magecomp\Savecartpro\Block\Customerviewcart" template="Magecomp_Savecartpro::customerview.phtml" name="customerviewcart" cacheable="false" /> </referenceContainer> </body> </page> 

After overriding, its not taking the changed code. Where am I wrong with the code. Help will be really appreciated.

2 Answers 2

0

When adding files within app/design you should not include view/frontend so the path you should use is app/design/frontend/LLW/amp/Magecomp_Savecartpro/layout/savecartpro_customer_viewcart.xml

0

You put override file-path is wrong please put file on below path.

/app/design/frontend/LLW/amp/Magecomp_Savecartpro/layout/savecartpro_customer_viewcart.xml 

Note: don't need to create view/frontend folder when you override file in design theme folder.

Hope this will help you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.