commerce scratch fixes.
This commit is contained in:
parent
5a9a92eec2
commit
3d260ea987
3 changed files with 8 additions and 13 deletions
|
|
@ -1968,12 +1968,7 @@ sub www_viewPurchase {
|
|||
|
||||
=head2 www_addEventsToBadge ( )
|
||||
|
||||
Method to display a purchase. From this screen, admins can
|
||||
return the whole purchase, return a whole badge (registration,
|
||||
a.k.a itinerary for a single person), or return a single event
|
||||
from an itinerary. The purchaser can just add events to
|
||||
individual registrations that have at least one event that
|
||||
hasn't occurred yet.
|
||||
Method to go into badge-addition mode.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1984,7 +1979,7 @@ sub www_addEventsToBadge {
|
|||
my $bid = $self->session->form->process('bid');
|
||||
$self->session->scratch->delete('EMS_add_purchase_badgeId');
|
||||
$self->session->scratch->set('EMS_add_purchase_badgeId',$bid);
|
||||
my @pastEvents = $self->session->db->buildArray("select productId from EventManagementSystem_registrations where badgeId=?",[$bid]);
|
||||
my @pastEvents = $self->session->db->buildArray("select productId from EventManagementSystem_registrations where returned=0 and badgeId=?",[$bid]);
|
||||
$self->session->scratch->delete('EMS_add_purchase_events');
|
||||
$self->session->scratch->set('EMS_add_purchase_events',join("\n",@pastEvents));
|
||||
$self->session->scratch->delete('EMS_scratch_cart');
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ Clears the C<paymentGateway> scratch variable.
|
|||
|
||||
sub _clearPaymentScratch {
|
||||
my $session = shift;
|
||||
$session->scratch->set('paymentGateway', '-delete-');
|
||||
$session->scratch->delete('paymentGateway');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -96,8 +96,8 @@ Clear the C<shippingMethod> and C<shippingOptions> scratch variables.
|
|||
|
||||
sub _clearShippingScratch {
|
||||
my $session = shift;
|
||||
$session->scratch->set('shippingMethod', '-delete-');
|
||||
$session->scratch->set('shippingOptions', '-delete-');
|
||||
$session->scratch->delete('shippingMethod');
|
||||
$session->scratch->delete('shippingOptions');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -948,7 +948,7 @@ sub www_selectPaymentGatewaySave {
|
|||
if (WebGUI::Commerce::Payment->load($session, $paymentGateway)->enabled) {
|
||||
$session->scratch->set('paymentGateway', $paymentGateway);
|
||||
} else {
|
||||
$session->scratch->set('paymentGateway', '-delete-');
|
||||
$session->scratch->delete('paymentGateway');
|
||||
}
|
||||
|
||||
return WebGUI::Operation::execute($session,'checkout');
|
||||
|
|
@ -1024,7 +1024,7 @@ sub www_selectShippingMethodSave {
|
|||
$session->scratch->set('shippingMethod', $shipping->namespace);
|
||||
$session->scratch->set('shippingOptions', Storable::freeze($shipping->getOptions));
|
||||
} else {
|
||||
$session->scratch->set('shippingMethod', '-delete-');
|
||||
$session->scratch->delete('shippingMethod');
|
||||
}
|
||||
|
||||
return WebGUI::Operation::execute($session,'checkout');
|
||||
|
|
|
|||
|
|
@ -666,7 +666,7 @@ sub www_listProducts {
|
|||
|
||||
$i18n = WebGUI::International->new($session, 'ProductManager');
|
||||
|
||||
$session->scratch->set('managingProduct', '-delete-');
|
||||
$session->scratch->delete('managingProduct');
|
||||
|
||||
$sth = $session->db->read('select * from products order by title');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue