Re: small hairball -- stuck on [showif] for related db

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21150
interpreted = N
texte = Thanks,actually, it was a couple of things:1) that SEARCH context wasn't needed 2) should have been searching for eqSKUdata=[SKU]Works like a charm, now!Dale>OK, am feeling brain dead. Wonder if someone can offer some suggestions -- >either what I'm missing or better yet, a simpler way -- on the following... > >I have certain SKUs that a customer may customize. For these SKUs, I want >to send them to a separate page to provide the customization info (for now, >simple text field in a form). > >The problem I'm having is in using a [showif] so that the FORM sends the >customer to the customize page next instead of the shopping cart page. > >What makes this a small hairball (at least for me) is that the SKUs are >in a related db, not the catalog.db that's been searched up to this point. >So I want to do this... > >1) search the pricing.db to see if the SKU selected can be customized >([customized]=T) > >2) if the SKU can be customized, use [showif] so that the FORM action will >send the shopper to the Customize.tmpl next > > >I've tried surrounding the [showif] with a SEARCH context, but am missing >something. Here's what I have so far: > >
db=pricing.db&eqItemdata=[item]][founditems][showif >[customize]=T]GiftCustomize.tmpl[/showif][/founditems][/search][hideif >[customize]=T]GiftCart.tmpl$add[/hideif]> > > > >Here's the surrounding snippet; you can see that trying this Search is >inside of another Search..... > >[SEARCH db=pricing.db&eqItemdatarq=[Item]&SKUsort=1&SKUsortdir=as] >[foundItems] >db=pricing.db&eqItemdatarq=[item]][founditems][showif >[customize]=T]GiftCustomize.tmpl[/showif][/founditems][/search][hideif >[customize]=T]GiftCart.tmpl$add[/hideif]> > > > > > > > > > >[SKU] >[showif [SkuName]>0][SkuName][/showif] >[showif [ProdSizes]>0][ProdSizes][/showif] >[showif [Colors]>0][Colors][/showif] >$[Price] >[showif [SRP]>0]$[SRP][/showif] >[showif [SRP]>0][Format >.1f][math](([SRP]-[price])/[SRP])*100[/math][/format]%[/showif] >BORDER=0 WIDTH=19 HEIGHT=16> >
> >[/FoundItems] >[/SEARCH] > > >Any thoughts on how to remove this hairball before the weekend greatly >appreciated! > >Dale Stokdyk >dstokdyk@dvs.mv.com Associated Messages, from the most recent to the oldest:

    
  1. Re: small hairball -- stuck on [showif] for related db (Dale Stokdyk 1998)
  2. Re: small hairball -- stuck on [showif] for related db (PCS Technical Support 1998)
  3. small hairball -- stuck on [showif] for related db (Dale Stokdyk 1998)
Thanks,actually, it was a couple of things:1) that SEARCH context wasn't needed 2) should have been searching for eqSKUdata=[SKU]Works like a charm, now!Dale>OK, am feeling brain dead. Wonder if someone can offer some suggestions -- >either what I'm missing or better yet, a simpler way -- on the following... > >I have certain SKUs that a customer may customize. For these SKUs, I want >to send them to a separate page to provide the customization info (for now, >simple text field in a form). > >The problem I'm having is in using a [showif] so that the FORM sends the >customer to the customize page next instead of the shopping cart page. > >What makes this a small hairball (at least for me) is that the SKUs are >in a related db, not the catalog.db that's been searched up to this point. >So I want to do this... > >1) search the pricing.db to see if the SKU selected can be customized >([customized]=T) > >2) if the SKU can be customized, use [showif] so that the FORM action will >send the shopper to the Customize.tmpl next > > >I've tried surrounding the [showif] with a SEARCH context, but am missing >something. Here's what I have so far: > >
db=pricing.db&eqItemdata=[item]][founditems][showif >[customize]=T]GiftCustomize.tmpl[/showif][/founditems][/search][hideif >[customize]=T]GiftCart.tmpl$add[/hideif]> > > > >Here's the surrounding snippet; you can see that trying this Search is >inside of another Search..... > >[SEARCH db=pricing.db&eqItemdatarq=[Item]&SKUsort=1&SKUsortdir=as] >[founditems] >db=pricing.db&eqItemdatarq=[item]][founditems][showif >[customize]=T]GiftCustomize.tmpl[/showif][/founditems][/search][hideif >[customize]=T]GiftCart.tmpl$add[/hideif]> > > > > > >[cart]> > > > >[SKU] >[showif [SkuName]>0][SkuName][/showif] >[showif [ProdSizes]>0][ProdSizes][/showif] >[showif [Colors]>0][Colors][/showif] >$[Price] >[showif [SRP]>0]$[SRP][/showif] >[showif [SRP]>0][Format >.1f][math](([SRP]-[price])/[SRP])*100[/math][/format]%[/showif] >BORDER=0 WIDTH=19 HEIGHT=16> >
> >[/FoundItems] >[/SEARCH] > > >Any thoughts on how to remove this hairball before the weekend greatly >appreciated! > >Dale Stokdyk >dstokdyk@dvs.mv.com Dale Stokdyk

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:

shipcost (1997) emailer error -108 (1997) Robust WebDNA Job Manager / Accountant (2006) Re:E-Mailer (WebCatb15acgiMac) (1997) Major OT shopping cart test request. (2002) [BULK] [WebDNA] [BULK] Console / WebDNA no connection to module (2011) Location of Browser Info.txt file (1997) Missing something simple? (1999) carriage returns in data (1997) WebCat (or other) Indexing (1999) security (1997) Searching multiple fields from one form field (1997) Webcatalog quitting (1997) Can you do this??? and other stuff (1997) Emailer (1997) WebCat b13 CGI -shownext- (1997) Number searching/formats (1998) Using Plug-In while running 1.6.1 (1997) NT Manual (1997) [random] only for 1-100??? (1997)