Support » Plugin: Cart REST API for WooCommerce - CoCart Lite » Cart content not updated

  • Resolved mikr96


    Hey dumont,

    Your API was very helpful but there is some slight issue that i encounter with, I couldnt update my cart.

    I did update the cart using /wp-json/cocart/v1/add-item and it was a success.

    But when i retrieve the cart content using /wp-json/cocart/v1/get-cart .. it did not return the same item that i add earlier.

    Need help 🙁

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Sébastien Dumont


    @mikr96 Hello.

    Could you provide more information as to how you are using CoCart?

    In the browser, your app for iOS or Android or perhaps testing via PostMan.

    Also, do you mean to add an item to the cart, or update an item already in cart?

    Look forward to your response.




    Im using the API in my wordpress. I created a custom page, so that I can manipulate how the cart flow rather than following the woocommerce native flow.

    This morning i realized that I have been using http rather https. After i changed it to https, the cart content is updated but when i transfer the custom page to the web from my local, the api is having a 505 server internal error.

    I have include the ck and cs as query param but still, it response with the same error.

    Can you guide me to the right path as I am quite new in wordpress. Thank you.



    Oh forget to mention,

    The response also gave me “cocart_cannot_be_purchased”.

    Its weird because all my items are in stock. So, what does it mean by “cannot_be_purchased” ? I am confused. Help 🙁

    Looking forward to your response



    Plugin Author Sébastien Dumont


    @mikr96 Not sure what sort of custom page you have created or why you have a 505 error.

    CoCart can be used with HTTP or HTTPS. I have not enforced it to use only HTTPS so developers can test locally before going live.

    Preferably you should be using HTTPS.

    It would help if you could maybe share some screenshots.

    As for cocart_cannot_be_purchased error. That is because the product can not be purchased. If it’s not the stock, maybe you have not set a price for that product or you have another condition applied by another plugin that is causing it to produce that error.

    Plugin Author Sébastien Dumont


    Also, stock is checked after checking to see if the product is purchasable so look into your data to find an answer why it’s not purchasable.

    @sebd86 thank you dumont. Seems like my product price went blank after i add new categories. I just realized that haha. However, my cart is not displaying, do you know how to toggle it ?

    Plugin Author Sébastien Dumont


    Are you adding items to the cart as a guest customer or as a logged in user?

    As logged in user.

    Hey, I think I got it. But I will need to auto reload the page every time when user add to cart and it is not practical haha. You have any suggestions ?

    Plugin Author Sébastien Dumont


    Great. Not sure what you are doing with your page so no suggestions. Support is for the plugin only. Good luck with your project.

    Thanks. May god bless you 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.