di.xml 5.19 KB
<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper">
        <plugin name="configurable" type="Magento\ConfigurableProduct\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Configurable" sortOrder="50" />
        <plugin name="updateConfigurations" type="Magento\ConfigurableProduct\Controller\Adminhtml\Product\Initialization\Helper\Plugin\UpdateConfigurations" sortOrder="60" />
    </type>
    <type name="Magento\Catalog\Controller\Adminhtml\Product\Builder">
        <plugin name="configurable" type="Magento\ConfigurableProduct\Controller\Adminhtml\Product\Builder\Plugin" sortOrder="50" />
    </type>
    <type name="Magento\Catalog\Model\Product\Validator">
        <plugin name="configurable" type="Magento\ConfigurableProduct\Model\Product\Validator\Plugin" sortOrder="50" />
    </type>
    <type name="Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar">
        <plugin name="configurable" type="Magento\ConfigurableProduct\Block\Adminhtml\Order\Create\Sidebar" sortOrder="200"/>
    </type>
    <type name="Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\Edit\Tab\Variations\Main">
        <arguments>
            <argument name="inputTypeFactory" xsi:type="object">Magento\Catalog\Model\System\Config\Source\InputtypeFactory</argument>
        </arguments>
    </type>
    <type name="Magento\Catalog\Model\ResourceModel\Product">
        <plugin name="reload_attributes" type="Magento\ConfigurableProduct\Plugin\Model\ResourceModel\Product" />
    </type>
    <type name="Magento\ConfigurableProduct\Ui\Component\Listing\AssociatedProduct\Columns">
        <arguments>
            <argument name="attributeRepository" xsi:type="object">Magento\ConfigurableProduct\Ui\Component\Listing\AssociatedProduct\Attribute\Repository</argument>
        </arguments>
    </type>
    <type name="Magento\ConfigurableProduct\Ui\Component\Listing\AssociatedProduct\Filters">
        <arguments>
            <argument name="attributeRepository" xsi:type="object">Magento\ConfigurableProduct\Ui\Component\Listing\AssociatedProduct\Attribute\Repository</argument>
        </arguments>
    </type>
    <preference for="Magento\ConfigurableProduct\Model\AttributesListInterface" type="Magento\ConfigurableProduct\Model\AttributesList" />
    <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="configurable" xsi:type="array">
                    <item name="class" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\Composite</item>
                    <item name="sortOrder" xsi:type="number">140</item>
                </item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\Composite">
        <arguments>
            <argument name="allowedProductTypes" xsi:type="object">Magento\Catalog\Ui\BaseAllowedProductTypes</argument>
            <argument name="modifiers" xsi:type="array">
                <item name="configurablePanel" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\ConfigurablePanel</item>
                <item name="configurablePrice" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\ConfigurablePrice</item>
                <item name="configurableQty" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\ConfigurableQty</item>
                <item name="configurableAttributeSetHandler" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\ConfigurableAttributeSetHandler</item>
                <item name="StockData" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\StockData</item>
                <item name="customOptions" xsi:type="string">Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\CustomOptions</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier\ConfigurablePanel">
        <arguments>
            <argument name="formName" xsi:type="string">product_form</argument>
            <argument name="dataScopeName" xsi:type="string">product_form.product_form</argument>
            <argument name="dataSourceName" xsi:type="string">product_form.product_form_data_source</argument>
        </arguments>
    </type>
    <virtualType name="Magento\Catalog\Ui\BaseAllowedProductTypes" type="Magento\Catalog\Ui\AllowedProductTypes">
        <arguments>
            <argument name="productTypes" xsi:type="array">
                <item name="simple" xsi:type="string">simple</item>
                <item name="virtual" xsi:type="string">virtual</item>
                <item name="configurable" xsi:type="string">configurable</item>
            </argument>
        </arguments>
    </virtualType>
</config>