Addlineitems ... grrr
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59688
interpreted = N
texte = Ok, I need assistance.I am checking a database to see if I should remove a dollar amount or a percentage from an items price. I set a "newdiscount" variable to use in the addlineitem.1. The math is working. If I display [newdiscount] the value is fine.2. If I break the AddLineItem and display it on screen the only difference is that the DOLLAR one if 5 and the PERCENTAGE one is 3.3. The DOLLAR style works perfectly. The PERCENTAGE does not.WHY? Code follows![showif [style]=percentage] [text]newdiscount=[math][amount]*.[showif [countchars][discount][/countchars]=1]0[/showif][discount][/math][/text][/showif][showif [style]=dollar] [text]newdiscount=[discount][/text][/showif][AddLineItem cart=[cart]&sku=[coupon_code]&db=admin/coupons.db]SKU=[coupon_code]&price=-[newdiscount]&password=[lookup db=WebCatalog Prefs&lookinfield=preference&value=LineItemChangePassword&returnfield=value][/AddLineItem] -------------------------------------------------------------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:
Ok, I need assistance.I am checking a database to see if I should remove a dollar amount or a percentage from an items price. I set a "newdiscount" variable to use in the addlineitem.1. The math is working. If I display [newdiscount] the value is fine.2. If I break the AddLineItem and display it on screen the only difference is that the DOLLAR one if 5 and the PERCENTAGE one is 3.3. The DOLLAR style works perfectly. The PERCENTAGE does not.WHY? Code follows![showif [style]=percentage] [text]newdiscount=[math][amount]*.[showif [countchars][discount][/countchars]=1]0[/showif][discount][/math][/text][/showif][showif [style]=dollar] [text]newdiscount=[discount][/text][/showif][AddLineItem cart=[cart]&sku=[coupon_code]&db=admin/coupons.db]SKU=[coupon_code]&price=-[newdiscount]&password=[lookup db=WebCatalog Prefs&lookinfield=preference&value=LineItemChangePassword&returnfield=value][/AddLineItem] -------------------------------------------------------------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/
"WebDna @ Inkblot Media"
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:
MISTAKE in last post: Adding multiple items to Cart (1999)
need e-commerce recommendation (2004)
Practice runs ? (1997)
rename a file (1997)
[WebDNA] HMAC-SHA1 Encryption (2013)
HELP WITH DATES (1997)
rotating thumbnails (1997)
HELP WITH DATES (1997)
HTML text cannot be copied to clipboard? (1999)
Date+time (2004)
Download Question (1997)
Why do extra quotation marks sometimes appear in my databases? (1998)
database size? (1997)
Fax Broadcast (1998)
[WebDNA] 6.2 Monitor (2012)
WebTen and WebCat (1997)
how do we turn off staticpages page creation? (2003)
WebCatalog can't find database (1997)
.db-tmp (2000)
Support ?? (1997)