test-magenx / module-quote
不适用
Requires
- php: ~7.3.0||~7.4.0
- magento/framework: 103.0.*
- magento/module-authorization: 100.4.*
- magento/module-backend: 102.0.*
- magento/module-catalog: 104.0.*
- magento/module-catalog-inventory: 100.4.*
- magento/module-checkout: 100.4.*
- magento/module-customer: 103.0.*
- magento/module-directory: 100.4.*
- magento/module-eav: 102.1.*
- magento/module-payment: 100.4.*
- magento/module-sales: 103.0.*
- magento/module-sales-sequence: 100.4.*
- magento/module-shipping: 100.4.*
- magento/module-store: 101.1.*
- magento/module-tax: 100.4.*
Suggests
- magento/module-webapi: 100.4.*
This package is auto-updated.
Last update: 2024-09-13 07:39:26 UTC
README
此模块提供了客户购物车管理功能。
安装
The Magento_Quote 模块是 Magento 2 的基础模块之一。您无法禁用或卸载此模块。
The Magento_Quote 模块在数据库中创建以下表
quotequote_addressquote_itemquote_address_itemquote_item_optionquote_paymentquote_shipping_ratequote_id_mask
有关在 Magento 2 中安装模块的信息,请参阅 启用或禁用模块。
可扩展性
扩展开发者可以与 Magento_Quote 模块交互。有关 Magento 扩展机制的更多信息,请参阅 Magento 插件。
Magento 依赖注入机制 允许您覆盖 Magento_Quote 模块的功能。
事件
模块触发了以下事件
-
sales_quote_address_collection_load_after事件在\Magento\Quote\Model\ResourceModel\Quote\Address\Collection::_afterLoad方法中。参数quote_address_collection是一个$this对象 (Magento\Quote\Model\ResourceModel\Quote\Address\Collection类)
-
items_additional_data事件在\Magento\Quote\Model\Cart\Totals\ItemConverter::modelToDataObject方法中。参数item是一个 quote_item 对象 (\Magento\Quote\Model\Quote\Item类)
-
sales_quote_remove_item事件在\Magento\Quote\Model\Quote::removeItem方法中。参数quote_item是一个 quote_item 对象 (\Magento\Quote\Model\Quote\Item类)
-
sales_quote_add_item事件在\Magento\Quote\Model\Quote::addItem方法中。参数quote_item是一个 quote_item 对象 (\Magento\Quote\Model\Quote\Item类)
-
sales_quote_product_add_after事件在\Magento\Quote\Model\Quote::addProduct方法中。参数items是一个包含 quot_item 对象的数组 (\Magento\Quote\Model\Quote\Item类)
-
sales_quote_merge_before事件在\Magento\Quote\Model\Quote::merge方法中。参数quote是一个$this对象 (\Magento\Quote\Model\Quote类)source是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
sales_quote_merge_after事件在\Magento\Quote\Model\Quote::merge方法中。参数quote是一个$this对象 (\Magento\Quote\Model\Quote类)source是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
sales_convert_quote_to_order事件在\Magento\Quote\Model\Quote\Address\ToOrder::convert方法中。参数order是一个订单对象 (\Magento\Sales\Model\Order类)quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
sales_quote_item_qty_set_after事件在\Magento\Quote\Model\Quote\Item::setQty方法中。参数item是一个$this对象 (\Magento\Quote\Model\Quote\Item类)
-
sales_quote_item_set_product事件在\Magento\Quote\Model\Quote\Item::setProduct方法中。参数product是一个产品对象 (\Magento\Catalog\Model\Product类)quote_item是一个$this对象 (\Magento\Quote\Model\Quote\Item类)
-
sales_quote_payment_import_data_before事件在\Magento\Quote\Model\Quote\Payment::importData方法中。参数payment是一个$this对象 (\Magento\Quote\Model\Quote\Payment类)input是一个数据对象 (\Magento\Framework\DataObject类)
-
sales_quote_collect_totals_before事件在\Magento\Quote\Model\Quote\TotalsCollector::collect方法中。参数quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
sales_quote_collect_totals_after事件在\Magento\Quote\Model\Quote\TotalsCollector::collect方法中。参数quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
sales_quote_address_collect_totals_before事件在\Magento\Quote\Model\Quote\TotalsCollector::collectAddressTotals方法中。参数quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)shipping_assignment是一个 shipping_assignment 对象 (\Magento\Quote\Model\ShippingAssignment类)total是一个总计对象(\Magento\Quote\Model\Quote\Address\Total类)
-
在
\Magento\Quote\Model\Quote\TotalsCollector::collectAddressTotals方法中,sales_quote_address_collect_totals_after事件。参数quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)shipping_assignment是一个 shipping_assignment 对象 (\Magento\Quote\Model\ShippingAssignment类)total是一个总计对象(\Magento\Quote\Model\Quote\Address\Total类)
-
在
\Magento\Quote\Model\QuoteManagement::placeOrder方法中,checkout_submit_before事件。参数quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
在
\Magento\Quote\Model\QuoteManagement::placeOrder方法中,checkout_submit_all_after事件。参数order是一个订单对象 (\Magento\Sales\Model\Order类)quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
在
\Magento\Quote\Model\QuoteManagement::submitQuote方法中,sales_model_service_quote_submit_before事件。参数order是一个订单对象 (\Magento\Sales\Model\Order类)quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
在
\Magento\Quote\Model\QuoteManagement::submitQuote方法中,sales_model_service_quote_submit_success事件。参数order是一个订单对象 (\Magento\Sales\Model\Order类)quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)
-
在
\Magento\Quote\Model\QuoteManagement::rollbackAddresses方法中,sales_model_service_quote_submit_failure事件。参数order是一个订单对象 (\Magento\Sales\Model\Order类)quote是一个 quote 对象 (\Magento\Quote\Model\Quote类)exception是一个异常对象(\Exception类)
-
在
\Magento\Quote\Model\ResourceModel\Quote\Item\Collection::_assignProducts方法中,prepare_catalog_product_collection_prices事件。参数collection是一个产品集合对象(\Magento\Quote\Model\ResourceModel\Quote\Item\Collection类)store_id是一个店铺 ID(int类型)
-
在
\Magento\Quote\Model\QuoteManagement::_assignProducts方法中,sales_quote_item_collection_products_after_load事件。参数collection是一个产品集合对象(\Magento\Catalog\Model\ResourceModel\Product\Collection类)
有关 Magento 2 中事件的信息,请参阅 事件和观察者。
公共 API
数据
-
\Magento\Quote\Api\Data\AddressAdditionalDataInterface- 提供带有报价地址信息的附加数据
-
\Magento\Quote\Api\Data\AddressInterface- 报价地址数据
-
\Magento\Quote\Api\Data\CartInterface- 报价数据
-
\Magento\Quote\Api\Data\CartItemInterface- 报价项目数据
-
\Magento\Quote\Api\Data\CartSearchResultsInterfac- 报价搜索结果数据
-
\Magento\Quote\Api\Data\CurrencyInterface- 货币数据
-
\Magento\Quote\Api\Data\EstimateAddressInterface- 估计地址数据
-
\Magento\Quote\Api\Data\PaymentInterface- 支付数据
-
\Magento\Quote\Api\Data\PaymentMethodInterface- 支付方式数据
-
\Magento\Quote\Api\Data\ProductOptionInterface- 产品选项数据
-
\Magento\Quote\Api\Data\ShippingAssignmentInterface- 配送分配数据
-
\Magento\Quote\Api\Data\ShippingInterface- 配送数据
-
\Magento\Quote\Api\Data\ShippingMethodInterface- 配送方式数据
-
\Magento\Quote\Api\Data\TotalsAdditionalDataInterface- 为总计集合提供附加数据
-
\Magento\Quote\Api\Data\TotalSegmentInterface- 总计段数据
-
\Magento\Quote\Api\Data\TotalsInterfacee- 报价总计数据
-
\Magento\Quote\Api\Data\TotalsItemInterface- 报价项总计数据
通用
\Magento\Quote\Api\ChangeQuoteControlInterface- 检查用户是否有权更改报价
访客
-
\Magento\Quote\Api\GuestBillingAddressManagementInterface- 将指定的账单地址分配给指定的报价
- 获取指定报价的账单地址
-
\Magento\Quote\Api\GuestCartItemRepositoryInterface- 获取分配给指定报价的列表项
- 添加/更新指定的购物车访客项
- 从指定的报价中删除指定的项
-
\Magento\Quote\Api\GuestCouponManagementInterface- 通过报价 ID 获取指定报价的优惠券
- 通过代码向指定报价添加优惠券
- 通过报价 ID 从指定报价中删除优惠券
-
\Magento\Quote\Api\GuestCartManagementInterface- 获取分配给指定报价的列表项
- 添加/更新指定的报价项
- 从指定的报价中删除指定的项
-
\Magento\Quote\Api\GuestPaymentMethodManagementInterface- 将指定的支付方法添加到指定的购物车报价中
- 获取指定购物车报价的支付方法
- 获取指定购物车报价的可用的支付方法列表
-
\Magento\Quote\Api\GuestShipmentEstimationInterface- 根据地址估计配送,并返回可用配送方式列表
-
\Magento\Quote\Api\GuestShippingMethodManagementInterface- 获取指定报价的适用运输方式列表
- 估算运输费用
-
\Magento\Quote\Api\GuestCartRepositoryInterface- 获取针对访客用户的报价
-
\Magento\Quote\Api\GuestCartTotalManagementInterface- 为报价设置运输/账单方式以及额外数据,并为访客收集总额
-
\Magento\Quote\Api\GuestCartTotalRepositoryInterface- 获取访客用户的报价总额
-
\Magento\Quote\Model\GuestCart\GuestShippingAddressManagementInterface- 将指定运输地址分配给指定报价
- 获取指定报价的运输地址
-
\Magento\Quote\Model\GuestCart\GuestShippingMethodManagementInterface- 为指定报价设置承运人和运输方式代码
- 获取指定报价的所选运输方式
注册客户
-
\Magento\Quote\Api\BillingAddressManagementInterface- 将指定的账单地址分配给指定的报价
- 获取指定报价的账单地址
-
\Magento\Quote\Api\CartItemRepositoryInterface- 获取分配给指定报价的列表项
- 添加/更新指定的报价项
- 从指定的报价中删除指定的项
-
\Magento\Quote\Api\CartManagementInterface- 为访客创建一个空的报价和购物车
- 如果客户还没有报价,则为指定客户创建一个空的报价和购物车
- 返回指定客户的报价信息
- 将指定客户分配给指定购物报价
- 为指定报价下单
-
\Magento\Quote\Api\CartRepositoryInterface- 通过报价ID获取报价
- 获取符合指定搜索条件的购物车列表
- 通过客户ID获取报价
- 通过报价ID获取活动报价
- 通过客户ID获取活动报价
- 保存报价
- 删除报价
-
\Magento\Quote\Api\CartTotalManagementInterface- 为报价设置运输/账单方式以及额外数据并收集总额
-
\Magento\Quote\Api\CartTotalRepositoryInterface- 通过报价ID获取报价总额
-
\Magento\Quote\Api\CouponManagementInterface- 通过报价 ID 获取指定报价的优惠券
- 通过代码向指定报价添加优惠券
- 通过报价 ID 从指定报价中删除优惠券
-
\Magento\Quote\Api\PaymentMethodManagementInterface- 将指定的支付方法添加到指定的购物车报价中
- 获取指定购物车报价的支付方法
- 获取指定购物车报价的可用的支付方法列表
-
\Magento\Quote\Api\ShipmentEstimationInterface- 根据地址估计配送,并返回可用配送方式列表
-
\Magento\Quote\Api\ShippingMethodManagementInterface- 根据报价ID和地址估算运输费用
- 根据报价ID和地址ID估算运输费用
- 获取指定报价的适用运输方式列表
-
\Magento\Quote\Model\ShippingAddressManagementInterface- 将指定运输地址分配给指定报价
- 获取指定报价的运输地址
-
\Magento\Quote\Model\ShippingMethodManagementInterface- 为指定报价设置承运人和运输方式代码
- 获取指定报价的所选运输方式
模型
-
\Magento\Quote\Model\Quote\Address\FreeShippingInterface- 检查是否为免费运输
-
\Magento\Quote\Model\Quote\Address\RateCollectorInterface- 根据提供的运输数据检索所有方法
-
\Magento\Quote\Model\MaskedQuoteIdToQuoteIdInterface- 将掩码报价ID转换为报价ID(实体ID)
-
\Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface- 将报价ID转换为掩码报价ID
有关 Magento 2 公共 API 的信息,请参阅 公共接口 & APIs。