• Resolved élisson Costa

    (@nossileee)


    Hi,

    I have an ERP system (www.bling.com.br) that connects to my website with woocomerce, for inventory management.

    It works perfectly, only now I started selling products in bulk, where the weights and quantities are quite varied.

    Example: the product has 1kg in stock, if I sell 0.2kg I should still have 0.8kg in stock.

    It happens right.

    But the Woocommerce API that sends the ERP stock to Woocommerce, says the system staff THAT THERE IS A LIMITATION OF the API that does not send stock to the decimal place, that way, the stock is completely unconfigured.

    I need the stock of 0.8kg to be sent to Woocommerce.
    But he can only send whole numbers, 1,2 or 3 … and so on.

    Would anyone know how to instruct anyone who knows how to program / adjust the API to accept sending inventory data to decimal places?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter élisson Costa

    (@nossileee)

    https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties

    Here it says:
    
    stock_quantity integer Stock quantity.
    
    Does this mean that the stock field is whole? How could it change?
    Plugin Author Habibillah

    (@habibillah)

    The best and simple, you set your stock in gram, so your stock will be 1000gr instead of 1kg. So you can sell 200gr, 100gr, etc

    Thread Starter élisson Costa

    (@nossileee)

    Let me try to express myself better!

    I am already managing to sell on the site fractioned in grams, even leaving the unit in Kg, I installed a plugin called “Unit Price for WooCommerce” and it works very well for that.

    The problem is in my ERP system called Bling being able to send the value with decimal.

    Support said it is a limitation of the Woocommerce API. (wanted to know if this is true?)

    The stock there is in Kg with 1,700 and when synchronizing the stock with woocommerce, the same product has stock equal to 1 and not 1,700.

    I even did the test now, adjusted to grams and tried to synchronize, nothing changed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘API Woocommerce does not accept stock with decimal place?’ is closed to new replies.