commerce scratch fixes.

This commit is contained in:
Matthew Wilson 2006-04-17 09:42:47 +00:00
parent 5a9a92eec2
commit 3d260ea987
3 changed files with 8 additions and 13 deletions

View file

@ -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');

View file

@ -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');