some minor enhancements
This commit is contained in:
parent
5dfc9e3bfc
commit
a0ec44567a
3 changed files with 42 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ Package WebGUI::Asset::Sku
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
This is the base class for all products in the commerce system.
|
This is the base class for all products in the WebGUI Shop.
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,13 +74,14 @@ Add more text to the keywords index for this asset.
|
||||||
|
|
||||||
=head3 text
|
=head3 text
|
||||||
|
|
||||||
A string of text. You may optionally also put HTML here, and it will be automatically filtered.
|
A string (or array of strings) of text. You may optionally also put HTML here, and it will be automatically filtered.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub addKeywords {
|
sub addKeywords {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $text = shift;
|
my $text = join(" ", @_);
|
||||||
|
|
||||||
$text = WebGUI::HTML::filter($text, "all");
|
$text = WebGUI::HTML::filter($text, "all");
|
||||||
#-------------------- added by zxp for chinese word segment
|
#-------------------- added by zxp for chinese word segment
|
||||||
utf8::decode($text);
|
utf8::decode($text);
|
||||||
|
|
|
||||||
|
|
@ -386,6 +386,44 @@ sub getTransactionIdsForUser {
|
||||||
return $session->db->buildArrayRef("select transactionId from transaction where userId=? order by dateOfPurchase desc",[$userId]);
|
return $session->db->buildArrayRef("select transactionId from transaction where userId=? order by dateOfPurchase desc",[$userId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 isFirst ( )
|
||||||
|
|
||||||
|
Returns 1 if this is the first of a set of recurring transactions.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub isFirst {
|
||||||
|
my $self = shift;
|
||||||
|
return ($self->get('originatingTransactionId') eq '');
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 isRecurring ( )
|
||||||
|
|
||||||
|
Returns 1 if this is a recurring transaction.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub isRecurring {
|
||||||
|
my $self = shift;
|
||||||
|
return $self->get('isRecurring');
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 isSuccessful ( )
|
||||||
|
|
||||||
|
Returns 1 if this transaction had a successful payment applied to it.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub isSuccessful {
|
||||||
|
my $self = shift;
|
||||||
|
return $self->get('isSuccessful');
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue