1

I want to override a template located here:

(magento_dir)/vendor/magento/module-offline-payments/view/frontend/web/template/payment/purchaseorder-form.html

I have done the override path liks this, but it is not working:

(magento_dir)/app/design/frontend/(VendorName)/(ThemeName)/Magento_Offline-Payments/view/frontend/web/template/payment/purchaseorder-form.html

I have already done this with Magento checkout module and it worked like the below:

Source path:
(magento_dir)/vendor/magento/module-checkout/...

My override path:
(magento_dir)/app/design/frontend/(VendorName)/(ThemeName)/Magento_Checkout/...

My current issue now is how I can translate "module-offline-payments" to something that works for the override path.

Can someone help?

3

Just found the answer. Here it is if someone is looking for it too.

"module-offline-payments" should be translated as "Magento_OfflinePayments" as the following:

(magento_dir)/app/design/frontend/(VendorName)/(ThemeName)/Magento_OfflinePayments/view/frontend/web/template/payment/purchaseorder-form.html

Just had a looked at the following file to see how magento itself was registering its own module: <magento_dir>/vendor/module-offline-payments/registration.php

The module was registered as "Magento_OfflinePayments"

0

In theme module-overrides you can omit the view/frontend folders in the path, making the path to your overwrite file as follows:

(magento_dir)/app/design/frontend/(VendorName)/(ThemeName)/Magento_OfflinePayments/web/template/payment/purchaseorder-form.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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