|
| 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
|
|