Re: Change Subtotal

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 36473
interpreted = N
texte = Here is the code in the formulas db:Name Formula price [showif [sku]=1][math]-[subtotal]*.50[/math][/showif][showif [sku]=2][math]-[subtotal]*.55[/math][/showif][showif [sku]!1][showif [sku]!2][lookup db=goodtimes/goodtimes.db&lookInField=sku&value=[sku]&returnField=price][/sh owif][/showif] taxrate [lookup db=TaxRates.db&lookInField=State&value=Other&returnField=taxRate¬Found=5. 00] shipCost [lookup db=ShipCosts.db&lookInField=ShipMethod&value=[shipVia]&returnField=ShipCost] unitShipCost [lookup db=goodtimes/goodtimes.db&lookInField=sku&value=[sku]&returnField=unitShipCo st] Here is the code in the invoice page that adds the lineitem for the discount:[showif [subtotal]<299]No Discount has been offered[/showif] [showif [subtotal]>298][showif [subtotal]<500]50% OFF $[math]tempsubtotal=[subtotal]*.50[/math][AddLineItem cart=[cart]&sku=1&db=goodtimes/goodtimes.db][/AddLineItem][/showif][/showif] [showif [subtotal]>499]55% OFF [math]tempsubtotal=[subtotal]*.55[/math][AddLineItem cart=[cart]&sku=2&price=[subtotal]&db=goodtimes/goodtimes.db][/AddLineItem][ /showif]Here is the code in the thank you page: [math show=f]OK=1[/math] [showif [__name]=][math show=f]OK=0[/math][/showif] [showif [__address]=][math show=f]OK=0[/math][/showif] [showif [__city]=][math show=f]OK=0[/math][/showif] [showif [__state]=][math show=f]OK=0[/math][/showif] [showif [__zip]=][math show=f]OK=0[/math][/showif] [showif [__phone]=][math show=f]OK=0[/math][/showif] [showif [math]OK[/math]=0] Please go back and enter all the information requested. [/showif] [showif [math]OK[/math]=1] [/showif] [showif [math]OK[/math]=1] [orderfile cart=[cart]] [SetHeader cart=[cart]]payMethod=[showif [useAC]=T]AC[/showif][hideif [useAC]=T]CC[/hideif]&[formvariables name=__&exact=F][getchars start=3][name][/getchars]=[url][value][/url]&[/formvariables][/SetHeader] [SetHeader cart=[cart]]shipVia=[url][__shipVia][/url]&ShipTostate=[url][__shipToState][ /url]&CartIPAddress=[ipAddress][/SetHeader] [lineItems] [lineindex] [quantity] [sku] [textA] $[price] $[math][quantity]*[price][/math] [/lineItems] Subtotal $[subTotal] Tax Rate: [taxRate] % Tax $[taxTotal] Shipping & Handling $[shipTotal] Grand Total $[grandTotal] ------------------------------------------------------------- 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:

    
  1. Re: Change Subtotal (Stephen Russo 2000)
  2. Re: Change Subtotal (Stephen Russo 2000)
  3. Re: Change Subtotal (Stephen Russo 2000)
  4. Re: Change Subtotal (Stephen Russo 2000)
  5. Re: Change Subtotal (John Butler 2000)
  6. Re: Change Subtotal (Stephen Russo 2000)
  7. Re: Change Subtotal (Peter Ostry 2000)
  8. Re: Change Subtotal (Peter Ostry 2000)
  9. Re: Change Subtotal (Peter Ostry 2000)
  10. Re: Change Subtotal (Stephen Russo 2000)
  11. Re: Change Subtotal (Stephen Russo 2000)
  12. Re: Change Subtotal (Stephen Russo 2000)
  13. Re: Change Subtotal (John Butler 2000)
  14. Re: Change Subtotal (Glenn Busbin 2000)
  15. Re: Change Subtotal (Stephen Russo 2000)
  16. Re: Change Subtotal (Stephen Russo 2000)
  17. Re: Change Subtotal (Glenn Busbin 2000)
  18. Re: Change Subtotal (Stephen Russo 2000)
  19. Re: Change Subtotal (Stephen Russo 2000)
  20. Re: Change Subtotal (John Butler 2000)
  21. Re: Change Subtotal (Glenn Busbin 2000)
  22. Re: Change Subtotal (Glenn Busbin 2000)
  23. Re: Change Subtotal (Glenn Busbin 2000)
  24. Re: Change Subtotal (Glenn Busbin 2000)
  25. Re: Change Subtotal (Stephen Russo 2000)
  26. Change Subtotal (Stephen Russo 2000)
  27. Re: Change Subtotal (Glenn Busbin 2000)
  28. Re: Change Subtotal (Glenn Busbin 2000)
Here is the code in the formulas db:Name Formula price [showif [sku]=1][math]-[subtotal]*.50[/math][/showif][showif [sku]=2][math]-[subtotal]*.55[/math][/showif][showif [sku]!1][showif [sku]!2][lookup db=goodtimes/goodtimes.db&lookInField=sku&value=[sku]&returnField=price][/sh owif][/showif] taxrate [lookup db=TaxRates.db&lookInField=State&value=Other&returnField=taxRate¬Found=5. 00] shipCost [lookup db=ShipCosts.db&lookInField=ShipMethod&value=[shipVia]&returnField=ShipCost] unitShipCost [lookup db=goodtimes/goodtimes.db&lookInField=sku&value=[sku]&returnField=unitShipCo st] Here is the code in the invoice page that adds the lineitem for the discount:[showif [subtotal]<299]No Discount has been offered[/showif] [showif [subtotal]>298][showif [subtotal]<500]50% OFF $[math]tempsubtotal=[subtotal]*.50[/math][AddLineItem cart=[cart]&sku=1&db=goodtimes/goodtimes.db][/AddLineItem][/showif][/showif] [showif [subtotal]>499]55% OFF [math]tempsubtotal=[subtotal]*.55[/math][AddLineItem cart=[cart]&sku=2&price=[subtotal]&db=goodtimes/goodtimes.db][/AddLineItem][ /showif]Here is the code in the thank you page: [math show=f]OK=1[/math] [showif [__name]=][math show=f]OK=0[/math][/showif] [showif [__address]=][math show=f]OK=0[/math][/showif] [showif [__city]=][math show=f]OK=0[/math][/showif] [showif [__state]=][math show=f]OK=0[/math][/showif] [showif [__zip]=][math show=f]OK=0[/math][/showif] [showif [__phone]=][math show=f]OK=0[/math][/showif] [showif [math]OK[/math]=0] Please go back and enter all the information requested. [/showif] [showif [math]OK[/math]=1] [/showif] [showif [math]OK[/math]=1] [orderfile cart=[cart]] [SetHeader cart=[cart]]payMethod=[showif [useAC]=T]AC[/showif][hideif [useAC]=T]CC[/hideif]&[formvariables name=__&exact=F][getchars start=3][name][/getchars]=[url][value][/url]&[/formvariables][/SetHeader] [SetHeader cart=[cart]]shipVia=[url][__shipVia][/url]&ShipTostate=[url][__shipToState][ /url]&CartIPAddress=[ipaddress][/SetHeader] [lineitems] [lineindex] [quantity] [sku] [textA] $[price] $[math][quantity]*[price][/math] [/lineItems] Subtotal $[subTotal] Tax Rate: [taxRate] % Tax $[taxTotal] Shipping & Handling $[shipTotal] Grand Total $[grandTotal] ------------------------------------------------------------- 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/ Stephen Russo

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:

[WebDNA] [convertchars] and ascii problem (2010) 'page impression' techniques for banner ads (1999) Is [thisurl] http or https? (1998) WebDNA - fun to compare (2005) Bad suffix error (1997) Wanted: Broader string manipulation functions (1997) Database Updates (1997) Authenticate (1997) Alternating BGColors in Table Rows (1998) ShowNext (1997) Double Spacing in Mails from Sendmail (2002) Nested vs conditional (1997) WebCatalog NT (1996) WC 2.0 frames feature (1997) WebCat2b15MacPlugin - showing [math] (1997) WebCat2.0 [format thousands .0f] no go (1997) showcart is slow (1998) problems with 2 tags (1997) [SearchString] usage (1997) .html to .tpl; ***TIP (1998)