Projekt

Allgemein

Profil

Aktionen

GX-Bug #69482

geschlossen

REST API für Produktvarianten übernimmt kein Preis bei Kombinationen | REST API for product variants don't apply price for combinations

Von Till Tepelmann vor mehr als 2 Jahren hinzugefügt. Vor etwa 2 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Marvin Muxfeld
Kategorie:
REST-API
Zielversion:
% erledigt:

0%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
4.5.1.0, 4.5.1.1
Release Notes Langtext:

Preis für Variantenkombinationen wird über die REST API v3 nun korrekt aktualisiert


Beschreibung

Wenn man die REST API v3 benutzt und bei den Varianten eine Komnination aktualisieren möchte, dann wird der Preis für die Kombination nicht übernommen, der Preis wird ignoriert.

Kann wie folgt reproduziert werden:

  1. Shopversion 4.5.1.1 installieren
  2. Eine REST API Anfrage an api.php/v3/products/1/variants mit folgendem JSON senden
  3. Öffne den Artikel Testartikel 1 im Gambio Admin und rufe die Varianten auf
[
    {
        "id": 1,
        "combination": [
            {
                "optionId": 1,
                "optionValueId": 1
            },
            {
                "optionId": 1,
                "optionValueId": 1
            }
        ],
        "sortOrder": 1,
        "modelNumber": "abcdef-12345",
        "GTIN": "00012345678905",
        "ASIN": "B0006GQ8RW",
        "EAN": "401234567890",
        "stockType": "only-positive",
        "stock": 1337,
        "weightType": "replacing",
        "weight": 13.37,
        "priceType": "replacing",
        "price": 13.37,
        "vpeScalarValue": 13.37,
        "vpeUnitId": 2,
        "deliveryTimeId": 1,
        "imageListId": 1
    }
]

Erwartetes Verhalten:
Wenn man eine Variante mit Kombinationen üpber die REST API aktualisieren möchte und einen Preis übermittelt, sollte der Preis auch mit aktualisiert werden

Tatsächliches Verhalten:
Wenn man über die REST API eine Variante mit Kombinationen aktualisiert, wird der Preis nicht übernommen, der Preis wird ignoriert


When using REST API v3 and want to update a comnination in the variants, the price for the combination is not taken, the price is ignored.

Can be reproduced as follows:

  1. install shop version 4.5.1.1.
  2. send a REST API request to api.php/v3/products/1/variants with following JSON
  3. open the product test article 1 in the Gambio Admin and open the variants

`` javascript
[
{
"id": 1,
"combination": [
{
"optionId": 1,
"optionValueId": 1
},
{
"optionId": 1,
"optionValueId": 1
}
],
}, "sortOrder": 1,
"modelNumber": "abcdef-12345",
}, "GTIN": "00012345678905",
"ASIN": "B0006GQ8RW",
"EAN": "401234567890",
"stockType": "only-positive",
"stock": 1337,
"weightType": "replacing",
"weight": 13.37,
"priceType": "replacing",
"price": 13.37,
"vpeScalarValue": 13.37,
"vpeUnitId": 2,
"deliveryTimeId": 1,
"imageListId": 1
}
]

Expected behavior:
If you want to update a variant with combinations via the REST API and submit a price, the price should be updated as well

Actual behavior:
When updating a variant with combinations via the REST API, the price is not applied, the price is ignored.

Aktionen

Auch abrufbar als: Atom PDF