|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (EventManager $eventManager, QuoteValidator $quoteValidator, OrderFactory $orderFactory, OrderManagement $orderManagement, CustomerManagement $customerManagement, ToOrderConverter $quoteAddressToOrder, ToOrderAddressConverter $quoteAddressToOrderAddress, ToOrderItemConverter $quoteItemToOrderItem, ToOrderPaymentConverter $quotePaymentToOrderPayment, UserContextInterface $userContext, \Magento\Quote\Api\CartRepositoryInterface $quoteRepository, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Customer\Model\CustomerFactory $customerModelFactory, \Magento\Quote\Model\Quote\AddressFactory $quoteAddressFactory, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, StoreManagerInterface $storeManager, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Api\AccountManagementInterface $accountManagement, \Magento\Quote\Model\QuoteFactory $quoteFactory, \Magento\Quote\Model\QuoteIdMaskFactory $quoteIdMaskFactory=null, \Magento\Customer\Api\AddressRepositoryInterface $addressRepository=null) | |
| createEmptyCart () | |
| createEmptyCartForCustomer ($customerId) | |
| placeOrder ($cartId, PaymentInterface $paymentMethod=null) | |
| getCartForCustomer ($customerId) | |
| submit (QuoteEntity $quote, $orderData=[]) | |
Public Member Functions inherited from CartManagementInterface | |
| assignCustomer ($cartId, $customerId, $storeId) | |
Protected Member Functions | |
| submitQuote (QuoteEntity $quote, $orderData=[]) | |
Additional Inherited Members | |
Data Fields inherited from CartManagementInterface | |
| const | METHOD_GUEST = 'guest' |
Class QuoteManagement
@SuppressWarnings(PHPMD.CouplingBetweenObjects) @SuppressWarnings(PHPMD.TooManyFields)
Definition at line 31 of file QuoteManagement.php.
| __construct | ( | EventManager | $eventManager, |
| QuoteValidator | $quoteValidator, | ||
| OrderFactory | $orderFactory, | ||
| OrderManagement | $orderManagement, | ||
| CustomerManagement | $customerManagement, | ||
| ToOrderConverter | $quoteAddressToOrder, | ||
| ToOrderAddressConverter | $quoteAddressToOrderAddress, | ||
| ToOrderItemConverter | $quoteItemToOrderItem, | ||
| ToOrderPaymentConverter | $quotePaymentToOrderPayment, | ||
| UserContextInterface | $userContext, | ||
| \Magento\Quote\Api\CartRepositoryInterface | $quoteRepository, | ||
| \Magento\Customer\Api\CustomerRepositoryInterface | $customerRepository, | ||
| \Magento\Customer\Model\CustomerFactory | $customerModelFactory, | ||
| \Magento\Quote\Model\Quote\AddressFactory | $quoteAddressFactory, | ||
| \Magento\Framework\Api\DataObjectHelper | $dataObjectHelper, | ||
| StoreManagerInterface | $storeManager, | ||
| \Magento\Checkout\Model\Session | $checkoutSession, | ||
| \Magento\Customer\Model\Session | $customerSession, | ||
| \Magento\Customer\Api\AccountManagementInterface | $accountManagement, | ||
| \Magento\Quote\Model\QuoteFactory | $quoteFactory, | ||
| \Magento\Quote\Model\QuoteIdMaskFactory | $quoteIdMaskFactory = null, |
||
| \Magento\Customer\Api\AddressRepositoryInterface | $addressRepository = null |
||
| ) |
| EventManager | $eventManager | |
| QuoteValidator | $quoteValidator | |
| OrderFactory | $orderFactory | |
| OrderManagement | $orderManagement | |
| CustomerManagement | $customerManagement | |
| ToOrderConverter | $quoteAddressToOrder | |
| ToOrderAddressConverter | $quoteAddressToOrderAddress | |
| ToOrderItemConverter | $quoteItemToOrderItem | |
| ToOrderPaymentConverter | $quotePaymentToOrderPayment | |
| UserContextInterface | $userContext | |
| \Magento\Quote\Api\CartRepositoryInterface | $quoteRepository | |
| \Magento\Customer\Api\CustomerRepositoryInterface | $customerRepository | |
| \Magento\Customer\Model\CustomerFactory | $customerModelFactory | |
| \Magento\Quote\Model\Quote\AddressFactory | $quoteAddressFactory |
Definition at line 173 of file QuoteManagement.php.
| createEmptyCart | ( | ) |
{Creates an empty cart and quote for a guest.
Implements CartManagementInterface.
Definition at line 226 of file QuoteManagement.php.
| createEmptyCartForCustomer | ( | $customerId | ) |
{Creates an empty cart and quote for a specified customer if customer does not have a cart yet.
| int | $customerId | The customer ID. |
Implements CartManagementInterface.
Definition at line 246 of file QuoteManagement.php.
| getCartForCustomer | ( | $customerId | ) |
{Returns information for the cart for a specified customer.
| int | $customerId | The customer ID. |
Implements CartManagementInterface.
Definition at line 384 of file QuoteManagement.php.
| placeOrder | ( | $cartId, | |
| PaymentInterface | $paymentMethod = null |
||
| ) |
{Places an order for a specified cart.
| int | $cartId | The cart ID. |
| PaymentInterface | null | $paymentMethod |
Implements CartManagementInterface.
Definition at line 337 of file QuoteManagement.php.
| submit | ( | QuoteEntity | $quote, |
$orderData = [] |
|||
| ) |
Submit quote
| Quote | $quote | |
| array | $orderData |
Definition at line 398 of file QuoteManagement.php.
|
protected |
Submit quote
| Quote | $quote | |
| array | $orderData |
Definition at line 445 of file QuoteManagement.php.
|
protected |
Definition at line 126 of file QuoteManagement.php.
|
protected |
Definition at line 116 of file QuoteManagement.php.
|
protected |
Definition at line 56 of file QuoteManagement.php.
|
protected |
Definition at line 96 of file QuoteManagement.php.
|
protected |
Definition at line 91 of file QuoteManagement.php.
|
protected |
Definition at line 121 of file QuoteManagement.php.
|
protected |
Definition at line 106 of file QuoteManagement.php.
|
protected |
Definition at line 36 of file QuoteManagement.php.
|
protected |
Definition at line 46 of file QuoteManagement.php.
|
protected |
Definition at line 51 of file QuoteManagement.php.
|
protected |
Definition at line 101 of file QuoteManagement.php.
|
protected |
Definition at line 61 of file QuoteManagement.php.
|
protected |
Definition at line 66 of file QuoteManagement.php.
|
protected |
Definition at line 131 of file QuoteManagement.php.
|
protected |
Definition at line 71 of file QuoteManagement.php.
|
protected |
Definition at line 76 of file QuoteManagement.php.
|
protected |
Definition at line 86 of file QuoteManagement.php.
|
protected |
Definition at line 41 of file QuoteManagement.php.
|
protected |
Definition at line 111 of file QuoteManagement.php.
|
protected |
Definition at line 81 of file QuoteManagement.php.