Jump to content

Webservice - Add specific prices


Achtida

Recommended Posts

Hello,

i try to add new specific prices via Webservice but i cannot although i can update (edit) via webservice a specific price record that i added from the administration panel.

Do you have any idea what i do wrong when passing the data?

    $PriceFields = $blankXml->specific_price->children();

    $PriceFields ->id_product = $id_product;

    $PriceFields ->price = $price;

    $PriceFields ->id_product_attribute = 0;

    $PriceFields ->id_group = 4;

    $PriceFields ->id_shop = 1;

    $PriceFields ->id_shop_group = 0;

    $PriceFields ->id_cart = 0;

    $PriceFields ->id_currency = 0;

    $PriceFields ->id_country = 0;

    $PriceFields ->id_customer = 0;

    $PriceFields ->from_quantity = 1;

    $PriceFields ->reduction = 0.000000;

    $PriceFields ->reduction_tax = 1;

    $PriceFields ->reduction_type = 'amount';

    $PriceFields ->from = strtotime('0000-00-00 00:00:00');  

    $PriceFields ->to = strtotime('0000-00-00 00:00:00');

    $PriceFields ->id_specific_price_rule = 0;

    $createdXml = $webService->add([

       'resource' => 'specific_prices',

       'postXml' => $blankXml->asXML(),

    ]);

thank you in advance

 

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...