cancel
Showing results for 
Search instead for 
Did you mean: 

Wants Pricing Field editable in Configurable Products

Wants Pricing Field editable in Configurable Products

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.

 

My requirements:

Products:

  1. Red shirt($70)
  2. Black Shirt($75)
  3. White Shirt($80)
  4. Shirt(Configurable Product - Price $75)

- Default Shirt will display $70 price in list page.. I want to change this functionality and want that it display whatever I add from admin($75).

 

 

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:

  1. fieldset name is correct? if not, please suggest.
  2. code in my xml is correct? if not, please suggest.
  3. Else please suggest best way to achieve this.

Anyone have solution then help in this.