File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
app/code/Magento/Checkout/Model/Type Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -491,13 +491,19 @@ public function saveBilling($data, $customerAddressId)
491
491
)->setCollectShippingRates (
492
492
true
493
493
)->collectTotals ();
494
- $ shipping ->save ();
494
+ if (!$ this ->isCheckoutMethodRegister ()) {
495
+ $ shipping ->save ();
496
+ }
495
497
$ this ->getCheckout ()->setStepData ('shipping ' , 'complete ' , true );
496
498
break ;
497
499
}
498
500
}
499
501
500
- $ this ->quoteRepository ->save ($ this ->getQuote ());
502
+ if ($ this ->isCheckoutMethodRegister ()) {
503
+ $ this ->quoteRepository ->save ($ this ->getQuote ());
504
+ } else {
505
+ $ address ->save ();
506
+ }
501
507
502
508
$ this ->getCheckout ()->setStepData (
503
509
'billing ' ,
@@ -516,6 +522,16 @@ public function saveBilling($data, $customerAddressId)
516
522
return [];
517
523
}
518
524
525
+ /**
526
+ * Check whether checkout method is "register"
527
+ *
528
+ * @return bool
529
+ */
530
+ protected function isCheckoutMethodRegister ()
531
+ {
532
+ return $ this ->getQuote ()->getCheckoutMethod () == self ::METHOD_REGISTER ;
533
+ }
534
+
519
535
/**
520
536
* Validate customer data and set some its data for further usage in quote
521
537
*
You can’t perform that action at this time.
0 commit comments