if (!\
is_string($parentId)) { return;
} $payload =
$this->
getCombinationsPayload($variants,
$parentId,
$parentPayload['productNumber'
]);
$variantIds =
array_column($payload, 'id'
);
$this->connection->
executeStatement( 'DELETE FROM `product_option` WHERE `product_id` IN (:ids);',
['ids' => Uuid::
fromHexToBytesList($variantIds)],
['ids' => ArrayParameterType::STRING
] );
$configuratorSettingPayload =
$this->
getProductConfiguratorSettingPayload($payload,
$parentId);
$this->connection->
executeStatement( 'DELETE FROM `product_configurator_setting` WHERE `product_id` = :parentId AND `id` NOT IN (:ids);',
[ 'parentId' => Uuid::
fromHexToBytes($parentId),
'ids' => Uuid::
fromHexToBytesList(array_column($configuratorSettingPayload, 'id'
)),
],
['ids' => ArrayParameterType::STRING
] );
$this->syncService->
sync([ new SyncOperation(