0

New to magento, I'm trying to override vendor/Amasty/Promo/view/frontend/templates/notification.phtml called in vendor/Amasty/Promo/view/frontend/layout/default.xml

So I've added the file in this locationdesign/frontend/MYTHEME/default/Amasty_Promo/templates/notification.phtml

The override is still not working. Any ideas ?

EDIT

default.xml

<body>
    <referenceBlock name="main.content">
        <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml" before="-"/>
        <block class="Amasty\Promo\Block\Notification" name="amasty.promo.notification" before="-"/>
    </referenceBlock>
</body>

1 Answer 1

0

What version are you using?

By a chance I got the module but I don't see any instructions in the file you mentioned.

vendor/Amasty/Promo/view/frontend/layout/default.xml

=

<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) 2019 Amasty (https://www.amasty.com)
 * @package Amasty_Promo
 */
-->

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <!-- TODO: Delete this file after 16.01.2020 -->
</page>

Your syntax is right, did you clear the cache? or turned it off for develpoment?

Oh and remember to turn on the developer mode!

bin/magento cache:flush
4
  • I've been adding the default xml in the message.
    – Kurano
    Jan 8, 2020 at 16:30
  • Did you turn on your new design ? Jan 8, 2020 at 16:38
  • it's not a new one so I guess yes^^ I'm just trying to an the override into this existing design
    – Kurano
    Jan 8, 2020 at 16:41
  • @Kurano did you manage to fix the problem ? Jan 11, 2020 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.