skip to Main Content

I want when admin select custom field product sku, able to Change price, sale price and a button for update price dynamically.

I created only field by etc/adminhtml/system.xml but unable to its functionality dynamically.
please help.

<?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="irshad_custom" translate="label" sortOrder="10">
            <label>Custom Tab</label>
        </tab>
        <section id="test_section" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
            <class>separator-top</class>
            <label>Price Configuration</label>
            <tab>irshad_custom</tab>
            <resource>Irshad_Ahmad::config_ahmad</resource>
            <group id="custom_settings" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Manage Configuration</label>
                <field id="enable" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enable</label>
                    <source_model>MagentoConfigModelConfigSourceYesno</source_model>
                </field>
                <field id="product_sku" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Product SKU</label>
                    <comment>Manage multiple squ with comma separated</comment>
                    <field id="enable">1</field>
                </field>
                <field id="price" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Price</label>
                    <validate>required-entry</validate>
                    <comment>Please store price</comment>
                    <field id="enable">1</field>
                </field>
                <field id="sell_price" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Sell Price</label>
                    <validate>required-entry</validate>
                    <comment>Please store Sell price</comment>
                    <field id="enable">1</field>
                </field>
                <field id="update_price" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Update Price</label>
                    <validate>required-entry</validate>
                </field>
                <field id="update_button" translate="label" type="button" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Update</label>
                </field>
            </group>
        </section>
    </system>
</config>

enter image description here

Back To Top
Search