fixed several checkout bugs
This commit is contained in:
parent
ca61c81967
commit
7e4e7898c0
5 changed files with 60 additions and 29 deletions
|
|
@ -132,7 +132,7 @@ Does bookkeeping on EMSRegistrationRibbon table.
|
|||
|
||||
sub onCompletePurchase {
|
||||
my ($self, $item) = @_;
|
||||
$self->session->db->write("insert into EMSRegistrationRibbon (ribbonAssetId, badgeId) values (?,?)",
|
||||
$self->session->db->write("insert into EMSRegistrantRibbon (ribbonAssetId, badgeId) values (?,?)",
|
||||
[$self->getId, $self->getOptions->{badgeId}]);
|
||||
return undef;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ sub onCompletePurchase {
|
|||
my $currentQuantity = $db->quickScalar("select quantity from EMSRegistrantToken where tokenAssetId=? and badgeId=?",\@params);
|
||||
unshift @params, $item->get("quantity");
|
||||
if (defined $currentQuantity) {
|
||||
$db->write("update EMSRegistrationToken set quantity=quantity+? where tokenAssetId=? and badgeId=?",\@params);
|
||||
$db->write("update EMSRegistrantToken set quantity=quantity+? where tokenAssetId=? and badgeId=?",\@params);
|
||||
}
|
||||
else {
|
||||
$db->write("insert into EMSRegistrationToken (quantity, tokenAssetId, badgeId) values (?,?,?)",\@params);
|
||||
$db->write("insert into EMSRegistrantToken (quantity, tokenAssetId, badgeId) values (?,?,?)",\@params);
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue