Copied to clipboard

Flag this post as spam?

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


  • Bjørn Fridal 274 posts 784 karma points
    Apr 12, 2013 @ 22:56
    Bjørn Fridal
    0

    Stock control and events

    Hi,

    I am trying to do custom stock control, but it is not working quite yet. I am doing the stock control in the OrderLinesUpdating event. If the orderline's quantity is not within the allowed I would like to keep it at it's current quantity, but I am not sure how. It seems that the quantity has already been changed at this state. Am I maybe hooking into the wrong event or going about it in an wrong way?

    Cheers
    Bjørn

  • Anders Burla Johansen 2560 posts 8256 karma points
    Apr 15, 2013 @ 09:05
    Anders Burla Johansen
    0

    Hi Bjørn

    Are you using Tea Commerce 1.x or 2.x?

    Kind regards
    Anders

  • Bjørn Fridal 274 posts 784 karma points
    Apr 15, 2013 @ 09:06
    Bjørn Fridal
    0

    Hi Anders,

    I am using version 2.0.1 :)

    Cheers
    Bjørn 

  • Anders Burla Johansen 2560 posts 8256 karma points
    Apr 16, 2013 @ 15:35
    Anders Burla Johansen
    1

    You need to fetch the order from the DB using DependencyContainer.Instance.Resolve<IOrderRepository>().Get( storeId, orderId);

    Kind regards
    Anders

  • Bjørn Fridal 274 posts 784 karma points
    Apr 16, 2013 @ 17:46
    Bjørn Fridal
    0

    Thanks I am going to give that a try :)

    Cheers
    Bjørn 

  • 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