Displaying VAT information on product display pages

If you need to display the tax breakdown for a single catalog entry, you will need to update the JSP to display the proper amounts.

Example

The VAT calculation already happens on the server side. This example demonstrates what VAT information can be retrieved from the server. You can update your own JSP to display such information as you require.

A typical customization is provided.

  • Take the Madisons store for example. To display a product's VAT details you can add the JSP snippet below to /Stores/WebContent/Madisons/Snippets/Catalog/CatalogEntryDisplay/CachedProductOnlyDisplay.jsp. If you want to display VAT for item/package/kit/bundle you will need to update the corresponding JSP in a similar way.

                         <%-- VAT information --%>
    <table cellpadding="0" cellspacing="0" border="1">
    <tr>
    <th>Gross Price</th>
    <th>Tax Amount</th>
    <th>Net Price</th>
    </tr>
    
    <tr>
    <c:set var="contractPrice"
    value="${product.calculatedContractPrice.amount}" />
    <c:set var="taxAmount"
    value="${product.displayTaxes.categoryAmount}" />
    <td><fmt:formatNumber value="${contractPrice}"
    type="currency"
    currencySymbol="${currencyFormatterDB.currencySymbol}"
    maxFractionDigits="${currencyDecimal}"/></td>
    <td><fmt:formatNumber value="${taxAmount}" type="currency"
    currencySymbol="S{currencyFormatterDB.currencySymbol}"
    maxFractionDigits="${currencyDecimal}"/></td>
    <td><fmt:formatNumber value="${contractPrice - taxAmount}"
    type="currency"
    currencySymbol="${currencyFormatterDB.currencySymbol}"
    maxFractionDigits="${currencyDecimal}"/></td>
    </tr>
       </table>
    
    Product: ProductDataBean is available in this JSP

    Using the above snippet, the following sample page can be displayed: Screen capture