123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?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">
- <preference for="Magento\InventoryCatalogApi\Api\DefaultStockProviderInterface" type="Magento\InventoryCatalog\Model\DefaultStockProvider"/>
- <preference for="Magento\InventoryCatalogApi\Api\DefaultSourceProviderInterface" type="Magento\InventoryCatalog\Model\DefaultSourceProvider"/>
- <preference for="Magento\InventoryCatalogApi\Model\GetProductIdsBySkusInterface" type="Magento\InventoryCatalog\Model\GetProductIdsBySkus"/>
- <preference for="Magento\InventoryCatalogApi\Model\GetProductTypesBySkusInterface" type="Magento\InventoryCatalog\Model\ResourceModel\GetProductTypesBySkus" />
- <preference for="Magento\InventoryCatalogApi\Model\GetSkusByProductIdsInterface" type="Magento\InventoryCatalog\Model\GetSkusByProductIds"/>
- <preference for="Magento\InventoryCatalogApi\Model\IsSingleSourceModeInterface" type="Magento\InventoryCatalog\Model\IsSingleSourceMode"/>
- <type name="Magento\InventoryApi\Api\StockRepositoryInterface">
- <plugin name="prevent_default_stock_deleting"
- type="Magento\InventoryCatalog\Plugin\InventoryApi\StockRepository\PreventDeleting\DefaultStockPlugin"/>
- </type>
- <type name="Magento\InventoryApi\Api\SourceItemsSaveInterface">
- <plugin name="set_data_to_legacy_catalog_inventory_at_source_items_save"
- type="Magento\InventoryCatalog\Plugin\InventoryApi\SetDataToLegacyCatalogInventoryAtSourceItemsSavePlugin"/>
- </type>
- <type name="Magento\InventoryIndexer\Indexer\SourceItem\SourceItemIndexer">
- <plugin name="priceIndexUpdater" type="Magento\InventoryCatalog\Plugin\InventoryIndexer\Indexer\SourceItem\PriceIndexUpdater" sortOrder="20"/>
- </type>
- <type name="Magento\InventoryIndexer\Indexer\Stock\StockIndexer">
- <plugin name="priceIndexUpdater" type="Magento\InventoryCatalog\Plugin\InventoryIndexer\Indexer\Stock\PriceIndexUpdater"/>
- </type>
- <type name="Magento\CatalogInventory\Model\Indexer\ProductPriceIndexFilter">
- <plugin name="change_select_for_price_modifier" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Indexer\ModifySelectInProductPriceIndexFilter"/>
- </type>
- <type name="Magento\InventoryApi\Api\SourceItemsDeleteInterface">
- <plugin name="set_to_zero_legacy_catalog_inventory_at_source_items_delete"
- type="Magento\InventoryCatalog\Plugin\InventoryApi\SetToZeroLegacyCatalogInventoryAtSourceItemsDeletePlugin"/>
- </type>
- <type name="Magento\CatalogInventory\Model\ResourceModel\QtyCounterInterface">
- <plugin name="update_source_item_at_legacy_qty_counter" type="Magento\InventoryCatalog\Plugin\CatalogInventory\UpdateSourceItemAtLegacyQtyCounterPlugin"/>
- </type>
- <type name="Magento\CatalogInventory\Model\ResourceModel\Stock\Item">
- <plugin name="update_source_item_at_legacy_stock_item_save"
- type="Magento\InventoryCatalog\Plugin\CatalogInventory\UpdateSourceItemAtLegacyStockItemSavePlugin"/>
- <plugin name="priceIndexUpdater" disabled="true"/>
- </type>
- <type name="Magento\CatalogInventory\Model\ResourceModel\Stock\Status">
- <plugin name="adapt_add_stock_data_to_collection"
- type="Magento\InventoryCatalog\Plugin\CatalogInventory\Model\ResourceModel\Stock\Status\AdaptAddStockDataToCollectionPlugin"/>
- <plugin name="adapt_add_stock_status_to_select"
- type="Magento\InventoryCatalog\Plugin\CatalogInventory\Model\ResourceModel\Stock\Status\AdaptAddStockStatusToSelectPlugin"/>
- <plugin name="adapt_add_is_in_stock_filter_to_collection"
- type="Magento\InventoryCatalog\Plugin\CatalogInventory\Model\ResourceModel\Stock\Status\AdaptAddIsInStockFilterToCollectionPlugin"/>
- </type>
- <type name="Magento\CatalogInventory\Helper\Stock">
- <plugin name="adapt_add_in_stock_filter_to_collection" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAddInStockFilterToCollectionPlugin"/>
- <plugin name="adapt_add_stock_status_to_products" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAddStockStatusToProductsPlugin"/>
- <plugin name="adapt_assign_status_to_product" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Helper\Stock\AdaptAssignStatusToProductPlugin"/>
- </type>
- <type name="Magento\InventoryApi\Model\SourceValidatorChain">
- <arguments>
- <argument name="validators" xsi:type="array">
- <item name="default_source_disable_validator" xsi:type="object">Magento\InventoryCatalog\Model\Source\Validator\DefaultSourceDisableValidator</item>
- </argument>
- </arguments>
- </type>
- <type name="Magento\InventoryApi\Model\StockSourceLinkValidatorChain">
- <arguments>
- <argument name="validators" xsi:type="array">
- <item name="default_stock_default_source" xsi:type="object">
- Magento\InventoryCatalog\Model\StockSourceLink\Validator\AssignToDefaultStockDefaultSourceValidator
- </item>
- </argument>
- </arguments>
- </type>
- <type name="Magento\InventorySalesApi\Api\GetStockBySalesChannelInterface">
- <plugin name="adapt_stock_resolver_to_admin_website"
- type="Magento\InventoryCatalog\Plugin\InventorySalesApi\StockResolver\AdaptStockResolverToAdminWebsitePlugin"/>
- </type>
- <type name="Magento\InventoryApi\Api\StockSourceLinksDeleteInterface">
- <plugin name="prevent_delete_default_stock_links" type="Magento\InventoryCatalog\Plugin\InventoryApi\StockSourceLinksDelete\PreventDeleteDefaultStockLinksPlugin"/>
- </type>
- <type name="Magento\InventoryCatalog\Setup\Operation\UpdateInventorySourceItem">
- <arguments>
- <argument name="tableNameSourceItem" xsi:type="const">Magento\Inventory\Model\ResourceModel\SourceItem::TABLE_NAME_SOURCE_ITEM</argument>
- </arguments>
- </type>
- <type name="Magento\InventoryCatalog\Model\UpdateSourceItemBasedOnLegacyStockItem">
- <arguments>
- <argument name="sourceItemsSave" xsi:type="object">Magento\Inventory\Model\SourceItem\Command\SourceItemsSaveWithoutLegacySynchronization</argument>
- </arguments>
- </type>
- <type name="Magento\Inventory\Model\SourceItem\Command\SourceItemsSaveWithoutLegacySynchronization">
- <plugin name="set_data_to_legacy_catalog_inventory_at_source_items_save" disabled="true"/>
- </type>
- <type name="Magento\CatalogInventory\Api\StockRegistryInterface">
- <plugin name="adapt_get_stock_status" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Api\StockRegistry\AdaptGetStockStatusPlugin"/>
- <plugin name="adapt_get_stock_status_by_sku" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Api\StockRegistry\AdaptGetStockStatusBySkuPlugin"/>
- <plugin name="adapt_get_product_stock_status" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Api\StockRegistry\AdaptGetProductStockStatusPlugin"/>
- <plugin name="adapt_get_product_stock_status_by_sku" type="Magento\InventoryCatalog\Plugin\CatalogInventory\Api\StockRegistry\AdaptGetProductStockStatusBySkuPlugin"/>
- </type>
- <!-- Mass Source Assignment -->
- <preference for="Magento\InventoryCatalogApi\Api\BulkSourceAssignInterface"
- type="Magento\InventoryCatalog\Model\BulkSourceAssign"/>
- <preference for="Magento\InventoryCatalogApi\Api\BulkSourceUnassignInterface"
- type="Magento\InventoryCatalog\Model\BulkSourceUnassign"/>
- <preference for="Magento\InventoryCatalogApi\Api\BulkInventoryTransferInterface"
- type="Magento\InventoryCatalog\Model\BulkInventoryTransfer"/>
- <type name="\Magento\InventoryCatalogApi\Model\BulkSourceAssignValidatorChain">
- <arguments>
- <argument name="validators" xsi:type="array">
- <item name="sources"
- xsi:type="object">Magento\InventoryCatalog\Model\Source\Validator\Bulk\AssignSourcesValidator</item>
- </argument>
- </arguments>
- </type>
- <type name="\Magento\InventoryCatalogApi\Model\BulkSourceUnassignValidatorChain">
- <arguments>
- <argument name="validators" xsi:type="array">
- <item name="sources"
- xsi:type="object">Magento\InventoryCatalog\Model\Source\Validator\Bulk\UnassignSourcesValidator</item>
- </argument>
- </arguments>
- </type>
- <type name="\Magento\InventoryCatalogApi\Model\BulkInventoryTransferValidatorChain">
- <arguments>
- <argument name="validators" xsi:type="array">
- <item name="sources"
- xsi:type="object">Magento\InventoryCatalog\Model\Source\Validator\Bulk\TransferSourceValidator</item>
- </argument>
- </arguments>
- </type>
- <!-- Negative Min Quantity Threshold for Backorders -->
- <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter">
- <plugin name="allow_negative_min_qty"
- type="Magento\InventoryCatalog\Plugin\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter\AllowNegativeMinQtyPlugin"/>
- </type>
- <type name="Magento\CatalogInventory\Api\Data\StockItemInterface">
- <plugin name="adapt_min_qty_to_backorders"
- type="Magento\InventoryCatalog\Plugin\CatalogInventory\Api\Data\StockItemInterface\AdaptMinQtyToBackordersPlugin"/>
- </type>
- <type name="Magento\CatalogInventory\Model\Spi\StockStateProviderInterface">
- <plugin name="adapt_verify_stock_to_negative_min_qty"
- type="Magento\InventoryCatalog\Plugin\CatalogInventory\Model\Spi\StockStateProvider\AdaptVerifyStockToNegativeMinQtyPlugin"/>
- </type>
- </config>
|