Re: buy 2 items get this free
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48865
interpreted = N
texte = Jimi Sweet wrote:> My client wants to offer a free thing when someone buys 2 or more > other things. It doesn't need to show up as a line item, but is there > an elegant way to do this? i was thinking...> > [showif [number_of_items_in_cart]>1]You get this free thing![/showif]> > ...but is there a way to calculate [number_of_items_in_cart]?> By number of things do you mean units or lineitems (2 Chicklets[tm] vs 1 Wankel Rotary Engine and 1 can of SPAM). If it is two lineitems, you can use the suprisingly-named [NumLineItems] context. If it is units of anything, you'll have to use a [lineitems] loop and add the units up yourself.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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:
Jimi Sweet wrote:> My client wants to offer a free thing when someone buys 2 or more > other things. It doesn't need to show up as a line item, but is there > an elegant way to do this? i was thinking...> > [showif [number_of_items_in_cart]>1]You get this free thing![/showif]> > ...but is there a way to calculate [number_of_items_in_cart]?> By number of things do you mean units or lineitems (2 Chicklets[tm] vs 1 Wankel Rotary Engine and 1 can of SPAM). If it is two lineitems, you can use the suprisingly-named [NumLineItems] context. If it is units of anything, you'll have to use a [lineitems] loop and add the units up yourself.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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/
John Peacock
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:
[include] error message (was:how to put/keep product customization info in basket?) (1998)
Sorting by date (1997)
HTML encoding in URLs (1997)
[OT] Deploying XRAID (2003)
Email within tmpl ? (1997)
Protecting Realms (1998)
Archive (Zip, Sit, Tgz) (2004)
WebTen and WebCat (1997)
Need relative path explanation (1997)
EIMS & emailer conflicts? (1999)
Mac v. NT (1998)
Reversed words (1997)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)
Solve the Problem, get the code! (2001)
[WebDNA] Searching Possible Bug (2009)
Formatting time output (2000)
[WebDNA] WebDNA Newbie Questions (2008)
Nested tags count question (1997)
Locking up with WebCatalog... (1997)
[SameAsShipping] (2005)