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:

[OT] CSS and SSI books (2004) affiliate marketing program (1998) Urgent WebCatalog problem (2000) Database of Tax Rates? (1997) Country & Ship-to address & other fields ? (1997) Sample Tearoom Search Error (1997) OT: need bad code (2005) Progress !! WAS: Trouble with formula.db (1997) RE: File Uploads (Whoops) (1998) History of beta changes? (1999) Setting up shop (1997) [WebDNA] tcp connect is slow...any ways to speed it up? (2008) CMS - Formatting Content (2004) Removing Space Characters (1999) How can I record purchases to a database? (1998) Spawn problem (2000) Sorting error (1997) Snake Bites (1997) Help! WebCat2 bug (1997) OT - help.. (2003)