numero = 24781
interpreted = N
texte = i havre been banging my head for 14 hrs on this one. and from the lookat the archives it has been a tough road for many.Basically i want to have a customer come to the site with a discountcode and put the code in to recieve discount pricing. this is the samecode for many users.I configured price in the formulas.db to do the discount when the codeis correct.I am putting the code number into header3.code is:price [format .[lookupdb=admin/prefs.db&lookinfield=pref&value=CURRENCY_ACCURACY&returnfield=value]f][math][showif[header3]=specialcode]0.9*[/showif][lookupdb=admin/products.db&lookInField=sku&value=[sku]&returnField=price][/math][/format]taxRate [taxRate]i have two problems in trying to complete this in some user friendlyway.one method (preferred) i have them enter the code in a form field oncheckout.tpl and post this to invoice.tpl.code is:Please Enter Your Personal Discount Code Below ENTER CODE # ... i already learned that in order for this tpo work i need a lineitemsloop at the beginning of the invoice.tpl that reads the line items inthe cart and replaces/updates the full price with the discounted price.using the price change password. i am using:[lineitems][SetLineItem cart=[cart]&index=[lineindex]]password=xxxxx&price=[format.[lookupdb=admin/prefs.db&lookinfield=pref&value=CURRENCY_ACCURACY&returnfield=value]f][math][showif[header3]=10452]0.9*[/showif][lookupdb=admin/products.db&lookInField=sku&value=[sku]&returnField=price][/math][/format][/SetLineItem][/lineitems]the problem is when the form posts, the header info is added to thecart but the prices do not update using the lineitems loop above..but if i then reload the page which asks to repost the form and then irepostthe data it updates the items.so basically it all works except i want it to update when the page loadsnot reloads.any experts out there that can tell me the secret here?ps the other method of having the user enter the code at the beginninghas a similar problem. the post on the home page does not get into thecart because though a cart number is created the cart file is not untili go to the next page which is too late.i need to sleep....jym-- _/_/_/CyberLive, Inc.\_\_\_ _/_/_/_/_/ Jym Duane \_\_\_\_\_\_ Marketing / Custom Design \ E-Commerce Phone: (949) 443-1323 Fax: (949)443-1360 Email: sales@cyberlive.com Web: http://www.cyberlive.com _/_/_/_/_/_/_/_/_/_/_/_/_/_/ \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\__/_/_/_/_/_/_/ The Internet Services Professionals \_\_\_\_\_\_\_31781 Camino Capistrano, Suite 302, San Juan Capistrano, CA 92675-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
Associated Messages, from the most recent to the oldest:
HELP..Changing Price after adding to cart. (Jym Duane 1999)
i havre been banging my head for 14 hrs on this one. and from the lookat the archives it has been a tough road for many.Basically i want to have a customer come to the site with a discountcode and put the code in to recieve discount pricing. this is the samecode for many users.I configured price in the formulas.db to do the discount when the codeis correct.I am putting the code number into header3.code is:price [format .[lookupdb=admin/prefs.db&lookinfield=pref&value=CURRENCY_ACCURACY&returnfield=value]f][math][showif[header3]=specialcode]0.9*[/showif][lookupdb=admin/products.db&lookInField=sku&value=[sku]&returnField=price][/math][/format]taxRate [taxRate]i have two problems in trying to complete this in some user friendlyway.one method (preferred) i have them enter the code in a form field oncheckout.tpl and post this to invoice.tpl.code is:Please Enter Your Personal Discount Code Below ENTER CODE # ... i already learned that in order for this tpo work i need a lineitemsloop at the beginning of the invoice.tpl that reads the line items inthe cart and replaces/updates the full price with the discounted price.using the price change password. i am using:[lineitems][SetLineItem cart=[cart]&index=[lineindex]]password=xxxxx&price=[format.[lookupdb=admin/prefs.db&lookinfield=pref&value=CURRENCY_ACCURACY&returnfield=value]f][math][showif[header3]=10452]0.9*[/showif][lookupdb=admin/products.db&lookInField=sku&value=[sku]&returnField=price][/math][/format][/SetLineItem][/lineitems]the problem is when the form posts, the header info is added to thecart but the prices do not update using the lineitems loop above..but if i then reload the page which asks to repost the form and then irepostthe data it updates the items.so basically it all works except i want it to update when the page loadsnot reloads.any experts out there that can tell me the secret here?ps the other method of having the user enter the code at the beginninghas a similar problem. the post on the home page does not get into thecart because though a cart number is created the cart file is not untili go to the next page which is too late.i need to sleep....jym-- _/_/_/CyberLive, Inc.\_\_\_ _/_/_/_/_/ Jym Duane \_\_\_\_\_\_ Marketing / Custom Design \ E-Commerce Phone: (949) 443-1323 Fax: (949)443-1360 Email: sales@cyberlive.com Web: http://www.cyberlive.com _/_/_/_/_/_/_/_/_/_/_/_/_/_/ \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\__/_/_/_/_/_/_/ The Internet Services Professionals \_\_\_\_\_\_\_31781 Camino Capistrano, Suite 302, San Juan Capistrano, CA 92675-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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 Jym Duane
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...