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?

7ochem
  • 7,532
  • 14
  • 51
  • 80
yi zhang
  • 176
  • 2
  • 7

2 Answers2

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/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"

Dhiraj
  • 3
  • 2
yi zhang
  • 176
  • 2
  • 7
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

tecjam
  • 4,033
  • 3
  • 27
  • 48