Create a product with price, but price is changed after creation

levittlevitt Posts: 13Member
Hi, 
I found this problem I have when I try to create a product with a given price, 
This is the coding part I am using: 

"after I create the product via API, then I update the variant"

$api->variants->update($variantID, [

"priceExcl" => 0,
"priceIncl" => $product->price,
"priceCost" => "",
"oldPriceExcl" => 0,
"oldPriceIncl" => 0,

"tax" => 18213,
"product" => $newproduct_ID

]);
Then, I went to the shop back end found out that the price is different with the value from "priceIncl", I tried to put price after "priceExcl" and I got price as zero. 

for example I set price as "priceIncl"= 89000, in the shop actual shows "Price Excl.BTW: 73553,719". 

So, where should I set the price to make sure it will be the same in the shop?

Thank you for any help. 

3 comments

  • levittlevitt Posts: 13Member
    add one info: 
    Because when I fetch the product from API, the price is under "priceIncl", that's why I tried to do the same when I create a product. thanks
  • TimBloembergenTimBloembergen Posts: 38Moderator, Lightspeed Staff moderator
    edited January 9
    Hi Levitt,

    The price is showing EXCL VAT because the option "Prices Excl VAT" is enabled within the Backoffice of the shop you are updating the prices for.
    You can find this option by navigating to Settings > Taxes in the Backoffice.
    Tim Bloembergen
    API Integrations Specialist
    Lightspeed HQ
  • levittlevitt Posts: 13Member
    Hi Levitt,

    The price is showing EXCL VAT because the option "Prices Excl VAT" is enabled within the Backoffice of the shop you are updating the prices for.
    You can find this option by navigating to Settings > Taxes in the Backoffice.
    hi Tim, thank you for the information. I am not able to change the settings because of the company rules. So, for me as a developer, how to update the price to make sure the price I set will be the price shows on the backend office? which attribute I should sign the price to? 

    Thank you :) 
Sign In or Register to comment.