Skip to content

Commit d556967

Browse files
committed
ACP2E-94: When product is removed in Multiaddress checkout, the address dropdown value changes to default of all product.
1 parent 8040b74 commit d556967

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

app/code/Magento/Quote/Model/Quote.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
112112
/**
113113
* Checkout login method key
114114
*/
115-
const CHECKOUT_METHOD_LOGIN_IN = 'login_in';
115+
protected const CHECKOUT_METHOD_LOGIN_IN = 'login_in';
116116

117117
/**
118118
* @var string
@@ -172,14 +172,14 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
172172
protected $_preventSaving = false;
173173

174174
/**
175-
* Catalog product
175+
* Product of the catalog
176176
*
177177
* @var \Magento\Catalog\Helper\Product
178178
*/
179179
protected $_catalogProduct;
180180

181181
/**
182-
* Quote validator
182+
* To perform validation on the quote
183183
*
184184
* @var \Magento\Quote\Model\QuoteValidator
185185
*/
@@ -213,7 +213,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
213213
protected $_customerFactory;
214214

215215
/**
216-
* Group repository
216+
* Repository for group to perform CRUD operations
217217
*
218218
* @var \Magento\Customer\Api\GroupRepositoryInterface
219219
*/
@@ -260,21 +260,21 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
260260
protected $_objectCopyService;
261261

262262
/**
263-
* Address repository
263+
* Repository for customer address to perform crud operations
264264
*
265265
* @var \Magento\Customer\Api\AddressRepositoryInterface
266266
*/
267267
protected $addressRepository;
268268

269269
/**
270-
* Search criteria builder
270+
* It is used for building search criteria
271271
*
272272
* @var \Magento\Framework\Api\SearchCriteriaBuilder
273273
*/
274274
protected $searchCriteriaBuilder;
275275

276276
/**
277-
* Filter builder
277+
* This is used for holding builder object for filter service
278278
*
279279
* @var \Magento\Framework\Api\FilterBuilder
280280
*/
@@ -1356,7 +1356,7 @@ public function setBillingAddress(\Magento\Quote\Api\Data\AddressInterface $addr
13561356
{
13571357
$old = $this->getAddressesCollection()->getItemById($address->getId())
13581358
?? $this->getBillingAddress();
1359-
if (!empty($old)) {
1359+
if ($old != null) {
13601360
$old->addData($address->getData());
13611361
} else {
13621362
$this->addAddress($address->setAddressType(Address::TYPE_BILLING));
@@ -1378,7 +1378,7 @@ public function setShippingAddress(\Magento\Quote\Api\Data\AddressInterface $add
13781378
} else {
13791379
$old = $this->getAddressesCollection()->getItemById($address->getId())
13801380
?? $this->getShippingAddress();
1381-
if (!empty($old)) {
1381+
if ($old != null) {
13821382
$old->addData($address->getData());
13831383
} else {
13841384
$this->addAddress($address->setAddressType(Address::TYPE_SHIPPING));

0 commit comments

Comments
 (0)