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 = 55447
interpreted = N
texte = On 1/12/04 3:46 PM, "Donovan Brooke" wrote: > Clint Davis wrote: >=20 >> Can I use [SetLineItem] to change the price of the second book to 99=A2 if >> they have the proper promo code and no other 99=A2 item(s)? >=20 > Yes. >=20 > I don't have your products structure but lets say that the discount > applies to all products (books) of a certain category > (won't need this if it is for all products)... >=20 > So after code has been accepted... >=20 > [text]counter=3D0[/text] > [lineitems] > [showif [url][lookup db=3Dproducts.db[!] > [/!]&lookinfield=3DSKU&[!] > [/!]Value=3D[SKU][!] > [/!]&returnfield=3DCATEGORY][/url]=3D[url]BOOK[/url]] >=20 > [text]theindex=3D[lineindex][/text] > [text]counter=3D[math][counter]+1[/math][/text] > [/showif] > [/lineitems] >=20 > [!] This will only change the price of the last lineitem if number (of th= e > category) is greater than one [/!] > [showif [counter]>1] > [setlineitem=20 > cart=3D[cart]&index=3D[theindex]&db=3Dproducts.db]price=3D.99&password=3D= [/set > lineitem] > [/showif] Well, the more I ask the account executive about this, the more complex it gets. Here's the basic structure: 1. Lineitems with quantity greater than one are split into as many lineitem= s as the quantity. 2. Is there more than one lineitem? a. If there is, is there already a discounted item? i. If there is, check out. ii. If there isn't, is the promotion code correct? 1. If it is, change the price of the least expensive item to 99= =A2 and check out. 2. If it isn't, check out. b. If there isn't, is there already a discounted item? i. If there is, reset it's price by doing a [lookup]. ii. If there isn't, check out. ------------------------------------------------------------- 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: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
  2. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Donovan Brooke 2004)
  3. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
  4. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Donovan Brooke 2004)
  5. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
  6. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Donovan Brooke 2004)
  7. Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
On 1/12/04 3:46 PM, "Donovan Brooke" wrote: > Clint Davis wrote: >=20 >> Can I use [setlineitem] to change the price of the second book to 99=A2 if >> they have the proper promo code and no other 99=A2 item(s)? >=20 > Yes. >=20 > I don't have your products structure but lets say that the discount > applies to all products (books) of a certain category > (won't need this if it is for all products)... >=20 > So after code has been accepted... >=20 > [text]counter=3D0[/text] > [lineitems] > [showif [url][lookup db=3Dproducts.db[!] > [/!]&lookinfield=3DSKU&[!] > [/!]Value=3D[SKU][!] > [/!]&returnfield=3DCATEGORY][/url]=3D[url]BOOK[/url]] >=20 > [text]theindex=3D[lineindex][/text] > [text]counter=3D[math][counter]+1[/math][/text] > [/showif] > [/lineitems] >=20 > [!] This will only change the price of the last lineitem if number (of th= e > category) is greater than one [/!] > [showif [counter]>1] > [setlineitem=20 > cart=3D[cart]&index=3D[theindex]&db=3Dproducts.db]price=3D.99&password=3D= [/set > lineitem] > [/showif] Well, the more I ask the account executive about this, the more complex it gets. Here's the basic structure: 1. Lineitems with quantity greater than one are split into as many lineitem= s as the quantity. 2. Is there more than one lineitem? a. If there is, is there already a discounted item? i. If there is, check out. ii. If there isn't, is the promotion code correct? 1. If it is, change the price of the least expensive item to 99= =A2 and check out. 2. If it isn't, check out. b. If there isn't, is there already a discounted item? i. If there is, reset it's price by doing a [lookup]. ii. If there isn't, check out. ------------------------------------------------------------- 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/ Clint Davis

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:

page redirect in webDNA (1997) multipart (2004) Format of Required fields error message (1997) emailer error -108 (1997) [WebDNA] Nested Searches (2013) tracking no. of downloads (2006) Format question WC Mac f3 (1997) WCS Newbie question (1997) Re:Replace command help (1998) Duplicates (1998) WCS Newbie question (1997) Help name our technology! (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) WC2.0 Memory Requirements (1997) v6.x & [cart] (2004) mac hack (1997) Multiple Ad databases? (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) expired beta (1997) PIXO support (1997)