Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Grahn 14 posts 94 karma points
    Feb 07, 2014 @ 10:14
    Anders Grahn
    0

    TC.GetCurrentOrder never completes when run from UmbracoApiController

    Hello, We are having an issue with TC.GetCurrentOrder(1) where this call never actually completes whenever it is called from an UmbracoApiController. Specifically there is no error and no timeout when called in this context. It works perfectly whenever called from a razor though, so we are thinking WebApi/UmbracoApi has something to do with this. We just don't know what or how.

    Does anyone have any ideas? We are using version 2.2.3 on an umbraco 6.1.6 installation if that helps.

    Thanks in advance, Anders

  • Anders Burla 2560 posts 8256 karma points
    Feb 07, 2014 @ 11:04
    Anders Burla
    100

    Hi Anders

    A REST API is stateless by design - and Tea Commerce needs to use session cookies for the cart. So I dont think that you can use an ApiController for what you are doing. What you properly want to do is use /base in umbraco which has state/session.

    Kind regards
    Anders

  • Anders Grahn 14 posts 94 karma points
    Feb 07, 2014 @ 13:46
    Anders Grahn
    0

    Thanks for the reply and the reasoning. Was a great help :). Since we can still fetch orders by id we found a way to get the id and use that within the webapi (since webapi is nonoptional for this).

Please Sign in or register to post replies

Write your reply to:

Draft