I have a product catelog with multiple products. The catelog is linked on a price group of 21%. The show prices with VAT option is checked. The product(s) in question are linked to this catelog, and on the price tab, the prices are filled.
On my cart-page, I use UCommerce.Runtime.SiteContext.Current.OrderContext.GetBasket(); to fetch the basket. But, when i use myBasket.PurchaseOrder.TaxTotal the total is always zero?
I expect this to be the total VAT price, so: 21% of the product price in the active basket (when one product is added). Am I missing something has this never worked (this way)?
Thank you for your reply. TransactionLibrary.AddToBasket does not seem to work though, the numers are still zero. I guess I made a mistake somewhere else. I'll dig into it and if I find why I'll post it here.
Did you comment out the pipeline methods in the basket pipeline configuration file?
When you use SiteContext.Current.CatalogContext.CurrentPriceGroup; then what is the VAT rate on that? What is configured on the catalog related to pricegroup and VAT?
Basket.PurchaseOrder.TaxTotal always zero
Hi,
I have a product catelog with multiple products. The catelog is linked on a price group of 21%. The show prices with VAT option is checked. The product(s) in question are linked to this catelog, and on the price tab, the prices are filled.
On my cart-page, I use UCommerce.Runtime.SiteContext.Current.OrderContext.GetBasket(); to fetch the basket. But, when i use myBasket.PurchaseOrder.TaxTotal the total is always zero?
I expect this to be the total VAT price, so: 21% of the product price in the active basket (when one product is added). Am I missing something has this never worked (this way)?
Using: Umbraco v4.11.9 & uCommerce (Version=3.6.1.13149).
How do you add products to the basket ?
Hi Wouter,
You should use TransactionLibrary.AddToBasket. It will do all the magic for you.
You can easily just send ind a productId but you can also run on currentproduct if you do this on a product page:
SiteContext.Current.CatalogContext.CurrentProduct
I might be missing some context though. Can you elaborate a little bit of what you're trying to achieve here?
At the end of the method you can return order.OrderLines.Sum(x => x.Quantity); which will give you the total amount rather that doing a foreach :)
Try refactoring the code and let me know if this solves the problem.
Hope this helps.
Regards
Morten
Thank you for your reply. TransactionLibrary.AddToBasket does not seem to work though, the numers are still zero. I guess I made a mistake somewhere else. I'll dig into it and if I find why I'll post it here.
Did you comment out the pipeline methods in the basket pipeline configuration file?
When you use SiteContext.Current.CatalogContext.CurrentPriceGroup; then what is the VAT rate on that? What is configured on the catalog related to pricegroup and VAT?
is working on a reply...