added more documentation to sku types
continuing to migrate EMS to C2
This commit is contained in:
parent
5a50203b35
commit
45fef64fd6
8 changed files with 633 additions and 202 deletions
|
|
@ -42,6 +42,13 @@ These methods are available from this class:
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition
|
||||
|
||||
Adds templateId, thankYouMessage, and defaultPrice fields.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
|
@ -86,6 +93,13 @@ sub definition {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getConfiguredTitle
|
||||
|
||||
Returns title + price
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfiguredTitle {
|
||||
my $self = shift;
|
||||
return $self->getTitle." (".$self->getOptions->{price}.")";
|
||||
|
|
@ -93,12 +107,26 @@ sub getConfiguredTitle {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getPrice
|
||||
|
||||
Returns configured price, or default price, or 100 if neither of those are available.
|
||||
|
||||
=cut
|
||||
|
||||
sub getPrice {
|
||||
my $self = shift;
|
||||
return $self->getOptions->{price} || $self->get("defaultPrice") || 100.00;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 prepareView
|
||||
|
||||
Prepares the template.
|
||||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
|
|
@ -109,6 +137,13 @@ sub prepareView {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 view
|
||||
|
||||
Displays the donation form.
|
||||
|
||||
=cut
|
||||
|
||||
sub view {
|
||||
my ($self) = @_;
|
||||
my $session = $self->session;
|
||||
|
|
@ -125,6 +160,13 @@ sub view {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 wwww_donate
|
||||
|
||||
Accepts the information from the donation form and adds it to the cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_donate {
|
||||
my $self = shift;
|
||||
if ($self->canView) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@ These methods are available from this class:
|
|||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addToCart ( badgeInfo )
|
||||
|
||||
Adds this badge as configured for an individual to the cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub addToCart {
|
||||
my ($self, $badgeInfo) = @_;
|
||||
$badgeInfo->{badgeId} = "new";
|
||||
|
|
@ -51,6 +58,13 @@ sub addToCart {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition
|
||||
|
||||
Adds price, seatsAvailable fields.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
|
@ -87,6 +101,13 @@ sub definition {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getConfiguredTitle
|
||||
|
||||
Returns title + badgeholder name
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfiguredTitle {
|
||||
my $self = shift;
|
||||
my $name = $self->session->db->getScalar("select name from EMSRegistrant where badgeId=?",[$self->getOptions->{badgeId}]);
|
||||
|
|
@ -95,17 +116,38 @@ sub getConfiguredTitle {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getMaxAllowedInCart
|
||||
|
||||
Returns 1
|
||||
|
||||
=cut
|
||||
|
||||
sub getMaxAllowedInCart {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getPrice
|
||||
|
||||
Returns the price field value.
|
||||
|
||||
=cut
|
||||
|
||||
sub getPrice {
|
||||
my $self = shift;
|
||||
return $self->get("price");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getQuantityAvailable
|
||||
|
||||
Returns seatsAvailable - the count from the EMSRegistrant table.
|
||||
|
||||
=cut
|
||||
|
||||
sub getQuantityAvailable {
|
||||
my $self = shift;
|
||||
my $seatsTaken = $self->session->db->quickScalar("select count(*) from EMSRegistrant where badgeAssetId=?",[$self->getId]);
|
||||
|
|
@ -113,6 +155,13 @@ sub getQuantityAvailable {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 onCompletePurchase (item)
|
||||
|
||||
Marks badge order as paid.
|
||||
|
||||
=cut
|
||||
|
||||
sub onCompletePurchase {
|
||||
my ($self, $item) = @_;
|
||||
my $badgeInfo = $self->getOptions;
|
||||
|
|
@ -123,6 +172,13 @@ sub onCompletePurchase {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 onRemoveFromCart ( item )
|
||||
|
||||
Destroys badge.
|
||||
|
||||
=cut
|
||||
|
||||
sub onRemoveFromCart {
|
||||
my ($self, $item) = @_;
|
||||
my $badgeId = $self->getOptions->{badgeId};
|
||||
|
|
@ -137,13 +193,31 @@ sub onRemoveFromCart {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 purge
|
||||
|
||||
Deletes all badges and things attached to the badges. No refunds are given.
|
||||
|
||||
=cut
|
||||
|
||||
sub purge {
|
||||
my $self = shift;
|
||||
$self->session->db->write("delete from EMSRegistrant where badgeAssetId=?",[$self->getId]);
|
||||
my $db = $self->session->db;
|
||||
$db->write("delete from EMSRegistrantTicket where badgeAssetId=?",[$self->getId]);
|
||||
$db->write("delete from EMSRegistrantToken where badgeAssetId=?",[$self->getId]);
|
||||
$db->write("delete from EMSRegistrantRibbon where badgeAssetId=?",[$self->getId]);
|
||||
$db->write("delete from EMSRegistrant where badgeAssetId=?",[$self->getId]);
|
||||
$self->SUPER::purge;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 view
|
||||
|
||||
Displays badge description.
|
||||
|
||||
=cut
|
||||
|
||||
sub view {
|
||||
my ($self) = @_;
|
||||
|
||||
|
|
@ -235,6 +309,13 @@ sub view {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_addToCart
|
||||
|
||||
Processes form from view() and then adds to cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_addToCart {
|
||||
my ($self) = @_;
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canView;
|
||||
|
|
@ -266,7 +347,7 @@ sub www_addToCart {
|
|||
|
||||
# add it to the cart
|
||||
$self->addToCart(\%badgeInfo);
|
||||
return $self->getParent->www_view;
|
||||
return $self->getParent->www_viewExtras($self->getOptions->{badgeId});
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ package WebGUI::Asset::Sku::EMSRibbon;
|
|||
use strict;
|
||||
use Tie::IxHash;
|
||||
use base 'WebGUI::Asset::Sku';
|
||||
|
||||
use WebGUI::HTMLForm;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -40,6 +40,13 @@ These methods are available from this class:
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition
|
||||
|
||||
Add price field to the definition.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
|
@ -70,6 +77,13 @@ sub definition {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getConfiguredTitle
|
||||
|
||||
Return title + badge holder name.
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfiguredTitle {
|
||||
my $self = shift;
|
||||
my $name = $self->session->db->getScalar("select name from EMSRegistrant where badgeId=?",[$self->getOptions->{badgeId}]);
|
||||
|
|
@ -77,17 +91,38 @@ sub getConfiguredTitle {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getMaxAllowedInCart
|
||||
|
||||
Return 1;
|
||||
|
||||
=cut
|
||||
|
||||
sub getMaxAllowedInCart {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getPrice
|
||||
|
||||
Returns the price from the definition.
|
||||
|
||||
=cut
|
||||
|
||||
sub getPrice {
|
||||
my $self = shift;
|
||||
return $self->get("price");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 onCompletePurchase
|
||||
|
||||
Does bookkeeping on EMSRegistrationRibbon table.
|
||||
|
||||
=cut
|
||||
|
||||
sub onCompletePurchase {
|
||||
my ($self, $item) = @_;
|
||||
$self->session->db->write("insert into EMSRegistrationRibbon (ribbonAssetId, badgeId) values (?,?)",
|
||||
|
|
@ -96,6 +131,13 @@ sub onCompletePurchase {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 purge
|
||||
|
||||
Deletes all entries in EMSRegistrationRibbon table for this sku. No refunds are given.
|
||||
|
||||
=cut
|
||||
|
||||
sub purge {
|
||||
my $self = shift;
|
||||
$self->session->db->write("delete from EMSRegistrantRibbon where tokenAssetId=?",[$self->getId]);
|
||||
|
|
@ -103,17 +145,51 @@ sub purge {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 view
|
||||
|
||||
Displays the ribbon description.
|
||||
|
||||
=cut
|
||||
|
||||
sub view {
|
||||
my ($self) = @_;
|
||||
return $self->getParent->view;
|
||||
my ($self) = @_;
|
||||
|
||||
# build objects we'll need
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_EventManagementSystem");
|
||||
my $form = $self->session->form;
|
||||
|
||||
|
||||
# render the page;
|
||||
my $output = '<h1>'.$self->getTitle.'</h1>'
|
||||
.'<p>'.$self->get('description').'</p>';
|
||||
|
||||
# build the add to cart form
|
||||
if ($form->get('badgeId') ne '') {
|
||||
my $addToCart = WebGUI::HTMLForm->new($self->session, action=>$self->getUrl);
|
||||
$addToCart->hidden(name=>"func", value=>"addToCart");
|
||||
$addToCart->hidden(name=>"badgeId", value=>$form->get('badgeId'));
|
||||
$addToCart->submit(value=>$i18n->get('add to cart','Shop'), label=>$self->getPrice);
|
||||
$output .= $addToCart->print;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_addToCart
|
||||
|
||||
Takes form variable badgeId and add the ribbon to the cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_addToCart {
|
||||
my ($self) = @_;
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canView;
|
||||
$self->addToCart({badgeId=>$self->session->form->get('badgeId')});
|
||||
return $self->getParent->www_view;
|
||||
my $badgeId = $self->session->form->get('badgeId');
|
||||
$self->addToCart({badgeId=>$badgeId});
|
||||
return $self->getParent->www_viewExtras($badgeId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,13 @@ These methods are available from this class:
|
|||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 addToCart ( {badgeId=>$badgeId })
|
||||
|
||||
Does some bookkeeping to keep track of limited quantities of tickets that are available, then adds to cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub addToCart {
|
||||
my ($self, $badgeInfo) = @_;
|
||||
$self->session->db->write("insert into EMSRegistrantTicket (badgeId, ticketAssetId) values (?,?)",
|
||||
|
|
@ -47,6 +54,13 @@ sub addToCart {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition
|
||||
|
||||
Adds price, seatsAvailable, eventNumber, startDate, endDate and relatedBadges fields.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
|
@ -81,15 +95,15 @@ sub definition {
|
|||
tab => "properties",
|
||||
fieldType => "dateTime",
|
||||
defaultValue => $date->toDatabase,
|
||||
label => $i18n->get("add/edit event start date"),
|
||||
hoverHelp => $i18n->get("add/edit event start date description"),
|
||||
label => $i18n->get("event start date"),
|
||||
hoverHelp => $i18n->get("start date help"),
|
||||
},
|
||||
endDate => {
|
||||
tab => "properties",
|
||||
fieldType => "dateTime",
|
||||
defaultValue => $date->toDatabase,
|
||||
label => $i18n->get("add/edit event end date"),
|
||||
hoverHelp => $i18n->get("add/edit event end date description"),
|
||||
label => $i18n->get("event end date"),
|
||||
hoverHelp => $i18n->get("event end date help"),
|
||||
},
|
||||
relatedBadges => {
|
||||
tab => "properties",
|
||||
|
|
@ -113,6 +127,13 @@ sub definition {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getConfiguredTitle
|
||||
|
||||
Returns title + badgeholder name.
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfiguredTitle {
|
||||
my $self = shift;
|
||||
my $name = $self->session->db->getScalar("select name from EMSRegistrant where badgeId=?",[$self->getOptions->{badgeId}]);
|
||||
|
|
@ -120,17 +141,38 @@ sub getConfiguredTitle {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getMaxAllowedInCart
|
||||
|
||||
Returns 1.
|
||||
|
||||
=cut
|
||||
|
||||
sub getMaxAllowedInCart {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getPrice
|
||||
|
||||
Returns the value of the price field
|
||||
|
||||
=cut
|
||||
|
||||
sub getPrice {
|
||||
my $self = shift;
|
||||
return $self->get("price");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getQuantityAvailable
|
||||
|
||||
Returns seatsAvailable minus the count from the EMSRegistrantTicket table.
|
||||
|
||||
=cut
|
||||
|
||||
sub getQuantityAvailable {
|
||||
my $self = shift;
|
||||
my $seatsTaken = $self->session->db->quickScalar("select count(*) from EMSRegistrantTicket where ticketAssetId=?",[$self->getId]);
|
||||
|
|
@ -138,6 +180,13 @@ sub getQuantityAvailable {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 onCompletePurchase
|
||||
|
||||
Marks the ticket as purchased.
|
||||
|
||||
=cut
|
||||
|
||||
sub onCompletePurchase {
|
||||
my ($self, $item) = @_;
|
||||
$self->session->db->write("update EMSRegistrantTicket set purchaseComplete=1 where ticketAssetId=? and badgeId=?",
|
||||
|
|
@ -146,6 +195,13 @@ sub onCompletePurchase {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 onRemoveFromCart
|
||||
|
||||
Frees up the ticket to be purchased by someone else.
|
||||
|
||||
=cut
|
||||
|
||||
sub onRemoveFromCart {
|
||||
my ($self, $item) = @_;
|
||||
$self->session->db->write("delete from EMSRegistrantTicket where ticketAssetId=? and badgeId=?",
|
||||
|
|
@ -153,6 +209,13 @@ sub onRemoveFromCart {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 purge
|
||||
|
||||
Deletes all ticket purchases of this type. No refunds are given.
|
||||
|
||||
=cut
|
||||
|
||||
sub purge {
|
||||
my $self = shift;
|
||||
$self->session->db->write("delete from EMSRegistrantTicket where ticketAssetId=?",[$self->getId]);
|
||||
|
|
@ -160,17 +223,52 @@ sub purge {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 view
|
||||
|
||||
Displays the ticket description.
|
||||
|
||||
=cut
|
||||
|
||||
sub view {
|
||||
my ($self) = @_;
|
||||
return $self->getParent->view;
|
||||
my ($self) = @_;
|
||||
|
||||
# build objects we'll need
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_EventManagementSystem");
|
||||
my $form = $self->session->form;
|
||||
|
||||
|
||||
# render the page;
|
||||
my $output = '<h1>'.$self->getTitle.' ('.$self->get('eventNumber').')</h1>'
|
||||
.'<p>'.$self->get('description').'</p>'
|
||||
.'<p>'.$self->get('startDate').'</p>';
|
||||
|
||||
# build the add to cart form
|
||||
if ($form->get('badgeId') ne '') {
|
||||
my $addToCart = WebGUI::HTMLForm->new($self->session, action=>$self->getUrl);
|
||||
$addToCart->hidden(name=>"func", value=>"addToCart");
|
||||
$addToCart->hidden(name=>"badgeId", value=>$form->get('badgeId'));
|
||||
$addToCart->submit(value=>$i18n->get('add to cart','Shop'), label=>$self->getPrice);
|
||||
$output .= $addToCart->print;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_addToCart
|
||||
|
||||
Takes form variable badgeId and add the ticket to the cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_addToCart {
|
||||
my ($self) = @_;
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canView;
|
||||
$self->addToCart({badgeId=>$self->session->form->get('badgeId')});
|
||||
return $self->getParent->www_view;
|
||||
my $badgeId = $self->session->form->get('badgeId');
|
||||
$self->addToCart({badgeId=>$badgeId});
|
||||
return $self->getParent->www_viewExtras($badgeId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,13 @@ These methods are available from this class:
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition
|
||||
|
||||
Adds price field.
|
||||
|
||||
=cut
|
||||
|
||||
sub definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
|
@ -70,6 +77,13 @@ sub definition {
|
|||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getConfiguredTitle
|
||||
|
||||
Returns title + badgeholder name.
|
||||
|
||||
=cut
|
||||
|
||||
sub getConfiguredTitle {
|
||||
my $self = shift;
|
||||
my $name = $self->session->db->getScalar("select name from EMSRegistrant where badgeId=?",[$self->getOptions->{badgeId}]);
|
||||
|
|
@ -77,12 +91,26 @@ sub getConfiguredTitle {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getPrice
|
||||
|
||||
Returns the value of the price field.
|
||||
|
||||
=cut
|
||||
|
||||
sub getPrice {
|
||||
my $self = shift;
|
||||
return $self->get("price");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 onCompletePurchase
|
||||
|
||||
Adds tokens to the badge.
|
||||
|
||||
=cut
|
||||
|
||||
sub onCompletePurchase {
|
||||
my ($self, $item) = @_;
|
||||
my $db = $self->session->db;
|
||||
|
|
@ -99,6 +127,13 @@ sub onCompletePurchase {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 purge
|
||||
|
||||
Destroys all tokens of this type. No refunds are given.
|
||||
|
||||
=cut
|
||||
|
||||
sub purge {
|
||||
my $self = shift;
|
||||
$self->session->db->write("delete from EMSRegistrantToken where tokenAssetId=?",[$self->getId]);
|
||||
|
|
@ -106,19 +141,53 @@ sub purge {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 view
|
||||
|
||||
Displays the token description.
|
||||
|
||||
=cut
|
||||
|
||||
sub view {
|
||||
my ($self) = @_;
|
||||
return $self->getParent->view;
|
||||
my ($self) = @_;
|
||||
|
||||
# build objects we'll need
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_EventManagementSystem");
|
||||
my $form = $self->session->form;
|
||||
|
||||
|
||||
# render the page;
|
||||
my $output = '<h1>'.$self->getTitle.'</h1>'
|
||||
.'<p>'.$self->get('description').'</p>';
|
||||
|
||||
# build the add to cart form
|
||||
if ($form->get('badgeId') ne '') {
|
||||
my $addToCart = WebGUI::HTMLForm->new($self->session, action=>$self->getUrl);
|
||||
$addToCart->hidden(name=>"func", value=>"addToCart");
|
||||
$addToCart->hidden(name=>"badgeId", value=>$form->get('badgeId'));
|
||||
$addToCart->integer(name=>'quantity', value=>1, label=>$i18n->get('quantity','Shop'));
|
||||
$addToCart->submit(value=>$i18n->get('add to cart','Shop'), label=>$self->getPrice);
|
||||
$output .= $addToCart->print;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_addToCart
|
||||
|
||||
Takes form variable badgeId and add the token to the cart.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_addToCart {
|
||||
my ($self) = @_;
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canView;
|
||||
$self->addToCart({badgeId=>$self->session->form->get('badgeId')});
|
||||
return $self->getParent->www_view;
|
||||
my $badgeId = $self->session->form->get('badgeId');
|
||||
$self->addToCart({badgeId=>$badgeId});
|
||||
return $self->getParent->www_viewExtras($badgeId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue