Re: Changing SubTotal

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 54046
interpreted = N
texte = Hi Alan, you are on the right track. check out: http://webdna.smithmicro.com/ref/pages.html?context=PurchaseCommand.html (you cannot override SubTotal directly (as it is a calculated value). Donovan P.S., you might need the password for price changes??? can't remember off the top of my head. Donovan Alan White wrote: > Hi Folks > > I was wondering if someone might be able to give advise on some code I have > done to try and get a discount voucher working. > > On my billing page I ask the user to add a voucher number of they have one > and then on my invoice page I have used the following code :- > > [!] -- Where HEADER39 is the enteredDiscountNumber -- [/!] > > [text]voucherNo=1234567[/text] > [showif [HEADER39]=[voucherNo]] > [text]discountSubTotal=[math][subTotal]-(([subTotal]/100)*40)[/math][/text] > [setheader cart=[cart]]subTotal=[discountSubTotal][/setlineitem][/setheader] > > [!] -- To test discountSubTotal -- [/!] > discount Subtotal should be [discountSubTotal] > [/showif] > > [!] -- End Discount -- [/!] > > The correct discount is being calculated but I am getting lost as to > changing the subTotal to my new value. > > Hope someone can help... > > Alan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Changing SubTotal ( John Peacock 2003)
  2. Re: Changing SubTotal ( Alan White 2003)
  3. Re: Changing SubTotal ( John Peacock 2003)
  4. Re: Changing SubTotal ( Alan White 2003)
  5. Re: Changing SubTotal ( Donovan Brooke 2003)
  6. Re: Changing SubTotal ( Alan White 2003)
  7. Re: Changing SubTotal ( Alan White 2003)
  8. Re: Changing SubTotal ( Alan White 2003)
  9. Re: Changing SubTotal ( John Peacock 2003)
  10. Re: Changing SubTotal ( Donovan Brooke 2003)
  11. Changing SubTotal ( Alan White 2003)
Hi Alan, you are on the right track. check out: http://webdna.smithmicro.com/ref/pages.html?context=PurchaseCommand.html (you cannot override SubTotal directly (as it is a calculated value). Donovan P.S., you might need the password for price changes??? can't remember off the top of my head. Donovan Alan White wrote: > Hi Folks > > I was wondering if someone might be able to give advise on some code I have > done to try and get a discount voucher working. > > On my billing page I ask the user to add a voucher number of they have one > and then on my invoice page I have used the following code :- > > [!] -- Where HEADER39 is the enteredDiscountNumber -- [/!] > > [text]voucherNo=1234567[/text] > [showif [HEADER39]=[voucherNo]] > [text]discountSubTotal=[math][subTotal]-(([subTotal]/100)*40)[/math][/text] > [setheader cart=[cart]]subTotal=[discountSubTotal][/setlineitem][/setheader] > > [!] -- To test discountSubTotal -- [/!] > discount Subtotal should be [discountSubTotal] > [/showif] > > [!] -- End Discount -- [/!] > > The correct discount is being calculated but I am getting lost as to > changing the subTotal to my new value. > > Hope someone can help... > > Alan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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://webdna.smithmicro.com/ Donovan Brooke

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:

Generating Report Totals (1997) [date] insanity! (2001) [WebDNA] some tests (2011) Rotating photo gallery (2004) Pithy questions on webcommerce & siteedit (1997) No Access warning when caching HTML files (1997) TCP Connect (2003) Old & New? (2003) Fwd: FW: Purchase Command error (1997) [/application] error? (1997) b12 cannot limit records returned and more. (1997) Reindexing a db with duplicate numbers... (1999) a new bug? (1999) test don't read (1998) [WebDNA] xmlparse of POST (2014) webcat/chat/javascript/IE on windows only problem - long,code included - nevermind (2002) encryption madness (2003) Date Question (2002) Browser Info.txt -- newest additions? (1997) Date Search Problem (1999)