Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points 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 2560 posts 8256 karma points
    Mar 26, 2013 @ 20:06
    Anders Burla
    101

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

    TC.getCurrentOrder({storeId:_storeId})

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft