Copied to clipboard

Flag this post as spam?

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


  • Rasmus 6 posts 47 karma points
    Nov 03, 2014 @ 13:33
    Rasmus
    0

    Wrong currency object in CalculateOrderLineUnitPrice

    The problem

    The problem is simply, that the wrong currency object is returned when using the CalculateOrderLineUnitPrice event in TeaComemrce version 2.3.2.

    How to see the problem

    I have implemented the method like this:

    protected override Price CalculateOrderLineUnitPrice(OriginalUnitPrice originalUnitPrice, OrderLine orderLine, Currency currency, Order order)
    {
        // This id is correct
        var curr = order.CurrencyId;
    
        // The Currency object seems to just return the first id possible.
    }
    

    I have set the currency like this:

    TC.setCurrentCurrency({
        storeId: 1,
        currencyId: 3,
        successfn: function (data) {
    
            console.log(data);
    
        }
    });
    

    I have also tried setting the currency through Razor, but with the same result.

    I really appreciate any help you can provide.


    Update

    After I've talked with Anders (from TeaSolutions) I can confirm this is an error in 2.3.2, and it has been fixed in the next version of TeaCommerce.

    I made a hack until I have the possibility to update.

Please Sign in or register to post replies

Write your reply to:

Draft