Re: formula part 3
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34872
interpreted = N
texte = from the docs:[REMOVELINEITEM cart=cartID&index=3] Putting [REMOVELINEITEM] in your template immediately deletes thespecified line item from the specified shopping cart file. Alternately, you may use the Remove command. See also [AddLineItem] and Add. If thecart file is not in a ShoppingCarts folder, you may use the alternate form file=/folder/cartID instead of cart=cartID.Your syntax omitted an index #-JohnArturo Vargas wrote:> I have this working> in invoice.tpl if Quantity>3 then discount2 gets added from the catalog.txt> my code is as follows:> [showif [Quantity]>3][AddLineItem> cart=[cart]&db=catalog.txt&sku=Discount2]quantity=1[/addlineitem][/showif]>> but when some one goes back from the invoice to the shopping cart and back> to the invoice I have discount2 twice.>> So I added this code to the shopping cart:> [lineitems][removelineitem> cart=[cart]&db=catalog.txt&SKU=Discount2][/lineitems]> but it is not working I still keep getting more discounts everytime I go to> the invoice.tpl.>> Can some one help?>> Arturo Vargas> The World Wide Web Store>> -----Original Message-----> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On> Behalf Of John Butler> Sent: Tuesday, July 18, 2000 6:05 PM> To: WebCatalog Talk> Subject: Re: formula part 3>> not that I know of. probably the author of that code you found was passing> in a value> for that var (or generating it locally via [lineitems] in conjunction with> [text] or> [math])>> Arturo Vargas wrote:>> > Ok I know I ask lots of questions!! :)> >> > I am trying to have a customer buy 3 items and get the 4th one free. This> is> > what I have done so far> >> > In the invoice.tpl I added this code that I found in another existing page> > that does what I need.> > [showif [totalQty]>3][AddLineItem> > cart=[cart]&db=catalog.txt&sku=Discount2]quantity=1[/addlineitem][/showif]> >> > Discount2 is a product that exists on my db, the price of discount2> > is -19.95> >> > This is not working> >> > It adds the discount2 product no matter the quantity is.> >> > Any Suggetions??> > and is [totalQty] a tag ?? if so where is it I can't find it.> >> > Arturo Vargas> > The World Wide Web Store> >> > -------------------------------------------------------------> > 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://search.smithmicro.com/>> -------------------------------------------------------------> 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://search.smithmicro.com/>> -------------------------------------------------------------> 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://search.smithmicro.com/-------------------------------------------------------------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://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
from the docs:[REMOVELINEITEM cart=cartID&index=3] Putting [removelineitem] in your template immediately deletes thespecified line item from the specified shopping cart file. Alternately, you may use the Remove command. See also [addlineitem] and Add. If thecart file is not in a ShoppingCarts folder, you may use the alternate form file=/folder/cartID instead of cart=cartID.Your syntax omitted an index #-JohnArturo Vargas wrote:> I have this working> in invoice.tpl if Quantity>3 then discount2 gets added from the catalog.txt> my code is as follows:> [showif [Quantity]>3][AddLineItem> cart=[cart]&db=catalog.txt&sku=Discount2]quantity=1[/addlineitem][/showif]>> but when some one goes back from the invoice to the shopping cart and back> to the invoice I have discount2 twice.>> So I added this code to the shopping cart:> [lineitems][removelineitem> cart=[cart]&db=catalog.txt&SKU=Discount2][/lineitems]> but it is not working I still keep getting more discounts everytime I go to> the invoice.tpl.>> Can some one help?>> Arturo Vargas> The World Wide Web Store>> -----Original Message-----> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On> Behalf Of John Butler> Sent: Tuesday, July 18, 2000 6:05 PM> To: WebCatalog Talk> Subject: Re: formula part 3>> not that I know of. probably the author of that code you found was passing> in a value> for that var (or generating it locally via [lineitems] in conjunction with> [text] or> [math])>> Arturo Vargas wrote:>> > Ok I know I ask lots of questions!! :)> >> > I am trying to have a customer buy 3 items and get the 4th one free. This> is> > what I have done so far> >> > In the invoice.tpl I added this code that I found in another existing page> > that does what I need.> > [showif [totalQty]>3][AddLineItem> > cart=[cart]&db=catalog.txt&sku=Discount2]quantity=1[/addlineitem][/showif]> >> > Discount2 is a product that exists on my db, the price of discount2> > is -19.95> >> > This is not working> >> > It adds the discount2 product no matter the quantity is.> >> > Any Suggetions??> > and is [totalQty] a tag ?? if so where is it I can't find it.> >> > Arturo Vargas> > The World Wide Web Store> >> > -------------------------------------------------------------> > 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://search.smithmicro.com/>> -------------------------------------------------------------> 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://search.smithmicro.com/>> -------------------------------------------------------------> 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://search.smithmicro.com/-------------------------------------------------------------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://search.smithmicro.com/
John Butler
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:
Improper naming convections? (2004)
Stopping bad HTML propagation ? (1997)
WebCat2b12plugin - [search] is broken ... not! (1997)
Grep not working, shows [grep] in browser (2000)
Fun with Dates - revisited (1997)
[Sum] function? (1997)
Max Record length restated as maybe bug (1997)
Multiple Merchant Accounts? (1997)
remotely add + sign (1997)
Date or time comparisons have bugs ... (1998)
suggestions needed for shipping cost solution (1999)
Help! WebCat2 bug (Ben's input) (1997)
Re:Emailer tracking (1997)
New Plug-in and Type 11 errors (1997)
bug ? causes NT event log to fill (1997)
[format 40s]text[/format] doesn't work (1997)
Closing Databases (1998)
Adding muliple sku + quantities (1999)
Quit revisited (1997)
Carts & cookies (1999)