Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

My stock dosen't change when I create an order with Api

My stock dosen't change when I create an order with Api

Not applicable

Hello,

I am developing a tool that communicates with API (Prestashop API) using Python. When I try to create an order with a product, everything seems to work fine, but the quantity of the product does not change. I have tried everything, but nothing seems to work.

Details:
Order creation successful with the specified product Stock remains the same

As a trial account, am I able to modify stock through the API? Is there anything wrong with my code?

 


order_find = shopify.Order.find() print(order_find) if len(order_find) >= 1: for ord in order_find: if ord.source_identifier == order['increment_id']: print('La commande est déjà existante') break else: print('La commande vient d\'etre créer') response = orderS.save() print(response) else: print('La commande vient d\'etre créer') response = orderS.save() print(response) 

 

Thank you 

Replies 0 (0)