!@#$$@@# formulas database, tax and freight.
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 43038
interpreted = N
texte = A site we did is trying to be clever in that it remembers what you had inyour cart from visit to visit.If you add something to your cart then close your browser, open your browserand come back again. the item is magically restored.The way it works is i store a temporary customer ID in a cookie and writethe products to a database. If the customer comes back i loop through allthe products in the database and add them back in to a new cart.My problem however is that when i add the products programatically, the taxand freight from the formulas database are ignored.What i can't understand is the code that adds the line item the first timearound is identical to the code the re-adds the products from the database.What am i missing?Do i have to set some headers before or after i add line items to invoke theformulas database?Do i have to use setlineitems rather than addlineitems?do i have to do a rain dance to make this mickey mouse technology work theway i expect everytime???code that adds line item and works correctly:[!]***Everything okay?***[/!] [showif [add_a_lineYN]=YES] [text]price_error_msg=Sorry, we do not currently have a price for thatproduct. You are welcome to call and find out more about itsavailability.[/text] [text]show_price_error=YES[/text] [hideif [LOOKUPdb=/db/products.db&value=[SKU]&lookInField=SKU&returnField=PRICE¬Found=]=] [text]show_price_error=NO[/text] [AddLineItemcart=[newcart]&sku=[sku]&db=/db/products.db]quantity=1[/AddLineItem] [/hideif] [/showif]code that re-adds line item and doesn't work.[!]*** Order can exist under either the customer ID if the user has aprofile or under the cart as an order ID ***[/!] [!]*** If they are a logged in user - do it this way as there may bemore than one order under this cust_id and it would be good to clear it allup ***[/!] [showif [user_logged_in]=TRUE] [searchdb=/db/existing_order.db&eqCUST_IDdatarq=[logged_user_id]&max=1] [founditems] [searchdb=/db/existing_detail.db&eqEXISTING_IDdatarq=[EXISTING_ID]&asLINE_IDsort=1&LINE_IDtype=number] [founditems] [AddLineItemcart=[newcart]&sku=[PROD_SKU]&db=/db/products.db]quantity=1[/AddLineItem] [/founditems] [/search] [/founditems] [/search] [/showif]help?-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
A site we did is trying to be clever in that it remembers what you had inyour cart from visit to visit.If you add something to your cart then close your browser, open your browserand come back again. the item is magically restored.The way it works is i store a temporary customer ID in a cookie and writethe products to a database. If the customer comes back i loop through allthe products in the database and add them back in to a new cart.My problem however is that when i add the products programatically, the taxand freight from the formulas database are ignored.What i can't understand is the code that adds the line item the first timearound is identical to the code the re-adds the products from the database.What am i missing?Do i have to set some headers before or after i add line items to invoke theformulas database?Do i have to use setlineitems rather than addlineitems?do i have to do a rain dance to make this mickey mouse technology work theway i expect everytime???code that adds line item and works correctly:[!]***Everything okay?***[/!] [showif [add_a_lineYN]=YES] [text]price_error_msg=Sorry, we do not currently have a price for thatproduct. You are welcome to call and find out more about itsavailability.[/text] [text]show_price_error=YES[/text] [hideif [LOOKUPdb=/db/products.db&value=[SKU]&lookInField=SKU&returnField=PRICE¬Found=]=] [text]show_price_error=NO[/text] [AddLineItemcart=[newcart]&sku=[sku]&db=/db/products.db]quantity=1[/AddLineItem] [/hideif] [/showif]code that re-adds line item and doesn't work.[!]*** Order can exist under either the customer ID if the user has aprofile or under the cart as an order ID ***[/!] [!]*** If they are a logged in user - do it this way as there may bemore than one order under this cust_id and it would be good to clear it allup ***[/!] [showif [user_logged_in]=TRUE] [searchdb=/db/existing_order.db&eqCUST_IDdatarq=[logged_user_id]&max=1] [founditems] [searchdb=/db/existing_detail.db&eqEXISTING_IDdatarq=[EXISTING_ID]&asLINE_IDsort=1&LINE_IDtype=number] [founditems] [AddLineItemcart=[newcart]&sku=[PROD_SKU]&db=/db/products.db]quantity=1[/AddLineItem] [/founditems] [/search] [/founditems] [/search] [/showif]help?-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Andrew Simpson
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:
functions... (2005)
Format question WC Mac f3 (1997)
Physical Security for WebCatalog Directories (1997)
IIS Brain Dead (1998)
bug in [SendMail] (1997)
SSL and WebCatalog (1997)
math a various prices (1997)
Calendar using WebCatalog? (1997)
[Sum] function? (1997)
Re:[ShowIf] and empty fields (1997)
using showpage and showcart commands (1996)
[append] (1997)
Multiple SSL Keys (1998)
WC2b12: Yes, Formulas.db is for real (1997)
FlushDatabase Suggestion (1998)
Country & Ship-to address & other fields ? (1997)
WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Web Catalog and Net Cloak (1998)
Copyright ? (1997)