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 thisfree 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 invoiceor (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:
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 thisfree 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 invoiceor (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:
Re:E-Mailer (WebCatb15acgiMac) (1997)
Setting up WebCatalog with Retail Pro data (1996)
The IBC root beer has arrived! (1997)
taxRate is fine but taxTotal isn't (1997)
Add htmlarea 3 to SiteBuilder (2004)
customers getting same cart (2004)
New user...how do I create URLs from form fields? (2000)
Download URL & access on the fly ? (1997)
[input] [/input] (1997)
[cart] not being interpreted inside [founditems] (1997)
'does not contain' operator needed ... (1997)
[writefile] (1997)
Encrypt Users.db problem (1998)
WC 2.0 frames feature (1997)
WebCat & WebTen (1997)
Multiple security dbs (1997)
Bug? (1997)
DDE feature in webcat (1998)
syntax question, not in online refernce (1997)
Problems with cybercash (2000)