Siebel Interactive Selling Transact Server Interface Reference > The Shopping Cart >

Totals and Discounts


There are two functions in the ShoppingCartBean for getting total information:

They take no arguments, and you call them in the same way that you call any function in the ShoppingCartBean:

<%= bean.getQuoteTotal() %>

These functions return a formatted price string. The only concern about using these functions is that you must call the getPartPrice or the getPartSubPrice function in your ShoppingCart JSP page within the hasMoreParts loop. The totals are calculated while the parts are being displayed on the cart page for performance reasons (to avoid a second traversal through the contents of the quote).

There are also two ShoppingCartBean functions related to discounts:

Neither takes an argument and each returns a formatted number string (for example "5.00"). To have the entered discount percentage apply to the total and subtotal automatically, use these functions to set and retrieve the discount percentage. The percentage entered should be a number between 0 and 100 (decimals are acceptable as well, for example "5.75"). Call the line item discount function to allow a discount at the line item level, and call the quote discount function to allow a discount for the entire quote. These functions may be used together.


 Siebel Interactive Selling Transact Server Interface Reference 
 Published: 18 April 2003