I have created custom template where i just want to list out payment methods in magento2. I do not want to rewrite payment method block but fetch the same block in my custom template.Is there any example in magetno2 so i can do the same Thanks in advance!
1 Answer
I have idea. maybe help you.
1: create a module and your template in this module.
2: create page in cms and add code in content tab.
{{block class="Namespace\Modulename\Block\Blockname" template="Namespace_Modulename::vendor/tempalte_file_name.phtml" }}
in your block add
protected $_template Namespace_Modulename::vendor/tempalte_file_name.phtml
-
Thanks for your replay, I did this thing. I have only problem that how to load all payment methods in this template? I wan to load all payment methods as loaded on checkout page with all validation. Commented Jul 8, 2016 at 5:00