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

Duplicate product problem #327

Closed powrooz66 closed 6 years ago

powrooz66 commented 6 years ago

Hi! I have problem when i try to duplicate a product. The new product has combinations(attributes) from old product, but old product has no any combinations. Why ? I want to get oldPorduct without changes and newProduct with no combinations

ProductFactory prdktFactory = new ProductFactory(sklepyPresta._Host, sklepyPresta._User, sklepyPresta._Pass); ;
                                Bukimedia.PrestaSharp.Entities.product oldProduct = prdktFactory.Get(id_product);
                                Bukimedia.PrestaSharp.Entities.product newProduct = new Bukimedia.PrestaSharp.Entities.product();

                                newProduct = oldProduct;
                                newProduct .id = prdktFactory.GetIds().Max() + 1;
                                newProduct .id_default_combination = null;
                                newProduct .cache_default_attribute = 0;

                                prdktFactory.Add(newProduct );
lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.