Copied to clipboard

Flag this post as spam?

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


  • Asbjørn 82 posts 195 karma points c-trib
    Apr 25, 2017 @ 11:26
    Asbjørn
    0

    Can't debug OrderLineCalculator

    I can't seem to debug my custom OrderLineCalculator. I know the code runs, as I can log things to the Umbraco Log, but the debugger in Visual Studio doesn't hit at all.

    This issue is also mentioned in this thread: https://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/83601-why-arent-the-customorderlinecalculator-run-on-http-thread

    This site is running TeaCommerce 3.2.1 and Umbraco 7.5.13.

    This is the code for the OrderLineCalculator:

    [SuppressDependency("TeaCommerce.Api.PriceCalculators.IOrderLineCalculator", "TeaCommerce.Api")]
    public class CustomOrderLineCalculator : OrderLineCalculator
    {
    
        public CustomOrderLineCalculator(IVatGroupService vatGroupService, IProductInformationExtractor productInformationExtractor)
          : base(vatGroupService, productInformationExtractor)
        {
        }
    
        public override Price CalculatePrice(OrderLine orderLine, Currency currency, Order order)
        {
            //Code removed
    
            return base.CalculatePrice(orderLine, currency, order);
        }
    
    }
    
  • Anders Burla 2560 posts 8256 karma points
    Apr 25, 2017 @ 11:34
    Anders Burla
    0

    Have you built your custom calculator using the latest dll files? So your code is build using the same dll that runs on the webshop?

    Kind regards

    Anders

  • Asbjørn 82 posts 195 karma points c-trib
    Apr 25, 2017 @ 11:48
    Asbjørn
    0

    Yes, it is using the same Dlls (I copy them to a lib folder so they are easier to manage in source control).

    At first I thought that it wasn't registered at all, but then I discovered that it actually logged things, but just didn't hit the breakpoints. At least I assume that means it is registered correctly.

    I have another project with TeaCommerce 3.1.4 where everything is working perfectly. In this project, with TeaCommerce 3.2.1, however, the same basic code is not working...

    I'm working on recreating the issue in a project using the starter kit at the moment.

  • Asbjørn 82 posts 195 karma points c-trib
    Apr 25, 2017 @ 12:21
    Asbjørn
    0

    Hi,

    I have managed to reproduce the issue with a clean install of Umbraco 7.5.13, TeaCommerce 3.2.1 with the latest starter kit.

    You can download the project (VS 2017) here: https://1drv.ms/u/s!AkwgkpetCvCprbkMRg2UuS5uWrcfZA

    The issue happens in both VS 2017 and 2015

  • Anders Burla 2560 posts 8256 karma points
    Apr 28, 2017 @ 12:57
    Anders Burla
    0

    Will have to try and test this my self. Give me some time :)

  • Asbjørn 82 posts 195 karma points c-trib
    May 02, 2017 @ 06:34
    Asbjørn
    0

    Thanks :) This is a rather mysterious issue, so I'll be very interested to hear if you discover a cause.

  • Anders Burla 2560 posts 8256 karma points
    May 08, 2017 @ 08:11
    Anders Burla
    100

    Please send email with contact info to [email protected], so we can send you Tea Commerce 3.2.2 and see if that fixes the bug. It should :)

  • Asbjørn 82 posts 195 karma points c-trib
    May 08, 2017 @ 09:40
    Asbjørn
    0

    Thanks. Version 3.2.2 does indeed fix the issue :)

  • Anders Burla 2560 posts 8256 karma points
    May 08, 2017 @ 10:52
    Anders Burla
    0

    Fixed in Tea Commerce 3.2.2

Please Sign in or register to post replies

Write your reply to:

Draft