@@ -58,9 +58,6 @@ class Creator
58
58
/** @var StoreManagerInterface */
59
59
private $ storeManager ;
60
60
61
- /** @var Customer */
62
- private $ customer ;
63
-
64
61
/** @var ScopeConfigInterface */
65
62
private $ scopeConfig ;
66
63
@@ -85,7 +82,6 @@ class Creator
85
82
* @param CartExtensionFactory $cartExtensionFactory
86
83
* @param ProductRepositoryInterface $productRepository
87
84
* @param StoreManagerInterface $storeManager
88
- * @param Customer $customer
89
85
* @param ScopeConfigInterface $scopeConfig
90
86
* @param QuoteManagement $quoteManagement
91
87
* @param Registry $registry
@@ -101,7 +97,6 @@ public function __construct(
101
97
CartExtensionFactory $ cartExtensionFactory ,
102
98
ProductRepositoryInterface $ productRepository ,
103
99
StoreManagerInterface $ storeManager ,
104
- Customer $ customer ,
105
100
ScopeConfigInterface $ scopeConfig ,
106
101
QuoteManagement $ quoteManagement ,
107
102
Registry $ registry
@@ -116,7 +111,6 @@ public function __construct(
116
111
$ this ->cartExtensionFactory = $ cartExtensionFactory ;
117
112
$ this ->productRepository = $ productRepository ;
118
113
$ this ->storeManager = $ storeManager ;
119
- $ this ->customer = $ customer ;
120
114
$ this ->scopeConfig = $ scopeConfig ;
121
115
$ this ->quoteManagement = $ quoteManagement ;
122
116
$ this ->registry = $ registry ;
@@ -177,8 +171,6 @@ public function execute(CheckoutFormInterface $checkoutForm)
177
171
/**
178
172
* @param Quote $quote
179
173
* @param CheckoutFormInterface $checkoutForm
180
- * @throws NoSuchEntityException
181
- * @throws LocalizedException
182
174
*/
183
175
private function processCustomer (Quote $ quote , CheckoutFormInterface $ checkoutForm )
184
176
{
@@ -193,12 +185,10 @@ private function processCustomer(Quote $quote, CheckoutFormInterface $checkoutFo
193
185
);
194
186
}
195
187
196
- $ customer = $ this ->customer ->get (
197
- $ checkoutForm ->getBuyer (),
198
- $ store = $ this ->getStore (),
199
- $ checkoutForm ->getInvoice ()->getAddress ()->getCompany ()->getVatId ()
200
- );
201
- $ quote ->assignCustomer ($ customer );
188
+ $ quote ->setCustomerFirstname ($ checkoutForm ->getBuyer ()->getFirstName ());
189
+ $ quote ->setCustomerLastname ($ checkoutForm ->getBuyer ()->getLastName ());
190
+ $ quote ->setCustomerEmail ($ checkoutForm ->getBuyer ()->getEmail ());
191
+ $ quote ->setCustomerIsGuest (true );
202
192
}
203
193
204
194
/**
0 commit comments