Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog-inventory
Model
Quote
Item
QuantityValidator
QuoteItemQtyList.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CatalogInventory\Model\Quote\Item\QuantityValidator
;
7
8
class
QuoteItemQtyList
9
{
16
protected
$_checkedQuoteItems
= [];
17
29
public
function
getQty
(
$productId
,
$quoteItemId
,
$quoteId
, $itemQty)
30
{
31
$qty = $itemQty;
32
if
(isset(
33
$this->_checkedQuoteItems[
$quoteId
][
$productId
][
'qty'
]
34
) && !in_array(
35
$quoteItemId
,
36
$this->_checkedQuoteItems[
$quoteId
][
$productId
][
'items'
]
37
)
38
) {
39
$qty += $this->_checkedQuoteItems[
$quoteId
][
$productId
][
'qty'
];
40
}
41
42
$this->_checkedQuoteItems[
$quoteId
][
$productId
][
'qty'
] = $qty;
43
$this->_checkedQuoteItems[
$quoteId
][
$productId
][
'items'
][] =
$quoteItemId
;
44
45
return
$qty;
46
}
47
}
$productId
$productId
Definition:
website_attribute_sync.php:26
Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList\getQty
getQty($productId, $quoteItemId, $quoteId, $itemQty)
Definition:
QuoteItemQtyList.php:29
Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList
Definition:
QuoteItemQtyList.php:8
Magento\CatalogInventory\Model\Quote\Item\QuantityValidator
$quoteItemId
$quoteItemId
Definition:
cart.php:17
Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList\$_checkedQuoteItems
$_checkedQuoteItems
Definition:
QuoteItemQtyList.php:16
$quoteId
$quoteId
Definition:
quote_with_items_and_custom_options_saved_rollback.php:12