Copied to clipboard

Flag this post as spam?

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


  • Kenn Jacobsen 133 posts 791 karma points MVP c-trib
    Jan 04, 2012 @ 09:17
    Kenn Jacobsen
    0

    TeaCommerce occasionally "forgets" the manipulated shipping

    Hi all,

    I have a custom event handler, that calculates shipping for an order based on the total weight of the items in the order. Generally it works as expected, but once in a while TeaCommerce seems to "forget" the manipulated shipping price. I don't have the exact steps to reproduce, but I have a gut feeling that it's got something to do with cloning incomplete orders, when a checkout flow is interrupted.

    Have anyone experienced anything similar?

    When I look into the TeaCommerce_Order table for these orders, I can see that the column "ManipulatedShippingFeeWithoutVAT" is set to the correct (manipulated) price, but the column "TransactionShippingFeeWithoutVAT" is set to 0. On the orders that go through without problems, the "TransactionShippingFeeWithoutVAT" column has the same value as the "ManipulatedShippingFeeWithoutVAT" column.

    I hope someone out there has an idea, that can bring me closer to a solution.

    Regards,
    Kenn

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 04, 2012 @ 10:52
    Anders Burla Johansen
    0

    Hi Kenn

    I dont have the solution for this but it would be great if we could find the way to reproduce this error so we could debug it and fix it. The TransactionShippingFeeWithoutVAT is assigned when you generate the payment form - to "lock" the order. Try and check if the value is right at that moment. Then - if you go back to the shop and add another product - Tea Commerce will clone the order and give it a new id and will empty the TransactionShippingFeeWithoutVA. Try check if it does. Then try and go to payment again and see that the order is "locked" and TransactionShippingFeeWithoutVAT is set again.

    This is one of those problem where we need to find the way to reproduce it to fix it :)

    Hope it helps you in the right direction to reproduce the error.

    Kind regards
    Anders

  • Kenn Jacobsen 133 posts 791 karma points MVP c-trib
    Jan 04, 2012 @ 11:01
    Kenn Jacobsen
    0

    Hi again,

    This is exactly the behaviour, I see, whenever I try to reproduce the error. In other words, I haven't been able to reproduce it myself. I can only note, that on our test system, the error occurs in maybe one out of a hundred orders. And each time, the TransactionShippingFeeWithoutVAT is set to zero while the ManipulatedShippingFeeWithoutVAT has the correct value.

     

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 04, 2012 @ 11:44
    Anders Burla Johansen
    0

    Sounds odd - could you try and do some kind of logging to see when it happens and maybe output some of the different shipping properties for the order to the log so you know what each value got?

    Kind regards
    Anders

  • Kenn Jacobsen 133 posts 791 karma points MVP c-trib
    Jan 04, 2012 @ 13:03
    Kenn Jacobsen
    0

    Hi again,

    I'll try to do some more aggressive updating of the order shipping price in my event handler to see if this does anything to fix the problem. I guess worst case I'll have to create an extension method that can be called somewhere in the checkout flow, to force an update of the shipping price.

    At what point exactly does TeaCommerce set the value of TransactionShippingFeeWithoutVAT? 

    Kind regards,
    Kenn 

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 04, 2012 @ 13:11
    Anders Burla Johansen
    0

    When you call the Base.GeneratePaymentForm, use the javascript API method goToPayment GetPaymentForm - this sets the TransactionShippingFeeWithoutVAT = order.ShippingFeeWithoutVAT.

    When the order is cloned - only a thing the Tea Commerce base method does it clears the TransactionShippingFeeWithoutVAT= null; Thats it :)

  • Kenn Jacobsen 133 posts 791 karma points MVP c-trib
    Jan 04, 2012 @ 13:18
    Kenn Jacobsen
    0

    Oh. Should've mentioned; I'm not using the JS API - all TeaCommerce JS is disabled.

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 05, 2012 @ 08:19
    Anders Burla Johansen
    0

    Ahh okay - but shouldn't make a difference - the SJ API is just an easier way to invoke the server side methods.

    Kind regards
    Anders

  • Kenn Jacobsen 133 posts 791 karma points MVP c-trib
    Jan 13, 2012 @ 12:47
    Kenn Jacobsen
    100

    Well, I'm not entirely sure it works just yet, but I'll close this thread anyway and hope my more aggressive approach will work. Thanks for the replies :-)

  • Anders Burla Johansen 2560 posts 8256 karma points
    Jan 13, 2012 @ 13:35
    Anders Burla Johansen
    0

    Hope it works for you :) If you at a later point find a way to reproduce the error - dont hesitate to contact us again at this thread

    Kind regards
    Anders

  • Hutch White 89 posts 112 karma points
    Sep 12, 2012 @ 01:27
    Hutch White
    0

    Hi Kenn,

    Can I ask what shipping calculator your using here and if you have any notes or documentation you could provide?  We're looking to add a UPS shipping calculator to our site and would greatly appreciate anything you have.

    Thanks!

  • Kenn Jacobsen 133 posts 791 karma points MVP c-trib
    Sep 12, 2012 @ 07:24
    Kenn Jacobsen
    0

    Hey.... we simply wrote a custom shipping price calculator based on the Danish Postal Service list prices and the total weight of the items in the basket. No notes or documentation I'm afraid.

    -Kenn

Please Sign in or register to post replies

Write your reply to:

Draft