• Resolved garimagarg

    (@garimagarg)


    hello,

    I am using cocart plugin api in andriod and ios app.
    Api is giving different cart items for specific cart key in postman and in apps.

    suppose for any cart key it gives 3 items in postman and check with the same cart key in app then it gives 2 items.

    Is plugin using session? or their is any other issue.

    and when try to delete any cart item then sometimes its working and sometimes its showing item key not available event that item key available in cart.
    same in case of update cart item.

    please let me know what could be the reason behind this
    please revert asap its urgent.

    Thanks

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

    (@sebd86)

    Hi. This is a new issue and one that I or others have not seen happen.

    Yes CoCart uses sessions so there is only 1 unique cart. If you are accessing the same cart in Postman and via your App then you should be seeing the same results.

    Did you recently update anything for this issue to start?

    Thread Starter garimagarg

    (@garimagarg)

    No, I did not update anything..

    Thread Starter garimagarg

    (@garimagarg)

    I got one another issue…
    I have added some cart items in one specific cart key..
    Now, those cart items also showing for another cart keys also.
    Like I added 2 items for cart key : 2
    Whne i get the cart for cart key : 11,8 then get the same 2 items for these cart keys as well.
    I can share the access if you want to check whats going wrong with this.

    Thanks

    Plugin Author Sébastien Dumont

    (@sebd86)

    From what I have examined from your Postman collection, you are conflicting the carts session by authorizing and setting the cart key.

    You can’t do both. Either you set the cart key or you authenticate as the user.

    Also you set the cart key as a global parameter like you have done for getting the cart not as form data.

    Thread Starter garimagarg

    (@garimagarg)

    Please Suggest how can I solve this problem.. As I don’t have much knowledge about this.

    Thread Starter garimagarg

    (@garimagarg)

    I am using API Bearer Auth plugin for the login API. I don’t know now what I need to do for resolve this cart issue.
    I am using cart_key for get cart of specific user.

    Plugin Author Sébastien Dumont

    (@sebd86)

    As I said in my last response. You can’t set the cart key and authenticate as another user i.e. administrator. This is because the session already identifies a user.

    If you are authenticating as a customer then that’s all you need to do.

    If you are trying to manage a specific cart then just set the cart_key query.

    Thread Starter garimagarg

    (@garimagarg)

    After removing the authorization its working.. Let me check it with APP as well.. I wil get back to you if will get this issue again..

    Thanks for your help

    • This reply was modified 2 months, 2 weeks ago by garimagarg.
    Thread Starter garimagarg

    (@garimagarg)

    Hello,

    Sorry, I am bothering you again and again..
    I got another issue.. If I am trying to Update any item then its showing error that cart item not exists.
    If I will run the Get cart API first and then Update Cart APi then its working in postman.
    But in any other Rest APi tool if I will direct run the Update cart APi then its showing error.
    Now, in the App First time its working then again 2nd time its not working.
    Suppose i have 3 products in cart. after adding thw products when I will got to cart screen on mobile then for one product update cart item is working but for another its not working..
    Its due to cache or any other thing.. Please help.

    Thanks

    Thread Starter garimagarg

    (@garimagarg)

    Hello,

    Delete cart API Always giving error “No item in cart” in Andriod and IOS devices.
    In postman its working when get cart api calls before delte cart. But without calling “Get cart” APi Delete Item APi not working.

    Please Let me know how can i resolve this issue.

    Thanks

    Plugin Author Sébastien Dumont

    (@sebd86)

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