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 the specified line item from the specified shopping cart file. Alternately, you may use the Remove command. See also [AddLineItem] and Add. If the cart 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:

    
  1. Re: formula part 3 (John Butler 2000)
  2. Re: formula part 3 (Arturo Vargas 2000)
  3. Re: formula part 3 (John Butler 2000)
  4. formula part 3 (Arturo Vargas 2000)
from the docs:[REMOVELINEITEM cart=cartID&index=3] Putting [removelineitem] in your template immediately deletes the specified line item from the specified shopping cart file. Alternately, you may use the Remove command. See also [addlineitem] and Add. If the cart 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:

RE: Cart Template (1997) unusual search problem (1998) [WebDNA] Use of MySQL with WebDNA (2010) OT: MacAuthorize (2001) WebCatalog f2 Installation (1997) Unexpected comparison behavior change in 4.5.1 (2003) Emailer (1998) Some ThankYou page problems (1997) [format 40s]text[/format] doesn't work (1997) Clickable maps and WebCatalog? (1996) For Grant: Webcatalog 4.0 - When will we be able to beta testit? (2000) Re:no [search] with NT (1997) won't serve .tpl (2000) Running _every_ page through WebCat ? (1997) Specifying the URL where a user should go (2000) dates and hex formatting (1997) Authenticate (1999) WebCat2b12 CGI Mac - [shownext] problem (1997) sorting and grouping (1998) upgrading (1997)