Hallo, wir haben das so gelöst:
for ($i = 0; $i < $productVariant['bilder']; $i++)
{
$imageSrc = bilder_url.'/1600x1600/' . $productVariant['artikelnummer'] . '_' . $i . '.jpg';
if (@getimagesize($imageSrc)) {
$imageDataVariants[$i] = array('link' => $imageSrc);
$counter++;
}
}
if(count($imageDataVariants) > 0) {
$updateArticle = array(
'taxId' => 1,
'variants' => array(
array(
'isMain' => false,
'additionaltext' => $productVariant['produktname'],
'configuratorOptions' => array(
array('group' => 'Varianten '.$product['artikelnummer'], 'option' => $productVariant['produktname']. ' + ' .$productVariant['preis'] ),
),
'number' => $productVariant['artikelnummer'],
'__options_images' => array('replace' => true),
'images' => $imageDataVariants,
)
),
);
$client->put('articles/'. $id, $updateArticle);