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:

WebCat2b15MacPlugin - showing [math] (1997) links to .db's ? (1999) Sort Order on a page search (1997) writing db to disk (1997) Multiple Passwords (1997) Template Not Found (1998) os 8.5 (1999) PIXO support (1997) [SearchString] usage (1997) AOL and webcat (1998) Uninstall error (2003) Re1000001: Setting up shop (1997) If Empty ? (1997) Setting up the server (1997) Attn: Bug in GeneralStore example b15 (1997) Date problems-more (1997) Authenticate (2000) [click][/click] (1999) [group] ? (1997) Web requests in que... (2007)