Re: default image if image in code not available
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 46860
interpreted = N
texte = You might to want to reduce the number of disk hits by using something like this:[TEXT]vImage=generic.gif[/TEXT][showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] [TEXT]vImage=[sku].gif[/TEXT][/showif]

Or, even better, run a loop doing the check above once a day, or when new products are added and use a hasPicture field in your db.>Tim, your example will not work. Steve, needs to look for the image file,>not the sku in the database.>If there is no sku, then there is no product,,,, so why would you need a>photo anyway.>>Try this code:>>[showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T]>

>[/showif]>[hideif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T]>

>[/hideif]>>>Brian>>----- Original Message ----->From: Tim Robinson
>To: WebCatalog Talk >Sent: Monday, January 13, 2003 8:01 PM>Subject: Re: default image if image in code not available>>> > [showif [sku]=]
[/showif]> > [hideif [sku]=]
[/hideif]> >> >> > > From: steve chun > > > Reply-To: (WebCatalog Talk)> > > Date: Mon, 13 Jan 2003 19:41:46> > > To: (WebCatalog Talk)> > > Subject: default image if image in code not available> > >> > > Looking for suggestions for the following problem. Here is the code:> > >> > >> > >
> > >> > > What I would like to do is have Webcatalog look in a folder for the> > > image based on the sku and if there is no image by that sku, then> > > replace it with a default no image gif file.> > >> > > I thought of using listfile but there may be 2,000 images in the> > > folder and I'm worried about system performance.> > >> > > Only other alternative is to import pictures into Filemaker and do a> > > lookup to create the code for the exported database but that's a big> > > extra step.> > >> > >> > >> > > sc> > >> > >> > > -------------------------------------------------------------> > > 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://webdna.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://webdna.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://webdna.smithmicro.com/-- ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Idéer AB SE-200 39 Malmoe Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se-------------------------------------------------------------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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
You might to want to reduce the number of disk hits by using something like this:[text]vImage=generic.gif[/TEXT][showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] [text]vImage=[sku].gif[/TEXT][/showif]
Or, even better, run a loop doing the check above once a day, or when new products are added and use a hasPicture field in your db.>Tim, your example will not work. Steve, needs to look for the image file,>not the sku in the database.>If there is no sku, then there is no product,,,, so why would you need a>photo anyway.>>Try this code:>>[showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T]>
>[/showif]>[hideif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T]>
>[/hideif]>>>Brian>>----- Original Message ----->From: Tim Robinson >To: WebCatalog Talk >Sent: Monday, January 13, 2003 8:01 PM>Subject: Re: default image if image in code not available>>> > [showif [sku]=]
[/showif]> > [hideif [sku]=]
[/hideif]> >> >> > > From: steve chun > > > Reply-To: (WebCatalog Talk)> > > Date: Mon, 13 Jan 2003 19:41:46> > > To: (WebCatalog Talk)> > > Subject: default image if image in code not available> > >> > > Looking for suggestions for the following problem. Here is the code:> > >> > >> > >
> > >> > > What I would like to do is have Webcatalog look in a folder for the> > > image based on the sku and if there is no image by that sku, then> > > replace it with a default no image gif file.> > >> > > I thought of using listfile but there may be 2,000 images in the> > > folder and I'm worried about system performance.> > >> > > Only other alternative is to import pictures into Filemaker and do a> > > lookup to create the code for the exported database but that's a big> > > extra step.> > >> > >> > >> > > sc> > >> > >> > > -------------------------------------------------------------> > > 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://webdna.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://webdna.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://webdna.smithmicro.com/-- ************************************************************* Christer Olsson PO Box 9160 Phone +46 40 25 85 85 Ljusa Idéer AB SE-200 39 Malmoe Fax +46 40 25 85 89 Kantyxegatan 5 Sweden http://www.ljusaideer.se-------------------------------------------------------------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://webdna.smithmicro.com/
Christer Olsson
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:
Enhancement Request for WebCatalog-NT (1996)
Webcat/Webmerchant part II (1998)
WebCat2 - [format thousands] (1997)
no global [username] or [password] displayed ... (1997)
WebCat2 beta 11 - new prefs ... (1997)
[WebDNA] hideif within a search (2009)
Clearly.home (1998)
[sendmail] v. [writefile] (2000)
Sorting by highest number of matches unique to a field (2003)
[GROUPS] followup (1997)
Problems getting parameters passed into email. (1997)
[DOS]/DOS query perhaps OT (2003)
Negative number search (2000)
A Toughie (1998)
WebCatalog 2.0 & WebDNA docs in HTML ... (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
re: Large databases in WebCat (1997)
Expert tech support -- a fast and simple solution (long) ... (2000)
Merging databases (1997)
URGENT! ACGI Stopped!!!! (1997)