0

i have installed one custom extension, i have to modify it, i create system.xml file in this extension, that file has a two textbox value, that i get in checkout_index_index.xml file, how to get it, please help me in this, thanks,

here is my system.xml code

<?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>
    <tab id="bodak_checkout_custom_form" translate="label" sortOrder="0">
        <label>FMS Taxrelief</label>
    </tab>
    <section id="checkoutcustomform" translate="label"  sortOrder="100"  showInDefault="1" showInWebsite="1" showInStore="1">
        <class>checkout-custom-form</class>
        <label>Taxrelief</label>
        <tab>bodak_checkout_custom_form</tab>
        <resource>Bodak_CheckoutCustomForm::checkoutcustomform_config</resource>
        <group id="general" translate="label" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>General Configuration</label>
            <field id="enable" translate="label" type="select" showInDefault="1" showInStore="1" showInWebsite="1">
                <label>Module Enable</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="tax_state" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Tax State</label>
                <source_model>Bodak\CheckoutCustomForm\Model\Config\TaxState</source_model>
            </field>

            <field id="text_above_tax_number" translate="label" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Text above tax number</label>
            </field>
            <field id="text_above_tax_state" translate="label" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Text above tax state</label>
            </field>

        </group>
    </section>
    </system>
</config>

checkout_index_index.xml code

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="custom-checkout-form" xsi:type="array">
                                                            <item name="component" xsi:type="string">uiComponent</item>
                                                            <item name="displayArea" xsi:type="string">custom-checkout-form</item>
                                                            <item name="children" xsi:type="array">
                                                                <item name="custom-checkout-form-container" xsi:type="array">
                                                                    <item name="sortOrder" xsi:type="string">0</item>
                                                                    <item name="component" xsi:type="string">Bodak_CheckoutCustomForm/js/view/checkout/custom-checkout-form</item>
                                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                                    <item name="config" xsi:type="array">
                                                                        <item name="template" xsi:type="string">Bodak_CheckoutCustomForm/checkout/custom-checkout-form</item>
                                                                    </item>
                                                                    <item name="children" xsi:type="array">
                                                                        <item name="custom-checkout-form-fieldset" xsi:type="array">
                                                                            <item name="component" xsi:type="string">uiComponent</item>
                                                                            <item name="displayArea" xsi:type="string">custom-checkout-form-fields</item>
                                                                            <item name="children" xsi:type="array">
                                                                                <item name="checkout_buyer_name" xsi:type="array">
                                                                                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
                                                                                    <item name="config" xsi:type="array">
                                                                                        <item name="customScope" xsi:type="string">customCheckoutForm</item>
                                                                                        <item name="template" xsi:type="string">ui/form/field</item>
                                                                                        <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
                                                                                    </item>
                                                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                                                    <item name="dataScope" xsi:type="string">customCheckoutForm.checkout_buyer_name</item>
                                                                                    <item name="label" xsi:type="string">Buyer name</item>
                                                                                    <item name="sortOrder" xsi:type="string">1</item>
                                                                                </item>
                                                                                <item name="checkout_buyer_email" xsi:type="array">
                                                                                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
                                                                                    <item name="config" xsi:type="array">
                                                                                        <item name="customScope" xsi:type="string">customCheckoutForm</item>
                                                                                        <item name="template" xsi:type="string">ui/form/field</item>
                                                                                        <item name="elementTmpl" xsi:type="string">ui/form/element/email</item>
                                                                                        <item name="tooltip" xsi:type="array">
                                                                                            <item name="description" xsi:type="string" translate="true">We will send an order confirmation to this email address</item>
                                                                                        </item>
                                                                                    </item>
                                                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                                                    <item name="dataScope" xsi:type="string">customCheckoutForm.checkout_buyer_email</item>
                                                                                    <item name="label" xsi:type="string">Buyer email</item>
                                                                                    <item name="sortOrder" xsi:type="string">2</item>
                                                                                    <item name="validation" xsi:type="array">
                                                                                        <item name="validate-email" xsi:type="boolean">true</item>
                                                                                    </item>
                                                                                </item>
                                                                                <item name="checkout_purchase_order_no" xsi:type="array">
                                                                                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
                                                                                    <item name="config" xsi:type="array">
                                                                                        <item name="customScope" xsi:type="string">customCheckoutForm</item>
                                                                                        <item name="template" xsi:type="string">ui/form/field</item>
                                                                                        <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
                                                                                    </item>
                                                                                    <item name="validation" xsi:type="array">
                                                                                        <item name="required-entry" xsi:type="boolean">true</item>
                                                                                    </item>
                                                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                                                    <item name="dataScope" xsi:type="string">customCheckoutForm.checkout_purchase_order_no</item>
                                                                                    <item name="label" xsi:type="string">Purchase order no.</item>
                                                                                    <item name="sortOrder" xsi:type="string">3</item>
                                                                                </item>
                                                                                <item name="checkout_goods_mark" xsi:type="array">
                                                                                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
                                                                                    <item name="config" xsi:type="array">
                                                                                        <item name="customScope" xsi:type="string">customCheckoutForm</item>
                                                                                        <item name="template" xsi:type="string">ui/form/field</item>
                                                                                        <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
                                                                                    </item>
                                                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                                                    <item name="dataScope" xsi:type="string">customCheckoutForm.checkout_goods_mark</item>
                                                                                    <item name="label" xsi:type="string">Goods mark</item>
                                                                                    <item name="sortOrder" xsi:type="string">4</item>
                                                                                </item>
                                                                                <item name="checkout_comment" xsi:type="array">
                                                                                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
                                                                                    <item name="config" xsi:type="array">
                                                                                        <item name="customScope" xsi:type="string">customCheckoutForm</item>
                                                                                        <item name="template" xsi:type="string">ui/form/field</item>
                                                                                        <item name="elementTmpl" xsi:type="string">ui/form/element/textarea</item>
                                                                                        <item name="cols" xsi:type="string">15</item>
                                                                                        <item name="rows" xsi:type="string">2</item>
                                                                                    </item>
                                                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                                                    <item name="dataScope" xsi:type="string">customCheckoutForm.checkout_comment</item>
                                                                                    <item name="label" xsi:type="string">Comment</item>
                                                                                    <item name="sortOrder" xsi:type="string">5</item>
                                                                                </item>
                                                                            </item>
                                                                        </item>
                                                                    </item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

enter image description here in this code has two field name text_above_tax_number and text_above_tax_state that fields database value i want to get in my xml file,

I have try this Link but in checkout_index_idex.xml file has how to add code i dont know

6
  • Can you specify in detail what you are looking for? Commented Aug 19, 2020 at 6:12
  • @DhirenVasoya in my checkout_index_index.xml file has written two field code, that field display at frontend, and i have created system.xml file and that file has also two field, now i want get that two field data in xml file
    – rocky9310
    Commented Aug 19, 2020 at 6:17
  • @DhirenVasoya i have upload my checkout_index_index.xml file code
    – rocky9310
    Commented Aug 19, 2020 at 6:18
  • Do you want to show those title on checkout page any where or something? Commented Aug 19, 2020 at 6:24
  • @DhirenVasoya yes i want two show that title in checkout page, above Buyer name and Goods mark field
    – rocky9310
    Commented Aug 19, 2020 at 6:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.