Added an asset called Shelf, which allows you to create categories of Skus.
This commit is contained in:
parent
e9853fdf5c
commit
82056c66aa
10 changed files with 266 additions and 29 deletions
|
|
@ -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]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue