[ic] patch for results_grid to show no_image.gif

David Killingsworth killer at tuxstudios.com
Sun Mar 25 20:59:00 UTC 2012


I added some no_image defined logic to the components/results_grid, to
display a no_image.gif if there is none defined for the item in the
database

http://pastebin.com/KqdT2YVf

there may  be a more elegant way to do that, but I manage to get it to
work as I intended

--- results_grid        2012-03-25 15:43:56.000000000 -0500
+++ results_grid.orig   2012-03-25 15:44:15.000000000 -0500
@@ -133,24 +133,13 @@
                                        title => "[L]Click for more
information.[/L]",
                                        alt => $record->{description},
                                });
-       if ( $record->{thumb} =~ //)  {
-                       $record->{thumb} = $Tag->image({
+       $record->{thumb} = $Tag->image({
                                        imagesubdir => "thumb",
                                        src => $record->{thumb},
                                        extra => "border=0",
                                        title => "[L]Click for more
information.[/L]",
                                        alt => $record->{description},
                                });
-       } else {
-                       $record->{thumb} = $Tag->image({
-                                       imagesubdir => "no_image/thumb",
-                                       src => "no_image.gif",
-                                       extra => "border=0",
-                                       title => "[L]Click for more
information.[/L]",
-                                       alt => $record->{description},
-                               });
-       }
-

        my $q = $Tag->data('inventory', 'quantity', $sku);
        if ($q > 0) {




More information about the interchange-users mailing list