0

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.
  • What is your purpose of assigning configurable product price? Each configurable product's child product has their own attributes (price, quantity, etc.), that child product attributes are used in quote, order, etc. – Rendy Eko Prastiyo Apr 26 '17 at 6:46
  • Currently as a magento default. It is showing lowest price of simple product of Configurable product price on list page. I want ot change it so it will display whatever admin entered in configurable product. Configurable product => $12..... (1). Simple Product 1=> $12...... (2). Simple Product 2=> $10...... (3). Simple Product 3=> $14...... Now it will display price $10 on listing page. I want it so it will display $12(Whatever entered from configurable product). I had a log customization and based on that this is my requirement to display custom added price on front-end. – Gopal Kacha Apr 26 '17 at 11:07
  • @GopalKacha Did you get the solution? or the full module? Please share.. I am stuck in the same problem – Jsparo30 Apr 23 '18 at 11:14
  • Yes, I have created module.. I will share with you. – Gopal Kacha Apr 24 '18 at 15:14
  • 1
    I have solved this issue by creating plugin method of Magento2. You can get complete detail of the module at: kachagopal.blogspot.com/2018/08/… – Gopal Kacha Aug 1 '18 at 21:13
1

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.

  • I have solved this issue by creating plugin method of Magento2. You can get complete detail of the module at: kachagopal.blogspot.com/2018/08/… – Gopal Kacha Aug 1 '18 at 21:11
  • @GopalKacha then I assume if the price of the simple products change, the admin then have to change the price of the configurable product manually? – Mohammed Joraid May 28 at 10:38

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.