Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | CHECKOUT_METHOD_LOGIN_IN = 'login_in' |
![]() | |
const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
![]() | |
const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
![]() | |
const | KEY_ID = 'id' |
const | KEY_ENTITY_ID = 'entity_id' |
const | KEY_CREATED_AT = 'created_at' |
const | KEY_UPDATED_AT = 'updated_at' |
const | KEY_CONVERTED_AT = 'converted_at' |
const | KEY_IS_ACTIVE = 'is_active' |
const | KEY_IS_VIRTUAL = 'is_virtual' |
const | KEY_ITEMS = 'items' |
const | KEY_ITEMS_COUNT = 'items_count' |
const | KEY_ITEMS_QTY = 'items_qty' |
const | KEY_CUSTOMER = 'customer' |
const | KEY_CHECKOUT_METHOD = 'checkout_method' |
const | KEY_SHIPPING_ADDRESS = 'shipping_address' |
const | KEY_BILLING_ADDRESS = 'billing_address' |
const | KEY_RESERVED_ORDER_ID = 'reserved_order_id' |
const | KEY_ORIG_ORDER_ID = 'orig_order_id' |
const | KEY_CURRENCY = 'currency' |
const | KEY_CUSTOMER_IS_GUEST = 'customer_is_guest' |
const | KEY_CUSTOMER_NOTE = 'customer_note' |
const | KEY_CUSTOMER_NOTE_NOTIFY = 'customer_note_notify' |
const | KEY_CUSTOMER_TAX_CLASS_ID = 'customer_tax_class_id' |
const | KEY_STORE_ID = 'store_id' |
Additional Inherited Members | |
![]() | |
static | $_underscoreCache = [] |
Quote model
Supported events: sales_quote_load_after sales_quote_save_before sales_quote_save_after sales_quote_delete_before sales_quote_delete_after
@api @method int getIsMultiShipping() @method Quote setIsMultiShipping(int $value) @method float getStoreToBaseRate() @method Quote setStoreToBaseRate(float $value) @method float getStoreToQuoteRate() @method Quote setStoreToQuoteRate(float $value) @method string getBaseCurrencyCode() @method Quote setBaseCurrencyCode(string $value) @method string getStoreCurrencyCode() @method Quote setStoreCurrencyCode(string $value) @method string getQuoteCurrencyCode() @method Quote setQuoteCurrencyCode(string $value) @method float getGrandTotal() @method Quote setGrandTotal(float $value) @method float getBaseGrandTotal() @method Quote setBaseGrandTotal(float $value) @method int getCustomerId() @method Quote setCustomerId(int $value) @method Quote setCustomerGroupId(int $value) @method string getCustomerEmail() @method Quote setCustomerEmail(string $value) @method string getCustomerPrefix() @method Quote setCustomerPrefix(string $value) @method string getCustomerFirstname() @method Quote setCustomerFirstname(string $value) @method string getCustomerMiddlename() @method Quote setCustomerMiddlename(string $value) @method string getCustomerLastname() @method Quote setCustomerLastname(string $value) @method string getCustomerSuffix() @method Quote setCustomerSuffix(string $value) @method string getCustomerDob() @method Quote setCustomerDob(string $value) @method string getRemoteIp() @method Quote setRemoteIp(string $value) @method string getAppliedRuleIds() @method Quote setAppliedRuleIds(string $value) @method string getPasswordHash() @method Quote setPasswordHash(string $value) @method string getCouponCode() @method Quote setCouponCode(string $value) @method string getGlobalCurrencyCode() @method Quote setGlobalCurrencyCode(string $value) @method float getBaseToGlobalRate() @method Quote setBaseToGlobalRate(float $value) @method float getBaseToQuoteRate() @method Quote setBaseToQuoteRate(float $value) @method string getCustomerTaxvat() @method Quote setCustomerTaxvat(string $value) @method string getCustomerGender() @method Quote setCustomerGender(string $value) @method float getSubtotal() @method Quote setSubtotal(float $value) @method float getBaseSubtotal() @method Quote setBaseSubtotal(float $value) @method float getSubtotalWithDiscount() @method Quote setSubtotalWithDiscount(float $value) @method float getBaseSubtotalWithDiscount() @method Quote setBaseSubtotalWithDiscount(float $value) @method int getIsChanged() @method Quote setIsChanged(int $value) @method int getTriggerRecollect() @method Quote setTriggerRecollect(int $value) @method string getExtShippingInfo() @method Quote setExtShippingInfo(string $value) @method int getGiftMessageId() @method Quote setGiftMessageId(int $value) @method bool|null getIsPersistent() @method Quote setIsPersistent(bool $value) @method Quote setSharedStoreIds(array $values) @method Quote setWebsite($value) @SuppressWarnings(PHPMD.ExcessivePublicCount) @SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.ExcessiveClassComplexity) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
__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 |
||
) |
\Magento\Framework\Model\Context | $context | |
\Magento\Framework\Registry | $registry | |
\Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory | |
AttributeValueFactory | $customAttributeFactory | |
QuoteValidator | $quoteValidator | |
\Magento\Catalog\Helper\Product | $catalogProduct | |
\Magento\Framework\App\Config\ScopeConfigInterface | $scopeConfig | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Framework\App\Config\ScopeConfigInterface | $config | |
Quote\AddressFactory | $quoteAddressFactory | |
\Magento\Customer\Model\CustomerFactory | $customerFactory | |
\Magento\Customer\Api\GroupRepositoryInterface | $groupRepository | |
\Magento\Quote\Model\ResourceModel\Quote\Item\CollectionFactory | $quoteItemCollectionFactory | |
Quote\ItemFactory | $quoteItemFactory | |
\Magento\Framework\Message\Factory | $messageFactory | |
Status\ListFactory | $statusListFactory | |
\Magento\Catalog\Api\ProductRepositoryInterface | $productRepository | |
Quote\PaymentFactory | $quotePaymentFactory | |
\Magento\Quote\Model\ResourceModel\Quote\Payment\CollectionFactory | $quotePaymentCollectionFactory | |
\Magento\Framework\DataObject\Copy | $objectCopyService | |
\Magento\CatalogInventory\Api\StockRegistryInterface | $stockRegistry | |
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 | |
Cart\CurrencyFactory | $currencyFactory | |
JoinProcessorInterface | $extensionAttributesJoinProcessor | |
Quote\TotalsCollector | $totalsCollector | |
Quote\TotalsReader | $totalsReader | |
ShippingFactory | $shippingFactory | |
ShippingAssignmentFactory | $shippingAssignmentFactory | |
\Magento\Framework\Model\ResourceModel\AbstractResource | null | $resource | |
\Magento\Framework\Data\Collection\AbstractDb | null | $resourceCollection | |
array | $data | |
\Magento\Sales\Model\OrderIncrementIdChecker | null | $orderIncrementIdChecker | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 406 of file Quote.php.
|
protected |
Adding catalog product object data to quote
\Magento\Catalog\Model\Product | $product | |
int | $qty |
We can't modify existing child items
Definition at line 1695 of file Quote.php.
|
protected |
|
protected |
|
protected |
|
protected |
Sets flag, whether this quote has some error associated with it.
@codeCoverageIgnore
bool | $flag |
Definition at line 2066 of file Quote.php.
addAddress | ( | \Magento\Quote\Api\Data\AddressInterface | $address | ) |
addCustomerAddress | ( | \Magento\Customer\Api\Data\AddressInterface | $address | ) |
Add address to the customer, created out of a Data Object
TODO refactor in scope of MAGETWO-19930
\Magento\Customer\Api\Data\AddressInterface | $address |
Definition at line 1042 of file Quote.php.
addErrorInfo | ( | $type = 'error' , |
|
$origin = null , |
|||
$code = null , |
|||
$message = null , |
|||
$additionalData = null |
|||
) |
Adds error information to the quote. Automatically sets error flag.
string | $type | An internal error type ('error', 'qty', etc.), passed then to adding messages routine |
string | null | $origin | Usually a name of module, that embeds error |
int | null | $code | Error code, unique for origin, that sets it |
string | null | $message | Error message |
\Magento\Framework\DataObject | null | $additionalData | Any additional data, that caller would like to store |
Definition at line 2113 of file Quote.php.
addItem | ( | \Magento\Quote\Model\Quote\Item | $item | ) |
Adding new item to quote
\Magento\Quote\Model\Quote\Item | $item |
Definition at line 1577 of file Quote.php.
addMessage | ( | $message, | |
$index = 'error' |
|||
) |
Add message.
string | $message | |
string | $index |
Definition at line 2008 of file Quote.php.
|
protected |
addProduct | ( | \Magento\Catalog\Model\Product | $product, |
$request = null , |
|||
$processMode = \Magento\Catalog\Model\Product\Type\AbstractType::PROCESS_MODE_FULL |
|||
) |
Add product. Returns error message if product type instance can't prepare product.
mixed | $product | |
null | float | \Magento\Framework\DataObject | $request | |
null | string | $processMode |
Error message
If prepare process return one object
As parent item we should always use the item of first added product
Definition at line 1598 of file Quote.php.
addressCollectionWasSet | ( | ) |
addShippingAddress | ( | \Magento\Quote\Api\Data\AddressInterface | $address | ) |
Add shipping address.
\Magento\Quote\Api\Data\AddressInterface | $address |
Definition at line 1367 of file Quote.php.
assignCustomer | ( | \Magento\Customer\Api\Data\CustomerInterface | $customer | ) |
beforeSave | ( | ) |
Prepare data before save
Currency logic
global - currency which is set for default in backend base - currency which is set for current website. all attributes that have 'base_' prefix saved in this currency quote/order - currency which was selected by customer or configured by admin for current store. currency in which customer sees price thought all checkout.
Rates: base_to_global & base_to_quote/base_to_order
Definition at line 804 of file Quote.php.
currentPaymentWasSet | ( | ) |
deleteItem | ( | \Magento\Quote\Model\Quote\Item | $item | ) |
Delete quote item. If it does not have identifier then it will be only removed from collection
\Magento\Quote\Model\Quote\Item | $item |
Definition at line 1495 of file Quote.php.
getAddressByCustomerAddressId | ( | $addressId | ) |
getAddressById | ( | $addressId | ) |
getAddressesCollection | ( | ) |
getAllAddresses | ( | ) |
getAllShippingAddresses | ( | ) |
Get all shipping addresses.
Definition at line 1171 of file Quote.php.
getAllVisibleItems | ( | ) |
Get array of all items what can be display directly
Definition at line 1415 of file Quote.php.
getBillingAddress | ( | ) |
Retrieve quote billing address
Implements CartInterface.
Definition at line 1151 of file Quote.php.
getCheckoutMethod | ( | $originalMethod = false | ) |
getConvertedAt | ( | ) |
Returns the cart conversion date and time.
Implements CartInterface.
Definition at line 588 of file Quote.php.
getCreatedAt | ( | ) |
Returns the cart creation date and time.
Implements CartInterface.
Definition at line 556 of file Quote.php.
getCurrency | ( | ) |
Returns information about quote currency, such as code, exchange rate, and so on.
Implements CartInterface.
Definition at line 511 of file Quote.php.
getCustomer | ( | ) |
Retrieve customer model object
@TODO: Remove the method after all external usages are refactored in MAGETWO-19930 _customer and _customerFactory variables should be eliminated as well
Implements CartInterface.
Definition at line 999 of file Quote.php.
getCustomerGroupId | ( | ) |
Retrieve customer group id
Definition at line 1070 of file Quote.php.
getCustomerIsGuest | ( | ) |
True for guest customers, false for logged in customers
Implements CartInterface.
Definition at line 692 of file Quote.php.
getCustomerNote | ( | ) |
Customer notice text
Implements CartInterface.
Definition at line 708 of file Quote.php.
getCustomerNoteNotify | ( | ) |
Send customer notification flag
Implements CartInterface.
Definition at line 724 of file Quote.php.
getCustomerTaxClassId | ( | ) |
Get customer tax class ID.
tax class can vary at any time. so instead of using the value from session, we need to retrieve from db every time to get the correct tax class
Implements CartInterface.
Definition at line 1084 of file Quote.php.
getErrors | ( | ) |
Retrieve current quote errors
Definition at line 2046 of file Quote.php.
getExtensionAttributes | ( | ) |
Retrieve existing extension attributes object or create a new one.
Implements CartInterface.
Definition at line 2575 of file Quote.php.
getIsActive | ( | ) |
Determines whether the cart is still active.
Implements CartInterface.
Definition at line 604 of file Quote.php.
getIsVirtual | ( | ) |
Check quote for virtual product only
Implements CartInterface.
Definition at line 2330 of file Quote.php.
getItemById | ( | $itemId | ) |
Retrieve item model object by item identifier
int | $itemId |
Definition at line 1478 of file Quote.php.
getItemByProduct | ( | $product | ) |
getItems | ( | ) |
Lists items in the cart.
Implements CartInterface.
Definition at line 540 of file Quote.php.
getItemsCollection | ( | $useCache = true | ) |
Retrieve quote items collection
bool | $useCache |
Definition at line 1380 of file Quote.php.
getItemsCount | ( | ) |
Returns the number of different items or products in the cart.
Implements CartInterface.
Definition at line 628 of file Quote.php.
getItemsQty | ( | ) |
Returns the total quantity of all cart items.
Implements CartInterface.
Definition at line 644 of file Quote.php.
getItemsSummaryQty | ( | ) |
Get items summary qty.
Definition at line 1828 of file Quote.php.
getItemVirtualQty | ( | ) |
Get item virtual qty.
Definition at line 1857 of file Quote.php.
getMessages | ( | ) |
Retrieve current quote messages
Definition at line 2031 of file Quote.php.
getOrigOrderId | ( | ) |
Returns the original order ID for the cart.
Implements CartInterface.
Definition at line 660 of file Quote.php.
getPayment | ( | ) |
getPaymentsCollection | ( | ) |
getReservedOrderId | ( | ) |
Returns the reserved order ID for the cart.
Implements CartInterface.
Definition at line 676 of file Quote.php.
getSharedStoreIds | ( | ) |
getShippingAddress | ( | ) |
Retrieve quote shipping address
Definition at line 1161 of file Quote.php.
getShippingAddressesItems | ( | ) |
getStore | ( | ) |
getStoreId | ( | ) |
getTotals | ( | ) |
Get all quote totals (sorted by priority)
Definition at line 1996 of file Quote.php.
getUpdatedAt | ( | ) |
Returns the cart last update date and time.
Implements CartInterface.
Definition at line 572 of file Quote.php.
hasItems | ( | ) |
hasItemsWithDecimalQty | ( | ) |
hasProductId | ( | $productId | ) |
hasVirtualItems | ( | ) |
Has a virtual products on quote
Definition at line 2340 of file Quote.php.
isMultipleShippingAddresses | ( | ) |
Check if there are more than one shipping address
Definition at line 2565 of file Quote.php.
isPreventSaving | ( | ) |
isVirtual | ( | ) |
Check quote for virtual product only
Definition at line 2306 of file Quote.php.
itemsCollectionWasSet | ( | ) |
Checks if it was set
loadActive | ( | $quoteId | ) |
loadByCustomer | ( | $customer | ) |
Loading quote data by customer
\Magento\Customer\Model\Customer | int | $customer |
loadByIdWithoutStore | ( | $quoteId | ) |
merge | ( | Quote | $quote | ) |
Merge quotes
Quote | $quote |
Init shipping and billing address if quote is new
Definition at line 2360 of file Quote.php.
paymentsCollectionWasSet | ( | ) |
preventSaving | ( | ) |
removeAddress | ( | $addressId | ) |
removeAllAddresses | ( | ) |
Leave no more than one billing and one shipping address, fill them with default data
Definition at line 1272 of file Quote.php.
removeAllItems | ( | ) |
Mark all quote items as deleted (empty quote)
Definition at line 1558 of file Quote.php.
removeErrorInfosByParams | ( | $type, | |
$params | |||
) |
Removes error infos, that have parameters equal to passed in $params. $params can have following keys (if not set - then any item is good for this key): 'origin', 'code', 'message'
string | $type | An internal error type ('error', 'qty', etc.), passed then to adding messages routine |
array | $params |
Definition at line 2144 of file Quote.php.
removeItem | ( | $itemId | ) |
removeMessageByText | ( | $type, | |
$text | |||
) |
Removes message by text
string | $type | |
string | $text |
Definition at line 2187 of file Quote.php.
reserveOrderId | ( | ) |
Generate new increment order id and associate it with current quote
Definition at line 2216 of file Quote.php.
setBillingAddress | ( | \Magento\Quote\Api\Data\AddressInterface | $address = null | ) |
Set billing address.
\Magento\Quote\Api\Data\AddressInterface | $address |
Definition at line 1325 of file Quote.php.
setCheckoutMethod | ( | $checkoutMethod | ) |
Sets the payment method that is used to process the cart.
@codeCoverageIgnore
string | $checkoutMethod |
Definition at line 2530 of file Quote.php.
setConvertedAt | ( | $convertedAt | ) |
Sets the cart conversion date and time.
string | $convertedAt |
Implements CartInterface.
Definition at line 596 of file Quote.php.
setCreatedAt | ( | $createdAt | ) |
Sets the cart creation date and time.
string | $createdAt |
Implements CartInterface.
Definition at line 564 of file Quote.php.
setCurrency | ( | \Magento\Quote\Api\Data\CurrencyInterface | $currency = null | ) |
Definition at line 532 of file Quote.php.
setCustomer | ( | \Magento\Customer\Api\Data\CustomerInterface | $customer = null | ) |
setCustomerAddressData | ( | array | $addresses | ) |
Substitute customer addresses
Definition at line 1023 of file Quote.php.
setCustomerIsGuest | ( | $customerIsGuest | ) |
Sets true for guest customers, false for logged in customers
bool | $customerIsGuest |
Implements CartInterface.
Definition at line 700 of file Quote.php.
setCustomerNote | ( | $customerNote | ) |
Sets Customer notice text
string | $customerNote |
Implements CartInterface.
Definition at line 716 of file Quote.php.
setCustomerNoteNotify | ( | $customerNoteNotify | ) |
Sets send customer notification flag
bool | $customerNoteNotify |
Implements CartInterface.
Definition at line 732 of file Quote.php.
setCustomerTaxClassId | ( | $customerTaxClassId | ) |
Set customer tax class ID.
int | $customerTaxClassId |
Implements CartInterface.
Definition at line 1103 of file Quote.php.
setExtensionAttributes | ( | \Magento\Quote\Api\Data\CartExtensionInterface | $extensionAttributes | ) |
Set an extension attributes object.
\Magento\Quote\Api\Data\CartExtensionInterface | $extensionAttributes |
Definition at line 2586 of file Quote.php.
setHasError | ( | $flag | ) |
Sets flag, whether this quote has some error associated with it. When TRUE - also adds 'unknown' error information to list of quote errors. When FALSE - clears whole list of quote errors. It's recommended to use addErrorInfo() instead - to be able to remove error statuses later.
bool | $flag |
Definition at line 2081 of file Quote.php.
setIsActive | ( | $isActive | ) |
Sets whether the cart is still active.
bool | $isActive |
Implements CartInterface.
Definition at line 612 of file Quote.php.
setIsVirtual | ( | $isVirtual | ) |
Definition at line 620 of file Quote.php.
setItems | ( | array | $items = null | ) |
Sets items in the cart.
Implements CartInterface.
Definition at line 548 of file Quote.php.
setItemsCount | ( | $itemsCount | ) |
Sets the number of different items or products in the cart.
int | $itemsCount |
Implements CartInterface.
Definition at line 636 of file Quote.php.
setItemsQty | ( | $itemsQty | ) |
Sets the total quantity of all cart items.
float | $itemQty |
Implements CartInterface.
Definition at line 652 of file Quote.php.
setOrigOrderId | ( | $origOrderId | ) |
Sets the original order ID for the cart.
int | $origOrderId |
Implements CartInterface.
Definition at line 668 of file Quote.php.
setPayment | ( | PaymentInterface | $payment | ) |
setReservedOrderId | ( | $reservedOrderId | ) |
Sets the reserved order ID for the cart.
int | $reservedOrderId |
Implements CartInterface.
Definition at line 684 of file Quote.php.
setShippingAddress | ( | \Magento\Quote\Api\Data\AddressInterface | $address = null | ) |
Set shipping address
\Magento\Quote\Api\Data\AddressInterface | $address |
Definition at line 1344 of file Quote.php.
setStore | ( | \Magento\Store\Model\Store | $store | ) |
setStoreId | ( | $storeId | ) |
Sets store identifier
int | $storeId |
Implements CartInterface.
Definition at line 753 of file Quote.php.
setUpdatedAt | ( | $updatedAt | ) |
Sets the cart last update date and time.
string | $updatedAt |
Implements CartInterface.
Definition at line 580 of file Quote.php.
updateCustomerData | ( | \Magento\Customer\Api\Data\CustomerInterface | $customer | ) |
Update customer data object
\Magento\Customer\Api\Data\CustomerInterface | $customer |
Definition at line 1057 of file Quote.php.
updateItem | ( | $itemId, | |
$buyRequest, | |||
$params = null |
|||
) |
Updates quote item with new configuration
$params sets how current item configuration must be taken into account and additional options. It's passed to \Magento\Catalog\Helper\Product->addParamsToBuyRequest() to compose resulting buyRequest.
Basically it can hold
For more options see \Magento\Catalog\Helper\Product->addParamsToBuyRequest()
int | $itemId | |
\Magento\Framework\DataObject | $buyRequest | |
null | array | \Magento\Framework\DataObject | $params |
Product configuration didn't stick to original quote item It either has same configuration as some other quote item's product or completely new configuration
Definition at line 1750 of file Quote.php.
const CHECKOUT_METHOD_LOGIN_IN = 'login_in' |