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 now I've another trouble: what happens if someone do not complete the order and close 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. Anytime someone order one of this product, Webcatalog add it in a cart and baffle the order. So if a user do not want to bye product in the cart and do not remove it but simply close connection, WebCat do not permit to another user to order it.What can I do for the resolution of this problem? ThanksGiovanna Associated Messages, from the most recent to the oldest:

    
  1. Re: webCatalog and Stocks (Giovanna Petrachi 1998)
  2. Re: webCatalog and Stocks (Michael Winston 1998)
  3. Re: webCatalog and Stocks (Giovanna Petrachi 1998)
  4. Re: webCatalog and Stocks (Michael Winston 1998)
  5. Re: webCatalog and Stocks (Giovanna Petrachi 1998)
  6. Re:webCatalog and Stocks (Jay Van Vark 1998)
  7. Re: webCatalog and Stocks (grichter@panavise.com (Gary Richter) 1998)
  8. webCatalog and Stocks (Giovanna Petrachi 1998)
>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 now I've another trouble: what happens if someone do not complete the order and close 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. Anytime someone order one of this product, Webcatalog add it in a cart and baffle the order. So if a user do not want to bye product in the cart and do not remove it but simply close connection, WebCat do not permit to another user to 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:

random random links (1999) OK, here goes... (1997) WebCat 5 Intranet Question (2003) WebCatalog - Mac vs Linux (2000) Problems getting parameters passed into email. (1997) bye bye tax rate (1998) E-mail formating question (1999) ThisAutoNumber (2003) [date format] w/in sendmail (1997) Extended [ConvertChars] (1997) Search design (1997) [defined]ish (1997) HomePage Caution (1997) passing search criteria (1997) WebCatalog can't find database (1997) Deleting Orders (1997) Grep -- remove extra returns first (2003) Active Server Code... (1998) [WebDNA] filter out the exclaimation point (2017) Summing fields (1997)