I am new developer of Magento 2.

Is Magento provided a way to set default value of quantity in admin new product page? enter image description here


I found solution:


<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <modal name="advanced_inventory_modal">
        <fieldset name="stock_data">
            <field name="qty">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="value" xsi:type="string">1</item>

Don't forget clear cache. I hope it will help.

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.