0

Hi I have been stuck about 1 day, what I want is override this file in my magento 2:

vendor/magento/module-user/view/adminhtml/email/password_reset_confirmation.html

I have many attempt but still no luck, the magento still load the template from the vendor's template, what I was try is this:

1.copy vendor/magento/module-user/view/adminhtml/email/password_reset_confirmation.htmlto app/design/adminhtml/Magento/email/password_reset_confirmation.html

  1. make new module with this structure :

enter image description here

  1. googling and try aplly the solution from google but still no luck, thi is is the link from any link that I have find in google Magento 2 Change Reset Password email template

so, how to override the forgot password template for admin? not for customer

6
  • which theme are you using?
    – fmsthird
    Mar 13, 2019 at 8:35
  • Magento usesvendor/magento/module-customer/view/frontend/email/password_new.html when we click "Reset password" in Admin Panel
    – fmsthird
    Mar 13, 2019 at 8:48
  • front end using Smartwave/porto, but in admin its seems not using any theme, inside app/design/adminhtml/ just has a empty folder named "Magento"
    – Deki
    Mar 13, 2019 at 8:48
  • @magefms what I want is for admin forget password, not for customer, is it same template?
    – Deki
    Mar 13, 2019 at 8:50
  • yeah it's the same , try and check
    – fmsthird
    Mar 13, 2019 at 8:50

1 Answer 1

1

Try this,

Instead of

Magento/Email

replace with this

Magento/User

so the path should be like below

app/design/adminhtml/Magento/Backend/Magento_User/email/password_reset_confirmation.html

and make sure your theme is installed properly.

Your registration.php inside the theme should be like this

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'adminhtml/Magento/backend',
__DIR__);

For more information about Creating Admin Theme

EDIT :

And you can load vendor template in admin and make a necessary changes there.

Go to Log-in -> Marketing -> Email Templates -> Add New Template -> Under Load default template -> select your module in your case under Magento_User -> choose Forget Admin Password -> then finally load template to see your template loaded in admin and make changes there.

Hope this helps :)

5
  • I have followed your step, but when I run php bin/magento setup:upgrade it give me error like this Autoload error: Theme 'adminhtml/Magento/backend' from '/home/deki/www/seamart/app/design/adminhtml/Magento/Backend' has been already defined in '/home/deki/www/seamart/vendor/magento/theme-adminhtml-backend' so I edit the registration file from at the word adminhtml/Magento/backend ,just change case from adminhtml/Magento/backend to adminhtml/Magento/Backend the error is disappear but the template still load from vendor nothing change anything
    – Deki
    Mar 13, 2019 at 8:18
  • backend is your theme-name Mar 13, 2019 at 8:59
  • @DekiAkbar Just follow this guide for more information about admin theme creation devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/… Mar 13, 2019 at 8:59
  • wait I'll check it
    – Deki
    Mar 13, 2019 at 9:04
  • updated check you can edit template by loading in admin as well @DekiAkbar Mar 13, 2019 at 9:11

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.