Question

I have the followed the steps to create a custom tax service for ucommerce. For arguments sake i want to tax everyting at $500. It would seem to me that the TaxService is not being called.

../UCommerce/Configuration/Components

<component id="TaxService"
    service="UCommerce.Catalog.ITaxService, UCommerce"
    type="AMS101.UCommerceCustomisation.CalculateTaxService, AMS101"
    lifestyle="Singleton"/>

Implement ITaxService

public class CalculateTaxService :ITaxService{
        public Money CalculateTax(Product product, PriceGroup priceGroup, PriceGroupPrice unitPrice) {
            return new Money( 500m, Currency.FirstOrDefault( x => x.ISOCode == "AUD" ) );
        }
    }

removed line from basket config

<!--<value>${Basket.CalculateOrderLineTax}</value>-->

would really appreciate any help.

Was it helpful?

Solution

Did you try recycling the app pool after making the change to the config file. It might be a simple matter of a stale config being used.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top