Copied to clipboard

Flag this post as spam?

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


  • Facius 12 posts 73 karma points
    Sep 22, 2011 @ 11:27
    Facius
    0

    PostDanmark Webpack Integration.

    Hello.

    I've been looking at your very nice webshop module.

    However my customer wants integration with a track'n trace service, and automatic generation of shipping labels.

    Is there a way to make integration with the PostDanmark WebPack 2 API?

    Best Regards, Victor Facius

  • Anders Burla 2560 posts 8256 karma points
    Sep 22, 2011 @ 11:42
    Anders Burla
    0

    Hi Victor

    Thanks for the kind words! Its totally possible to use the PostDanmark API and integrate it with Tea Commerce into you solution. You would use the Tea Commerce .NET API to make the integration ( http://rune.gronkjaer.dk/en-US/2010/11/26/how-to-use-the-tea-commerce-events/ ).

    On a idea basis - what you properly would do was to hook into the OrderStatusChanged event and when you changed it from "New" to "Shipped" ( you would create that one your self ), you would make the API calls to PostDanmark and get the track'n trace number. That number you would save as an order property on the order to use for later or maybe present it to the customer if they have an "order history" page - or you could even send an email at that step. In this step you could also generate the shipping label or you could make a button in your UI to create that - thats totally up to you.

    Hope this helps you and please feel free to ask more questions.

    Kind regards
    Anders

  • Facius 12 posts 73 karma points
    Sep 22, 2011 @ 11:57
    Facius
    0

    Thank you for the fast reply.

    I was hoping someone had already made it :)
    I'm on a very short schedule with this project. One of those "i want it done by tomorrow "- customers, but i guess he will just have to wait until i finish coding it.
    Your idea basis looks solid. Thanks a lot!

  • Anders Burla 2560 posts 8256 karma points
    Sep 25, 2011 @ 11:12
    Anders Burla
    0

    Yes always better if someone has already implemented it - but now you can be the first one to do it and share it with the world :)

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Aug 22, 2012 @ 09:09
    Rasmus Fjord
    0

    Im in the same situation right now, Did you make an integration Facious ? or do you know of a customer who had it done Anders ?

  • Anders Burla 2560 posts 8256 karma points
    Aug 22, 2012 @ 09:13
    Anders Burla
    0

    Hi Rasmus

    I haven't heard of anyone that have done the implementation. But could be a cool one - and think its simple to do the integration into Tea Commerce. But don't know the Post Danmark API - but I could help you with your questions regarding Tea Commerce specific implementation.

    Kind regards
    Anders

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Aug 22, 2012 @ 09:17
    Rasmus Fjord
    0

    awesome, im getting a description on how it should work from our customer as i write, and login and such so i can start testing it. Then ill properbly return on how to do it.

  • Anders Burla 2560 posts 8256 karma points
    Aug 22, 2012 @ 09:20
    Anders Burla
    0

    Cool - looking forward to see the integration :)

  • Facius 12 posts 73 karma points
    Aug 22, 2012 @ 11:07
    Facius
    0

    I never got to do the webpack integration, my customer choose another shipping company.

    But you should know that PostDanmark is changing out WebPack with something called PacSoft Online, so you doesn't start developing for a legacy api:)

    http://www.postdanmark.dk/da/Logistik/kundeservice-selvbetjening/pacsoft/Sider/Landing.aspx

     

     

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Aug 22, 2012 @ 11:19
    Rasmus Fjord
    0

    Takker du for headsup ! 

  • Anders Burla 2560 posts 8256 karma points
    Sep 04, 2012 @ 13:22
    Anders Burla
    0

    Hi Rasmus - did you look at this in more depth or waiting for the client to approve?

    Kind regards
    Anders

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Sep 04, 2012 @ 13:27
    Rasmus Fjord
    0

    Ey Anders. 

    Arh sorry for not closing this one. 

    Well actually i have been diggin ALOT into PostDk's "new" product that is going to exchange their old one in like a month or so. And so far a direct integration is not possible (please correct me if im wrong) ive got all their information on their new system and so the only thing we can do is exporting a XML file that the customer can download and upload som into PostDK's new system and get package slips returned.

    That part is easily done but we will wait with it for a month or so till they start using the new software from postdk so they know what to do.

  • Anders Burla 2560 posts 8256 karma points
    Sep 04, 2012 @ 15:16
    Anders Burla
    0

    Cool - sounds like a great way to do it. Hope you blog about it when its done :)

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Sep 04, 2012 @ 15:20
    Rasmus Fjord
    0

    Will do mate ! 

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 29, 2014 @ 20:02
    Bjarne Fyrstenborg
    0

    Have someone implemented this with Umbraco and Tea Commerce? :)

    However as an alternative could I create an email template and then use the field "order notes", where Track&Trace number with be pasted in?
    I have a client who has a webshop, where there isn't overwhelming numbers of orders yet, so for now I think they could live with manual to add the Track&Trace number to the order and sent the mail using the email template, but I need a field where they can enter the Track&Trace number..

    /Bjarne

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jan 30, 2014 @ 00:41
    Rasmus Fjord
    0

    Hey Bjarne 

    The pacsoft(post dk api) integration I wouldnt look into unless you know it thoroughly, I dont see it as a big hassle at all but its still a lot of hours to do it.

    The other thing your asking is quite easy :) Where you either use the "notes/comment" field or just create your own field in the backend.

     

    In TC 1.x (your probably on 2.x but its not far fetched i would recon, Anders or Rune could chip in).

    I have a file called TeaCommerceAdminOrder.xslt which defines the order page in the backend. 

    In here I have just added my own field like this : 

      <input type="text" id="trackTrace" name="trackTrace" class="dontPrint">

                      <xsl:attribute name="value">

                        <xsl:value-of select="$order/properties/trackTrace"/>

                      </xsl:attribute>

                    </input>

     

    And in the top of the XSLT is a small bit of jquery to save the value of the field that looks like this : 

     var formObj = {

    "comments": jQuery("#comments").val(),

    "trackTrace":  jQuery("#trackTrace").val()

    };

          TeaCommerce.updateOrderPropertiesAdmin(]]><xsl:value-of select="$order/@id"/><![CDATA[,formObj, {async:false});

     

    Hope this helps

     

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 30, 2014 @ 01:57
    Bjarne Fyrstenborg
    0

    Hi Rasmus

    Yes, I also thought it would require some time to learn using Post DK's API and for now I think it would be easier just to add an additional field to save the Track & Trace number for each order.

    I am using Tea Commerce v. 2.2.3, so it might be tea-commerce/edit-order.cshtml I have to edit and create a new email template where it use the new field.

    There is some javascript in that template too, but it has changes a little..
    I guess I should change something around these lines to add the additional property:

    onSaving(function () {
    
          var adminOrderId = '@Model.Id',
              orderPropertyElements = jQuery('.orderProperty'),
              orderLineQuantities = jQuery('.orderLineQuantity'),
              orderProperties = {};
          orderPropertyElements.each(function () {
            var orderPropertyElement = jQuery(this);
            orderProperties[orderPropertyElement.attr('name')] = orderPropertyElement.val();
          });
    
          //Update order properties
          TC.addOrUpdateOrderProperties({ properties: orderProperties, adminOrderId: adminOrderId, async: false });
    ... 

    /Bjarne 

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jan 30, 2014 @ 02:07
    Rasmus Fjord
    1

    I think i can help you with this quite easily :

    http://documentation.teacommerce.net/javascript-api/order-properties/addorupdateorderproperties/

     

    On this line :

        orderProperties ={};
    Just do something like this :
        orderProperties ={TrackAndTrace:  jQuery("#trackTrace").val()};

     

    I think your home safe with this if you have an input with ID trackTrace

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 30, 2014 @ 02:30
    Bjarne Fyrstenborg
    0

    Yes, it seems to work..

    It also seems to work if the input field use the name attribute and get the orderProperty class..

    <input type="text" value="@Model.Properties[ "TrackAndTrace" ]" id="trackAndTrace" name="TrackAndTrace" class="umbEditorTextField dontPrint orderProperty" />

    I think it will do the same and add a property called TrackAndTrace with the value of the input field..

    Not sure whether one is better than the other..

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jan 30, 2014 @ 03:27
    Rasmus Fjord
    0

    If it works it works my friend :) 

     

    Use the last model, seems cleaner in my eyes.

Please Sign in or register to post replies

Write your reply to:

Draft