Add common cart summary template variables to the PayDriver. Add a summary screen for Cash. i18n fixes for Cash.

This commit is contained in:
Colin Kuskie 2010-04-28 11:19:34 -07:00
parent d48d9bc90f
commit a472f9ebdd
5 changed files with 106 additions and 67 deletions

View file

@ -24,6 +24,7 @@ use WebGUI::Storage;
use WebGUI::Asset;
use WebGUI::Asset::WikiPage;
use WebGUI::Exception;
use WebGUI::Shop::Pay;
my $toVersion = '7.9.4';
@ -40,6 +41,7 @@ alterCartTable($session);
alterAddressBookTable($session);
addWizardHandler( $session );
addTemplateExampleImage( $session );
addPayDriverTemplates( $session );
finish($session); # this line required
@ -150,6 +152,24 @@ sub alterCartTable {
print "DONE!\n" unless $quiet;
}
#----------------------------------------------------------------------------
sub addPayDriverTemplates {
my $session = shift;
print "\tAdd templates to the Payment Drivers that need them... " unless $quiet;
# and here's our code
my $pay = WebGUI::Shop::Pay->new($session);
my @gateways = @{ $pay->getPaymentGateways };
GATEWAY: foreach my $gateway (@gateways) {
next GATEWAY unless $gateway;
my $properties = $gateway->get;
if ($gateway->isa('WebGUI::Shop::PayDriver::Cash')) {
$properties->{summaryTemplateId} = '30h5rHxzE_Q0CyI3Gg7EJw';
}
$gateway->update($properties);
}
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
#----------------------------------------------------------------------------