I have done some research to this subject but couldn't seem to find a detailed answer.

What I need

To overwrite a template file from a third party module in my case: Amasty One Step Checkout

Template file to overwrite:


I have found that this file is loaded using knockoutjs via this function:

<!-- ko with: requestComponent('checkout.steps.shipping-step.shippingAddress') -->
<!-- ko template: 'Amasty_Checkout/onepage/shipping/methods' --><!-- /ko -->

in file:


What I've done

Added module dependency

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Plugin_Name" setup_version="1.0.0">
            <module name="Magento_Checkout" />
            <module name="Amasty_Checkout" />

Tried overwriting the template file like this in my module's checkout_index_index.xml

<referenceBlock name="checkout.steps.shipping-step.shippingAddress">
    <action method="setTemplate">
         <argument name="template" xsi:type="string">Plugin_Name::shipping_view.html</argument>

But without success..

Can someone explain what steps to take to overwrite a third party's template file and if there is a difference if it is loaded in another template file via knockoutjs

Thanks in advance

1 Answer 1


Try this:

Create requirejs-config.js file at below path.


And put below code in requirejs-config.js

var config = {
    map: {
        '*': {

We can override any html file in this way.

  • What if we want to override a design template file to a custom module?
    – MGento
    Commented Sep 16, 2019 at 11:32

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.