Re: Thanks and new Question on lineitems

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43665
interpreted = N
texte = Well, here's how I do it - a little different approach. My order page has checkboxes as well. I search the entire catalog, and then add only those items that have been checked. No way for the user to select duplicate items that way:[search db=catalog.db&neskudata=[blank]&ascategorysort=1&astitlesort=2&eqinstock datarq=T] [founditems] [showif [interpret][checked[sku]][/interpret]=on] [hideif [orderfile ShoppingCarts/[GetCookie SessionID]][lineitems][sku][/lineitems][/orderfile]^[sku]] [addlineitem db=catalog.db&cart=[Getcookie SessionID]&sku=[sku]][/addlineitem] [/hideif] [/showif] [/founditems]Works like a charm. If you have trouble following the logic, let me know...Will Starck NovaDerm Skincare Science http://www.novaderm.com wjs@novaderm.comOn Friday, September 20, 2002, at 05:14 PM, Paul wrote:> Hi > > Will this work if the user selects several items at a time > > The system I have allows you to select several items from the same > category at the same time and adds them all to the cart at the same > time > so it just needs to omit the one or more duplicate items > > Thanks again > paul > > -----Original Message----- > From: Daryl Mitchell > To: (WebCatalog Talk) > Date: Fri, 20 Sep 2002 11:53:00 -0600 > Subject: Re: Thanks and new Question on lineitems > >> Something like this should work: >> >> [lineItems] >> [showif [url][sku][/url]=[url][item_sku_being_added][/url]] >> [text]failed=T[/text] >> [/showif] >> [/lineItems] >> [showif [failed]=T] >>

Sorry, you already have that item in your cart. Please choose a >> different item.

>> [/showif] >> [hideif [failed]=T] >> [addlineitem cart=[cart]&sku=[sku]&db=products.db]quantity=1& ... >> other parameters ...[/addlineitem] >>

Item added to the cart.

>> [/hideif] >> >>> 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 >> >> -- >> >> Daryl Mitchell >> E-Business Specialist, PW Group >> Saskatoon, SK CANADA >> Tel: (306) 665-3557 >> Toll-free: (800) 291-9935 >> Fax: (306) 653-1255 >> E-Mail: d.mitchell@pwgroup.ca >> Web: http://www.pwgroup.ca/ >> >> ------------------------------------------------------------- >> 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)
Well, here's how I do it - a little different approach. My order page has checkboxes as well. I search the entire catalog, and then add only those items that have been checked. No way for the user to select duplicate items that way:[search db=catalog.db&neskudata=[blank]&ascategorysort=1&astitlesort=2&eqinstock datarq=T] [founditems] [showif [interpret][checked[sku]][/interpret]=on] [hideif [orderfile ShoppingCarts/[GetCookie SessionID]][lineitems][sku][/lineitems][/orderfile]^[sku]] [addlineitem db=catalog.db&cart=[Getcookie SessionID]&sku=[sku]][/addlineitem] [/hideif] [/showif] [/founditems]Works like a charm. If you have trouble following the logic, let me know...Will Starck NovaDerm Skincare Science http://www.novaderm.com wjs@novaderm.comOn Friday, September 20, 2002, at 05:14 PM, Paul wrote:> Hi > > Will this work if the user selects several items at a time > > The system I have allows you to select several items from the same > category at the same time and adds them all to the cart at the same > time > so it just needs to omit the one or more duplicate items > > Thanks again > paul > > -----Original Message----- > From: Daryl Mitchell > To: (WebCatalog Talk) > Date: Fri, 20 Sep 2002 11:53:00 -0600 > Subject: Re: Thanks and new Question on lineitems > >> Something like this should work: >> >> [lineitems] >> [showif [url][sku][/url]=[url][item_sku_being_added][/url]] >> [text]failed=T[/text] >> [/showif] >> [/lineItems] >> [showif [failed]=T] >>

Sorry, you already have that item in your cart. Please choose a >> different item.

>> [/showif] >> [hideif [failed]=T] >> [addlineitem cart=[cart]&sku=[sku]&db=products.db]quantity=1& ... >> other parameters ...[/addlineitem] >>

Item added to the cart.

>> [/hideif] >> >>> 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 >> >> -- >> >> Daryl Mitchell >> E-Business Specialist, PW Group >> Saskatoon, SK CANADA >> Tel: (306) 665-3557 >> Toll-free: (800) 291-9935 >> Fax: (306) 653-1255 >> E-Mail: d.mitchell@pwgroup.ca >> Web: http://www.pwgroup.ca/ >> >> ------------------------------------------------------------- >> 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/ NovaDerm Skincare Science

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] Send results to more pages? (2011) Initiating NewCart (1997) [WebDNA] ONLY the FIRST continuous run of numeric chars? (2008) Running webcat 6 on Windows XP Prof. (2005) WebCatalog2 Feature Feedback (1996) search engine friendly URLS (Mac) and Lycos! (1998) Plugin or CGI or both (1997) email [title] (1997) Showif, Hideif reverse logic ? (1997) problems with 2 tags (1997) Need help with emailer- 2 issues (1997) So when do we get something similar? (1998) Memory leak with text variables (1998) Universal root for WC errors? (1997) Chat (2002) WebCatalog2 Feature Feedback (1996) Chatroom (2000) FlushDatabase Suggestion (1998) f2 download problems (1997) Calendar Solutions (1998)