• Resolved Tushar

    (@tushar4monto)


    Hello Woocommerce

    We have created a mobile application using Rest API. you provided very well documentation. but we are very disappointed with cart API. how we can create the application without cart functionality.How you can forget cart API.

    You should provide API or another way how we can create cart functionality for an application.

    Also, you used cookies for get cart details. with application how we can manage cookies it’s not possible.

    We think there is should one function that we can call for add data to cart with a parameter like a user id cart items with variations or without variation with an array for multiple products or without array for a single product

    Thanks

    • This topic was modified 8 years ago by Tushar.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    Hey @tushar4monto – which REST API calls did you have in mind that you cannot get through the API? https://docs.woocommerce.com/wc-apidocs/class-WC_Cart.html

    Thread Starter Tushar

    (@tushar4monto)

    Hello

    We are really thankful for your replay. maybe you not get our point. we are facing difficulty for manage cart with user login and without user login with rest API.

    The issue is we call add to cart API its work but not add this cart to the particular user.
    Means first we call login API. the user will logged in. after we add the product to cart. but this product does not synchronize with the user because add to cart method use session data and with API it’s not possible.

    We hope you understand our issue.

    Thank you.

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    Hey @tushar4monto – I’m not sure I’m following indeed.

    Where is the user logging in? On your app? And is that the reason you need to manage the cart from a distance? But doesn’t it make more sense to not work with the cart, but directly with orders then?

    FWIW, here’s a plugin (not developed by us), that adds some API calls for the cart in WooCommerce: https://ww.wp.xz.cn/plugins/cart-rest-api-for-woocommerce/

    Thread Starter Tushar

    (@tushar4monto)

    Hello

    Thank you for reply Job (@jobthomas)

    Yes, the user logged in an App.

    I think WooCommerce default cart functionality get user data from cookies on the web. but in the application, if we call user login API how we can manage user login same as a website in the application. it’s not possible to manage with API.

    if we missing something please help us.
    Our goal is to manage cart same as a website using API. with user login and without user login.

    Thank you.

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    Hey @tushar4monto – in that case, that’s indeed not possible with the current REST API. You can do two things:

    1/ Have a look at the above plugin to see if that does the trick.

    2/ Open a feature request on the GH repo: https://github.com/woocommerce/woocommerce/issues/new?template=Feature_request.md

    Since we can’t help you further with that here on the forum, I’ll mark this as resolved now.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Missing Rest API For CART’ is closed to new replies.