Re: buy 2 items get this free

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 48862
interpreted = N
texte = Charles Kline wrote:> Sure there is: > [math]itemcount=0[/math] > [lineitems] > [math]itemcount=itemcount+1[/math] > [/lineitems]It's perhaps a bit more complicated than this if you take into account quantity as number of lineitems. [!]noli = number of line items [/!][text]noli=0[/text] [lineitems] [text]noli=[math][quantity]+[noli][/math][/text] [/lineitems]Jimi, I would add a product to the database with a SKU called free_thingy (or whatever). Price this free thingy as 0.00. Then you have it as a lineitem but you don't get charged for it.When the code above results in 2 or more, add that product. [showif [noli]>1] [addlineitem blah free_thingy] [/showif]If you do it this way will have to have an include code on every page that isn't before the invoice or (no return) page that takes out the free thingy in the case that the cart is edited back to one.[removelineitem blah free_thingy]g.luck, Donovan> > > You have [itemcount] in your cart! [if [itemcount]>1][then]Whoopee you > get a free thingy.[/then][/if] > > On Monday, March 24, 2003, at 12:14 PM, Jimi Sweet wrote: > >> ...but is there a way to calculate [number_of_items_in_cart]? > > > > ------------------------------------------------------------- > 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 -Administrator of IT / -Assc. Art Director -Creative Services -Epsen Hillmer Graphics-402.342.1169 X297 ------------------------------------------------------------- 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: buy 2 items get this free (John Peacock 2003)
  2. Re: buy 2 items get this free (Donovan 2003)
  3. Re: buy 2 items get this free (Clint Davis 2003)
  4. Re: buy 2 items get this free (Velma Kahn 2003)
  5. Re: buy 2 items get this free (Charles Kline 2003)
  6. buy 2 items get this free (Jimi Sweet 2003)
Charles Kline wrote:> Sure there is: > [math]itemcount=0[/math] > [lineitems] > [math]itemcount=itemcount+1[/math] > [/lineitems]It's perhaps a bit more complicated than this if you take into account quantity as number of lineitems. [!]noli = number of line items [/!][text]noli=0[/text] [lineitems] [text]noli=[math][quantity]+[noli][/math][/text] [/lineitems]Jimi, I would add a product to the database with a SKU called free_thingy (or whatever). Price this free thingy as 0.00. Then you have it as a lineitem but you don't get charged for it.When the code above results in 2 or more, add that product. [showif [noli]>1] [addlineitem blah free_thingy] [/showif]If you do it this way will have to have an include code on every page that isn't before the invoice or (no return) page that takes out the free thingy in the case that the cart is edited back to one.[removelineitem blah free_thingy]g.luck, Donovan> > > You have [itemcount] in your cart! [if [itemcount]>1][then]Whoopee you > get a free thingy.[/then][/if] > > On Monday, March 24, 2003, at 12:14 PM, Jimi Sweet wrote: > >> ...but is there a way to calculate [number_of_items_in_cart]? > > > > ------------------------------------------------------------- > 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 -Administrator of IT / -Assc. Art Director -Creative Services -Epsen Hillmer Graphics-402.342.1169 X297 ------------------------------------------------------------- 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

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:

Removing [showif] makes a big difference in speed (1997) Socks Proxy Error (1999) NTbeta18 corrupted? (1997) tcpconnect (1999) Multiple catalog databases and showcart (1997) [TaxableTotal] - not working with AOL and IE (1997) is your webDNA site 'froogle' ready ??? (2003) username = 115 (1999) syntax question, not in online refernce (1997) Error Lob.db records error message not name (1997) WebCatalog dying in WebTen Revisited (1998) Cart Question (1998) Explorer 3.0/ Access Denied! (1997) converting tabs (1997) Netscape v. IE (1997) Configuring E-mail (1997) PCS Frames-Default page is solution! (1997) Signal Raised Error (1997) Code database (1998) Cookies? (1997)