Added an asset called Shelf, which allows you to create categories of Skus.

This commit is contained in:
JT Smith 2008-04-29 01:26:45 +00:00
parent e9853fdf5c
commit 82056c66aa
10 changed files with 266 additions and 29 deletions

View file

@ -277,24 +277,11 @@ sub getPrice {
return $self->get('price');
}
#-------------------------------------------------------------------
sub getThumbnailFilename {
my $self = shift;
my $filestore = $_[0];
my $files = $filestore->getFiles();
foreach my $file (@{$files}){
if($file =~ m/^thumb-/){
return $file;
}
}
return "";
}
#-------------------------------------------------------------------
sub getThumbnailUrl {
my $self = shift;
my $store = $_[0];
return $store->getUrl($self->getThumbnailFilename($store));
my $store = shift || WebGUI::Storage::Image->get($self->session, $self->get('image1'));
return $store->getThumbnailUrl($store->getFiles->[0]);
}
#-------------------------------------------------------------------