[GELÖST] mehrere Eigenschaften / PropertyValues übergeben

Hallo @Weidmann, hast du auch die 

filterGroupId

übergeben?

 

Die ID deines Filtersets. Da habe ich auch eine Fehlermeldung zu bekommen.

 

@Weidmann schrieb:

Hallo,

ich versuche seit Stunden die Options über die API zu setzen (nutze Python).

Ich mache das genau so, wie hier beschrieben:

‚propertyValues‘:
[{‚id‘: 3845, ‚optionId‘: 26}, {‚id‘: 3843, ‚optionId‘:11}, {‚id‘: 3728, ‚optionId‘: 25}]

und erhalte immer den Fehler:

apiTest.ShopwareAPIError: Shopware indicated a failure: {‚success‘: False, ‚message‘: ‚Name or id for property value required‘}

zurück.

 

Habe auch diese Kombinationen durchprobiert:

  1. mit Schlüsselwort „option“:

‚propertyValues‘: [{‚option‘: {‚id‘: 3845, ‚optionId‘: 26}}, {‚option‘: {‚id‘: 3843, ‚optionId‘:11}}, {‚option‘: {‚id‘: 3728, ‚optionId‘: 25}}]

  1. mit value eine Ebene tiefer:

‚propertyValues‘: [{‚option‘: {‚id‘: 3845},  ‚optionId‘: 26}, {‚option‘: {‚id‘: 3843}, ‚optionId‘:11}, {‚option‘: {‚id‘: 3728}, ‚optionId‘: 25}]

  1. Keys gedreht:

‚propertyValues‘: [{‚option‘: {‚optionId‘: 26},  ‚id‘: 3845}, {‚option‘: {‚optionId‘: 11}, ‚id‘:3843}, {‚option‘: {‚optionId‘: 25}, ‚id‘: 3728}]

etc.

 

Wenn ich ein GET mache, erhalte ich das:

‚propertyValues‘: [
{ ‚id‘: 3728, ‚value‘: ‚27 mm‘, ‚position‘: 0, ‚optionId‘: 25, ‚mediaId‘: None},
{ ‚id‘: 3843, ‚value‘: ‚800 mm‘, ‚position‘: 0, ‚optionId‘: 11, ‚mediaId‘: None},
{ ‚id‘: 3845, ‚value‘: ‚4200 mm‘, ‚position‘: 0, ‚optionId‘: 26, ‚mediaId‘: None}

]

Wenn ich jetzt lese, dass das alles bei Euch so funktioniert, könnte ich verzweifeln … übersehe ich etwas?

Gruß,

Christoph