#!/usr/bin/perl -w use CGI; use strict; use product qw(:productInfo); use Cwd; $|++; my $q = new CGI; my $sku = $q->param('sku'); my $path_to_images = "/webpics/originals/"; my $path_to_images = "/webpics/itemthumb/"; my $path_to_images = "/webpics/itemmed/"; print $q->header(); #check for sku, description associated with it #then print the image if ($sku){ my $firstDigits; if ($sku =~ /^\d{3}/) {$firstDigits = $&} my %product = getProductInfo($sku); $path_to_images .= $firstDigits . "/" . $sku . ".jpg"; if (-e $path_to_images && values %product) { print <
Sku Number: $sku
Item Number: $product{'item_number'}
Minimum Sell: $product{'min_amount'}
Description: $product{'description'}
Retail: \$$product{'retail'}
HTML } else{ print < Sorry, No Products Avaliable with that Sku Number.
HTML } } print scalar localtime, $q->end_html