0

I want to add unique IDs to the 'place order' buttons on checkout.
I found the right templates on the vendor folder & tried to copy them to my custom theme on app/design:

vendor/magento/module-paypal/view/frontend/web/template/payment/paypal-express.html
To:
app/design/frontend/Vendor/Theme/Magento_Paypal/view/frontend/web/template/payment/authorizenet-directpost.html

&

vendor/magento/module-authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html
To:
app/design/frontend/Vendor/Theme/Magento_Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

But it doesn't seems to have any effect on the frontend.
*I already tried to replace 'view/frontend/web/template' with 'templates' on my overrides, still no effect.
*I tried all the obvious stuff like cache flush, static contents, etc...


UPDATE (SOLVED)
Eventually I created a custom module & overrided the templates using Vendor_Module/view/frontend/requirejs-config.js

var config = {
map: {
    '*': {
        'Magento_Authorizenet/template/payment/authorizenet-directpost.html': 'Vendor_Module/template/payment/authorizenet-directpost.html',
        'Magento_Paypal/template/payment/paypal-express.html': 'Vendor_Module/template/payment/paypal-express.html'
    }
}

};

I then placed the templates under:

Vendor_Module/view/frontend/web/template/payment/authorizenet-directpost.html
Vendor_Module/view/frontend/web/template/payment/paypal-express.html

0

Change and after change clear static content and flash cache.

app/design/frontend/Vendor/Theme/Magento_Paypal/view/frontend/web/template/payment/authorizenet-directpost.html

to

app/design/frontend/Vendor/Theme/Magento_Paypal/web/template/payment/authorizenet-directpost.html

And

app/design/frontend/Vendor/Theme/Magento_Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

to

app/design/frontend/Vendor/Theme/Magento_Authorizenet/web/template/payment/authorizenet-directpost.html

  • That didn't work. Eventually I ended up overriding those templates from a new custom module (see my update above). – Pini Feb 4 '18 at 12:27

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.