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:

group searching problem (2002) WebDNA deletes major DB data big time (2004) Help! WebCat2 bug (Ben's input) (1997) japanese characters (1997) Setting up shop (1997) Bad creator codes which cause access denied error message (1997) Range in [showif] (2000) Re:Signal Raised (1997) WebCatalog for Postcards ? (1997) related data (2003) A little syntax help (1997) Graphic Design Freelancer Looking for Work (2002) Thanks and Big News!!! (1997) Possible Hijacking from Globix (2002) MacAuthorize order data fields WAS:How To question... (1997) [WebDNA] jumping on the linux train (2011) Online reference (1997) WebCat2 - many [carts] on one template page? (1997) emailer settings and control questions (1997) (1998)