Re: webCatalog and Stocks

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16765
interpreted = N
texte = At 9:13 AM -0800 3/26/98, Giovanna Petrachi is rumored to have typed: > I need Webcatalog alert user who order 10 that I've 5 in stock or that my > stock is empty. > So if an order is OK, webCatalog can proceed to write order in a > ShoppingCart otherwise Webcatalog must alert user and proceed in a > different way.I do something like this: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[/SETLIN 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.MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ 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)
At 9:13 AM -0800 3/26/98, Giovanna Petrachi is rumored to have typed: > I need Webcatalog alert user who order 10 that I've 5 in stock or that my > stock is empty. > So if an order is OK, webCatalog can proceed to write order in a > ShoppingCart otherwise Webcatalog must alert user and proceed in a > different way.I do something like this: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[/SETLIN 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.MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ Michael Winston

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:

WebCat2b15MacPlugin - showing [math] (1997) [WriteFile] problems (1997) serial number generation (1997) WebCat on Apache (2002) Multiple Merchant Accounts? (1997) Large sites (2003) Proper file locations (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) show all problem (1997) [WebDNA] BOOTSTRAP and WebDNA (2017) WC Database Format (1997) searchable list archive (1997) Cannot calculate prices (1997) Instructions for Digest (1997) [OT] Communigate List (2003) bcc and sendmail (2001) Text in coloums... (2000) $Quit, $CloseDatabase corrections (1997) WebDNA-Talk Digest mode broken (1997) [OT] Imagemagick (2004)