I am trying to replace my custom payment method's button called "submit request" to "place order" button when the status is approved. I send status in URL parameter and now want to get it in knockout and data-bind in .html file and add CSS that if status is approved than "submit request" button is display:none and "place order" button is display:block. If status is not approved than "submit request" button is display:block and "place order" button is display:none. my URL is /checkout/index/index/status/approved/#payment.

Any help will be appreciated.

  • you can achieve this in your payment method renderer js.There should be a js file (assume the file name is whatever.js) under YOUR-MAGENTO-ROOT/Company/MyModule/view/frontend/web/js/view/payment/method-renderer/whatever.js. You can work on that file to achieve your requirement. – Pritam Info 24 Jun 14 '19 at 14:26
  • Add code of your method renderer js as well as ko html template. – Vivek Kumar Jun 24 '19 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.