generated from boboko/starter
marketing consent
This commit is contained in:
@@ -164,7 +164,14 @@ public function saveAddress(string $locale, Request $request): JsonResponse
|
||||
$this->checkout->setBillingAddress($billing);
|
||||
$cart = $this->checkout->setShippingAddress($shipping);
|
||||
|
||||
$cart->meta = [...($cart->meta?->toArray() ?? []), 'ship_to_billing' => $sameAsBilling];
|
||||
$cart->meta = [
|
||||
...($cart->meta?->toArray() ?? []),
|
||||
'ship_to_billing' => $sameAsBilling,
|
||||
// Interim storage only — the proper consent record (timestamp,
|
||||
// policy version) is the back-end Task 2. This just lets the
|
||||
// checkbox round-trip on reload like every other field.
|
||||
'marketing_consent' => $request->boolean('marketing_consent'),
|
||||
];
|
||||
$cart->save();
|
||||
|
||||
// ShippingManifest is a request-lifetime singleton whose getOptions()
|
||||
|
||||
Reference in New Issue
Block a user