Bilder per API an Shopware

Hallo,

wir übertragen per API die Produktbilder an Shopware, leider werden bei den Varianten das erste Bild nicht als Vorschaubild gesetzt. Gibt es eine Lösung? Vielen Dank

wird put auf articles:

Array
(
[configuratorSet] => Array
(
[groups] => Array
(
[0] => Array
(
[name] => Inhalt Variante
[options] => Array
(
[0] => Array
(
[name] => 100ml
)

[1] => Array
(
[name] => 10ml
)

)

)

)

)

[taxId] => 1
[variants] => Array
(
[0] => Array
(
[isMain] => 1
[number] => 44732
[referenceUnit] => 100.0000
[purchaseUnit] => 100.0000
[packUnit] => 0
[ean] => 4001638500777
[supplierNumber] => 951100x
[unitId] => 1
[pid] => 7559
[additionaltext] => 100ml
[width] => 60
[height] => 138
[len] => 37
[weight] => 0.2760
[shippingTime] => 1
[shippingFree] => 0
[purchasePrice] => 7.03
[stockMin] => 0.0000
[minPurchase] => 1.0000
[maxPurchase] =>
[configuratorOptions] => Array
(
[0] => Array
(
[group] => Inhalt Variante
[option] => 100ml
)

)

[prices] => Array
(
[0] => Array
(
[customerGroupKey] => EK
[from] => 1
[to] => beliebig
[percent] => 0
[price] => 14.95
[pseudoPrice] => 0
[basePrice] => 7.03
)

)

[attribute] => Array
(
[emzNotificationsEmailNotificiation] => 0
[emzNotificationsSale] => 0
[lenzGoogleShoppingCategory] => 567
[lenzGoogleShoppingActive] => 1
[lenzGoogleShoppingTitle] =>
[lenzGoogleShoppingDescription] =>
[lenzGoogleShoppingCondition] => new
)

[active] => 1
[__options_images] => Array
(
[replace] => 1
)

[images] => Array
(
[0] => Array
(
[mediaId] => 385740
[position] => 1
[main] => 1
)

)

)

[1] => Array
(
[isMain] => 0
[number] => 008900M1
[referenceUnit] => 100.0000
[purchaseUnit] => 10.0000
[packUnit] => 0
[ean] => 4001638089005
[supplierNumber] => 008900M1
[unitId] => 1
[pid] => 7560
[additionaltext] => 10ml
[width] => 0.000
[height] => 0.000
[len] => 0.000
[weight] => 0.0100
[shippingTime] => 1
[shippingFree] => 0
[purchasePrice] => 1.29
[stockMin] => 0.0000
[minPurchase] => 1.0000
[maxPurchase] =>
[configuratorOptions] => Array
(
[0] => Array
(
[group] => Inhalt Variante
[option] => 10ml
)

)

[prices] => Array
(
[0] => Array
(
[customerGroupKey] => EK
[from] => 1
[to] => beliebig
[percent] => 0
[price] => 1.95
[pseudoPrice] => 0
[basePrice] => 1.29
)

)

[attribute] => Array
(
[emzNotificationsEmailNotificiation] => 1
[emzNotificationsSale] => 0
[lenzGoogleShoppingCategory] => 567
[lenzGoogleShoppingActive] => 1
[lenzGoogleShoppingTitle] =>
[lenzGoogleShoppingDescription] =>
[lenzGoogleShoppingCondition] => new
)

[active] => 1
[__options_images] => Array
(
[replace] => 1
)

[images] => Array
(
[0] => Array
(
[mediaId] => 379729
[position] => 2
[main] => 2
)

)

)

)

[__options_images] => Array
(
[replace] => 1
)

)

Hallo,

hiermit sollte es klappe:

create(array(
		// ...
		'images' => array(
			// ...
			array(
				'link' => 'https://www.google.de/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png'
				'description'	=> 'Google Logo'
				'main' => true
			),
			array(
				'link' => 'https://www.shopwaredemo.de/media/image/b9/d3/e1/logo-desk.png'
				'description'	=> 'Shopware Demo',
				'main' => false
			),
			// ...
		),
		// ...
	));

 

Hallo,

danke für den Lösungsansatz es klappt jedoch nicht, der Schnittstellenentenwickler hat das Script so eingebaut jedoch werden dann keine Bilder mehr übertragen.
Haben wir eine Chance uns das dir das mal anschauen kannst?

 

Moin,

das Problem hatten wir auch mal.

Du musst im Knoten images was ändern.

//für das Main Bild

“images”: [{

“main”: “1”,

“position”: “1”,

//und für das zweite Bild

“main”:    “2”,             

“position”:    “2”,

Gruß!

Moin,
danke für den Tipp.

Das ist im Code schon so drin.

Gruß