Closed fabiovannini closed 3 years ago
Thanks for reporting this. It would need deeper investigation, but most likely, if the API doesn't fail, it has to see with PS way of working; The Prestasharp library in itself it just a C# wrapper around PS standard endpoints.
Thank you oromand, sorry for the inconvenience.
I opened an official ticket on Prestashop, it seems to be a problem on the Prestashop core: https://github.com/PrestaShop/PrestaShop/issues/23061
I close the ticket.
Describe the bug
When you read a combination via webservice and update it without any changes (same dto), if this combination is in any Customer cart, it disappear from cart (always). The combination is updated right. Any error is trigged by webservice. Any message displayed to the customer.
Expected behavior
The combination must be remain in the cart (respecting business rules and domain logics)
Steps to Reproduce
Steps to reproduce the behavior:
1) Create a product 2) Create some combinations 3) Insert a combination in the cart on public side 4) Read this combination with web service 5) Update read combination from web service (same read dto unchanged) 6) This combination left the cart (ALWAYS)
Additional information
Sample code
`PrestashopCombination = new CombinationFactory(PrestashopApiBaseUrl, PrestashopAccount, PrestashopPassword);
var combinations = PrestashopCombination.GetByFilter(new Dictionary<string, string>() { // READ ALL OR ONE COMBINATION FOR TEST }, null, null);
foreach (var productCombination in productCombinations) { PrestashopCombination.Update(productCombination); }`