0

What is the best way to Override Magento_Payment::info/default.phtml in module ?

1
  • Any thoughts on this ?
    – devhs
    Commented Mar 16, 2021 at 10:19

1 Answer 1

1

Inside a custom theme would be the best approach to override this template.

LE: In a custom module there are several ways you could try this, check here the instructions from devdocs for Setting the template used by a block.

8
  • I am not using theme, just using a module is their any way i can override with in the module ? That would be great
    – devhs
    Commented Mar 1, 2021 at 10:27
  • I updated my answer :)
    – Diana
    Commented Mar 1, 2021 at 10:33
  • Thankyou i will try & update.
    – devhs
    Commented Mar 1, 2021 at 12:00
  • roger that, please let me know the results.
    – Diana
    Commented Mar 1, 2021 at 14:39
  • Hello, Template file - Magento_Payment::info/default.phtml Block - Magento2/vendor/magento/module-payment/Block/Info.php The template file is declared in info.php, i have tried with plugin "beforeToHtml" & set module's template but didn't work.
    – devhs
    Commented Mar 10, 2021 at 11:16

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.