Question

I want to add a link (Continue Shopping) that takes me to the homepage, on the checkout step myshop.com/checkout refer to image attached.

enter image description here

Was it helpful?

Solution

Override /vendor/magento/module-checkout/view/frontend/web/template/shipping.html in your custom theme

app/design/frontend/Test/test/Magento_Checkout/web/template/shipping.html

OR If you have custom module Override shipping.html at

app/code/Vendor/Module/view/frontend/web/template/shipping.html

Now add custom link before <div class="actions-toolbar"> like this

<div class="custom-link">
    <a href="your-link">Continue Shopping</a>
</div>
<div class="actions-toolbar" id="shipping-method-buttons-container">
    <div class="primary">
        <button data-role="opc-continue" type="submit" class="button action continue primary">
            <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
        </button>
    </div>
</div>

Now deploy static files by php bin/magento setup:static-content:deploy and flush cache

OUTPUT:

enter image description here

OTHER TIPS

Override /vendor/magento/module-checkout/view/frontend/web/template/shipping.html and add a link before the button.

    <div class="actions-toolbar" id="shipping-method-buttons-container">

      <!-- add link here -->

      <div class="primary">
        <button data-role="opc-continue" type="submit" class="button action continue primary">
            <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
        </button>
      </div>
   </div>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top