override in cart page in the custom module in the magento 2 is not work?
-
05-10-2020 - |
Question
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="checkout.cart">
<action method="setTemplate">
<argument name="template" xsi:type="string">Ocodewire_Designtool::cart.phtml</argument>
</action>
</referenceBlock>
</page>
Solution
You forgot the <body>
tag.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.cart">
<action method="setTemplate">
<argument name="template" xsi:type="string">Ocodewire_Designtool::cart.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
See devdocs for instructions on page configuration: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-types.html#Page-configuration-structure-and-allowed-layout-instructions
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange