Data helper
Definition at line 12 of file Data.php.
◆ __construct()
Construct
- Parameters
-
\Magento\Framework\App\Helper\Context | $context | |
\Magento\Checkout\Model\Session | $checkoutSession | |
Definition at line 35 of file Data.php.
40 parent::__construct($context);
◆ getMaximumQty()
Get maximum quantity allowed for shipping to multiple addresses
- Returns
- int
Definition at line 58 of file Data.php.
60 return (
int)$this->scopeConfig->getValue(
61 self::XML_PATH_CHECKOUT_MULTIPLE_MAXIMUM_QUANTITY,
62 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
◆ getQuote()
Retrieve checkout quote
- Returns
- \Magento\Quote\Model\Quote
Definition at line 48 of file Data.php.
50 return $this->checkoutSession->getQuote();
◆ isMultishippingCheckoutAvailable()
isMultishippingCheckoutAvailable |
( |
| ) |
|
Check if multishipping checkout is available There should be a valid quote in checkout session. If not, only the config value will be returned
- Returns
- bool
Definition at line 72 of file Data.php.
75 $isMultiShipping = $this->scopeConfig->isSetFlag(
76 self::XML_PATH_CHECKOUT_MULTIPLE_AVAILABLE,
77 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
80 return $isMultiShipping;
82 return $isMultiShipping && !
$quote->hasItemsWithDecimalQty() &&
$quote->validateMinimumAmount(
85 $quote->getItemsSummaryQty() -
$quote->getItemVirtualQty() > 0 &&
◆ $checkoutSession
◆ XML_PATH_CHECKOUT_MULTIPLE_AVAILABLE
const XML_PATH_CHECKOUT_MULTIPLE_AVAILABLE = 'multishipping/options/checkout_multiple' |
◆ XML_PATH_CHECKOUT_MULTIPLE_MAXIMUM_QUANTITY
const XML_PATH_CHECKOUT_MULTIPLE_MAXIMUM_QUANTITY = 'multishipping/options/checkout_multiple_maximum_qty' |
The documentation for this class was generated from the following file:
- vendor/magento/module-multishipping/Helper/Data.php