4.3 ww.dll API Reference : API descriptions : Functions with database access : getitemexpanded
 
getitemexpanded
 
Note: Siriusware Inc. recommends that you use this call instead of getitem when possible.
 
Description
getitemexpanded adds modifiers to getitem. Support has been added for nested modifiers to getitemexpanded. The old syntax using the <hasmod> is still supported but deprecated. To specify modifiers, use the fields <mod1>, <mod2> etc. The data inside a <modN> tag must include <department>, <category> and <item> tags and may optionally contain its own <mod1>, <mod2>, etc., tags.
 
Example:
<func>getitemexpanded</func>
<department>TICKETS</department>
<category>PACKAGE</category>
<item>PACKAGE</item>
<calcprice>1</calcprice>
<qty>1</qty>
<mod1>
<department>TICKETS</department>
<category>ADULT</category>
<item>1DAY</item>
<mod1>
<department>TICKETS</department>
<category>PACKAGE</category>
<item>10VOUCHER</item>
</mod1>
</mod1>
<mod2>
<department>TICKETS</department>
<category>ADULT</category>
<item>1DAY</item>
<mod1>
<department>TICKETS</department>
<category>PACKAGE</category>
<item>10VOUCHER</item>
</mod1>
</mod2>
 
Example:
The following example contains multiple <modN> tags:
<func>getitemexpanded</func>
<department>IMAX</department>
<category>MOVIES</category>
<item>OCEAN0730</item>
<calcprice>1</calcprice>
<template>1</template>
<fields>i.department, i.category, i.item, i.item_id, i.descrip, i.gl_no, i.user_code, i.type_1, i.type_2, i.type_3, i.type_4, i.type_5, i.type_6, i.type_7, i.type_8, i.type_9, i.type_10, i.security, i.help_info, i.start_show, i.end_show, i.blackout1s, i.blackout1e, i.blackout2s, i.blackout2e, i.blackout3s, i.blackout3e, i.blackout4s, i.blackout4e, i.start_time, i.end_time, i.show_mon, i.show_tue, i.show_wed, i.show_thu, i.show_fri, i.show_sat, i.show_sun, i.price_type, i.dp_set_id, i.price_cols, i.wknd_start, i.wknd_end, i.rate_sched, i.daily_pric, i.monday_0, i.monday_1, i.monday_2, i.monday_3, i.monday_4, i.monday_5, i.tuesday_0, i.tuesday_1, i.tuesday_2, i.tuesday_3, i.tuesday_4, i.tuesday_5, i.weds_0, i.weds_1, i.weds_2, i.weds_3, i.weds_4, i.weds_5, i.thursday_0, i.thursday_1, i.thursday_2, i.thursday_3, i.thursday_4, i.thursday_5, i.friday_0, i.friday_1, i.friday_2, i.friday_3, i.friday_4, i.friday_5, i.saturday_0, i.saturday_1, i.saturday_2, i.saturday_3, i.saturday_4, i.saturday_5, i.sunday_0, i.sunday_1, i.sunday_2, i.sunday_3, i.sunday_4, i.sunday_5, i.tax_rate, i.tax_rate_b, i.cust_tax, i.cust_tax_b, i.fee_rate, i.add_tax, i.add_tax_b, i.time_span, i.span_type, i.admissions, i.admprconly, i.min_qty, i.max_qty, i.prn_tkt1, i.one_tkt1, i.prn_tkt2, i.one_tkt2, i.prn_vouch1, i. one_vch1, i.prn_vouch2, i.one_vch2, i.prn_recpt, i.split_type, i.pr_ctr_1, i.pcsplit_1, i.pr_ctr_2, i.pcsplit_2, i.pr_ctr_3, i.pcsplit_3, i.pr_ctr_4, i.pcsplit_4, i.pr_ctr_5, i.pcsplit_5, i.pr_ctr_6, i.pcsplit_6, i.item_type, i.validate, i.validate2, i.last_mod, i.stockt1, i.stockt2, i.stockv1, i.stockv2, i.ckmax4sale, i.ckm4s_rt, i.dw_act, i.do_on_sale, i.novalonret, i.set_price, i.inventory, i.invent_id, i.barcode, i.upc, i.vendor_1, i.vendor_2, i.reorder_pt, i.target_qty, i.max_tod, i.min_age, i.max_age, i.revnu_type, i.rev_days, i.rev_money, i.rfnd_cond, i.i_matrix, i.i_tmpnm_id, i.gstno_ret, i.remote_p1, i.remote_p2, i.remote_p3, i.remote_p4, i.rtnvaloptn, i.vpartno, i.role_no, i.prevalidat, i.subclass, i.season, i.hidden, i.meet_reqd, i.mod_reqd, i.mod_min, i.mod_max, i.multiline, i.do_on_web, i.web_rule, i.show_mon, i.show_tue, i.show_wed, i.show_thu, i.show_fri, i.show_sat, i.show_sun, i.allow_pah,i.gf_address,i.gf_areacod,i.gf_birthda,i.gf_cc,i.gf_city,i.gf_date1,i.gf_dtime1,i.gf_height,i.gf_memo1,i.gf_memo2,i.gf_memo3,i.gf_notes,i.gf_number1,i.gf_number2,i.gf_number3,i.gf_number4,i.gf_number5,i.gf_phone,i.gf_state,i.gf_text1,i.gf_text2,i.gf_text3,i.gf_text4,i.gf_text5,i.gf_text6,i.gf_text7,i.gf_text8,i.gf_weight,i.gf_zip,i.gf_first2,i.gf_last2,i.gf_e_mail, i.modguest,ckpts4sale,pts4saledp,i.gf_ltext1, i.gf_ltext2, i.gf_ltext3, i.gf_ltext4, i.gf_ltext5</fields>
<datetime>11-19-2011</datetime>
<max4sale>1</max4sale>
<points4sale>1</points4sale>
<calcpoints>1</calcpoints>
<avail>11/14/2011-12/11/2011</avail>
<mod1><department>IMAX </department><category>EXHIBITS </category><item>FARMTECH </item><mod1><department>IMAX </department><category>MODIFIERS </category><item>3DGLASSES </item></mod1></mod1><mod2><department>IMAX </department><category>EXHIBITS </category><item>SPACEFLIGH</item><mod1><department>IMAX </department><category>MODIFIERS </category><item>HEADPHONES</item></mod1><mod2><department>IMAX </department><category>MODIFIERS </category><item>SPHEADREST</item></mod2></mod2><mod3><department>IMAX </department><category>EXHIBITS </category><item>TRAINTECH </item><mod1><department>IMAX </department><category>MODIFIERS </category><item>3DGLASSES </item></mod1><mod2><department>IMAX </department><category>MODIFIERS </category><item>HEADPHONES</item></mod2><mod3><department>IMAX </department><category>MODIFIERS </category><item>SPHEADREST</item></mod3></mod3><qty>1</qty>
 
In addition to the all of the old fields, each return record now includes a parent_id field which gives the index in the recordset of its parent. If an item is a main item then it has parent_id=-1.
It takes the <hasmod> field and expands all DCIs involved to get the proper pricing for the main (parent) item and all of its modifiers. These are returned in a recordset.  The recordset always has the parent item first.  (This is accomplished by the presence of a parent field which is 1 for the parent item and 0 for all the modifiers).
 
Example:
<func>getitemexpanded</func><department>AAA-MATT  </department>
<category>AAA</category><item>WIDGET</item><calcprice>1</calcprice>
<HASMOD>AAA-MATT  AAA       BLING     AAA-MATT  AAA      JANKY</HASMOD>
 
Part of the item pricing calculation logic has been optimized so that Dynamic Pricing Rules are only obtained once from the database during a getitemexpanded or getitemtree call. In addition, a rule containing SUB() rules in it will only get the SUB() rules once during the call.