From ead6722dc7d25ad8318cbd27ec0fead8b3e52f65 Mon Sep 17 00:00:00 2001 From: Drake Date: Wed, 6 Dec 2006 20:23:30 +0000 Subject: [PATCH] Have upgrade script patch some commerce template settings that seem to be corrupted in the default DB. --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.2.3-7.3.0.pl | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f6645d3c1..79beb341b 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -47,6 +47,7 @@ - fix: Default Rich Editor setting not rendering correctly - fix: visitor name disappearing on preview in CS - fix: HTTP proxy not passing form elements through + - upgrade script patches some corrupted commerce template settings - The Events Calendar is now the new Calendar with some fun new features. All your existing Events Calendars will be migrated automatically. - rfe: multiple redirects on a page - which one? diff --git a/docs/upgrades/upgrade_7.2.3-7.3.0.pl b/docs/upgrades/upgrade_7.2.3-7.3.0.pl index febdf3d11..9019bb98c 100644 --- a/docs/upgrades/upgrade_7.2.3-7.3.0.pl +++ b/docs/upgrades/upgrade_7.2.3-7.3.0.pl @@ -28,6 +28,7 @@ addEmailValidationExpiry($session); addNewCalendar($session); migrateCalendars($session); removeOldCalendar($session); +fixCommerceTemplateSettings($session); finish($session); # this line required #------------------------------------------------- @@ -315,6 +316,24 @@ EOT $session->config->set('workflowActivities', $activities); } +#------------------------------------------------- +sub fixCommerceTemplateSettings { + my $session = shift; + print "\tFixing up commerce template settings.\n" unless $quiet; + foreach my $spec (['commerceConfirmCheckoutTemplateId', 'PBtmpl0000000000000016'], + ['commerceCheckoutCanceledTemplateId', 'PBtmpl0000000000000015'], + ['commercePurchaseHistoryTemplateId', 'PBtmpl0000000000000019'], + ['commerceSelectShippingMethodTemplateId', 'PBtmplCSSM000000000001'], + ['commerceSelectPaymentGatewayTemplateId', 'PBtmpl0000000000000017'], + ['commerceViewShoppingCartTemplateId', 'PBtmplVSC0000000000001'], + ['commerceTransactionErrorTemplateId', 'PBtmpl0000000000000018']) { + my ($name, $value) = @$spec; + if ($session->setting->get($name) eq '1') { + $session->setting->set($name, $value); + } + } +} + # ---- DO NOT EDIT BELOW THIS LINE ---- #-------------------------------------------------