Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

[Erledigt] In welchem Format "releaseDate" über REST API für eine Variante setzen?

$
0
0

Guten Tag,

wie der Titel schon sagt versuche ich das "releaseDate" über die Rest API für eine Variante zu setzen, aber egal was ich eintrage, die Datenbank bleibt leer. Leider finde ich im Netz auch kein Beispiel bei dem ein Datum über die API gesetzt wird. Veilleicht hat einer von euch das Problem schon gelößt, über eine Antwort würde ich mich sehr freuen.

Ich verwende aktuelle Shopware-Version 5.1.5

hiermit erzeuge ich die Varianten und das klappt sehr gut, naja bis aus "releaseDate".

$VariantePost = array(
	'articleId' => id,
	'number' => $products_artvarnr,
	'active' => 1,
	'inStock' => $products_stock,
	'unitId' => 1,
	'shippingFree' => 1,
	'releaseDate' => 2016-05-27,
	'prices' => array(
		array(
			'customerGroupKey' => 'EK',
			'from' => 1,
			'to' => '-',
			'price' => $products_price_final,
		),
	),
 
	'configuratorOptions' => array(
		array('optionId' => $option_id,'groupId' => $group_id,),
	),
);

$client->post('variants',$VariantePost);

Update hiermit

$VariantePut = array(
		'releaseDate' => 2016-05-27,
	);

$client->put('variants/'.$variante_id,$VariantePut);

 

Mit freundlichen Grüßen
Zaphod


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>