Re: Thankyou.tpl

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30558
interpreted = N
texte = I cannot see explicitly why you cannot get the BillTo information to show up, since I do not know how you got to this page. Here are some suggestions anyway...For one thing, you should change all of those [math] contexts in the shipto addresses to [text] contexts; math contexts are only used when you are performing math functions (like plus, minus).Secondly, you should be using a search context to get the PriceN and SizeN values, not lookup. We just had a discussion on the list that suggested that any more than 2 lookups should be replaced with a seach instead. I suspect you should also examine your logic since you are doing 6 lookups to set two values.Third, you should be setting the price and taxable information at the point of adding a line to the cart, using the Formulas.db. The Price line in the Formulas.db gets interpreted at the point you add something; you have access to the Size at that point (in TextA if I am not mistaken) and you can create a formula that gets the price right then and there.Alternately, you could update the pricing on the page where you gather the address and credit card information. But the ThankYou page is typically restating the current state of the order, not altering the contents of the order file.The normal order of operation for WebCat is (with example template names):1) Cart.tpl - add items to cart (inserting the price at that time) 2) GetAddress.tpl - When the user selects checkout, get the name/address and update the header; you can also use this to fix the shipping and tax charges, since you have no way to know about those until you have an address. 3) FinalInvoice.tpl - Confirm all of the user information; this page should restate the complete charges, including shipping and tax, in the ShoppingCart. 4) ThankYou.tpl - Purchase moves the completed cart to the Orders directory and e-mails to fulfillment and (may) display the cart information again.This is the way that the TeaShop site is set up; this is a very good example site to follow through in detail to see how the program flow is most effectively handled.Hope this helps...John Peacock ____________________Reply Separator____________________ Subject: Thankyou.tpl Author: (WebCatalog Talk) Date: 4/17/2000 12:09 PMI have been trying to figure this out for awhile now and would like some input. I cannot get the Bill to information to show up on the Thankyou.tpl page. here is the code any suggestions?Lori Thank You for Your Order! [showif [Same address for shipping]=] [math]ShipToName=[name][/math] [math]ShipToAddress1=[address1][/math] [math]ShipToAddress2=[address2][/math] [math]ShipToCity=[city][/math] [math]ShipToState=[state][/math] [math]ShipToZip=[zip][/math] [math]ShipToPhone=[phone][/math] [/showif] [include file=navbar.txt]

Your Final Invoice Contains the Following Items from
Scenic Signs & Screen Printing
2803 Emery Drive
Wausau, WI 54401-9707
1-800-388-4811

Your Order Number is #[cart]
[orderfile cart=[cart]] Print this page for your receipt

[lineitems] [SetLineItem cart=[cart]&index=[lineindex]&db=scenicsigns.db]password=ahab&Price=[MyPrice ]&TextA=[TextA]&TextB=[TextB]&TextC=[TextC]&TextD=[TextD][/SetLineItem] [/lineitems]
Item #QtyProduct #Product NameOptionsPriceExtension
[lineIndex][quantity][sku][Description][hideif [TextA]=][TextA], [/hideif][hideif [TextB]=][TextB], [/hideif][hideif [TextC]=][TextC], [/hideif][hideif [TextD]=][TextD][/hideif]$[format .2f][Price][/format]$[format .2f][math][quantity]*[Price][/math][/format]
Subtotal$[subTotal]
Shipping & Handling$ [showif [subTotal]>400] [math show=f]shipping=24.50[/math] [/showif] [showif [subTotal]<400] [math show=f]shipping=24.50[/math] [/showif] [showif [subTotal]<300] [math show=f]shipping=20[/math] [/showif] [showif [subTotal]<200] [math show=f]shipping=15[/math] [/showif] [showif [subTotal]<100] [math show=f]shipping=10.5[/math] [/showif] [showif [subTotal]<50] [math show=f]shipping=7.5[/math] [/showif] [showif [subTotal]<30] [math show=f]shipping=5[/math] [/showif] [format .2f][shipping][/format]
[ShipTostate] Tax Rate: [lookup db=TaxRates.db&lookInField=State&value=[Shiptostate]&returnField=taxRate¬ Found=0]% Tax$[format 6.2f][math]totalTax=([lookup db=TaxRates.db&lookInField=State&value=[Shiptostate]&returnField=taxRate¬ Found=0]/100)*([subTotal]+[shipping])[/math][/format]
Grand Total$[format 6.2f][math][subTotal]+[totalTax]+[shipping][/math][/format]

Your order will be
sent to the following address after payment is confirmed. Money order and
Certified Check orders please wait for e-mail confirmation before sending
your payment. Please send payment to:
Scenic Signs
2803 Emery Drive
Wausau, WI 54401-9709

Bill To
Name: [name]
Address: [address1]
[address2]
City: [city] State: [state] Zip: [zip]
Country: [country]
Phone: [phone]
Email: [email]
Payment Type: [cardType]
Account: [accountNum]
Expires:[expMonth]/[expYear]
[/orderfile]
Start a New Shopping Trip
[purchase cart=[cart]&db=scenicsigns.db][SendMail to=alphawd@alphawd.com&from=sales@scenicsigns.com&Errors-To=lori@alphawd.com &subject=Order#[cart]] [unurl]Internet Order You may view the entire order at http://www.scenicsigns.com/ViewOrder.tpl?cart=[cart] Bill To:[name] [address1] [address2] [city],[state] [zip]Country: [country] E-Mail: [email] Payment Type: [cardType] Account: [accountNum] Expires: [expMonth]/[expYear] Ship To:[ShipToname] [ShipToaddress1] [ShipToaddress2] [ShipTocity],[ShipTostate] [ShipTozip] [ShipTocountry] ST Email:[ShipToemail]Product Code Title Qty Price -------------------- ---------------------------------------- --- ---------- [lineItems][format 20s][sku][/format] [format 40s][Description][/format] [format 3s][quantity][/format] [format 10.2f][price][/format] [/lineItems] ----------------------------------------------------------------- ---------- Subtotal: [format 10.2f][subTotal][/format] Shipping: [format 10.2f][shipTotal][/format] Tax: [format 10.2f][taxTotal][/format] Grand Total: [format 10.2f][grandTotal][/format][/unurl][/sendmail] [SendMail to=[email]&from=info&scenicsigns.com Errors-To=lori@alphawd.com&subject=Order#[cart]] Thank you for your order! We received your order and we are now processing it. If you have any questions, please contact us via email at info@scenicsigns.com or Call us at 1-800-388-4811. Money order and Certified Check orders please wait for e-mail conformation before sending your payment. Please send payment to: Scenic Signs - 2803 Emery Drive - Wausau, WI 54401-9709Bill To:[name] [address1] [address2] [city],[state] [zip]

Country: [country] Payment Type: [PaymentType] Account: [GetChars start=1&end=2][AccountNum][/GetChars]...[GetChars start=1&end=4&from=end][AccountNum][/GetChars](Credit Card purposely not shown because this email is not encrypted) Ship To:[ShipToname] [ShipToaddress1] [ShipToaddress2] [ShipTocity],[ShipTostate] [ShipTozip] [ShipTocountry] Product Code Title Qty Price -------------------- ---------------------------------------- --- ---------- [lineItems][format 20s][sku][/format] [format 40s][Description][/format] [format 3s][quantity][/format] [format 10.2f][price][/format] [/lineItems] ----------------------------------------------------------------- ---------- Subtotal: [format 10.2f][subTotal][/format] Shipping: [format 10.2f][shipTotal][/format] Tax: [format 10.2f][taxTotal][/format] Grand Total: [format 10.2f][grandTotal][/format][/sendmail] [SetHeader cart=[cart]&db=scenicsigns.db] CartIPAddress=[ipAddress]&taxRate=[lookup db=TaxRates.db&lookInField=State&value=[Shiptostate]&returnField=taxRate¬ Found=0]&shipTotal=[shipping] [/SetHeader] ------------------------------------------------------------- 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:

    
  1. Re: Thankyou.tpl (jpeacock@univpress.com 2000)
I cannot see explicitly why you cannot get the BillTo information to show up, since I do not know how you got to this page. Here are some suggestions anyway...For one thing, you should change all of those [math] contexts in the shipto addresses to [text] contexts; math contexts are only used when you are performing math functions (like plus, minus).Secondly, you should be using a search context to get the PriceN and SizeN values, not lookup. We just had a discussion on the list that suggested that any more than 2 lookups should be replaced with a seach instead. I suspect you should also examine your logic since you are doing 6 lookups to set two values.Third, you should be setting the price and taxable information at the point of adding a line to the cart, using the formulas.db. The Price line in the formulas.db gets interpreted at the point you add something; you have access to the Size at that point (in TextA if I am not mistaken) and you can create a formula that gets the price right then and there.Alternately, you could update the pricing on the page where you gather the address and credit card information. But the ThankYou page is typically restating the current state of the order, not altering the contents of the order file.The normal order of operation for WebCat is (with example template names):1) Cart.tpl - add items to cart (inserting the price at that time) 2) GetAddress.tpl - When the user selects checkout, get the name/address and update the header; you can also use this to fix the shipping and tax charges, since you have no way to know about those until you have an address. 3) FinalInvoice.tpl - Confirm all of the user information; this page should restate the complete charges, including shipping and tax, in the ShoppingCart. 4) ThankYou.tpl - Purchase moves the completed cart to the Orders directory and e-mails to fulfillment and (may) display the cart information again.This is the way that the TeaShop site is set up; this is a very good example site to follow through in detail to see how the program flow is most effectively handled.Hope this helps...John Peacock ____________________Reply Separator____________________ Subject: Thankyou.tpl Author: (WebCatalog Talk) Date: 4/17/2000 12:09 PMI have been trying to figure this out for awhile now and would like some input. I cannot get the Bill to information to show up on the Thankyou.tpl page. here is the code any suggestions?Lori <a target="_parent" href="page.dna?numero=1041">Thank you for your order!</a> [showif [Same address for shipping]=] [math]ShipToName=[name][/math] [math]ShipToAddress1=[address1][/math] [math]ShipToAddress2=[address2][/math] [math]ShipToCity=[city][/math] [math]ShipToState=[state][/math] [math]ShipToZip=[zip][/math] [math]ShipToPhone=[phone][/math] [/showif] [include file=navbar.txt]

Your Final Invoice Contains the Following Items from
Scenic Signs & Screen Printing
2803 Emery Drive
Wausau, WI 54401-9707
1-800-388-4811

Your Order Number is #[cart]
[orderfile cart=[cart]] Print this page for your receipt

[lineitems] [SetLineItem cart=[cart]&index=[lineindex]&db=scenicsigns.db]password=ahab&Price=[MyPrice ]&TextA=[TextA]&TextB=[TextB]&TextC=[TextC]&TextD=[TextD][/SetLineItem] [/lineitems]
Item #QtyProduct #Product NameOptionsPriceExtension
[lineIndex][quantity][sku][Description][hideif [TextA]=][TextA], [/hideif][hideif [TextB]=][TextB], [/hideif][hideif [TextC]=][TextC], [/hideif][hideif [TextD]=][TextD][/hideif]$[format .2f][Price][/format]$[format .2f][math][quantity]*[Price][/math][/format]
Subtotal$[subTotal]
Shipping & Handling$ [showif [subTotal]>400] [math show=f]shipping=24.50[/math] [/showif] [showif [subTotal]<400] [math show=f]shipping=24.50[/math] [/showif] [showif [subTotal]<300] [math show=f]shipping=20[/math] [/showif] [showif [subTotal]<200] [math show=f]shipping=15[/math] [/showif] [showif [subTotal]<100] [math show=f]shipping=10.5[/math] [/showif] [showif [subTotal]<50] [math show=f]shipping=7.5[/math] [/showif] [showif [subTotal]<30] [math show=f]shipping=5[/math] [/showif] [format .2f][shipping][/format]
[ShipTostate] Tax Rate: [lookup db=TaxRates.db&lookInField=State&value=[Shiptostate]&returnField=taxRate¬ Found=0]% Tax$[format 6.2f][math]totalTax=([lookup db=TaxRates.db&lookInField=State&value=[Shiptostate]&returnField=taxRate¬ Found=0]/100)*([subTotal]+[shipping])[/math][/format]
Grand Total$[format 6.2f][math][subTotal]+[totalTax]+[shipping][/math][/format]

Your order will be
sent to the following address after payment is confirmed. Money order and
Certified Check orders please wait for e-mail confirmation before sending
your payment. Please send payment to:
Scenic Signs
2803 Emery Drive
Wausau, WI 54401-9709

Bill To
Name: [name]
Address: [address1]
[address2]
City: [city] State: [state] Zip: [zip]
Country: [country]
Phone: [phone]
Email: [email]
Payment Type: [cardType]
Account: [accountNum]
Expires:[expMonth]/[expYear]
[/orderfile]
Start a New Shopping Trip
[purchase cart=[cart]&db=scenicsigns.db][SendMail to=alphawd@alphawd.com&from=sales@scenicsigns.com&Errors-To=lori@alphawd.com &subject=Order#[cart]] [unurl]Internet Order You may view the entire order at http://www.scenicsigns.com/ViewOrder.tpl?cart=[cart] Bill To:[name] [address1] [address2] [city],[state] [zip]Country: [country] E-Mail: [email] Payment Type: [cardType] Account: [accountNum] Expires: [expMonth]/[expYear] Ship To:[ShipToname] [ShipToaddress1] [ShipToaddress2] [ShipTocity],[ShipTostate] [ShipTozip] [ShipTocountry] ST Email:[ShipToemail]Product Code Title Qty Price -------------------- ---------------------------------------- --- ---------- [lineitems][format 20s][sku][/format] [format 40s][Description][/format] [format 3s][quantity][/format] [format 10.2f][price][/format] [/lineItems] ----------------------------------------------------------------- ---------- Subtotal: [format 10.2f][subTotal][/format] Shipping: [format 10.2f][shipTotal][/format] Tax: [format 10.2f][taxTotal][/format] Grand Total: [format 10.2f][grandTotal][/format][/unurl][/sendmail] [SendMail to=[email]&from=info&scenicsigns.com Errors-To=lori@alphawd.com&subject=Order#[cart]] Thank you for your order! We received your order and we are now processing it. If you have any questions, please contact us via email at info@scenicsigns.com or Call us at 1-800-388-4811. Money order and Certified Check orders please wait for e-mail conformation before sending your payment. Please send payment to: Scenic Signs - 2803 Emery Drive - Wausau, WI 54401-9709Bill To:[name] [address1] [address2] [city],[state] [zip]

Country: [country] Payment Type: [PaymentType] Account: [GetChars start=1&end=2][AccountNum][/GetChars]...[GetChars start=1&end=4&from=end][AccountNum][/GetChars](Credit Card purposely not shown because this email is not encrypted) Ship To:[ShipToname] [ShipToaddress1] [ShipToaddress2] [ShipTocity],[ShipTostate] [ShipTozip] [ShipTocountry] Product Code Title Qty Price -------------------- ---------------------------------------- --- ---------- [lineitems][format 20s][sku][/format] [format 40s][Description][/format] [format 3s][quantity][/format] [format 10.2f][price][/format] [/lineItems] ----------------------------------------------------------------- ---------- Subtotal: [format 10.2f][subTotal][/format] Shipping: [format 10.2f][shipTotal][/format] Tax: [format 10.2f][taxTotal][/format] Grand Total: [format 10.2f][grandTotal][/format][/sendmail] [SetHeader cart=[cart]&db=scenicsigns.db] CartIPAddress=[ipaddress]&taxRate=[lookup db=TaxRates.db&lookInField=State&value=[Shiptostate]&returnField=taxRate¬ Found=0]&shipTotal=[shipping] [/SetHeader] ------------------------------------------------------------- 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 jpeacock@univpress.com

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:

Email Formatting and Encryption (1998) Webcat no longer supported? (2006) really wierd date stuff on NT (1997) empty shopping cart message (1997) Associative lookup style? + bit more (1997) Missing Cart Information (2003) searching for items that begin with a number (2004) Search Engines (2002) Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997) Re:Running 2 two WebCatalog.acgi's (1996) MacAuthorize order data fields WAS:How To question... (1997) instant cookies? (1999) RAM variables (1997) Checking two required fields (1998) process SSI (1998) Error Log.db --however (1997) Text limits in NT version? (1997) can WC render sites out? (1997) Am I going senile? (Price recalc based on quantity) (1997) Multi-processor Mac info ... (1997)