3

We are trying to add "Continue Shopping" button after "Next" button in checkout page Magento 2. We found that below file is the .html rendering the content.

\vendor\magento\module-checkout\view\frontend\web\template\shipping.html

Can any one help me on how to add "Continue Shopping" after next button.

2 Answers 2

3

Finally i have done this by overriding files into my theme as i added below , hope this helps for someone.

app\design\frontend[Vendor][theme]\Magento_Checkout\web\template\shipping.html

      <div class="primary">
          <button data-role="opc-continue" type="submit" class="button action continue primary">
              <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
           </button>
           </br>
           <a class="continue_shopping_url" data-bind = "attr: { href: continueShoppingUrl}">Continue Shopping</a>
      </div>

app\design\frontend[Vendor][theme]\Magento_Checkout\web\js\view\shipping.js

    initialize: function () {
    // inside this initialize function i called my bindings. 
    this.continueShoppingUrl = ko.observable(window.location.origin);
1
  • please update the detailed code of second step..i am new to this Oct 29, 2018 at 12:04
0
You can add Continue Shopping Link in file

/var/www/html/magento2/vendor/magento/module-checkout/view/frontend/templates/onepage.phtml

by placing this file in your theme.

You can add link either using php or by Jquery.I have play lot of more in this file by adding some links and for customize checkout page.

Hope it will help you.

0

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.