<?xml version="1.0"?>
<!--
/**
 * Webkul Software.
 *
 * @category  Webkul
 * @package   Webkul_Marketplace
 * @author    Webkul Software Private Limited
 * @copyright Webkul Software Private Limited (https://webkul.com)
 * @license   https://store.webkul.com/license.html
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Register this module with the shared Webkul_Base license service. Declaring
         enable_path opts into Base's central enable-gate: the module cannot be turned
         on in admin until its license is verified on the Webkul > Module License page. -->
    <type name="Webkul\Base\Model\LicenseRegistry">
        <arguments>
            <argument name="modules" xsi:type="array">
                <item name="Webkul_Marketplace" xsi:type="array">
                    <item name="title" xsi:type="string">Marketplace Multi Vendor</item>
                    <item name="enable_path" xsi:type="string">marketplace/general_settings/enable_module</item>
                </item>
            </argument>
        </arguments>
    </type>
    <preference for="Webkul\Marketplace\Api\Data\NotificationInterface" type="Webkul\Marketplace\Model\Notification"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductInterface" type="Webkul\Marketplace\Model\Product"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductSearchResultInterface" type="Webkul\Marketplace\Model\Product"/>
    <preference for="Webkul\Marketplace\Api\ProductRepositoryInterface" type="Webkul\Marketplace\Model\ProductRepository"/>
    <preference for="Webkul\Marketplace\Api\NotificationRepositoryInterface" type="Webkul\Marketplace\Model\NotificationRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\DraftProductInterface" type="Webkul\Marketplace\Model\DraftProduct"/>
    <preference for="Webkul\Marketplace\Api\DraftProductRepositoryInterface" type="Webkul\Marketplace\Model\DraftProductRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\AdminNewsInterface" type="Webkul\Marketplace\Model\AdminNews"/>
    <preference for="Webkul\Marketplace\Api\AdminNewsRepositoryInterface" type="Webkul\Marketplace\Model\AdminNewsRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\PublishedNewsInterface" type="Webkul\Marketplace\Model\PublishedNews"/>
    <preference for="Webkul\Marketplace\Api\PublishedNewsRepositoryInterface" type="Webkul\Marketplace\Model\PublishedNewsRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductRemarkInterface" type="Webkul\Marketplace\Model\ProductRemark"/>
    <preference for="Webkul\Marketplace\Api\ProductRemarkRepositoryInterface" type="Webkul\Marketplace\Model\ProductRemarkRepository"/>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="marketplace_products_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Product\Grid\Collection</item>
                <item name="marketplace_products_listing_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Product\FrontGrid\Collection</item>
                <item name="marketplace_draft_product_listing_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\DraftProduct\FrontGrid\Collection</item>
                <item name="marketplace_sellers_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Seller\Grid\Collection</item>
                <item name="marketplace_admin_news_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\AdminNews\Grid\Collection</item>
                <item name="marketplace_order_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Saleslist\Grid\Collection</item>
                <item name="marketplace_feedback_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Feedback\Grid\Collection</item>
                <item name="marketplace_transaction_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Sellertransaction\Grid\Collection</item>
                <item name="marketplace_commission_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Saleperpartner\Grid\Collection</item>
                <item name="marketplace_sellerflag_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\SellerFlagReason\Grid\Collection</item>
                <item name="marketplace_productflag_list_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\ProductFlagReason\Grid\Collection</item>
                <item name="marketplace_transactions_listing_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Sellertransaction\FrontGrid\Collection</item>
                <item name="marketplace_earning_listing_data_source" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Sellerearning\FrontGrid\Collection</item>
            </argument>
        </arguments>
    </type>
    <type name="\Webkul\Marketplace\Model\Order\Pdf\Invoice">
        <plugin name="Webkul_Marketplace::invoicePdfHeader" type="Webkul\Marketplace\Model\Plugin\Order\InvoicePdfHeader" sortOrder="10" />
    </type>
    <type name="\Webkul\Marketplace\Model\Order\Pdf\Shipment">
        <plugin name="Webkul_Marketplace::shipmentPdfHeader" type="Webkul\Marketplace\Model\Plugin\Order\ShipmentPdfHeader" sortOrder="11" />
    </type>
    <type name="\Webkul\Marketplace\Model\Order\Pdf\Creditmemo">
        <plugin name="Webkul_Marketplace::creditmemoPdfHeader" type="Webkul\Marketplace\Model\Plugin\Order\CreditmemoPdfHeader" sortOrder="12" />
    </type>
    <type name="\Magento\Customer\Model\Session">
        <plugin name="Webkul_Marketplace::customerSessionVendorLogin" type="Webkul\Marketplace\Model\Plugin\Customer\Session" sortOrder="13" />
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Sellerearning\FrontGrid\Collection">
        <arguments>
            <argument name="sellerEarnMainTable" xsi:type="string">marketplace_saleslist</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_sellerearning_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">sellerearning_grid_collection</argument>
            <argument name="sellerEarnResourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Saleslist</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Sellertransaction\FrontGrid\Collection">
        <arguments>
            <argument name="sellerTransMainTable" xsi:type="string">marketplace_sellertransaction</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_transaction_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">transaction_grid_collection</argument>
            <argument name="sellerTransResourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Sellertransaction</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Product\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_product</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_product_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">product_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Product</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Product\FrontGrid\Collection">
        <arguments>
            <argument name="prodFrontMainTable" xsi:type="string">marketplace_product</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_product_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">product_grid_collection</argument>
            <argument name="prodFrontResourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Product</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\DraftProduct\FrontGrid\Collection">
        <arguments>
            <argument name="draftProdMainTable" xsi:type="string">marketplace_draft_product</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_draft_product_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">marketplace_draft_product_collection</argument>
            <argument name="draftProdResourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\DraftProduct</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Seller\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_userdata</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_seller_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">seller_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Seller</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\AdminNews\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_admin_news</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_admin_news_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">admin_news_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\AdminNews</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Saleslist\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_saleslist</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_order_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">order_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Saleslist</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Feedback\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_datafeedback</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_feedback_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">feedback_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Feedback</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Sellertransaction\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_sellertransaction</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_transaction_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">transaction_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Sellertransaction</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\Saleperpartner\Grid\Collection">
        <arguments>
            <argument name="salePartnerMainTable" xsi:type="string">marketplace_saleperpartner</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_commission_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">commission_grid_collection</argument>
            <argument name="salePartnerResourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\Saleperpartner</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\SellerFlagReason\Grid\Collection">
        <arguments>
            <argument name="flagReasonMainTable" xsi:type="string">marketplace_sellerflag_reason</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_sellerflagreason_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">sellerflagreason_grid_collection</argument>
            <argument name="flagReasonResourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\SellerFlagReason</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Model\ResourceModel\ProductFlagReason\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">marketplace_productflag_reason</argument>
            <argument name="eventPrefix" xsi:type="string">marketplace_productflagreason_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">productflagreason_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Webkul\Marketplace\Model\ResourceModel\ProductFlagReason</argument>
        </arguments>
    </type>
    <virtualType name="MarketplaceGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool">
        <arguments>
            <argument name="appliers" xsi:type="array">
                <item name="regular" xsi:type="object">Magento\Framework\View\Element\UiComponent\DataProvider\RegularFilter</item>
                <item name="fulltext" xsi:type="object">Magento\Framework\View\Element\UiComponent\DataProvider\FulltextFilter</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="ProductGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Webkul\Marketplace\Model\ResourceModel\Product\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">MarketplaceGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="SellerGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Webkul\Marketplace\Model\ResourceModel\Seller\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">MarketplaceGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="OrderGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Webkul\Marketplace\Model\ResourceModel\Saleslist\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">MarketplaceGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="FeedbackGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Webkul\Marketplace\Model\ResourceModel\Feedback\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">MarketplaceGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="TransactionGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Webkul\Marketplace\Model\ResourceModel\Sellertransaction\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">MarketplaceGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="CommissionnGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Webkul\Marketplace\Model\ResourceModel\Saleperpartner\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">MarketplaceGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="order_approval_status" xsi:type="string">sales_order.order_approval_status</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="\Magento\Sales\Model\Order\Invoice\Total\Shipping">
        <plugin name="Webkul_Marketplace::invoiceTotalShippingCollect" type="Webkul\Marketplace\Model\Plugin\Order\Invoice\Total\Shipping" sortOrder="1" />
    </type>
    <preference for="Magento\Checkout\CustomerData\Cart" type="Webkul\Marketplace\CustomerData\Rewrite\Checkout\Cart" />
    <type name="Webkul\Marketplace\Logger\Logger">
        <arguments>
            <argument name="handlers" xsi:type="array">
                <item name="error" xsi:type="object">Webkul\Marketplace\Logger\Handler</item>
            </argument>
        </arguments>
    </type>
    <preference for="Magento\Catalog\Model\ResourceModel\Product\Collection" type="Webkul\Marketplace\Model\Rewrite\Catalog\ResourceModel\Product\Collection" />
    <preference for="Magento\Sitemap\Model\Sitemap" type="Webkul\Marketplace\Model\Rewrite\Sitemap\Sitemap" />

    <!-- plugin end -->
    <preference for="Webkul\Marketplace\Api\SellerFlagReasonRepositoryInterface" type="Webkul\Marketplace\Model\SellerFlagReasonRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\SellerFlagReasonInterface" type="Webkul\Marketplace\Model\SellerFlagReason"/>
    <preference for="Webkul\Marketplace\Api\Data\SellerFlagReasonSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="Webkul\Marketplace\Api\ProductFlagReasonRepositoryInterface" type="Webkul\Marketplace\Model\ProductFlagReasonRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductFlagReasonInterface" type="Webkul\Marketplace\Model\ProductFlagReason"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductFlagReasonSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="Webkul\Marketplace\Api\SellerFlagsRepositoryInterface" type="Webkul\Marketplace\Model\SellerFlagsRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\SellerFlagsInterface" type="Webkul\Marketplace\Model\SellerFlags"/>
    <preference for="Webkul\Marketplace\Api\Data\SellerFlagsSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="Webkul\Marketplace\Api\ProductFlagsRepositoryInterface" type="Webkul\Marketplace\Model\ProductFlagsRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductFlagsInterface" type="Webkul\Marketplace\Model\ProductFlags"/>
    <preference for="Webkul\Marketplace\Api\Data\ProductFlagsSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="Webkul\Marketplace\Api\OrdersRepositoryInterface" type="Webkul\Marketplace\Model\OrdersRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\OrdersSearchResultInterface" type="Webkul\Marketplace\Model\ResourceModel\Orders\Collection"/>
    <preference for="Webkul\Marketplace\Api\Data\SaleslistSearchResultInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="Webkul\Marketplace\Api\Data\FeedbackSearchResultInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="Webkul\Marketplace\Api\SaleslistRepositoryInterface" type="Webkul\Marketplace\Model\SaleslistRepository"/>
    <preference for="Webkul\Marketplace\Api\Data\FeedbackInterface" type="Webkul\Marketplace\Model\Feedback"/>
    <preference for="Webkul\Marketplace\Api\FeedbackRepositoryInterface" type="Webkul\Marketplace\Model\FeedbackRepository"/>
    <preference for="Webkul\Marketplace\Api\FeedbackcountRepositoryInterface" type="Webkul\Marketplace\Model\FeedbackcountRepository"/>
    <preference for="Webkul\Marketplace\Api\OrderPendingMailsRepositoryInterface" type="Webkul\Marketplace\Model\OrderPendingMailsRepository"/>
    <preference for="Webkul\Marketplace\Api\SaleperpartnerRepositoryInterface" type="Webkul\Marketplace\Model\SaleperpartnerRepository"/>
    <preference for="Webkul\Marketplace\Api\SellerRepositoryInterface" type="Webkul\Marketplace\Model\SellerRepository"/>
    <preference for="Webkul\Marketplace\Api\SellertransactionRepositoryInterface" type="Webkul\Marketplace\Model\SellertransactionRepository"/>
    <preference for="Webkul\Marketplace\Api\VendorAttributeMappingRepositoryInterface" type="Webkul\Marketplace\Model\VendorAttributeMappingRepository"/>
    <preference for="Webkul\Marketplace\Api\WysiwygImageRepositoryInterface" type="Webkul\Marketplace\Model\WysiwygImageRepository"/>

    <type name="Magento\Quote\Model\Quote">
        <plugin name="Webkul_Marketplace::validateMinimumAmount" type="Webkul\Marketplace\Plugin\Quote\Model\Quote" sortOrder="13" />
    </type>
    <type name="Magento\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage">
        <plugin name="Webkul_Marketplace::getMessage" type="Webkul\Marketplace\Plugin\Quote\Model\Quote\Validator\MinimumOrderAmount\ValidationMessage" sortOrder="13" />
    </type>
    <preference for="Webkul\Marketplace\Api\Data\WysiwygImageInterface" type="Webkul\Marketplace\Model\WysiwygImage"/>
    <!-- plugin used to check cart items limit -->
    <type name="Magento\Catalog\Block\Product\View">
        <plugin name="Webkul_Marketplace::checkSellerMaxQty" type="Webkul\Marketplace\Plugin\Block\ProductView" />
    </type>
    <type name="Magento\Framework\Console\CommandListInterface">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="assign_mp_product" xsi:type="object">Webkul\Marketplace\Console\Command\AssignSellerId</item>
            </argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Console\Command\AssignSellerId">
        <arguments>
            <argument name="appState" xsi:type="object">Magento\Framework\App\State\Proxy</argument>
            <argument name="productRepository" xsi:type="object">Magento\Catalog\Api\ProductRepositoryInterface\Proxy</argument>
            <argument name="sellerProduct" xsi:type="object">Webkul\Marketplace\Model\ProductFactory\Proxy</argument>
            <argument name="filterBuilder" xsi:type="object">Magento\Framework\Api\FilterBuilder\Proxy</argument>
            <argument name="searchCriteria" xsi:type="object">Magento\Framework\Api\SearchCriteriaBuilder\Proxy</argument>
            <argument name="helper" xsi:type="object">Webkul\Marketplace\Helper\Data\Proxy</argument>
        </arguments>
    </type>
    <type name="Magento\LayeredNavigation\Block\Navigation">
        <plugin name="wk_remove_seller_filter" type="Webkul\Marketplace\Plugin\LayeredNavigation\Block\Navigation" sortOrder="10" />
    </type>
    <type name="Webkul\Marketplace\Controller\Product\Productlist">
        <arguments>
            <argument name="types" xsi:type="array">
                <item name="layout1" xsi:type="array">
                    <item name="disable" xsi:type="string">marketplace_productlist_disable</item>
                    <item name="low_stock" xsi:type="string">marketplace_productlist_lowstock</item>
                    <item name="out_of_stock" xsi:type="string">marketplace_productlist_outofstock</item>
                    <item name="pending" xsi:type="string">marketplace_productlist_pending</item>
                    <item name="deny" xsi:type="string">marketplace_productlist_deny</item>
                </item>
                <item name="layout2" xsi:type="array">
                    <item name="enable" xsi:type="string">marketplace_layout2_productlist_enable</item>
                    <item name="disable" xsi:type="string">marketplace_layout2_productlist_disable</item>
                    <item name="low_stock" xsi:type="string">marketplace_layout2_productlist_lowstock</item>
                    <item name="out_of_stock" xsi:type="string">marketplace_layout2_productlist_outofstock</item>
                    <item name="pending" xsi:type="string">marketplace_layout2_productlist_pending</item>
                    <item name="deny" xsi:type="string">marketplace_layout2_productlist_deny</item>
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Controller\Order">
        <arguments>
            <argument name="formKeyValidator" xsi:type="object">Magento\Framework\Data\Form\FormKey\Validator</argument>
        </arguments>
    </type>
    <type name="Webkul\Marketplace\Controller\Order\History">
        <arguments>
            <argument name="types" xsi:type="array">
                <item name="all" xsi:type="string">All Orders</item>
                <item name="pending" xsi:type="string">Pending</item>
                <item name="processing" xsi:type="string">Processing</item>
                <item name="holded" xsi:type="string">Hold</item>
                <item name="complete" xsi:type="string">Complete</item>
                <item name="closed" xsi:type="string">Closed</item>
                <item name="canceled" xsi:type="string">Cancle</item>
            </argument>
        </arguments>
    </type>

    <!-- Plugin to Restrict max qty to order on product level  -->
    <type name="Magento\CatalogInventory\Model\Stock\Item">
        <plugin name="mk_restrict_max_qty" type="Webkul\Marketplace\Plugin\Stock\RestrictStockItem" sortOrder="10" />
    </type>

    <!-- Plugin to allow Product view of disabled product  -->
    <type name="Magento\Catalog\Helper\Product">
        <plugin name="allow_disabled_product_view" type="Webkul\Marketplace\Plugin\ProductPreview\AllowDisabledProductView" />
    </type>
    <type name="Magento\Catalog\Model\Product">
        <plugin name="allow_product_availability" type="Webkul\Marketplace\Plugin\ProductPreview\AllowAvailableProduct" />
    </type>
    <type name="\Magento\ConfigurableProduct\Model\Product\Type\Configurable">
        <plugin name="allow_disabled_availability" type="Webkul\Marketplace\Plugin\ProductPreview\AllowConfigDisabledProduct" />
    </type>
    <preference for="Magento\Bundle\Ui\DataProvider\Product\BundleDataProvider" type="Webkul\Marketplace\Ui\DataProvider\Product\BundleDataProvider" />
    <preference for="Webkul\Marketplace\Api\SellerWithdrawalRequestsInterface" type="Webkul\Marketplace\Model\SellerWithdrawalRequests"/>

    <!-- Plugin to add is_seller value in customer data -->
    <type name="Magento\Customer\CustomerData\Customer">
        <plugin name="add_is_seller_flag" type="Webkul\Marketplace\Plugin\CustomerDataPlugin" />
    </type>

    <!-- Plugin to add show_contact_us value in wishlist data -->
    <type name="Magento\Wishlist\CustomerData\Wishlist">
        <plugin name="add_show_contact_us_button_flag" type="Webkul\Marketplace\Plugin\WishlistDataPlugin" />
    </type>

    <!-- Plugin to restrict reorder -->
    <type name="Magento\Sales\Helper\Reorder">
        <plugin name="mp_restrict_reorder" type="Webkul\Marketplace\Plugin\ReorderPlugin" />
    </type>

    <!-- Plugin to update contact details for products view -->
    <type name="Magento\Catalog\Block\Ui\ProductViewCounter">
        <plugin name="webkul_contact_us_product_view" type="Webkul\Marketplace\Plugin\Catalog\Block\Ui\ProductViewCounter"/>
    </type>

    <!-- Plugin to restrict add to cart for related products -->
    <type name="Magento\Checkout\Model\AddProductToCart">
        <plugin name="filter_related_products_by_buying_option" type="Webkul\Marketplace\Plugin\FilterRelatedProducts" />
    </type>

    <!-- Collection Cache Starts -->

    <!-- Controllers -->
    <virtualType name="ControllersCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="controllerslist" xsi:type="string">marketplace_controller_list</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Controllers\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">ControllersCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Feedback -->
    <virtualType name="FeedbackCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="feedback" xsi:type="string">marketplace_feedback</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Feedback\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">FeedbackCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Feedback Count -->
    <virtualType name="FeedbackcountCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="feedbackcount" xsi:type="string">marketplace_feedbackcount</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Feedbackcount\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">FeedbackcountCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Orders -->
    <virtualType name="OrdersCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="orders" xsi:type="string">marketplace_orders</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Orders\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">OrdersCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Order Pending Mail -->
    <virtualType name="OrderPendingMailsCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="orderpendingmails" xsi:type="string">marketplace_order_pendingemails</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\OrderPendingMails\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">OrderPendingMailsCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Product -->
    <virtualType name="ProductCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="product" xsi:type="string">marketplace_product</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Product\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">ProductCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Sale per partner -->
    <virtualType name="SaleperpartnerCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="saleperpartner" xsi:type="string">marketplace_saleperpartner</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Saleperpartner\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SaleperpartnerCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Sales list -->
    <virtualType name="SaleslistCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="saleslist" xsi:type="string">marketplace_saleslist</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Saleslist\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SaleslistCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Seller transaction -->
    <virtualType name="SellerTransactionCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="sellertransaction" xsi:type="string">marketplace_sellertransaction</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Sellertransaction\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SellerTransactionCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Seller -->
    <virtualType name="SellerCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="seller" xsi:type="string">marketplace_seller</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\Seller\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SellerCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Seller flag reason -->
    <virtualType name="SellerFlagReasonCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="sellerflagreason" xsi:type="string">marketplace_sellerflagreason</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\SellerFlagReason\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SellerFlagReasonCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Product flag reason -->
    <virtualType name="ProductFlagReasonCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="productflagreason" xsi:type="string">marketplace_productflagreason</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\ProductFlagReason\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">ProductFlagReasonCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Seller Flags -->
    <virtualType name="SellerFlagsCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="sellerflags" xsi:type="string">marketplace_sellerflags</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\SellerFlags\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SellerFlagsCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Product Flags -->
    <virtualType name="ProductFlagsCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="productflags" xsi:type="string">marketplace_productflags</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\ProductFlags\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">ProductFlagsCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- WYSIWYG Image -->
    <virtualType name="WysiwygImageCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="wysiwygimage" xsi:type="string">marketplace_wysiwygimage</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\WysiwygImage\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">WysiwygImageCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Vendor Attribute Mapping -->
    <virtualType name="VendorAttributeMappingCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="vendorattributemapping" xsi:type="string">wk_mp_attr_mapping</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\VendorAttributeMapping\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">VendorAttributeMappingCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Credit Memo -->
    <virtualType name="CreditMemoListCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="creditmemolist" xsi:type="string">marketplace_creditmemolist</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\CreditMemoList\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">CreditMemoListCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Draft Product -->
    <virtualType name="DraftProductCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="draftproduct" xsi:type="string">marketplace_draftproduct</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\DraftProduct\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">DraftProductCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Product Remark -->
    <virtualType name="ProductRemarkCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="productremark" xsi:type="string">marketplace_productremark</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\ProductRemark\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">ProductRemarkCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Admin News -->
    <virtualType name="AdminNewsCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="adminnews" xsi:type="string">marketplace_adminnews</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\AdminNews\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">AdminNewsCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Published News -->
    <virtualType name="PublishedNewsCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="publishednews" xsi:type="string">marketplace_publishednews</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\PublishedNews\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">PublishedNewsCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Seller Withdrawal Requests -->
    <virtualType name="SellerWithdrawalRequestsCollectionCacheFetchStrategy" type="Magento\Framework\Data\Collection\Db\FetchStrategy\Cache">
        <arguments>
            <argument name="cacheTags" xsi:type="array">
                <item name="sellerwithdrawalrequests" xsi:type="string">marketplace_sellerwithdrawalrequests</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Webkul\Marketplace\Model\ResourceModel\SellerWithdrawalRequests\Collection">
        <arguments>
            <argument name="fetchStrategy" xsi:type="object">SellerWithdrawalRequestsCollectionCacheFetchStrategy</argument>
        </arguments>
    </type>

    <!-- Collection Cache Ends -->
</config>
