Re: !@#$$@@# formulas database, tax and freight.
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 43047
interpreted = N
texte = I had the same problem recently.It may be that you also need to pass a password in the addlineitems:[LineItems][AddLineItem file=repeatorders/[cart]&sku=[sku]&db=../data/directproducts.db]password=YourPassword&Quantity=[Quantity]&Taxable=[Taxable]&TextA=[TextA]&TextB=[TextB]&TextC=[TextC]&TextD=[TextD]&TextE=[TextE][/AddLineItem] [/LineItems]The password is in wour webcat prefs.-- Stuart Tremainidfk web developments - AustraliaOn Monday, 2 September 2002, Andrew Simpson
wrote:>A site we did is trying to be clever in that it remembers what you had in>your cart from visit to visit.>>If you add something to your cart then close your browser, open your browser>and come back again. the item is magically restored.>>The way it works is i store a temporary customer ID in a cookie and write>the products to a database. If the customer comes back i loop through all>the 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 tax>and freight from the formulas database are ignored.>>What i can't understand is the code that adds the line item the first time>around 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 the>formulas 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 the>way 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 that>product. You are welcome to call and find out more about its>availability.[/text]> [text]show_price_error=YES[/text]> [hideif [LOOKUP>db=/db/products.db&value=[SKU]&lookInField=SKU&returnField=PRICE¬Found=]=>]> [text]show_price_error=NO[/text]> [AddLineItem>cart=[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 a>profile or under the cart as an order ID ***[/!]> [!]*** If they are a logged in user - do it this way as there may be>more than one order under this cust_id and it would be good to clear it all>up ***[/!]> [showif [user_logged_in]=TRUE]> [search>db=/db/existing_order.db&eqCUST_IDdatarq=[logged_user_id]&max=1]> [founditems]> [search>db=/db/existing_detail.db&eqEXISTING_IDdatarq=[EXISTING_ID]&asLINE_IDsort=1&>LINE_IDtype=number]> [founditems]> [AddLineItem>cart=[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/>-------------------------------------------------------------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:
I had the same problem recently.It may be that you also need to pass a password in the addlineitems:[lineitems][AddLineItem file=repeatorders/[cart]&sku=[sku]&db=../data/directproducts.db]password=YourPassword&Quantity=[Quantity]&Taxable=[Taxable]&TextA=[TextA]&TextB=[TextB]&TextC=[TextC]&TextD=[TextD]&TextE=[TextE][/AddLineItem] [/LineItems]The password is in wour webcat prefs.-- Stuart Tremainidfk web developments - AustraliaOn Monday, 2 September 2002, Andrew Simpson wrote:>A site we did is trying to be clever in that it remembers what you had in>your cart from visit to visit.>>If you add something to your cart then close your browser, open your browser>and come back again. the item is magically restored.>>The way it works is i store a temporary customer ID in a cookie and write>the products to a database. If the customer comes back i loop through all>the 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 tax>and freight from the formulas database are ignored.>>What i can't understand is the code that adds the line item the first time>around 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 the>formulas 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 the>way 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 that>product. You are welcome to call and find out more about its>availability.[/text]> [text]show_price_error=YES[/text]> [hideif [LOOKUP>db=/db/products.db&value=[SKU]&lookInField=SKU&returnField=PRICE¬Found=]=>]> [text]show_price_error=NO[/text]> [AddLineItem>cart=[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 a>profile or under the cart as an order ID ***[/!]> [!]*** If they are a logged in user - do it this way as there may be>more than one order under this cust_id and it would be good to clear it all>up ***[/!]> [showif [user_logged_in]=TRUE]> [search>db=/db/existing_order.db&eqCUST_IDdatarq=[logged_user_id]&max=1]> [founditems]> [search>db=/db/existing_detail.db&eqEXISTING_IDdatarq=[EXISTING_ID]&asLINE_IDsort=1&>LINE_IDtype=number]> [founditems]> [AddLineItem>cart=[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/>-------------------------------------------------------------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/
Stuart Tremain
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:
Fw: html pages not working (2003)
Appending problem (still) on Solaris (2000)
Unexpected error (1997)
[WebDNA] BCC or Character limit in [sendmail] (2010)
syntax question, not in online refernce (1997)
Download Question (1997)
Protect (1997)
createfolder default behavior (1998)
Other tags inside the founditems context? (1998)
Canadian Postal Codes (2001)
[WebDNA] MD5 Hash issue (2009)
[SearchString] problem with [search] context (1997)
[WebDNA] Search Site (2009)
Date Calulation (1997)
Date Calulation (1997)
setitems, one more thing (1997)
Stopping bad HTML propagation ? (1997)
New Command prefs ... (1997)
Error: Permision deny. (2005)
PIXO support (1997)