Projekt

Allgemein

Profil

GX-Bug #68996

Von Daniel Wu vor mehr als 2 Jahren aktualisiert

The server responds with an error 500 (Internal server error) if only 1 option is passed. 

 Documentation: https://mjn.dev.gambio-server.net/dev-docu/docs/rest-v3/#operation/generate-product-variant 

 Steps to reproduce: 
 Send a POST request following the example within the documentation but with only one option. 

 POST @ {Shop-URL}/api.php/v3/products/1/variants/_generate 
 Request body (JSON): 
 ``` 
 [ 
     { 
     "optionId": 1, 
     "optionValueId": 1 
   } 
 ] 
 ``` 

 Expected result: 
 A variant The server should respond with the given option values is created. an error message explaining why it failed. 

 Actual result: 
 The server responds with an internal server error 500. 
 ___ 
 **Additional thought/question:**  
 Why is it even necessary to provide optionValueId AND optionId?

Zurück