Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
155 stars 152 forks source link

Update product in Multi Shop mode erases category configuration #315

Open Fraker29 opened 6 years ago

Fraker29 commented 6 years ago

I'm using the library to manage multiple stores on the same Prestashop platform. When I update a product for the second store, the categories configuration of this product is deleted for the two stores. When I get the product from the ProductFactory, the parameter id_category_default is set to the good value, then, in my code, I don't edit this value, and after the update, the default category for all the stores are deleted and the product disappear for the website. Note : the two stores have their own categories list. Thank you for your help.

PHonorato commented 5 years ago

have you solved this problem? I have a similar problem, when i creata a category, create the category in the two stores. The Url and API key are diferent each shop. I dont understand why he create in he two shops the same category.

Thanks

mowcixo commented 5 years ago

Hello @Fraker29 and @PHonorato, I couldn't test it yet, but I think that's a problem with Prestashop, not with PrestaSharp... could you test it without using PrestaSharp? using Postman or something?

PHonorato commented 5 years ago

Hi @mowcixo like i said in this issue https://github.com/Bukimedia/PrestaSharp/issues/356 Create a Manufacteur creates in one shop, but create a Category, create in both shops.

mowcixo commented 5 years ago

Hi @PHonorato, yes, I've read it, but it still can be a Prestashop bug just for categories, the way to test it is doing the category creation from a REST client like Postman and check if it does the same, but I didn't have the time to test it yet.

PHonorato commented 5 years ago

Ok, and thanks @mowcixo . I will try Postman

mowcixo commented 5 years ago

I will try to test it too ASAP and let you know @PHonorato

Fraker29 commented 5 years ago

Hello @PHonorato and @mowcixo, I can't remember if I found a solution for this issue or not, but I can have a look into my code. All I know is that I still use PrestaSharp in multiple store configuration.

mowcixo commented 5 years ago

That would be great @Fraker29, let us know please :)

mowcixo commented 5 years ago

I just tested the behaviour and wrote the bug in PrestaShop/PrestaShop#13987, thank you guys :)