3

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
  • I have only problem that how to load all payment methods in my custom page? I wan to load all payment methods as loaded on checkout page with all validation.(List of payment methods with default validation) Jul 8, 2016 at 5:04

1 Answer 1

0

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

1
  • 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. Jul 8, 2016 at 5:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.