@@ -112,7 +112,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
112
112
/**
113
113
* Checkout login method key
114
114
*/
115
- const CHECKOUT_METHOD_LOGIN_IN = 'login_in ' ;
115
+ public const CHECKOUT_METHOD_LOGIN_IN = 'login_in ' ;
116
116
117
117
/**
118
118
* @var string
@@ -172,14 +172,14 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
172
172
protected $ _preventSaving = false ;
173
173
174
174
/**
175
- * Catalog product
175
+ * Product of the catalog
176
176
*
177
177
* @var \Magento\Catalog\Helper\Product
178
178
*/
179
179
protected $ _catalogProduct ;
180
180
181
181
/**
182
- * Quote validator
182
+ * To perform validation on the quote
183
183
*
184
184
* @var \Magento\Quote\Model\QuoteValidator
185
185
*/
@@ -213,7 +213,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
213
213
protected $ _customerFactory ;
214
214
215
215
/**
216
- * Group repository
216
+ * Repository for group to perform CRUD operations
217
217
*
218
218
* @var \Magento\Customer\Api\GroupRepositoryInterface
219
219
*/
@@ -260,21 +260,21 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
260
260
protected $ _objectCopyService ;
261
261
262
262
/**
263
- * Address repository
263
+ * Repository for customer address to perform crud operations
264
264
*
265
265
* @var \Magento\Customer\Api\AddressRepositoryInterface
266
266
*/
267
267
protected $ addressRepository ;
268
268
269
269
/**
270
- * Search criteria builder
270
+ * It is used for building search criteria
271
271
*
272
272
* @var \Magento\Framework\Api\SearchCriteriaBuilder
273
273
*/
274
274
protected $ searchCriteriaBuilder ;
275
275
276
276
/**
277
- * Filter builder
277
+ * This is used for holding builder object for filter service
278
278
*
279
279
* @var \Magento\Framework\Api\FilterBuilder
280
280
*/
@@ -1356,7 +1356,7 @@ public function setBillingAddress(\Magento\Quote\Api\Data\AddressInterface $addr
1356
1356
{
1357
1357
$ old = $ this ->getAddressesCollection ()->getItemById ($ address ->getId ())
1358
1358
?? $ this ->getBillingAddress ();
1359
- if (! empty ( $ old) ) {
1359
+ if ($ old !== null ) {
1360
1360
$ old ->addData ($ address ->getData ());
1361
1361
} else {
1362
1362
$ this ->addAddress ($ address ->setAddressType (Address::TYPE_BILLING ));
@@ -1378,7 +1378,7 @@ public function setShippingAddress(\Magento\Quote\Api\Data\AddressInterface $add
1378
1378
} else {
1379
1379
$ old = $ this ->getAddressesCollection ()->getItemById ($ address ->getId ())
1380
1380
?? $ this ->getShippingAddress ();
1381
- if (! empty ( $ old) ) {
1381
+ if ($ old !== null ) {
1382
1382
$ old ->addData ($ address ->getData ());
1383
1383
} else {
1384
1384
$ this ->addAddress ($ address ->setAddressType (Address::TYPE_SHIPPING ));
@@ -1557,10 +1557,6 @@ public function removeItem($itemId)
1557
1557
1558
1558
if ($ item ) {
1559
1559
$ item ->setQuote ($ this );
1560
- /**
1561
- * If we remove item from quote - we can't use multishipping mode
1562
- */
1563
- $ this ->setIsMultiShipping (false );
1564
1560
$ item ->isDeleted (true );
1565
1561
if ($ item ->getHasChildren ()) {
1566
1562
foreach ($ item ->getChildren () as $ child ) {
0 commit comments