shelves can see skus under them as well as by keyword
This commit is contained in:
parent
d849aacc51
commit
f88cf54053
3 changed files with 14 additions and 7 deletions
|
|
@ -91,7 +91,7 @@ sub view {
|
|||
}
|
||||
|
||||
# get other child skus
|
||||
my @childSkus = @{$self->getLineage(['children'],{includeOnlyClasses=>['WebGUI::Asset::Wobject::Shelf']})};
|
||||
my @childSkus = @{$self->getLineage(['children'],{isa=>'WebGUI::Asset::Sku'})};
|
||||
|
||||
# find products based upon keywords
|
||||
my @keywords = $self->get('keywords');
|
||||
|
|
@ -107,8 +107,7 @@ sub view {
|
|||
|
||||
# generate template variables
|
||||
my @skus = ();
|
||||
foreach my $row (@{$p->getPageData}) {
|
||||
my $id = $row->{assetId};
|
||||
foreach my $id (@{$p->getPageData}) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass($session, $id);
|
||||
if (defined $asset) {
|
||||
my $sku = $asset->get;
|
||||
|
|
|
|||
|
|
@ -308,6 +308,10 @@ A boolean indicating whether the resulting asset tree should be returned in reve
|
|||
|
||||
An array reference containing a list of asset classes to include in the result. If this is specified then no other classes except these will be returned. The opposite of the excludeClasses rule.
|
||||
|
||||
=head4 isa
|
||||
|
||||
A classname where you can look for classes of a similar base class. For example, if you're looking for Donations, Subscriptions, Products and other subclasses of WebGUI::Asset::Sku, then set isa to 'WebGUI::Asset::Sku'.
|
||||
|
||||
=head4 includeArchived
|
||||
|
||||
A boolean indicating that we should include archived assets in the result set.
|
||||
|
|
@ -437,6 +441,10 @@ sub getLineage {
|
|||
if (exists $rules->{includeOnlyClasses}) {
|
||||
$where .= ' and (asset.className in ('.$self->session->db->quoteAndJoin($rules->{includeOnlyClasses}).'))';
|
||||
}
|
||||
## isa
|
||||
if (exists $rules->{isa}) {
|
||||
$where .= ' and (asset.className like '.$self->session->db->quote($rules->{isa}.'%').')';
|
||||
}
|
||||
## finish up our where clause
|
||||
if (!scalar(@whereModifiers)) {
|
||||
return [];
|
||||
|
|
|
|||
|
|
@ -2699,8 +2699,8 @@ div.tabs {
|
|||
},
|
||||
|
||||
'10' => {
|
||||
message => q|Manage trash.|,
|
||||
lastUpdated => 1031514049
|
||||
message => q|Manage my trash.|,
|
||||
lastUpdated =>1211131614
|
||||
},
|
||||
|
||||
'958' => {
|
||||
|
|
@ -3034,8 +3034,8 @@ or are under your current version tag.</p>
|
|||
},
|
||||
|
||||
'trash' => {
|
||||
message => q|My Trash|,
|
||||
lastUpdated =>1207859655,
|
||||
message => q|Trash|,
|
||||
lastUpdated =>1211131614,
|
||||
context => q|Title of the trash manager for the admin console.|
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue