4.3 ww.dll API Reference : API descriptions : Functions with database access : getparents
 
getparents
 
Description
getparents behaves in a similar manner to getmods. getparents gets items that are allowed as parents to the list of modifiers given in the <hasmod> tag. Pricing information, point cost and Max4Sale/Points4Sale capability availability can also be returned.
 
Input fields
 
XML tag
Description
<qty>
Optional. Quantity. Price returned is for specified quantity instead of per unit. If no <qty></qty> tags are passed, then ww.dll assumes the quantity is 1 and returns the price for a quantity of 1. See How ww.dll reacts to quantity tags for more information.
<hasmod>
Modifiers.
<calcprice>
Boolean (1 = calculate the price, 0 = don’t calculate the price)
<max4sale>
Boolean. (1 = return Max4Sale information, 0 = does not return Max4Sale
information)
<calcpoints>
Optional. Boolean. If 1, a point cost of each item (at qty=1) is returned as <pts_cost>.
 
Note: The ckpts4sale (is Points4Sale enforced) and pts4saledp (Dynamic Pricing Rule to use to calculate Points4Sale points to deduct) fields from the items table must be obtained in the field list from the item record (e.g., <fields>it.department, it.category, it.item, i.ckmax4sale, ckpts4sale, pts4saledp</fields>). Also note that all item reservation functionality works the same for Points4Sale capability as it does for Max4Sale capability except that the total point cost is stored in the item_res.pts4qty field.
<datetime>
Optional. Date/time of interest.
<calcpoints>
Boolean. (1 = return points cost information, 0 = don’t return points cost
information)
 
Return fields
XML recordset of matching records from the items table.
 
Example
 
Example invocation:
<func>getparents</func><hasmod>imax modifiers adult imax modifiers child imax modifiers youth imax modifiers senior </hasmod><max4sale>1</max4sale><calcprice>1</calcprice><calcpoints>1</calcpoints><datetime>2008-02-05</datetime>
Example return string:
OK :…recordset
<rs:data>
<z:row department='IMAX ' category='MOVIES '.......
 
See also
getmods