1

I have a collection and I have created a helper function that returns all values in an array.

Now I need all those value in vendor\magento\module-checkout\view\frontend\web\template\payment-method\list.html file.

Also, I want the same value on the HTML file for payment method title display.

Please Help.

Thanks

1

payment-method\list.html is the knock js Html template files and as per knock Html template file has its respective js file.

If you want to get custom collection data at list.html file then on Js variable you have to save to your collection data as json. Suggest to you create phtml files & Block class. On window js variable like window.custom.collection =<?php echo {YourHelperClassFunction} ?>;

Then using list.html js view js file Magento_Checkout/js/view/payment/list.Then at list.js file fetch data at new function and call this function to at list.html.

| improve this answer | |
  • Thanks amit for suggesting me good approach. I will try and let you know. – Amitkumar solanki Jul 31 '19 at 9:25
  • Thanks Amit, it works – Amitkumar solanki Jul 31 '19 at 16:50

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.