Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Sep 26, 2011 @ 18:57
    Matt Taylor
    0

    Inconsistent orderDate format in orders.xml

    I've got a macro that displays some details of the latest three orders so I simply sort the orders.xml by orderDate desc and grab the last three.

    I'm currently looking into why it's stopped working properly and I can see that the dates in the file are inconsistently formatted.

    Some are dd/mm/yyy and some are mm/dd/yyy and I think this is causing my problem.

    orderDate="15/08/2011 12:03:57"

    orderDate="8/15/2011 12:08:32 PM"

    orderDate="06/09/2011 10:08:31"

    orderDate="9/6/2011 2:22:45 PM"

    What's going on here?

    Regards,

    Matt

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 26, 2011 @ 19:13
    Rune Grønkjær
    0

    Hi Matt,

    Thanks for the bug description. We will look into it tomorrow.

    Do your shop and thereby your orders use several languages? Not that this should have any effect on the dates in the xml, but i'm just curious.

    /Rune

  • Matt Taylor 873 posts 2086 karma points
    Sep 26, 2011 @ 19:50
    Matt Taylor
    0

    Hi Rune,

    I'm just using the one language, English.

    I've emailed Anders the order.xml file. Hopefully he'll forward it on.

    Regards,

    Matt

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 27, 2011 @ 08:52
    Rune Grønkjær
    0

    Hi Matt,

    I found our bug, and I'm fixing it as we speak. Dates will now be written in the same format as Umbraco does, the sortable date/time format with an invariant culture. (Why did'nt we think of that before?) :)

    Would you do a test for me before you install the update? Go to the Tea Commerce section and regenerate the orders.xml file. You do that by right clicking the "orders" node. Your xml looks really weird, as if your website changes it's culture with regular intervals. Any idea as to why it would do that? Any custom stuff that messes with CurrentCulture or UICulture?

    I Will have a beta ready after I make some tests on the fix.

    /Rune

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 27, 2011 @ 09:08
    Rune Grønkjær
    0

    Hi Matt,

    It seems to be working just fine now. I have uploaded a BETA package to our:

    http://our.umbraco.org/projects/website-utilities/tea-commerce

    /Rune

  • Matt Taylor 873 posts 2086 karma points
    Sep 27, 2011 @ 09:55
    Matt Taylor
    0

    Hi Rune,

    Thanks for telling me how to refresh the order.xml. I was wondering how that was done.
    After doing so I can see that the order date is now consistently dd/mm/yyyy.

    I've checked my code and cannot see anywhere that I am directly changing the culture.
    Calling TeaCommerce.Base.SetCurrentCountry wouldn't do it would it?

    Regards,

    Matt

  • Rune Grønkjær 1372 posts 3103 karma points
    Sep 27, 2011 @ 10:02
    Rune Grønkjær
    0

    No, SetCurrentCountry only changes stuff on the order. Tea Commerce never messes with the websites cultures. So that's weird. We checked our own Tea Commerce webshop order.xml, which was consistent all the way.

    Weird stuff. But the fix I just uploaded will do the trick.

    We can see you have gone online with the shop. Congrats. It looks great.

    /Rune

  • Matt Taylor 873 posts 2086 karma points
    Sep 27, 2011 @ 10:07
    Matt Taylor
    0

    Thanks, yes the customer is really pleased. :)

    I can see how the patch will fix my issue, I'm going to hold off applying it for a short while because if I do I'll never get around to figuring out what's causing it at my end and it feels like something that may bite me harder later if  don't.

    Thanks again,

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft