$data =
[ 'token' =>
$cart->
getToken(),
'currency_id' => Uuid::
fromHexToBytes($context->
getCurrency()->
getId()),
'shipping_method_id' => Uuid::
fromHexToBytes($context->
getShippingMethod()->
getId()),
'payment_method_id' => Uuid::
fromHexToBytes($context->
getPaymentMethod()->
getId()),
'country_id' => Uuid::
fromHexToBytes($context->
getShippingLocation()->
getCountry()->
getId()),
'sales_channel_id' => Uuid::
fromHexToBytes($context->
getSalesChannel()->
getId()),
'customer_id' =>
$customerId,
'price' =>
$cart->
getPrice()->
getTotalPrice(),
'line_item_count' =>
$cart->
getLineItems()->
count(),
'payload' =>
$this->
serializeCart($cart,
$payloadExists),
'rule_ids' =>
json_encode($context->
getRuleIds(), \JSON_THROW_ON_ERROR
),
'now'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
];
// @deprecated tag:v6.6.0 - remove if condition, but keep body
if ($payloadExists) { $data['compressed'
] =
(int) $this->compress;
} $query =
new RetryableQuery($this->connection,
$this->connection->
prepare($sql));
$query->
execute($data);