I have been looking through the forum to find a way of adding another VAT to the uCommerce system, we added a new class that take ITaxService, but it the program never seems to hit it when we run through it. I understand that chaging the Components.Config should making it point to the new class. Could there be something I have changed or altered so this class can be hit?
Make sure that you remove the existing registration. If you have multiple componets registered for the same interface it'll grab the first implementation it finds.
Also are you working from XSLT or Razor? In XSLT the tax service will be triggered automagically, but for Razor you have to trigger it yourself when displaying products. It will get called whenever you add something to the basket though.
Thanks for getting back to me. In the components.config, I have just used the original component and changed it. It seems to be grabbing a tax code though as it is still working in the Basket but not hitting the class. We are using XSLT. Could there be something wrong with using the existing component.
I finally solved this issue, didnt realise that the Basket.config had to be changed within the pipelines folder, then for this to work need to bring in the 'CalculateOrderLineTaxTask.cs' 'CalculateOrderVatTotalTask.cs' and 'CalculateShippingTaxForShipmentsTask.cs' to the project and alter them so it picks up a null tax as well as the tax defined in the uCommerceand then alter the OrderDetail[XSLT] and Cart[XSLT].
Took a while to find but at least its working now.
Adding another VAT type problem
Hi,
I have been looking through the forum to find a way of adding another VAT to the uCommerce system, we added a new class that take ITaxService, but it the program never seems to hit it when we run through it. I understand that chaging the Components.Config should making it point to the new class. Could there be something I have changed or altered so this class can be hit?
Thanks
Jason
Make sure that you remove the existing registration. If you have multiple componets registered for the same interface it'll grab the first implementation it finds.
Also are you working from XSLT or Razor? In XSLT the tax service will be triggered automagically, but for Razor you have to trigger it yourself when displaying products. It will get called whenever you add something to the basket though.
Hi Soren,
Thanks for getting back to me. In the components.config, I have just used the original component and changed it. It seems to be grabbing a tax code though as it is still working in the Basket but not hitting the class. We are using XSLT. Could there be something wrong with using the existing component.
Thanks
Jason
Is the catalog configured to "Show prices with VAT"? Tax will not be added if the checkbox is left unchecked.
Hi Soren
This box is checked, and this does change the prices but doesnt pick up the custom class that we created.
Could there be any other issue that could stop this?
Thanks
Jason
I finally solved this issue, didnt realise that the Basket.config had to be changed within the pipelines folder, then for this to work need to bring in the 'CalculateOrderLineTaxTask.cs' 'CalculateOrderVatTotalTask.cs' and 'CalculateShippingTaxForShipmentsTask.cs' to the project and alter them so it picks up a null tax as well as the tax defined in the uCommerceand then alter the OrderDetail[XSLT] and Cart[XSLT].
Took a while to find but at least its working now.
Thanks
Json
is working on a reply...
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.