360 private $orderIncrementIdChecker;
433 \
Magento\
Customer\Api\Data\AddressInterfaceFactory $addressDataFactory,
434 \
Magento\
Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory,
437 \
Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter,
438 \
Magento\
Quote\Model\Cart\CurrencyFactory $currencyFactory,
443 \
Magento\
Quote\Model\ShippingAssignmentFactory $shippingAssignmentFactory,
447 \
Magento\Sales\Model\OrderIncrementIdChecker $orderIncrementIdChecker =
null 449 $this->quoteValidator = $quoteValidator;
450 $this->_catalogProduct = $catalogProduct;
451 $this->_scopeConfig = $scopeConfig;
454 $this->_quoteAddressFactory = $quoteAddressFactory;
457 $this->_quoteItemCollectionFactory = $quoteItemCollectionFactory;
458 $this->_quoteItemFactory = $quoteItemFactory;
460 $this->_statusListFactory = $statusListFactory;
462 $this->_quotePaymentFactory = $quotePaymentFactory;
463 $this->_quotePaymentCollectionFactory = $quotePaymentCollectionFactory;
464 $this->_objectCopyService = $objectCopyService;
466 $this->searchCriteriaBuilder = $criteriaBuilder;
467 $this->filterBuilder = $filterBuilder;
469 $this->itemProcessor = $itemProcessor;
470 $this->objectFactory = $objectFactory;
471 $this->addressDataFactory = $addressDataFactory;
472 $this->customerDataFactory = $customerDataFactory;
475 $this->extensibleDataObjectConverter = $extensibleDataObjectConverter;
476 $this->currencyFactory = $currencyFactory;
477 $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
478 $this->totalsCollector = $totalsCollector;
479 $this->totalsReader = $totalsReader;
480 $this->shippingFactory = $shippingFactory;
481 $this->shippingAssignmentFactory = $shippingAssignmentFactory;
483 ->get(\
Magento\Sales\Model\OrderIncrementIdChecker::class);
488 $customAttributeFactory,
513 $currency = $this->
getData(self::KEY_CURRENCY);
515 $currency = $this->currencyFactory->create()
516 ->setGlobalCurrencyCode($this->getGlobalCurrencyCode())
517 ->setBaseCurrencyCode($this->getBaseCurrencyCode())
518 ->setStoreCurrencyCode($this->getStoreCurrencyCode())
519 ->setQuoteCurrencyCode($this->getQuoteCurrencyCode())
520 ->setStoreToBaseRate($this->getStoreToBaseRate())
521 ->setStoreToQuoteRate($this->getStoreToQuoteRate())
522 ->setBaseToGlobalRate($this->getBaseToGlobalRate())
523 ->setBaseToQuoteRate($this->getBaseToQuoteRate());
524 $this->
setData(self::KEY_CURRENCY, $currency);
534 return $this->
setData(self::KEY_CURRENCY, $currency);
542 return $this->
_getData(self::KEY_ITEMS);
558 return $this->
_getData(self::KEY_CREATED_AT);
566 return $this->
setData(self::KEY_CREATED_AT, $createdAt);
574 return $this->
_getData(self::KEY_UPDATED_AT);
582 return $this->
setData(self::KEY_UPDATED_AT, $updatedAt);
590 return $this->
_getData(self::KEY_CONVERTED_AT);
598 return $this->
setData(self::KEY_CONVERTED_AT, $convertedAt);
606 return $this->
_getData(self::KEY_IS_ACTIVE);
614 return $this->
setData(self::KEY_IS_ACTIVE, $isActive);
622 return $this->
setData(self::KEY_IS_VIRTUAL, $isVirtual);
630 return $this->
_getData(self::KEY_ITEMS_COUNT);
638 return $this->
setData(self::KEY_ITEMS_COUNT, $itemsCount);
646 return $this->
_getData(self::KEY_ITEMS_QTY);
654 return $this->
setData(self::KEY_ITEMS_QTY, $itemsQty);
662 return $this->
_getData(self::KEY_ORIG_ORDER_ID);
670 return $this->
setData(self::KEY_ORIG_ORDER_ID, $origOrderId);
678 return $this->
_getData(self::KEY_RESERVED_ORDER_ID);
686 return $this->
setData(self::KEY_RESERVED_ORDER_ID, $reservedOrderId);
694 return $this->
_getData(self::KEY_CUSTOMER_IS_GUEST);
702 return $this->
setData(self::KEY_CUSTOMER_IS_GUEST, $customerIsGuest);
710 return $this->
_getData(self::KEY_CUSTOMER_NOTE);
718 return $this->
setData(self::KEY_CUSTOMER_NOTE, $customerNote);
726 return $this->
_getData(self::KEY_CUSTOMER_NOTE_NOTIFY);
734 return $this->
setData(self::KEY_CUSTOMER_NOTE_NOTIFY, $customerNoteNotify);
744 if (!$this->hasStoreId()) {
745 return $this->_storeManager->getStore()->getId();
747 return (
int)$this->
_getData(self::KEY_STORE_ID);
766 return $this->_storeManager->getStore($this->
getStoreId());
788 $ids = $this->
_getData(
'shared_store_ids');
789 if ($ids ===
null || !is_array($ids)) {
794 return $this->
getStore()->getWebsite()->getStoreIds();
819 $globalCurrencyCode = $this->_config->getValue(
820 \
Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE,
823 $baseCurrency = $this->
getStore()->getBaseCurrency();
825 if ($this->hasForcedCurrency()) {
826 $quoteCurrency = $this->getForcedCurrency();
828 $quoteCurrency = $this->
getStore()->getCurrentCurrency();
831 $this->setGlobalCurrencyCode($globalCurrencyCode);
832 $this->setBaseCurrencyCode($baseCurrency->getCode());
833 $this->setStoreCurrencyCode($baseCurrency->getCode());
834 $this->setQuoteCurrencyCode($quoteCurrency->getCode());
836 $this->setBaseToGlobalRate($baseCurrency->getRate($globalCurrencyCode));
837 $this->setBaseToQuoteRate($baseCurrency->getRate($quoteCurrency));
839 if (!$this->hasChangedFlag() || $this->getChangedFlag() ==
true) {
840 $this->setIsChanged(1);
842 $this->setIsChanged(0);
845 if ($this->_customer) {
846 $this->setCustomerId($this->_customer->getId());
856 parent::beforeSave();
913 return $this->assignCustomerWithAddressChange(
$customer);
924 public function assignCustomerWithAddressChange(
936 $defaultBillingAddress = $this->addressRepository->getById(
$customer->getDefaultBilling());
937 }
catch (\
Magento\Framework\Exception\NoSuchEntityException $e) {
940 if (isset($defaultBillingAddress)) {
950 $defaultShippingAddress = $this->addressRepository->getById(
$customer->getDefaultShipping());
951 }
catch (\
Magento\Framework\Exception\NoSuchEntityException $e) {
954 if (isset($defaultShippingAddress)) {
978 $this->setCustomerId(
$customer->getId());
979 $origAddresses =
$customer->getAddresses();
981 $customerDataFlatArray = $this->objectFactory->create(
982 $this->extensibleDataObjectConverter->toFlatArray(
989 $this->_objectCopyService->copyFieldsetToTarget(
'customer_account',
'to_quote', $customerDataFlatArray, $this);
1005 if (
null === $this->_customer) {
1007 $this->_customer = $this->customerRepository->getById($this->getCustomerId());
1009 $this->_customer = $this->customerDataFactory->create();
1010 $this->_customer->setId(
null);
1014 return $this->_customer;
1060 $this->dataObjectHelper->mergeDataObjects(CustomerInterface::class, $quoteCustomer,
$customer);
1072 if ($this->
hasData(
'customer_group_id')) {
1073 return $this->
getData(
'customer_group_id');
1074 }
elseif ($this->getCustomerId()) {
1093 $taxClassId = $this->groupRepository->getById($this->
getCustomerGroupId())->getTaxClassId();
1097 return $this->
getData(self::KEY_CUSTOMER_TAX_CLASS_ID);
1105 return $this->
setData(self::KEY_CUSTOMER_TAX_CLASS_ID, $customerTaxClassId);
1115 if (
null === $this->_addresses) {
1116 $this->_addresses = $this->_quoteAddressFactory->create()->getCollection()->setQuoteFilter($this->
getId());
1118 if ($this->
getId()) {
1119 foreach ($this->_addresses as
$address) {
1124 return $this->_addresses;
1141 $address = $this->_quoteAddressFactory->create()->setAddressType(
$type);
1207 if (
$address->getId() == $addressId) {
1223 if (!
$address->isDeleted() &&
$address->getCustomerAddressId() == $addressId) {
1236 public function getShippingAddressByCustomerAddressId($addressId)
1239 foreach ($this->getAddressesCollection() as
$address) {
1242 $address->getCustomerAddressId() == $addressId
1259 if (
$address->getId() == $addressId) {
1274 $addressByType = [];
1278 foreach ($addressesCollection as
$address) {
1291 $emptyAddress->setDeleteImmediately(
true);
1295 foreach ($addressesCollection as $key =>
$item) {
1296 if (
$item->getDeleteImmediately()) {
1297 $addressesCollection->removeItemByKey($key);
1346 if ($this->getIsMultiShipping()) {
1382 if ($this->hasItemsCollection()) {
1383 return $this->
getData(
'items_collection');
1385 if (
null === $this->_items) {
1386 $this->_items = $this->_quoteItemCollectionFactory->create();
1387 $this->extensionAttributesJoinProcessor->process($this->_items);
1388 $this->_items->setQuote($this);
1398 public function getAllItems()
1401 foreach ($this->getItemsCollection() as
$item) {
1403 if (!
$item->isDeleted()) {
1419 if (!
$item->isDeleted() && !
$item->getParentItemId() && !
$item->getParentItem()) {
1433 return sizeof($this->getAllItems()) > 0;
1443 foreach ($this->getAllItems() as
$item) {
1444 $stockItemDo = $this->stockRegistry->getStockItem(
1445 $item->getProduct()->getId(),
1446 $item->getStore()->getWebsiteId()
1448 if ($stockItemDo->getItemId() && $stockItemDo->getIsQtyDecimal()) {
1463 foreach ($this->getAllItems() as
$item) {
1481 if (
$item->getId() == $itemId) {
1497 if (
$item->getId()) {
1502 if (
$item->getHasChildren()) {
1503 foreach (
$item->getChildren() as $child) {
1507 foreach ($quoteItems as $key =>
$quoteItem) {
1510 $quoteItems->removeItemByKey($key);
1530 $item->setQuote($this);
1534 $this->setIsMultiShipping(
false);
1535 $item->isDeleted(
true);
1536 if (
$item->getHasChildren()) {
1537 foreach (
$item->getChildren() as $child) {
1538 $child->isDeleted(
true);
1542 $parent =
$item->getParentItem();
1544 $parent->isDeleted(
true);
1547 $this->_eventManager->dispatch(
'sales_quote_remove_item', [
'quote_item' =>
$item]);
1561 if (
$item->getId() ===
null) {
1564 $item->isDeleted(
true);
1579 $item->setQuote($this);
1580 if (!
$item->getId()) {
1582 $this->_eventManager->dispatch(
'sales_quote_add_item', [
'quote_item' =>
$item]);
1610 throw new \Magento\Framework\Exception\LocalizedException(
1611 __(
'We found an invalid request for adding product to quote.')
1616 throw new \Magento\Framework\Exception\LocalizedException(
1617 __(
'Product that you are trying to add is not available.')
1626 if (is_string($cartCandidates) || $cartCandidates instanceof \
Magento\Framework\Phrase) {
1627 return (
string)$cartCandidates;
1633 if (!is_array($cartCandidates)) {
1634 $cartCandidates = [$cartCandidates];
1641 foreach ($cartCandidates as $candidate) {
1643 $stickWithinParent = $candidate->getParentProductId() ? $parentItem :
null;
1644 $candidate->setStickWithinParent($stickWithinParent);
1649 $item->setQuote($this);
1650 $item->setOptions($candidate->getCustomOptions());
1651 $item->setProduct($candidate);
1661 $parentItem =
$item;
1663 if ($parentItem && $candidate->getParentProductId() && !
$item->getParentItem()) {
1664 $item->setParentItem($parentItem);
1670 if (
$item->getHasError()) {
1680 throw new \Magento\Framework\Exception\LocalizedException(
__(implode(
"\n",
$errors)));
1683 $this->_eventManager->dispatch(
'sales_quote_product_add_after', [
'items' =>
$items]);
1700 $item = $this->_quoteItemFactory->create();
1701 $item->setQuote($this);
1705 $item->setStoreId($this->_storeManager->getStore()->getId());
1754 throw new \Magento\Framework\Exception\LocalizedException(
1755 __(
'This is the wrong quote item id to update configuration.')
1765 $params = new \Magento\Framework\DataObject();
1775 if (is_string($resultItem)) {
1776 throw new \Magento\Framework\Exception\LocalizedException(
__($resultItem));
1779 if ($resultItem->getParentItem()) {
1780 $resultItem = $resultItem->getParentItem();
1783 if ($resultItem->getId() != $itemId) {
1789 $items = $this->getAllItems();
1792 if ($resultItem->compare(
$item)) {
1794 $resultItem->setQty($resultItem->getQty() +
$item->getQty());
1815 foreach ($this->getAllItems() as
$item) {
1830 $qty = $this->
getData(
'all_items_qty');
1831 if (
null === $qty) {
1833 foreach ($this->getAllItems() as
$item) {
1834 if (
$item->getParentItem()) {
1841 $qty += $child->getQty() *
$item->getQty();
1844 $qty +=
$item->getQty();
1847 $this->
setData(
'all_items_qty', $qty);
1859 $qty = $this->
getData(
'virtual_items_qty');
1860 if (
null === $qty) {
1862 foreach ($this->getAllItems() as
$item) {
1863 if (
$item->getParentItem()) {
1870 if ($child->getProduct()->getIsVirtual()) {
1871 $qty += $child->getQty();
1875 if (
$item->getProduct()->getIsVirtual()) {
1876 $qty +=
$item->getQty();
1880 $this->
setData(
'virtual_items_qty', $qty);
1894 if (
null === $this->_payments) {
1895 $this->_payments = $this->_quotePaymentCollectionFactory->create()->setQuoteFilter($this->
getId());
1897 if ($this->
getId()) {
1898 foreach ($this->_payments as
$payment) {
1903 return $this->_payments;
1913 if (
null === $this->_currentPayment || !$this->_currentPayment) {
1914 $this->_currentPayment = $this->_quotePaymentCollectionFactory->create()
1915 ->setQuoteFilter($this->
getId())
1918 if (
$payment = $this->_currentPayment) {
1919 if ($this->
getId()) {
1926 $payment = $this->_quotePaymentFactory->create();
1954 if (!$this->getIsMultiPayment() && (
$old = $this->
getPayment())) {
1980 if ($this->getTotalsCollectedFlag()) {
1984 $total = $this->totalsCollector->collect($this);
1985 $this->
addData($total->getData());
1987 $this->setTotalsCollectedFlag(
true);
1998 return $this->totalsReader->fetch($this, $this->
getData());
2010 $messages = $this->
getData(
'messages');
2011 if (
null === $messages) {
2015 if (isset($messages[
$index])) {
2022 $this->
setData(
'messages', $messages);
2033 $messages = $this->
getData(
'messages');
2034 if (
null === $messages) {
2036 $this->
setData(
'messages', $messages);
2068 return $this->
setData(
'has_error', $flag);
2098 $this->_errorInfoGroups = [];
2118 $additionalData =
null 2120 if (!isset($this->_errorInfoGroups[
$type])) {
2121 $this->_errorInfoGroups[
$type] = $this->_statusListFactory->create();
2146 if (
$type && !isset($this->_errorInfoGroups[
$type])) {
2152 $errorLists[] = $this->_errorInfoGroups[
$type];
2154 $errorLists = $this->_errorInfoGroups;
2157 foreach ($errorLists as
$type => $errorList) {
2158 $removedItems = $errorList->removeItemsByParams(
$params);
2159 foreach ($removedItems as
$item) {
2160 if (
$item[
'message'] !==
null) {
2166 $errorsExist =
false;
2167 foreach ($this->_errorInfoGroups as $errorListCheck) {
2168 if ($errorListCheck->getItems()) {
2169 $errorsExist =
true;
2173 if (!$errorsExist) {
2189 $messages = $this->
getData(
'messages');
2190 if (
null === $messages) {
2194 if (!isset($messages[
$type])) {
2205 unset($messages[
$type]);
2206 $this->
setData(
'messages', $messages);
2223 if ($this->orderIncrementIdChecker->isIncrementIdUsed($this->getReservedOrderId())) {
2238 public function validateMinimumAmount($multishipping =
false)
2241 $minOrderActive = $this->_scopeConfig->isSetFlag(
2242 'sales/minimum_order/active',
2246 if (!$minOrderActive) {
2249 $minOrderMulti = $this->_scopeConfig->isSetFlag(
2250 'sales/minimum_order/multi_address',
2254 $minAmount = $this->_scopeConfig->getValue(
2255 'sales/minimum_order/amount',
2259 $taxInclude = $this->_scopeConfig->getValue(
2260 'sales/minimum_order/tax_including',
2267 if (!$multishipping) {
2270 if (!
$address->validateMinimumAmount()) {
2277 if (!$minOrderMulti) {
2279 $taxes = ($taxInclude) ?
$address->getBaseTaxAmount() : 0;
2280 foreach (
$address->getQuote()->getItemsCollection() as
$item) {
2291 $taxes = ($taxInclude) ?
$address->getBaseTaxAmount() : 0;
2292 $baseTotal +=
$address->getBaseSubtotalWithDiscount() + $taxes;
2294 if ($baseTotal < $minAmount) {
2312 if (
$_item->isDeleted() ||
$_item->getParentItemId()) {
2316 if (!
$_item->getProduct()->getIsVirtual()) {
2321 return $countItems == 0 ?
false : $isVirtual;
2342 $hasVirtual =
false;
2344 if (
$item->getParentItemId()) {
2347 if (
$item->getProduct()->isVirtual()) {
2362 $this->_eventManager->dispatch(
2363 $this->_eventPrefix .
'_merge_before',
2364 [$this->_eventObject => $this,
'source' =>
$quote]
2369 foreach ($this->getAllItems() as
$quoteItem) {
2379 $newItem = clone
$item;
2381 if (
$item->getHasChildren()) {
2382 foreach (
$item->getChildren() as $child) {
2383 $newChild = clone $child;
2384 $newChild->setParentItem($newItem);
2394 if (!$this->
getId()) {
2399 if (
$quote->getCouponCode()) {
2400 $this->setCouponCode(
$quote->getCouponCode());
2403 $this->_eventManager->dispatch(
2404 $this->_eventPrefix .
'_merge_after',
2405 [$this->_eventObject => $this,
'source' =>
$quote]
2419 if (1 == $this->getTriggerRecollect()) {
2421 ->setTriggerRecollect(0)
2424 return parent::_afterLoad();
2434 return null !== $this->_addresses;
2454 return null !== $this->_payments;
2464 return null !== $this->_currentPayment;
2475 if ($this->getCustomerId() && !$originalMethod) {
2476 return self::CHECKOUT_METHOD_LOGIN_IN;
2478 return $this->
_getData(self::KEY_CHECKOUT_METHOD);
2488 if ($this->shippingAddressesItems !==
null) {
2489 return $this->shippingAddressesItems;
2495 if (
$item->getParentItemId()) {
2498 if (
$item->getProduct()->getIsVirtual()) {
2502 if (
$item->getQty() > 1) {
2503 for ($itemIndex = 0, $itemQty =
$item->getQty(); $itemIndex < $itemQty; $itemIndex++) {
2504 if ($itemIndex == 0) {
2505 $addressItem =
$item;
2507 $addressItem = clone
$item;
2509 $addressItem->setQty(1)->setCustomerAddressId(
$address->getCustomerAddressId())->
save();
2513 $item->setCustomerAddressId(
$address->getCustomerAddressId());
2518 $this->shippingAddressesItems =
$items;
2532 return $this->
setData(self::KEY_CHECKOUT_METHOD, $checkoutMethod);
2544 $this->_preventSaving =
true;
2557 return $this->_preventSaving;
setReservedOrderId($reservedOrderId)
addressCollectionWasSet()
addMessage($message, $index='error')
_getExtensionAttributes()
$extensionAttributesJoinProcessor
elseif(isset( $params[ 'redirect_parent']))
addErrorInfo( $type='error', $origin=null, $code=null, $message=null, $additionalData=null)
setOrigOrderId($origOrderId)
setCustomer(\Magento\Customer\Api\Data\CustomerInterface $customer=null)
setCheckoutMethod($checkoutMethod)
setShippingAddress(\Magento\Quote\Api\Data\AddressInterface $address=null)
setCustomerNote($customerNote)
addProduct(\Magento\Catalog\Model\Product $product, $request=null, $processMode=\Magento\Catalog\Model\Product\Type\AbstractType::PROCESS_MODE_FULL)
removeErrorInfosByParams($type, $params)
const CHECKOUT_METHOD_LOGIN_IN
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
deleteItem(\Magento\Quote\Model\Quote\Item $item)
getItemByProduct($product)
getAddressById($addressId)
addPayment(PaymentInterface $payment)
getAddressByCustomerAddressId($addressId)
getItemsCollection($useCache=true)
setPayment(PaymentInterface $payment)
assignCustomer(\Magento\Customer\Api\Data\CustomerInterface $customer)
setExtensionAttributes(\Magento\Quote\Api\Data\CartExtensionInterface $extensionAttributes)
getCheckoutMethod($originalMethod=false)
removeMessageByText($type, $text)
addItem(\Magento\Quote\Model\Quote\Item $item)
setCurrency(\Magento\Quote\Api\Data\CurrencyInterface $currency=null)
$extensibleDataObjectConverter
updateItem($itemId, $buyRequest, $params=null)
setItemsCount($itemsCount)
addCustomerAddress(\Magento\Customer\Api\Data\AddressInterface $address)
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, AttributeValueFactory $customAttributeFactory, \Magento\Quote\Model\QuoteValidator $quoteValidator, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Quote\Model\Quote\AddressFactory $quoteAddressFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Customer\Api\GroupRepositoryInterface $groupRepository, \Magento\Quote\Model\ResourceModel\Quote\Item\CollectionFactory $quoteItemCollectionFactory, \Magento\Quote\Model\Quote\ItemFactory $quoteItemFactory, \Magento\Framework\Message\Factory $messageFactory, \Magento\Sales\Model\Status\ListFactory $statusListFactory, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Quote\Model\Quote\PaymentFactory $quotePaymentFactory, \Magento\Quote\Model\ResourceModel\Quote\Payment\CollectionFactory $quotePaymentCollectionFactory, \Magento\Framework\DataObject\Copy $objectCopyService, \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, \Magento\Quote\Model\Quote\Item\Processor $itemProcessor, \Magento\Framework\DataObject\Factory $objectFactory, \Magento\Customer\Api\AddressRepositoryInterface $addressRepository, \Magento\Framework\Api\SearchCriteriaBuilder $criteriaBuilder, \Magento\Framework\Api\FilterBuilder $filterBuilder, \Magento\Customer\Api\Data\AddressInterfaceFactory $addressDataFactory, \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, \Magento\Quote\Model\Cart\CurrencyFactory $currencyFactory, JoinProcessorInterface $extensionAttributesJoinProcessor, Quote\TotalsCollector $totalsCollector, Quote\TotalsReader $totalsReader, \Magento\Quote\Model\ShippingFactory $shippingFactory, \Magento\Quote\Model\ShippingAssignmentFactory $shippingAssignmentFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[], \Magento\Sales\Model\OrderIncrementIdChecker $orderIncrementIdChecker=null)
paymentsCollectionWasSet()
loadByIdWithoutStore($quoteId)
setCustomerIsGuest($customerIsGuest)
foreach($product->getExtensionAttributes() ->getBundleProductOptions() as $option) $buyRequest
loadByCustomer($customer)
addAddress(\Magento\Quote\Api\Data\AddressInterface $address)
setItems(array $items=null)
$_quotePaymentCollectionFactory
getData($key='', $index=null)
setData($key, $value=null)
setCustomerAddressData(array $addresses)
setCustomerNoteNotify($customerNoteNotify)
setBillingAddress(\Magento\Quote\Api\Data\AddressInterface $address=null)
updateCustomerData(\Magento\Customer\Api\Data\CustomerInterface $customer)
addShippingAddress(\Magento\Quote\Api\Data\AddressInterface $address)
setCustomerTaxClassId($customerTaxClassId)
$shippingAssignmentFactory
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
getAllShippingAddresses()
$_quoteItemCollectionFactory
isMultipleShippingAddresses()
removeAddress($addressId)
_addCatalogProduct(\Magento\Catalog\Model\Product $product, $qty=1)
setConvertedAt($convertedAt)
setStore(\Magento\Store\Model\Store $store)
getShippingAddressesItems()