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-quote
Model
GuestCart
GuestShippingAddressManagement.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Quote\Model\GuestCart
;
7
8
use
Magento\Quote\Model\GuestCart\GuestShippingAddressManagementInterface
;
9
use
Magento\Quote\Model\QuoteIdMask
;
10
use Magento\Quote\Model\QuoteIdMaskFactory;
11
use
Magento\Quote\Model\ShippingAddressManagementInterface
;
12
16
class
GuestShippingAddressManagement
implements
GuestShippingAddressManagementInterface
17
{
21
protected
$quoteIdMaskFactory
;
22
26
protected
$shippingAddressManagement
;
27
34
public
function
__construct
(
35
ShippingAddressManagementInterface
$shippingAddressManagement
,
36
QuoteIdMaskFactory
$quoteIdMaskFactory
37
) {
38
$this->shippingAddressManagement =
$shippingAddressManagement
;
39
$this->quoteIdMaskFactory =
$quoteIdMaskFactory
;
40
}
41
45
public
function
assign
(
$cartId
, \
Magento
\
Quote
\Api\Data\
AddressInterface
$address
)
46
{
48
$quoteIdMask
= $this->quoteIdMaskFactory->create()->load(
$cartId
,
'masked_id'
);
49
return
$this->shippingAddressManagement->assign(
$quoteIdMask
->getQuoteId(),
$address
);
50
}
51
55
public
function
get
(
$cartId
)
56
{
58
$quoteIdMask
= $this->quoteIdMaskFactory->create()->load(
$cartId
,
'masked_id'
);
59
return
$this->shippingAddressManagement->get(
$quoteIdMask
->getQuoteId());
60
}
61
}
$quoteIdMask
$quoteIdMask
Definition:
quote_with_bundle_and_options_rollback.php:22
Magento\Quote\Model\GuestCart\GuestShippingAddressManagement
Definition:
GuestShippingAddressManagement.php:16
Magento\Quote\Model\GuestCart\GuestShippingAddressManagement\__construct
__construct(ShippingAddressManagementInterface $shippingAddressManagement, QuoteIdMaskFactory $quoteIdMaskFactory)
Definition:
GuestShippingAddressManagement.php:34
Magento\Quote\Api\Data\AddressInterface
Definition:
AddressInterface.php:13
Magento\Quote\Model\ShippingAddressManagementInterface
Definition:
ShippingAddressManagementInterface.php:13
Magento\Quote\Model\GuestCart\GuestShippingAddressManagementInterface
Definition:
GuestShippingAddressManagementInterface.php:13
$address
$address
Definition:
customer.php:38
Magento\Quote\Model\GuestCart
Definition:
GuestBillingAddressManagement.php:6
Magento\Quote\Model\GuestCart\GuestShippingAddressManagementInterface\assign
assign($cartId, \Magento\Quote\Api\Data\AddressInterface $address)
$cartId
$cartId
Definition:
quote.php:22
Magento\Quote\Model\GuestCart\GuestShippingAddressManagement\$shippingAddressManagement
$shippingAddressManagement
Definition:
GuestShippingAddressManagement.php:26
Magento
Magento\Quote\Model\GuestCart\GuestShippingAddressManagement\$quoteIdMaskFactory
$quoteIdMaskFactory
Definition:
GuestShippingAddressManagement.php:21
Magento\Framework\DB\Platform\Quote
Definition:
Quote.php:13
Magento\Quote\Model\QuoteIdMask
Definition:
QuoteIdMask.php:15