Bukimedia / PrestaSharp

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

Create Category Multishop #356

Open PHonorato opened 5 years ago

PHonorato commented 5 years ago

Hi, i have a multishop, with one key per shop. I use the key and url of one shop and when I create a category it creates in both stores...

Dim categoryFactory As CategoryFactory = New CategoryFactory(PrestashopURL, PrestashopKey, "") Dim NovaCategoria As New Entities.category NovaCategoria.id_parent = id_pai NovaCategoria.description.Add(New Bukimedia.PrestaSharp.Entities.AuxEntities.language(i,categoria)) NovaCategoria.link_rewrite.Add(New Bukimedia.PrestaSharp.Entities.AuxEntities.language(i, categoria)) NovaCategoria.meta_description.Add(New Bukimedia.PrestaSharp.Entities.AuxEntities.language(i, categoria)) NovaCategoria.meta_keywords.Add(New Bukimedia.PrestaSharp.Entities.AuxEntities.language(i, categoria)) NovaCategoria.name.Add(New Bukimedia.PrestaSharp.Entities.AuxEntities.language(i, categoria)) NovaCategoria.id_shop_default = loja_id NovaCategoria.is_root_category = 0 NovaCategoria.active = 1 categoryFactory.Add(NovaCategoria)

What am I doing wrong?

Thanks, Paulo Honorato

PHonorato commented 5 years ago

Create a manufacteur work fine. Create a new manufacteur olny in shop that i indicate in PrestashopURL and PrestashopKey. But when i try to create a category, create in both shop's

mowcixo commented 5 years ago

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