4.3 ww.dll API Reference : API descriptions : Functions with database access : newitemres
 
newitemres
 
Description
newitemres checks Max4Sale limits for an item with real time inventory and creates a record in the item_res table if there is sufficient quantity available. The item_res table tracks real-time item reservations, primarily when a user puts an item in his cart in web sales. The table is used to give accurate Max4Sale remaining quantity calculations.
 
Input fields
 
XML tag
Description
<department>
<item> department.
<category>
<item> category.
<item>
Item.
<quantity>
Quantity reserved or placed in cart.
<wwsale_id>
Web sale ID. If a wwsale_id that is passed in the call already exists in the ww_sales table, ww.dll returns, “ERR:wwsale_id is not unique.”
<start_date>
Start date for the <item>.
<hold_time>
Optional. In minutes. Defaults to five minutes. (This is how long the user has before the processsale call is made.)
 
Return fields
 
XML tag
Description
<itmres_no>
Item reservation number.
 
Examples
 
Example invocation:
<func>newitemres</func><department>AAA-MATT </department><category>AAA</category><item>CANDY</item><quantity>1</quantity>
<start_date>03-17-2004 07:00:00</start_date><wwsale_id>1000000</wwsale_id>
 
Example return string:
OK :<itmres_no>4000000</itmres_no>
 
See also
clearitemres