Re: webCatalog and Stocks
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16785
interpreted = N
texte = >Before the items are displayed on the cart page, I go through a [LINEITEMS]>loop to check the ordered quantity against the available inventory. If the>customer wants more than is available, I readjust their quantity and make a>note in htat line item:>>[LINEITEMS]>[SHOWIF [QUANTITY]>[LOOKUP>db=MYDB.db&value=[SKU]&lookinfield=SKU&ReturnField=Inventory]]>[SETLINEITEM CART=[CART]&INDEX=[LINEINDEX]]QUANTITY=[LOOKUP>db=MYDB.db&value=[SKU]&lookinfield=SKU&ReturnField=Inventory]&TEXTA=OVER[/SETLI>N>EITEM]>[/SHOWIF]>[/LINEITEMS]>>Then, when displaying the items later in the page, I say something like:>>[LINEITEMS]>[QUANITY][SHOWIF [TEXTA]=OVER](You have requested more than we have in>stock. Your order had been adjusted.)[/SHOWIF]>[SETLINEITEM CART=[CART]&INDEX=[LINEINDEX]]TEXTA=[/SETLINEITEM]>[/LINEITEMS]>>Now the customer sees how much they can order, and I can erase the note>from the lineitem.>>MichaelThank you Michael,your source has been very helpful for the resolution of my problem. But nowI've another trouble: what happens if someone do not complete the order andclose connection?I need to set a timeout after which webcatalog cancel the suspend order.I.e, I'm managing a DB in which some products have inventory=1. Anytimesomeone order one of this product, Webcatalog add it in a cart and bafflethe order. So if a user do not want to bye product in the cart and do notremove it but simply close connection, WebCat do not permit to another userto order it.What can I do for the resolution of this problem?ThanksGiovanna
Associated Messages, from the most recent to the oldest:
>Before the items are displayed on the cart page, I go through a
[lineitems]>loop to check the ordered quantity against the available inventory. If the>customer wants more than is available, I readjust their quantity and make a>note in htat line item:>>
[lineitems]>[SHOWIF [QUANTITY]>[LOOKUP>db=MYDB.db&value=[SKU]&lookinfield=SKU&ReturnField=Inventory]]>[SETLINEITEM CART=
[cart]&INDEX=[LINEINDEX]]QUANTITY=[LOOKUP>db=MYDB.db&value=[SKU]&lookinfield=SKU&ReturnField=Inventory]&TEXTA=OVER[/SETLI>N>EITEM]>[/SHOWIF]>[/LINEITEMS]>>Then, when displaying the items later in the page, I say something like:>>
[lineitems]>[QUANITY][SHOWIF [TEXTA]=OVER](You have requested more than we have in>stock. Your order had been adjusted.)[/SHOWIF]>[SETLINEITEM CART=
[cart]&INDEX=[LINEINDEX]]TEXTA=[/SETLINEITEM]>[/LINEITEMS]>>Now the customer sees how much they can order, and I can erase the note>from the lineitem.>>MichaelThank you Michael,your source has been very helpful for the resolution of my problem. But nowI've another trouble: what happens if someone do not complete the order andclose connection?I need to set a timeout after which webcatalog cancel the suspend order.I.e, I'm managing a DB in which some products have inventory=1. Anytimesomeone order one of this product, Webcatalog add it in a cart and bafflethe order. So if a user do not want to bye product in the cart and do notremove it but simply close connection, WebCat do not permit to another userto order it.What can I do for the resolution of this problem?ThanksGiovanna
Giovanna Petrachi
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Databases (2000)
[taxRate] [TaxTotal] ? (1997)
pictures / referrer etc. (1998)
A little syntax help (1997)
Showcart in [include] (1999)
Followup question re: checksum for credit cards? (1997)
Re:Running 2 two WebCatalog.acgi's (1996)
notification solutions (1997)
Logging purchases (1997)
WebDNA 5.0 Questions (2003)
page redirect in webDNA (1997)
Show only certain items (2002)
Firesite cache vs webcat cache (1997)
OT: Need some DVD advice (2006)
Which beta for w* 4.1 and a problem w/b12 (1999)
6.0 SQL Question (2004)
syntax question, not in online refernce (1997)
Secure server question (1997)
RE: Formulas.db + Users.db (1997)
Not really WebCat- (1997)