Re: Question on lineitems

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43680
interpreted = N
texte = I agree 100%I had used the code you sent me yesterday incorrectly so it wasnt workingHad a good sleep, clear head went though it and it works well.THanks you very much for your helpBest regards Paul-----Original Message----- From: NovaDerm Skincare Science To: (WebCatalog Talk) Date: Sat, 21 Sep 2002 13:24:37 Subject: Re: Question on lineitems> Wise man (me) once say: > > It is better to repair the the dam than try and stop the water once the > > dam has burst. > > I infinitely prefer the method of preventing them from adding more than > > one of each item to the cart to than letting them do it and then making > > them back track to undo what you should have prevented in the first > place! > > The code I gave you yesterday will do the former. Maybe you're > confusing my answer with someone else? > > Anyway, if you wish to do your way, you'll need to check the cart for > duplicates, and trigger a warning if there are dupes. Since the cart is > > stupid and has no way of knowing if a sku has already been added, > you're going to have to do some convoluted coding to catch the dupes: > > This code is on ShoppingCarts.tpl > > > > [formvariables name=checked&exact=false] > > [addlineitem cart=[cart]&db=catalog.db&sku=[getchars > start=8][name][/getchars]][/addlineitem] > > [/formvariables] > > > > [search db=catalog.db&neskudatarq=[blank]] > [founditems] > [math show=f]added[sku]=0[/math] > [math show=f]count[sku]=0[/math] > [/founditems] > [/search] > > > > > > > > > > > [orderfile] > > > > [lineitems] > > > [/lineitems] > > [/orderfile] > >
SkuTitlePrice
[sku] [lookup > db=catalog.db&value=[sku]&lookinfield=sku&returnfield=title] td>[price]
> > > > [orderfile] > [lineitems] > [math show=f]added[sku]=[interpret][added[sku]] [/interpret]+1[/math] > > > > > [showif [interpret][added[sku]][/interpret]>1] > > > http://www.novaderm.com/test/testadd/index.html > > Regards, > > Will > > > On Saturday, September 21, 2002, at 11:08 AM, Paul Berman wrote: > > > Hi > > > > I am using the idea you gave me yesterday, it works fine if I add a > > single > > item that is already in the orderfile but if I add two it adds them > > > > I am using > > > > > name=__[index] value=[url][SKU][/url]> > > to select the items to be added which works fine > > > > What is the variable that goes in here > > > > [orderfile] > > [lineItems] [showif [url][sku][/url]=[here!!]] > > [text]failed=T[/text] > > [/showif] > > [/lineItems][/orderfile] > > > > to set the failed=T > > > > I cant see where I have sceeewed up > > > > Thanks > > > > ----- Original Message ----- > > From: NovaDerm Skincare Science > > To: WebCatalog Talk > > Sent: Saturday, September 21, 2002 4:48 PM > > Subject: Re: Thanks and new Question on lineitems > > > > > >> Paul- > >> > >> Read my response from yesterday. It handles this exact problem. > >> > >> Go here and try your best to add duplicate items to the shopping > cart > >> --> > >> > >> http://www.novaderm.com > >> > >> > >> Will Starck > >> NovaDerm Skincare Science > >> http://www.novaderm.com > >> wjs@novaderm.com > >> > >> > >> On Saturday, September 21, 2002, at 05:32 AM, Paul Berman wrote: > >> > >>> Hi > >>> > >>> The problem I have with this is that the prodcut selection page > allow > >>> you to > >>> tick several tick boxes so you can add say 5 items at a time. > >>> > >>> > >>> > >>> 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/ > > > > > -- > > Will Starck > NovaDerm Skincare Science > http://www.novaderm.com > wjs@novaderm.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: Question on lineitems (Paul 2002)
  2. Re: Question on lineitems (NovaDerm Skincare Science 2002)
  3. Re: Question on lineitems (NovaDerm Skincare Science 2002)
  4. Re: Question on lineitems (NovaDerm Skincare Science 2002)
  5. Re: Question on lineitems (Paul Berman 2002)
  6. Re: Thanks and new Question on lineitems (NovaDerm Skincare Science 2002)
  7. Re: Thanks and new Question on lineitems (Paul Berman 2002)
  8. Re: Thanks and new Question on lineitems (NovaDerm Skincare Science 2002)
  9. Re: Thanks and new Question on lineitems (Paul 2002)
  10. Re: Thanks and new Question on lineitems (Daryl Mitchell 2002)
  11. Re: Thanks and new Question on lineitems (Robert Wade 2002)
  12. Re: Thanks and new Question on lineitems (Paul Berman 2002)
I agree 100%I had used the code you sent me yesterday incorrectly so it wasnt workingHad a good sleep, clear head went though it and it works well.THanks you very much for your helpBest regards Paul-----Original Message----- From: NovaDerm Skincare Science To: (WebCatalog Talk) Date: Sat, 21 Sep 2002 13:24:37 Subject: Re: Question on lineitems> Wise man (me) once say: > > It is better to repair the the dam than try and stop the water once the > > dam has burst. > > I infinitely prefer the method of preventing them from adding more than > > one of each item to the cart to than letting them do it and then making > > them back track to undo what you should have prevented in the first > place! > > The code I gave you yesterday will do the former. Maybe you're > confusing my answer with someone else? > > Anyway, if you wish to do your way, you'll need to check the cart for > duplicates, and trigger a warning if there are dupes. Since the cart is > > stupid and has no way of knowing if a sku has already been added, > you're going to have to do some convoluted coding to catch the dupes: > > This code is on ShoppingCarts.tpl > > > > [formvariables name=checked&exact=false] > > [addlineitem cart=[cart]&db=catalog.db&sku=[getchars > start=8][name][/getchars]][/addlineitem] > > [/formvariables] > > > > [search db=catalog.db&neskudatarq=[blank]] > [founditems] > [math show=f]added[sku]=0[/math] > [math show=f]count[sku]=0[/math] > [/founditems] > [/search] > > > > > > > > > > > [orderfile] > > > > [lineitems] > > > [/lineitems] > > [/orderfile] > >
SkuTitlePrice
[sku] [lookup > db=catalog.db&value=[sku]&lookinfield=sku&returnfield=title] td>[price]
> > > > [orderfile] > [lineitems] > [math show=f]added[sku]=[interpret][added[sku]] [/interpret]+1[/math] > > > > > [showif [interpret][added[sku]][/interpret]>1] > > > http://www.novaderm.com/test/testadd/index.html > > Regards, > > Will > > > On Saturday, September 21, 2002, at 11:08 AM, Paul Berman wrote: > > > Hi > > > > I am using the idea you gave me yesterday, it works fine if I add a > > single > > item that is already in the orderfile but if I add two it adds them > > > > I am using > > > > > name=__[index] value=[url][SKU][/url]> > > to select the items to be added which works fine > > > > What is the variable that goes in here > > > > [orderfile] > > [lineitems] [showif [url][sku][/url]=[here!!]] > > [text]failed=T[/text] > > [/showif] > > [/lineItems][/orderfile] > > > > to set the failed=T > > > > I cant see where I have sceeewed up > > > > Thanks > > > > ----- Original Message ----- > > From: NovaDerm Skincare Science > > To: WebCatalog Talk > > Sent: Saturday, September 21, 2002 4:48 PM > > Subject: Re: Thanks and new Question on lineitems > > > > > >> Paul- > >> > >> Read my response from yesterday. It handles this exact problem. > >> > >> Go here and try your best to add duplicate items to the shopping > cart > >> --> > >> > >> http://www.novaderm.com > >> > >> > >> Will Starck > >> NovaDerm Skincare Science > >> http://www.novaderm.com > >> wjs@novaderm.com > >> > >> > >> On Saturday, September 21, 2002, at 05:32 AM, Paul Berman wrote: > >> > >>> Hi > >>> > >>> The problem I have with this is that the prodcut selection page > allow > >>> you to > >>> tick several tick boxes so you can add say 5 items at a time. > >>> > >>> > >>> > >>> 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/ > > > > > -- > > Will Starck > NovaDerm Skincare Science > http://www.novaderm.com > wjs@novaderm.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/ Paul

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:

[WebDNA] email stops sending (2008) FYI: virus alert (1996) NT Manual (1997) [WebDNA] v7 Stress Test and Strange Behaviour (2012) Associative lookup style? (1997) Almost a there but..bye bye NetCloak (1997) Not really WebCat (1997) locking variables? (2000) [WebDNA] Calendar script (2009) WebCat2: Found Items syntax, etc. (1997) show all problem (1997) Help name our technology! I found it (1997) Flash Applications (2003) shipcost (1997) [numfound] in nested [search] (2000) What is WebDNA (1997) Web Catalog 2 demo (1997) WebCat for Unix?? (1997) webCatalog and Stocks (1998) ERROR in docs (2003)