Re: Thanks and new Question on lineitems

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43644
interpreted = N
texte = Before you use your [addlineitem] context, you will need to loop through the lineitems and determine if that item is already in the cart. An easy method to this is to use a text variable and a show if....Say you are passing the variable ?item=123 into your page that does the [addlineitem]...[orderfile cart=[cart]] [lineitems] [showif [sku]=[item]] [text]itemInCart=T[/text] [/lineitems] [/orderfile][hideif [itemInCart]=T] [addlineitem db=yourdatabase.db&sku=[item]&cart=[cart]]...(your other parameters)...[/addlineitem] [/hideif]Paul Berman wrote:> Thanks Robert, sorry for not giving the correct info in the first place. > > One more thing > > Is it possible to remove duplicates so only one of each item can be added to > the cart and if the user adds another its either ignored or removed. > > I havent given the option of quantity deliberately but you can still add the > same item twice and I need to stop this > > Many thanks > Paul > ----- Original Message ----- > From: Robert Wade > To: WebCatalog Talk > Sent: Friday, September 20, 2002 6:57 PM > Subject: Re: Showing formatted results in tables > > > Your original post said The results of a search. I wasn't aware you > were listing > > lineitems. You would need to use [lineindex] rather than [index]. > [index] is not > > a parameter of [lineitems]. > > > > Paul Berman wrote: > > > > > Hi > > > > > > [showif [index]\2][/showif] isnt working > > > > > > I am listing the[orderfile] [lineitems] > > > and I need them in pairs thsi doesnt seem to work inside these tags > > > > > > Just keep getting new rows > > > > > > Which tag or variable can I use inside this > > > > > > Thanks > > > paul > > > > > > ----- Original Message ----- > > > From: Robert Wade > > > To: WebCatalog Talk > > > Sent: Friday, September 20, 2002 6:34 PM > > > Subject: Re: Showing formatted results in tables > > > > > > > > > > > > > > > [founditems] > > > > > > > > > > > > > > > > [showif [index]\2][/showif] > > > > > > > > [/founditems] > > > > > > > >
[your stuff here]
> > > > > > > > Try this. This will simply add a closing row tag and start a new one > of > > > the index > > > > of the founditem in the loop is divisible by 2. I think it's correct, > I > > > wrote it > > > > out pretty quick. > > > > > > > > -Robert > > > > > > > > Paul Berman wrote: > > > > > > > > > Hi > > > > > > > > > > I need to show the results of a search in a table that is two rows > wide > > > with > > > > > one result per cell and then produce the next table row. > > > > > > > > > > I either get them all in one row or one column > > > > > > > > > > I know its someting simple but its friday > > > > > > > > > > Thanks > > > > > > > > > > ------------------------------------------------------------- > > > > > 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/ > > > > ------------------------------------------------------------- > 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: Thanks and new Question on lineitems (NovaDerm Skincare Science 2002)
  2. Re: Thanks and new Question on lineitems (Paul Berman 2002)
  3. Re: Thanks and new Question on lineitems (NovaDerm Skincare Science 2002)
  4. Re: Thanks and new Question on lineitems (Paul 2002)
  5. Re: Thanks and new Question on lineitems (Daryl Mitchell 2002)
  6. Re: Thanks and new Question on lineitems (Robert Wade 2002)
  7. Re: Thanks and new Question on lineitems (Paul Berman 2002)
Before you use your [addlineitem] context, you will need to loop through the lineitems and determine if that item is already in the cart. An easy method to this is to use a text variable and a show if....Say you are passing the variable ?item=123 into your page that does the [addlineitem]...[orderfile cart=[cart]] [lineitems] [showif [sku]=[item]] [text]itemInCart=T[/text] [/lineitems] [/orderfile][hideif [itemInCart]=T] [addlineitem db=yourdatabase.db&sku=[item]&cart=[cart]]...(your other parameters)...[/addlineitem] [/hideif]Paul Berman wrote:> Thanks Robert, sorry for not giving the correct info in the first place. > > One more thing > > Is it possible to remove duplicates so only one of each item can be added to > the cart and if the user adds another its either ignored or removed. > > I havent given the option of quantity deliberately but you can still add the > same item twice and I need to stop this > > Many thanks > Paul > ----- Original Message ----- > From: Robert Wade > To: WebCatalog Talk > Sent: Friday, September 20, 2002 6:57 PM > Subject: Re: Showing formatted results in tables > > > Your original post said The results of a search. I wasn't aware you > were listing > > lineitems. You would need to use [lineindex] rather than [index]. > [index] is not > > a parameter of [lineitems]. > > > > Paul Berman wrote: > > > > > Hi > > > > > > [showif [index]\2][/showif] isnt working > > > > > > I am listing the[orderfile] [lineitems] > > > and I need them in pairs thsi doesnt seem to work inside these tags > > > > > > Just keep getting new rows > > > > > > Which tag or variable can I use inside this > > > > > > Thanks > > > paul > > > > > > ----- Original Message ----- > > > From: Robert Wade > > > To: WebCatalog Talk > > > Sent: Friday, September 20, 2002 6:34 PM > > > Subject: Re: Showing formatted results in tables > > > > > > > > > > > > > > > [founditems] > > > > > > > > > > > > > > > > [showif [index]\2][/showif] > > > > > > > > [/founditems] > > > > > > > >
[your stuff here]
> > > > > > > > Try this. This will simply add a closing row tag and start a new one > of > > > the index > > > > of the founditem in the loop is divisible by 2. I think it's correct, > I > > > wrote it > > > > out pretty quick. > > > > > > > > -Robert > > > > > > > > Paul Berman wrote: > > > > > > > > > Hi > > > > > > > > > > I need to show the results of a search in a table that is two rows > wide > > > with > > > > > one result per cell and then produce the next table row. > > > > > > > > > > I either get them all in one row or one column > > > > > > > > > > I know its someting simple but its friday > > > > > > > > > > Thanks > > > > > > > > > > ------------------------------------------------------------- > > > > > 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/ > > > > ------------------------------------------------------------- > 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/ Robert Wade

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-JS why it does not run on Mac (solution) (2001) Extra equals signs with IE? (More debugging questions...) (1997) Redirect / errorfiles and netscape (2001) Setting up shop (1997) [LOOKUP] (1997) Roundup (2001) Browsername (1998) multiple search of same field (1999) [OT] International CC processing (2000) [offtopic]P1: How to make webcatalog more stable. - LONG (1999) 'bot Q (2000) WebCatalog can't find database (1997) FEA REQ: One .hdr, multiple .db's (2003) Re:Listfiles (1998) this works sometimes and sometimes not (1997) More DateMath problems (1997) database size? (1997) Configuring E-mail (1997) New Cart No. on same page (2003) Moment of Thanks (1997)