Copied to clipboard

Flag this post as spam?

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


  • Dan 1250 posts 3747 karma points admin c-trib
    Mar 26, 2013 @ 17:57
    Dan
    0

    Get order object via tea commerce 2 javascript API

    Hi,

    I'm trying to write out a custom property from the Tea Commerce order via the javascript API.  I'm starting by creating an 'order' object, which I should then be able to get the properties from.  I thought this would work:

    $(function(){
        var currentOrder = TC.GetCurrentOrder( _storeId );
    });

    But it gives an error: 'Uncaught TypeError: Object #<Object> has no method 'GetCurrentOrder''.

    Can anyone point me in the right direction here?

    Thanks

  • Anders Burla Johansen 2560 posts 8256 karma points
    Mar 26, 2013 @ 20:06
    Anders Burla Johansen
    101

    The store id needs to be parsed as a JSON property list. So try this:

    TC.getCurrentOrder({storeId:_storeId})

    Kind regards
    Anders

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies