di.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  9. <preference for="Magento\Quote\Api\ShippingMethodManagementInterface" type="Magento\Quote\Model\ShippingMethodManagement" />
  10. <preference for="Magento\Quote\Api\ShipmentEstimationInterface" type="Magento\Quote\Model\ShippingMethodManagement" />
  11. <preference for="Magento\Quote\Api\Data\ShippingMethodInterface" type="Magento\Quote\Model\Cart\ShippingMethod" />
  12. <preference for="Magento\Quote\Api\BillingAddressManagementInterface" type="Magento\Quote\Model\BillingAddressManagement" />
  13. <preference for="Magento\Quote\Model\ShippingAddressManagementInterface" type="Magento\Quote\Model\ShippingAddressManagement" />
  14. <preference for="Magento\Quote\Model\MaskedQuoteIdToQuoteIdInterface" type="Magento\Quote\Model\MaskedQuoteIdToQuoteId" />
  15. <preference for="Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface" type="Magento\Quote\Model\QuoteIdToMaskedQuoteId" />
  16. <preference for="Magento\Quote\Api\Data\AddressInterface" type="Magento\Quote\Model\Quote\Address" />
  17. <preference for="Magento\Quote\Api\Data\CartItemInterface" type="Magento\Quote\Model\Quote\Item" />
  18. <preference for="Magento\Quote\Api\Data\CartInterface" type="Magento\Quote\Model\Quote" />
  19. <preference for="Magento\Quote\Api\CartItemRepositoryInterface" type="Magento\Quote\Model\Quote\Item\Repository" />
  20. <preference for="Magento\Quote\Api\CartRepositoryInterface" type="Magento\Quote\Model\QuoteRepository" />
  21. <preference for="Magento\Quote\Api\Data\CartSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
  22. <preference for="Magento\Quote\Api\PaymentMethodManagementInterface" type="Magento\Quote\Model\PaymentMethodManagement" />
  23. <preference for="Magento\Quote\Api\Data\PaymentInterface" type="Magento\Quote\Model\Quote\Payment" />
  24. <preference for="Magento\Quote\Api\CouponManagementInterface" type="Magento\Quote\Model\CouponManagement" />
  25. <preference for="Magento\Quote\Api\CartManagementInterface" type="Magento\Quote\Model\QuoteManagement" />
  26. <preference for="Magento\Quote\Api\CartTotalRepositoryInterface" type="Magento\Quote\Model\Cart\CartTotalRepository" />
  27. <preference for="Magento\Quote\Api\ChangeQuoteControlInterface" type="Magento\Quote\Model\ChangeQuoteControl" />
  28. <preference for="Magento\Quote\Api\CartTotalManagementInterface" type="Magento\Quote\Model\Cart\CartTotalManagement" />
  29. <preference for="Magento\Quote\Api\Data\TotalsInterface" type="Magento\Quote\Model\Cart\Totals" />
  30. <preference for="Magento\Quote\Api\Data\TotalSegmentInterface" type="Magento\Quote\Model\Cart\TotalSegment" />
  31. <preference for="Magento\Quote\Api\Data\TotalsItemInterface" type="Magento\Quote\Model\Cart\Totals\Item" />
  32. <preference for="Magento\Quote\Api\Data\CurrencyInterface" type="Magento\Quote\Model\Cart\Currency" />
  33. <preference for="Magento\Quote\Api\GuestCartManagementInterface" type="Magento\Quote\Model\GuestCart\GuestCartManagement" />
  34. <preference for="Magento\Quote\Api\GuestCartRepositoryInterface" type="Magento\Quote\Model\GuestCart\GuestCartRepository" />
  35. <preference for="Magento\Quote\Api\GuestCartItemRepositoryInterface" type="Magento\Quote\Model\GuestCart\GuestCartItemRepository" />
  36. <preference for="Magento\Quote\Api\GuestCouponManagementInterface" type="Magento\Quote\Model\GuestCart\GuestCouponManagement" />
  37. <preference for="Magento\Quote\Api\GuestPaymentMethodManagementInterface" type="Magento\Quote\Model\GuestCart\GuestPaymentMethodManagement" />
  38. <preference for="Magento\Quote\Api\GuestCartTotalRepositoryInterface" type="Magento\Quote\Model\GuestCart\GuestCartTotalRepository" />
  39. <preference for="Magento\Quote\Model\GuestCart\GuestShippingAddressManagementInterface" type="Magento\Quote\Model\GuestCart\GuestShippingAddressManagement" />
  40. <preference for="Magento\Quote\Api\GuestShippingMethodManagementInterface" type="Magento\Quote\Model\GuestCart\GuestShippingMethodManagement" />
  41. <preference for="Magento\Quote\Api\GuestShipmentEstimationInterface" type="Magento\Quote\Model\GuestCart\GuestShippingMethodManagement" />
  42. <preference for="Magento\Quote\Api\GuestBillingAddressManagementInterface" type="Magento\Quote\Model\GuestCart\GuestBillingAddressManagement" />
  43. <preference for="Magento\Quote\Api\GuestCartTotalManagementInterface" type="Magento\Quote\Model\GuestCart\GuestCartTotalManagement" />
  44. <preference for="Magento\Quote\Api\Data\EstimateAddressInterface" type="Magento\Quote\Model\EstimateAddress" />
  45. <preference for="Magento\Quote\Api\Data\ProductOptionInterface" type="Magento\Quote\Model\Quote\ProductOption" />
  46. <preference for="Magento\Quote\Model\ValidationRules\QuoteValidationRuleInterface" type="Magento\Quote\Model\ValidationRules\QuoteValidationComposite\Proxy"/>
  47. <type name="Magento\Webapi\Controller\Rest\ParamsOverrider">
  48. <arguments>
  49. <argument name="paramOverriders" xsi:type="array">
  50. <item name="%cart_id%" xsi:type="object">Magento\Quote\Model\Webapi\ParamOverriderCartId\Proxy</item>
  51. </argument>
  52. </arguments>
  53. </type>
  54. <type name="Magento\Quote\Model\QuoteRepository">
  55. <arguments>
  56. <argument name="quoteCollection" xsi:type="object">Magento\Quote\Model\ResourceModel\Quote\Collection\Proxy</argument>
  57. </arguments>
  58. </type>
  59. <type name="Magento\Quote\Model\Quote\Address">
  60. <arguments>
  61. <argument name="addressConfig" xsi:type="object">Magento\Customer\Model\Address\Config\Proxy</argument>
  62. </arguments>
  63. </type>
  64. <virtualType name="QuoteAddressRelationsComposite" type="Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite">
  65. <arguments>
  66. <argument name="relationProcessors" xsi:type="array">
  67. <item name="default" xsi:type="object">Magento\Quote\Model\Quote\Address\Relation</item>
  68. </argument>
  69. </arguments>
  70. </virtualType>
  71. <type name="Magento\Quote\Model\ResourceModel\Quote\Address">
  72. <arguments>
  73. <argument name="entityRelationComposite" xsi:type="object">QuoteAddressRelationsComposite</argument>
  74. </arguments>
  75. </type>
  76. <virtualType name="QuoteRelationsComposite" type="Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite">
  77. <arguments>
  78. <argument name="relationProcessors" xsi:type="array">
  79. <item name="default" xsi:type="object">Magento\Quote\Model\Quote\Relation</item>
  80. </argument>
  81. </arguments>
  82. </virtualType>
  83. <type name="Magento\Quote\Model\ResourceModel\Quote">
  84. <arguments>
  85. <argument name="entityRelationComposite" xsi:type="object">QuoteRelationsComposite</argument>
  86. </arguments>
  87. </type>
  88. <preference for="Magento\Quote\Api\Data\AddressAdditionalDataInterface" type="Magento\Quote\Model\AddressAdditionalData" />
  89. <preference for="Magento\Quote\Api\Data\TotalsAdditionalDataInterface" type="Magento\Quote\Model\Cart\TotalsAdditionalData" />
  90. <preference for="Magento\Quote\Model\Quote\Address\CustomAttributeListInterface" type="Magento\Quote\Model\Quote\Address\CustomAttributeList" />
  91. <preference for="Magento\Quote\Model\Quote\Address\FreeShippingInterface" type="Magento\Quote\Model\Quote\Address\FreeShipping" />
  92. <preference for="Magento\Quote\Model\GuestCart\GuestShippingMethodManagementInterface" type="Magento\Quote\Model\GuestCart\GuestShippingMethodManagement" />
  93. <preference for="Magento\Quote\Model\ShippingMethodManagementInterface" type="Magento\Quote\Model\ShippingMethodManagement" />
  94. <preference for="Magento\Quote\Api\Data\ShippingInterface" type="Magento\Quote\Model\Shipping" />
  95. <preference for="Magento\Quote\Api\Data\ShippingAssignmentInterface" type="Magento\Quote\Model\ShippingAssignment" />
  96. <preference for="Magento\Quote\Model\Product\QuoteItemsCleanerInterface" type="Magento\Quote\Model\Product\QuoteItemsCleaner" />
  97. <type name="Magento\Catalog\Model\ResourceModel\Product">
  98. <plugin name="clean_quote_items_after_product_delete" type="Magento\Quote\Model\Product\Plugin\RemoveQuoteItems"/>
  99. <plugin name="update_quote_items_after_product_save" type="Magento\Quote\Model\Product\Plugin\UpdateQuoteItems"/>
  100. </type>
  101. <type name="Magento\Catalog\Model\Product\Action">
  102. <plugin name="quoteProductMassChange" type="Magento\Quote\Model\Product\Plugin\MarkQuotesRecollectMassDisabled"/>
  103. </type>
  104. <type name="Magento\Quote\Model\ValidationRules\QuoteValidationComposite">
  105. <arguments>
  106. <argument name="validationRules" xsi:type="array">
  107. <item name="AllowedCountryValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule</item>
  108. <item name="ShippingAddressValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule</item>
  109. <item name="ShippingMethodValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule</item>
  110. <item name="BillingAddressValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\BillingAddressValidationRule</item>
  111. <item name="PaymentMethodValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule</item>
  112. <item name="MinimumAmountValidationRule" xsi:type="object">Magento\Quote\Model\ValidationRules\MinimumAmountValidationRule</item>
  113. </argument>
  114. </arguments>
  115. </type>
  116. <type name="Magento\Quote\Model\ValidationRules\AllowedCountryValidationRule">
  117. <arguments>
  118. <argument name="generalMessage" xsi:type="string" translatable="true">Some addresses can't be used due to the configurations for specific countries.</argument>
  119. </arguments>
  120. </type>
  121. <type name="Magento\Quote\Model\ValidationRules\ShippingAddressValidationRule">
  122. <arguments>
  123. <argument name="generalMessage" xsi:type="string" translatable="true">Please check the shipping address information.</argument>
  124. </arguments>
  125. </type>
  126. <type name="Magento\Quote\Model\ValidationRules\ShippingMethodValidationRule">
  127. <arguments>
  128. <argument name="generalMessage" xsi:type="string" translatable="true">The shipping method is missing. Select the shipping method and try again.</argument>
  129. </arguments>
  130. </type>
  131. <type name="Magento\Quote\Model\ValidationRules\BillingAddressValidationRule">
  132. <arguments>
  133. <argument name="generalMessage" xsi:type="string" translatable="true">Please check the billing address information.</argument>
  134. </arguments>
  135. </type>
  136. <type name="Magento\Quote\Model\ValidationRules\PaymentMethodValidationRule">
  137. <arguments>
  138. <argument name="generalMessage" xsi:type="string" translatable="true">Enter a valid payment method and try again.</argument>
  139. </arguments>
  140. </type>
  141. </config>