cms block in payment method

by Nismath vi   Last Updated September 12, 2018 07:09 AM

I'm trying to add a cms block in payment methods block id=credit and i'm trying to add add a block before vault.cards.list app/design/frontend/ventor/module/Mangento_Vault/layout/vault_cards_listaction.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<body>
    <referenceContainer name="content">
        <block class="Magento\Vault\Block\Customer\CreditCards" name="vault.cards.list" cacheable="false" template="Magento_Vault::cards_list.phtml" />
        <block class="Magento\Framework\View\Element\Template" name="card.block" template="Magento_Vault::card-block.phtml" before="vault.cards.list"/>
        <block class="Magento\Vault\Block\Customer\AccountTokens" name="vault.token.list" cacheable="false" template="Magento_Vault::token_list.phtml" />
    </referenceContainer>
</body>
</page>

app/design/frontend/ventor/module/Mangento_Vault/templates/card-block.phtml

<?php
 echo $this->getLayout()
         ->createBlock('Magento\Cms\Block\Block')
         ->setBlockId('credit')
         ->toHtml();
?>


Related Questions



Add phtml to Customer Account Edit in Adminhtml

Updated April 27, 2018 07:09 AM

Stored Payment Method in magento 2.1

Updated December 19, 2017 09:09 AM


Block not shown inside a page

Updated May 05, 2017 19:09 PM