0

Ex-See field Select Country in bydefault.. i will add new field customer group in all payment method.enter image description here

0

Create a system.xml file for your module.

[Vendor]/[Module]/etc/adminhtml/system.xml


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="payment" translate="label" type="text" sortOrder="400" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="checkmo" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="customer_group" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Customer Group</label>
                    <source_model>Magento\Customer\Model\Config\Source\Group</source_model>
                </field>
            </group>
        </section>
    </system>
</config>

  • thnx. but if i added new payment module its not set automatically so i need to set by progmatically..how it possible?@Sohel – Magento2 Devloper Apr 7 '16 at 11:31
  • you just create a module for adding this system config only – Sohel Rana Apr 7 '16 at 11:34
  • but not possible to create observer throw set field in all payment method??? – Magento2 Devloper Apr 7 '16 at 11:36
  • 1
    programmatically means? – Sohel Rana Apr 7 '16 at 11:43
  • using some event or rewrite magento core files – Magento2 Devloper Apr 7 '16 at 11:46
0

path - /vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="product.info.main" before="-"/>
        <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
        <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
        <referenceContainer name="product.info.media">
                <block class="Magento\Catalog\Block\Product\View" name="product.info.test" template="Magento_Catalog::customvideo.phtml" after="-" />
            </referenceContainer>
    </body>
</page>

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.