Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?=
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 55446
interpreted = N
texte = Clint Davis wrote:> Can I use [SetLineItem] to change the price of the second book to 99¢ if> they have the proper promo code and no other 99¢ item(s)?Yes.I don't have your products structure but lets say that the discountapplies to all products (books) of a certain category(won't need this if it is for all products)...So after code has been accepted...[text]counter=0[/text][lineitems][showif [url][lookup db=products.db[!][/!]&lookinfield=SKU&[!][/!]Value=[SKU][!][/!]&returnfield=CATEGORY][/url]=[url]BOOK[/url]][text]theindex=[lineindex][/text][text]counter=[math][counter]+1[/math][/text][/showif][/lineitems][!] This will only change the price of the last lineitem if number (of the category) is greater than one [/!][showif [counter]>1][setlineitem cart=[cart]&index=[theindex]&db=products.db]price=.99&password=
[/setlineitem][/showif](wrote this fast so sorry if there is syntax issues)Donovan-- =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:
Clint Davis wrote:> Can I use [setlineitem] to change the price of the second book to 99¢ if> they have the proper promo code and no other 99¢ item(s)?Yes.I don't have your products structure but lets say that the discountapplies to all products (books) of a certain category(won't need this if it is for all products)...So after code has been accepted...[text]counter=0[/text][lineitems][showif [url][lookup db=products.db[!][/!]&lookinfield=SKU&[!][/!]Value=[SKU][!][/!]&returnfield=CATEGORY][/url]=[url]BOOK[/url]][text]theindex=[lineindex][/text][text]counter=[math][counter]+1[/math][/text][/showif][/lineitems][!] This will only change the price of the last lineitem if number (of the category) is greater than one [/!][showif [counter]>1][setlineitem cart=[cart]&index=[theindex]&db=products.db]price=.99&password=[/setlineitem][/showif](wrote this fast so sorry if there is syntax issues)Donovan-- =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:
Virus Alert: FBI Finds 911 Virus Wiping Out Hard Drives Today (2000)
WebCat2 - Getting to the browser's username/password data (1997)
Two submit buttons ? (1997)
Summ=T Problem (1997)
Shopping Cart variation... (1997)
Table Loop Hoops (2000)
tcpconnect/tcpsend problem ... (2004)
What happened to the archives? (1999)
Hosting Services (1999)
[SHOWIF] (1997)
[checkboxes] and webcat (2000)
[WriteFile] problems (1997)
Bad Cookie / Internet Option / Internet Explorer (2004)
Re:Copyright ? (1997)
Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997)
Webcat/Webmerchant part II (1998)
What file? (1997)
Writing [raw] to a file (2000)
db access problem after switching to SSL (2001)
WebCat2b13MacPlugIn - [include] (1997)