Siebel Interactive Selling Transact Server Interface Reference > ShoppingCartBean API >

Part Functions


Function
Description
Syntax
Example
hasMoreParts
Returns true while the current line item still has more parts to display.
public boolean hasMoreParts ()
<%
while ( bean.hasMoreParts() )
{
bean.nextPart();
//display quote line items..................
}
%>
nextPart
Returns the next part number in the list for the current line item.
public void nextPart()
<%
while ( bean.hasMoreParts() )
{
bean.nextPart();
//display quote line items..................
}
%>
getPartLevel
Since parts can belong to other parts as "children," this function returns an integer value designating the "nested" level of the current part. Therefore, if the current part is at the top level and is not a child itself, the level would be 0, but if the next part in the list was a child of this part then this function would return 1. Parts are always returned in the order of their family tree hierarchy, such that you begin with a parent, and then its children, and then its children's children, and so on before returning to the parent's siblings.
You can use the getPartLevel function to format the display of the parts such that it is more obvious which children belong to which parent, by inserting a certain number of tabs or spacing characters according to the part level.
public int getPartLevel()
<% bean. getPartLevel() %>
getPartID
Returns the numeric unique identifier for the part.
public int getPartID()
<% bean. getPartID() %>
getPartIndex
Returns the numeric index (counter) for the part. Numbering of parts starts over at one for each line item.
public int getPartIndex()
<% bean.GetPartIndex () %>
getPartConfigData
Returns the configuration data string for the part including all config and feature table data that was saved for this part number. The ORDER_SUBVAR variable in the app_config.js file determines which tables contain part numbers, and the data from the currently selected row in that table is associated with the part number it contains.
public String getPartConfigData()
<% bean.getPartConfigData() %>
getLineItemLinkbackURL
Returns the user-input discount amount for the line item. Should be a number between 0 and 100 with two places of decimal precision.
public String getLineItemDiscount()
<% bean.getLineItemDiscount() %>
getLineItemDeleteURL
Returns the URL the user can click on to remove this line item from the quote.
public String getLineItemDeleteURL()
<% bean.getLineItemDeleteURL() %>
getPartParentID
Returns the unique identifier of the parent item (part), if any. If the part has no parent, returns zero.
public int getPartParentID()
<% bean.getPartParentID() %>
getPartLineItemID
Returns the unique numeric identifier for the line item containing this part.
public int getPartLineItemID()
<% bean.getPartLineItemID() %>
getPartQty
Returns a numeric quantity for the quantity of this part the user has selected. Default value is 1. The example below shows quantity being displayed as an editable, updatable field. The name for the updatable quantity field must be constructed as in the example below.
public String getPartQty()
<td><font face="VERDANA" size=
-2><input type="text" name="<%= bean.getPartPrefix() %>_QTY" value="<%= bean.getPartQty() %>" size=5>
</font></td>
getPartDescr
Returns the description for this part as given in the data model.
public String getPartDescr()
<tr><td><font face="VERDANA" size= -2><t><%= bean.getPartDescr() %></font>
</td>
getPartNum
Returns the part number for this part as given in the ORDER_SUBVAR column in the data model.
public String getPartNum()
<td><font face="VERDANA" size=
-2><%= bean.getPartNum() %>
</font></td>
getPartPrice
Returns the price for this part as given in the data model.
public String getPartPrice()
<td><font face="VERDANA" size=
-2><%= bean.getPartPrice() %>
</font></td>
getPartSubPrice
Instead of price, you may specify subprice, which means that the price of this part is equal to the sum of the prices of its children parts or, when no children are available, the price is from the data model.
public String getPartSubPrice()
<td><font face="VERDANA" size=
-2><%= bean.getPartSubPrice() %></font></td>
getPartExtSubPrice
Subprice from above multiplied by part quantity.
public String getPartExtSubPrice()
<td><font face="VERDANA" size=
-2><%= bean.getPartExtSubPrice() %></font></td>
getPartExtPrice
Price from above multiplied by part quantity.
public String getPartExtPrice()
<td><font face="VERDANA" size=
-2><%= bean.getPartExtPrice() %></font></td></tr>
getPartItemized
Returns TRUE or FALSE, whether this part is itemized, from the pageset variable "PAGESET_ITEMIZED."
public String getPartItemized()
<% bean.getPartItemized() %>
getMatchingPartFields
Returns an array of matching part fields, where the field names either designate user-created custom fields or columns from the data model data tables. Here is an example:
The first statement declares an array of KeyValuePair objects as the return value for the getMatchingPartFields function call. This array will be populated by any and all fields and values that have "PRM" as part of their field name. The next statement looks to see if any matching fields were returned for this part. "matches.length" returns the number of entries in the array and if it is greater than zero, we have at least one matching field. Since we know that there are no other fields in our data model containing "PRM," we can assume that the first array record has the value we are interested in, and we can print it into a table cell labeled "PRM: ". That is what the next lines do. First, we close off the code block since we want to print something out to the screen. Then we make our HTML table cell with the label we want and print the value of the first array record using "<%= matches[0].value %>". The "matches[0]" specifies the first KeyValuePair object in the array, and the ".value" says to access the value field (".key" would give us the field name).
public KeyValuePair[] getMatchingPartFields
(String key_match)
<% KeyValuePair [] matches = bean.getMatchingPartFields("PRM");
if (matches.length > 0) {
%>
<td>PRM: <%=matches[0].value %> </td>
<% } %>
getPartField
Same as the above getMatchingPartFields, but does an exact match on the field name, and so returns only a single string value. If no exact match is found, returns empty string ("").
public String getPartField(String name)
<input type="text" name="<%=bean.getPartPrefix()%>_Special_Instructions" value="<%=bean.getPartField
("_Special_Instructions")%>">
getPartPrefix
Returns the prefix used to save customer-created fields associated with a particular line item (as opposed to the header fields, which only provide a single field entry for the entire quote). This prefix is "ITEM_" concatenated with the current line item index and the current part number index. Use the prefix in the name field of the form input field that you wish to save with the line item, followed by the name you create.
public String getPartPrefix()
<input type="text" name="<%=bean.getPartPrefix()%>_Special_Instructions" value="<%=bean.getPartField
("_Special_Instructions")%>">


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