WebSphere Commerce suite - How to display tax in product price?

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Commerce suite > August 2005 > How to display tax in product price?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to display tax in product price?

2005-05-10, 8:48 pm

Hi,

We need to display the tax inclusive price for all our products. We are using Websphere Commerce Express v5.6 and our store is based on the Consumer Direct starter store.

These are the steps I have followed:

1. Created a tax jurisdiction (Australia)
2. Created a sales tax code and set is as the default
3. Created a sales tax category and set to include tax in display price.
4. Set a display name for the tax category (GST)
5. Set the rate (10%)
6. Associated the Sales Tax code with the sales tax category
7. Added this code to the CachedProductOnlyDisplay.jsp

BigDecimal oldPrice =
product.getCalculatedPrice().getPrimaryPrice().getValue();
CategorizedMonetaryAmountsDataBean cMADB = product.getDisplayTaxes();
BigDecimal taxAmount = cMADB.getCategoryAmount();
BigDecimal TotalPriceWithTax = oldPrice.add(cMADB.getCategoryAmount());
FormattedMonetaryAmountDataBean formattedAmount = new
FormattedMonetaryAmountDataBean(); formattedAmount.setAmount(TotalPriceWithTax);
com.ibm.commerce.beans.DataBeanManager.activate (formattedAmount, commandContext);

Whenever this code runs I always find that getDisplayTaxes returns null. What am I missing? Is there some other step I need to complete?

Any assistance is much appreciated.

Regards
Kieren
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com