Interface CartItemInterface @api
- Since
- 100.0.2
Definition at line 13 of file CartItemInterface.php.
◆ getExtensionAttributes()
getExtensionAttributes |
( |
| ) |
|
Retrieve existing extension attributes object or create a new one.
- Returns
- \Magento\Quote\Api\Data\CartItemExtensionInterface|null
Implemented in Item.
◆ getItemId()
#- Returns the item ID.
- Returns
- int|null Item ID. Otherwise, null.
Implemented in Item.
◆ getName()
Returns the product name.
- Returns
- string|null Product name. Otherwise, null.
Implemented in Item.
◆ getPrice()
Returns the product price.
- Returns
- float|null Product price. Otherwise, null.
Implemented in Item.
◆ getProductOption()
Returns product option
- Returns
- \Magento\Quote\Api\Data\ProductOptionInterface|null
Implemented in Item.
◆ getProductType()
Returns the product type.
- Returns
- string|null Product type. Otherwise, null.
Implemented in Item.
◆ getQty()
Returns the product quantity.
- Returns
- float Product quantity.
Implemented in Item.
◆ getQuoteId()
Returns Quote id.
- Returns
- string
Implemented in Item.
◆ getSku()
Returns the product SKU.
- Returns
- string|null Product SKU. Otherwise, null.
Implemented in Item.
◆ setExtensionAttributes()
setExtensionAttributes |
( |
\Magento\Quote\Api\Data\CartItemExtensionInterface |
$extensionAttributes | ) |
|
Set an extension attributes object.
- Parameters
-
\Magento\Quote\Api\Data\CartItemExtensionInterface | $extensionAttributes | |
- Returns
- $this
◆ setItemId()
Sets the item ID.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ setName()
Sets the product name.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ setPrice()
Sets the product price.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ setProductOption()
Sets product option
- Parameters
-
\Magento\Quote\Api\Data\ProductOptionInterface | $productOption | |
- Returns
- $this
◆ setProductType()
setProductType |
( |
|
$productType | ) |
|
Sets the product type.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ setQty()
Sets the product quantity.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ setQuoteId()
Sets Quote id.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ setSku()
Sets the product SKU.
- Parameters
-
- Returns
- $this
Implemented in Item.
◆ KEY_ITEM_ID
const KEY_ITEM_ID = 'item_id' |
#+ Constants defined for keys of array, makes typos less likely
Definition at line 18 of file CartItemInterface.php.
◆ KEY_NAME
◆ KEY_PRICE
const KEY_PRICE = 'price' |
◆ KEY_PRODUCT_OPTION
const KEY_PRODUCT_OPTION = 'product_option' |
◆ KEY_PRODUCT_TYPE
const KEY_PRODUCT_TYPE = 'product_type' |
◆ KEY_QTY
◆ KEY_QUOTE_ID
const KEY_QUOTE_ID = 'quote_id' |
◆ KEY_SKU
The documentation for this interface was generated from the following file: