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

adding new specific prices for prestashop v 1.6 ERROR #333

Closed Rabi3k closed 5 years ago

Rabi3k commented 5 years ago

im using this code below to add new specific price to an item but the return value is the first specific price in my database and the specific price is not added any help? or suggestion

the API key in Webservise is checked for add

SpecificPriceFactory specificPriceFactory = new SpecificPriceFactory(shopURL, GlobalClass.Account, GlobalClass.Password);

        specific_price s = new specific_price();
        s.id_product = productID;
        s.id_shop_group = 0;
        s.id_shop = 0;
        s.id_cart = 0;
        s.id_currency = 0;
        s.id_customer = 0;
        s.id_country = 0;
        s.id_group = 4;
        s.id_product_attribute = Product_attribute[0];
        s.id_specific_price_rule = 0;
        s.price = -1;
        s.from_quantity = 1;
        s.reduction = 0;
        s.reduction_tax = 1;
        s.reduction_type = "percentage";
        s.from = "0000-00-00 00:00:00";
        s.to = "0000-00-00 00:00:00";
        var i = specificPriceFactory.Add(s);
OscarLate commented 5 years ago

same problem. did you solve it?

mowcixo commented 5 years ago

Hello @Rabi3k, sorry for the delay, did you solve it?

mowcixo commented 5 years ago

How about you @OscarLate?

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.