Magento – Magento 2 edit price field in configurable product in admin panel

adminformconfigurable-productmagento2

In magento 2 admin, when we edit product page. Product price field is read only for configurable product.

So that Admin can't change product price for configurable product.

I want to make change so that admin can change product price from admin for configurable product.

enter image description here

I have created module Mymodule_ConfigurablePrice.
So, I created product_form.xml file at app/code/Mymodule/ConfigurablePrice/view/adminhtml/ui_component directory.

code in product_form.xml file is:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="product-details">
        <field name="price">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="disabled" xsi:type="boolean">false</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

Questions:

  • fieldset name is correct? if not, please suggest.
  • code for xml is correct? if not, please suggest.
  • Else please suggest best way to
    achieve this.

Best Answer

SIMPLE WAY OF CHANGE ANY CONFIGURABLE PRODUCT PRICE IN MAGENTO 2 CE & EE

There is a simple way change configurable product price after created product and assign its simple products.

  1. firstly require to unassigned all simple products of configurable product and change price according to your choice.

  2. After change the price successfully and now assign its simple product and save it. you find change in your configurable prodot.

    I simple way work for me with testing another way i have not find on google.

All The Best.