4.3 ww.dll API Reference : API descriptions : Functions with database access : getmods
 
getmods
 
Description
getmods gets the applicable modifier records for a DCI. An SQL join is performed between the dci_mods and items tables in order to get this information.
<calcprice> uses the current date or the date passed in the <date> tag to calculate the price. The prices are included in the return string in the price_info field, including final price, tax and fee information. These are all included in each <item> section when passed to the processsale function.
The call respects all restrictions (at the item level) for the modifier items and responds to the <type_?> tags in the same manner as getitemtree. (See getitemtree.) If Max4Sale is sent as true (<max4sale>1</max4sale>), then a tag is in the qty_rem field with the number left to sell at that <date>. Otherwise, a “-” be returned in that field.
 
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.
<department>
<item> department.
<category>
<item> category.
<item>
Item.
<pass_no>
Optional. Pass number. If the corresponding pass template contains a special macro (e.g., SELECTLAST()ITEMSPECIAL ("ONLINE ")), then a discounted price is returned in price_xml in the [ext] field. The specials can be any of the following in the macro for the pass template: selectivespecial, globalspecial, itemspecial or special. If the pass is voided or expired, then the discounted price is not returned. For an example, see getitem.
<calcprice>
Boolean. 1 = calculate the price. 0 = don’t calculate the price.
<max4sale>
Optional. Boolean. If Max4Sale is sent as true (<max4sale>1</max4sale>), then a tag is returned in the qty_rem field with the number left to sell at that <date>. Otherwise, a - is returned in that field.
<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 as it does for Max4Sale capability except that the total point cost is stored in the item_res.pts4qty field.
<avail>
Optional. Returns information on whether a particular item is available based on Max4Sale or Points4Sale restrictions for a certain date or date range. If the tag is absent or is specified as <avail>0</avail>, nothing is calculated. See Note on the <avail> tag.
<date>
Optional. Date/time of interest.
<account>
Optional. An account nickname. When used, item price information is returned based on any Dynamic Pricing Rule associated with the account. If a user is logged into a group (which is really an account), that group name is passed to ww.dll when getting product prices and any Dynamic Pricing Rule assigned to that account is applied to the prices.
 
Note: In order for Dynamic Pricing Rules assigned to accounts to work correctly in E-Commerce module, you must add the following settings to the [Preferences] section of the Sales32c.INI file for the Sales Host and the salespoint where you recall these sales:
[Preferences]
ApplyAccountRulesOnRecall=FALSE
RecalculatePriceOnRecall=FALSE
 
Without these settings in place, you see incorrect pricing on recall of these sales.
<fields>
Optional. Fields to be returned. Note on the <fields> tag.
<type_?>
Optional. Boolean for the type_1 to type_10 fields. Any fields that need to be matched can be specified. For example, if you only want matches where the type_10 is set to TRUE, use <type_10>1</type_10>. If you wanted only matches where all types are 0 except for type 10, specify:
<type_1>0</type_1><type_2>0</type_2>
<type_3>0</type_3><type_4>0</type_4>
<type_5>0</type_5><type_6>0</type_6>
<type_7>0</type_7><type_8>0</type_8>
<type_9>0</type_9><type_10>1</type_10>
<mktgcode>
Optional. Marketing code. See ww.dll now supports specials.
<srcecode>
Optional. Source code. See ww.dll now supports specials.
<recurse>
Returns the information for the item record called along with its modifiers and the modifiers of those modifiers. In addition, it indicates the generation (where 1 is the main item, 2 is a first level modifier and 3 is a second level modifier), the item_id and the parentid.
 
Return fields
XML recordset of the matching record from the items table.
 
Field
Description
department
Department.
category
Category.
item
Item.
descrip
Description.
price_type
Price type.
dp_set_id
The set of Dynamic Pricing Rules to apply first.
price_cols
Price columns – 1, 2 or 3.
wknd_start
Weekend start.
wknd_end
Weekend end.
rate_sched
Rate schedule.
daily_pric
Daily price.
monday_0
Default price.
monday_1
Price during special rate period 1.
monday_2
Price during special rate period 2.
monday_3
Price during special rate period 3.
monday_4
Price during special rate period 4.
monday_5
Price during special rate period 5.
tuesday_0
Default price.
tuesday_1
Price during special rate period 1.
tuesday_2
Price during special rate period 2.
tuesday_3
Price during special rate period 3.
tuesday_4
Price during special rate period 4.
tuesday_5
Price during special rate period 5.
weds_0
Default price.
weds_1
Price during special rate period 1.
weds_2
Price during special rate period 2.
weds_3
Price during special rate period 3.
weds_4
Price during special rate period 4.
weds_5
Price during special rate period 5.
thursday_0
Default price.
thursday_1
Price during special rate period 1.
thursday_2
Price during special rate period 2.
thursday_3
Price during special rate period 3.
thursday_4
Price during special rate period 4.
thursday_5
Price during special rate period 5.
friday_0
Default price.
friday_1
Price during special rate period 1.
friday_2
Price during special rate period 2.
friday_3
Price during special rate period 3.
friday_4
Price during special rate period 4.
friday_5
Price during special rate period 5.
saturday_0
Default price.
saturday_1
Price during special rate period 1.
saturday_2
Price during special rate period 2.
saturday_3
Price during special rate period 3.
saturday_4
Price during special rate period 4.
saturday_5
Price during special rate period 5.
sunday_0
Default price.
sunday_1
Price during special rate period 1.
sunday_2
Price during special rate period 2.
sunday_3
Price during special rate period 3.
sunday_4
Price during special rate period 4.
sunday_5
Price during special rate period 5.
tax_rate
Tax rate.
tax_rate_b
Tax rate is defined in defaults table.
cust_tax
Custom tax rate.
cust_tax_b
Custom tax rate is defined in defaults table.
fee_rate
Fee rate.
add_tax
Add tax.
add_tax_b
Add tax b.
time_span
Time span.
span_type
Span type.
admissions
Admissions.
split_type
Split type.
item_type
Item type.
validate
Validate.
validate2
Additional validation.
ckmax4sale
Check Max4Sale capability.
ckpts4sale
Check Points4Sale capability.
pts4saledp
DP Rule to use to calculate Points4Sale points to deduct.
novalonret
When a “forced validation” item is returned, should the salespoint make sure the pass is valid prior to returning it?
set_price
Set price.
inventory
Inventory.
invent_id
Inventory ID.
barcode
Barcode.
upc
UPC.
keycode
Keycode.
keydescrip
Key description.
mod_reqd
Modifier required?
multiline
Multiline.
help_info
Help information.
price_info
Price information. Includes final price, tax and fee information.
qty_rem
If <max4sale> is sent as true (<max4sale>1</max4sale>), then information is sent back with the number left to sell at that <datetime>. Otherwise, a - is returned in that field.
pts_cost
If <calcpoints> is sent as true (<calcpoints >1</calcpoints>), then information is sent back with the points cost of each item (at qty=1).
avail_info
Values returned as a result of using the <avail> tag. See Note on the <avail> tag.
price_xml
Price information. If the <pass_no> tag is sent in and the corresponding pass template contains a specials macro (e.g., SELECTLAST()ITEMSPECIAL ("ONLINE ")), then a discounted price is returned in price_xml in the [ext] field. The specials can be any of the following in the macro for the pass template: selectivespecial, globalspecial, itemspecial or special. If the pass is voided or expired, then the discounted price is not returned. See main description of this getitem for an example.
 
Example
 
Example invocation:
<func>getmods</func><department>imax-exhib</department><category>i-deepsea3</category>
<item>dpsea1000</item>
 
Example return string:
OK :…recordset
<rs:data>
<z:row department='IMAX-EXHIB' category='MODIFIERS '
item='ADULT ' descrip='Adult Entrance '
price_type='0' dp_set_id='0' price_cols='0' wknd_start='0'
wknd_end='0' rate_sched='0' daily_pric='0' monday_0='0'
monday_1='0' monday_2='0' monday_3='0' monday_4='0' monday_5='0'
tuesday_0='0' tuesday_1='0' tuesday_2='0' tuesday_3='0'
tuesday_4='0' tuesday_5='0' weds_0='0' weds_1='0' weds_2='0'
weds_3='0' weds_4='0' weds_5='0' thursday_0='0' thursday_1='0'
thursday_2='0' thursday_3='0' thursday_4='0' thursday_5='0'
friday_0='0' friday_1='0' friday_2='0' friday_3='0' friday_4='0'
friday_5='0' saturday_0='0' saturday_1='0' saturday_2='0'
saturday_3='0' saturday_4='0' saturday_5='0' sunday_0='0'
sunday_1='0' sunday_2='0' sunday_3='0' sunday_4='0' sunday_5='0'
tax_rate='0' tax_rate_b='0' cust_tax='.0000' cust_tax_b='.0000'
fee_rate='0' add_tax='False' add_tax_b='False' time_span='0'
span_type='1' admissions='.00' split_type='0' item_type='1'
validate='1' validate2='False' ckmax4sale='False' ckpts4sale='False'
pts4saledp='0' novalonret='False' set_price='False' inventory='False'
invent_id='0' barcode='' upc='' keycode='0' keydescrip=''
mod_reqd='0' multiline='False' help_info=''/>
<z:row department='IMAX-EXHIB' category='MODIFIERS '
item='CHILD ' descrip='Child Entrance '
price_type='0' dp_set_id='0' price_cols='0' wknd_start='0'
wknd_end='0' rate_sched='0' daily_pric='0' monday_0='0'
monday_1='0' monday_2='0' monday_3='0' monday_4='0' monday_5='0'
tuesday_0='0' tuesday_1='0' tuesday_2='0' tuesday_3='0'
tuesday_4='0' tuesday_5='0' weds_0='0' weds_1='0' weds_2='0'
weds_3='0' weds_4='0' weds_5='0' thursday_0='0' thursday_1='0'
thursday_2='0' thursday_3='0' thursday_4='0' thursday_5='0'
friday_0='0' friday_1='0' friday_2='0' friday_3='0' friday_4='0'
friday_5='0' saturday_0='0' saturday_1='0' saturday_2='0'
saturday_3='0' saturday_4='0' saturday_5='0' sunday_0='0'
sunday_1='0' sunday_2='0' sunday_3='0' sunday_4='0' sunday_5='0'
tax_rate='0' tax_rate_b='0' cust_tax='.0000' cust_tax_b='.0000'
fee_rate='0' add_tax='False' add_tax_b='False' time_span='0'
span_type='1' admissions='.00' split_type='0' item_type='1'
validate='1' validate2='False' ckmax4sale='False' ckpts4sale='False'
pts4saledp='0' novalonret='False' set_price='False' inventory='False'
invent_id='0' barcode='' upc='' keycode='0' keydescrip=''
mod_reqd='0' multiline='False' help_info=''/>
<z:row department='IMAX-EXHIB' category='MODIFIERS '
item='MEMBERDISC' descrip='Member Disc. Entrance '
price_type='0' dp_set_id='0' price_cols='0' wknd_start='0'
wknd_end='0' rate_sched='0' daily_pric='0' monday_0='0'
monday_1='0' monday_2='0' monday_3='0' monday_4='0' monday_5='0'
tuesday_0='0' tuesday_1='0' tuesday_2='0' tuesday_3='0'
tuesday_4='0' tuesday_5='0' weds_0='0' weds_1='0' weds_2='0'
weds_3='0' weds_4='0' weds_5='0' thursday_0='0' thursday_1='0'
thursday_2='0' thursday_3='0' thursday_4='0' thursday_5='0'
friday_0='0' friday_1='0' friday_2='0' friday_3='0' friday_4='0'
friday_5='0' saturday_0='0' saturday_1='0' saturday_2='0'
saturday_3='0' saturday_4='0' saturday_5='0' sunday_0='0'
sunday_1='0' sunday_2='0' sunday_3='0' sunday_4='0' sunday_5='0'
tax_rate='0' tax_rate_b='0' cust_tax='.0000' cust_tax_b='.0000'
fee_rate='0' add_tax='False' add_tax_b='False' time_span='0'
span_type='1' admissions='.00' split_type='0' item_type='1'
validate='2' validate2='False' ckmax4sale='False' ckpts4sale='False'
pts4saledp='0' novalonret='False' set_price='False' inventory='False'
invent_id='0' barcode='' upc='' keycode='0' keydescrip=''
mod_reqd='0' multiline='False' help_info=''/>
<z:row department='IMAX-EXHIB' category='MODIFIERS '
item='MEMBERFREE' descrip='Member Free Entrance '
price_type='0' dp_set_id='0' price_cols='0' wknd_start='0'
wknd_end='0' rate_sched='0' daily_pric='0' monday_0='0'
monday_1='0' monday_2='0' monday_3='0' monday_4='0' monday_5='0'
tuesday_0='0' tuesday_1='0' tuesday_2='0' tuesday_3='0'
tuesday_4='0' tuesday_5='0' weds_0='0' weds_1='0' weds_2='0'
weds_3='0' weds_4='0' weds_5='0' thursday_0='0' thursday_1='0'
thursday_2='0' thursday_3='0' thursday_4='0' thursday_5='0'
friday_0='0' friday_1='0' friday_2='0' friday_3='0' friday_4='0'
friday_5='0' saturday_0='0' saturday_1='0' saturday_2='0'
saturday_3='0' saturday_4='0' saturday_5='0' sunday_0='0'
sunday_1='0' sunday_2='0' sunday_3='0' sunday_4='0' sunday_5='0'
tax_rate='0' tax_rate_b='0' cust_tax='.0000' cust_tax_b='.0000'
fee_rate='0' add_tax='False' add_tax_b='False' time_span='0'
span_type='1' admissions='.00' split_type='0' item_type='1'
validate='2' validate2='False' ckmax4sale='False' ckpts4sale='False'
pts4saledp='0' novalonret='False' set_price='False' inventory='False'
invent_id='0' barcode='' upc='' keycode='0' keydescrip=''
mod_reqd='0' multiline='False' help_info=''/>
<z:row department='IMAX-EXHIB' category='MODIFIERS '
item='SENIOR ' descrip='Senior Entrance '
price_type='0' dp_set_id='0' price_cols='0' wknd_start='0'
wknd_end='0' rate_sched='0' daily_pric='0' monday_0='0'
monday_1='0' monday_2='0' monday_3='0' monday_4='0' monday_5='0'
tuesday_0='0' tuesday_1='0' tuesday_2='0' tuesday_3='0'
tuesday_4='0' tuesday_5='0' weds_0='0' weds_1='0' weds_2='0'
weds_3='0' weds_4='0' weds_5='0' thursday_0='0' thursday_1='0'
thursday_2='0' thursday_3='0' thursday_4='0' thursday_5='0'
friday_0='0' friday_1='0' friday_2='0' friday_3='0' friday_4='0'
friday_5='0' saturday_0='0' saturday_1='0' saturday_2='0'
saturday_3='0' saturday_4='0' saturday_5='0' sunday_0='0'
sunday_1='0' sunday_2='0' sunday_3='0' sunday_4='0' sunday_5='0'
tax_rate='0' tax_rate_b='0' cust_tax='.0000' cust_tax_b='.0000'
fee_rate='0' add_tax='False' add_tax_b='False' time_span='0'
span_type='1' admissions='.00' split_type='0' item_type='1'
validate='1' validate2='False' ckmax4sale='False' ckpts4sale='False'
pts4saledp='0' novalonret='False' set_price='False' inventory='False'
invent_id='0' barcode='' upc='' keycode='0' keydescrip=''
mod_reqd='0' multiline='False' help_info=''/>
</rs:data>
 
Example invocation
<func>getmods</func><department>TEST</department><category>TEST</category><item>MAIN</ite
m><max4sale>1</max4sale><calcprice>1</calcprice><recurse>1</recurse>
 
Example return string:
 
item_id parentid gen department category item
667 0 1 TEST TEST MAIN1
663 667 2 TEST MODIFIERS MOD1
664 667 2 TEST MODIFIERS MOD2
665 663 3 TEST MODIFIERS MODONMOD1
666 663 3 TEST MODIFIERS MODONMOD2
665 664 3 TEST MODIFIERS MODONMOD1
666 664 3 TEST MODIFIERS MODONMOD2
 
See also
getitem
getitemexpanded
getitemtree
getmods
processsale