diff --git a/docs/gotcha.txt b/docs/gotcha.txt index d8414140f..153bc8dd0 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -55,7 +55,12 @@ save you many hours of grief. * All Product Templates that shipped with earlier versions of WebGUI have been deleted, except for the Default Product Macro. During the upgrade, - all products have been updated to use the Default Product Macro. + all products have been updated to use the Default Product Macro. If you want + to keep these, you will need to make a copy of them before the upgrade. + + * All Commerce Templates that shipped with earlier versions of WebGUI have + been deleted. If you want to keep these, you will need to make a copy of + them before the upgrade. * Subscriptions have been converted to assets. These assets will be placed in the import node in the folder 'Migrated Subscriptions'. diff --git a/docs/upgrades/upgrade_7.5.10-7.5.11.pl b/docs/upgrades/upgrade_7.5.10-7.5.11.pl index 7662ce2c2..028b0a134 100644 --- a/docs/upgrades/upgrade_7.5.10-7.5.11.pl +++ b/docs/upgrades/upgrade_7.5.10-7.5.11.pl @@ -45,7 +45,6 @@ addingInStoreCredit($session); insertCommerceTaxTable($session); migrateOldTaxTable($session); insertCommerceShipDriverTable($session); -removeOldCommerceCode($session); migrateToNewCart($session); createSkuAsset($session); createDonationAsset($session); @@ -79,6 +78,7 @@ addNewApprovalActivities( $session ); addUserListWobject( $session ); addInheritUrlFromParent( $session ); addDefaultFilesPerPage( $session ); +removeOldCommerceCode($session); finish($session); # this line required @@ -1134,16 +1134,16 @@ sub removeOldCommerceCode { unlink '../../lib/WebGUI/Product.pm'; unlink '../../lib/WebGUI/Subscription.pm'; unlink '../../lib/WebGUI/Operation/TransactionLog.pm'; -unlink '../../lib/WebGUI/i18n/English/CommercePaymentCash.pm'; -unlink '../../lib/WebGUI/i18n/English/CommercePaymentCheck.pm'; -unlink '../../lib/WebGUI/i18n/English/CommercePaymentITransact.pm'; -unlink '../../lib/WebGUI/i18n/English/CommerceShippingByPrice.pm'; -unlink '../../lib/WebGUI/i18n/English/CommerceShippingByWeight.pm'; -unlink '../../lib/WebGUI/i18n/English/CommerceShippingPerTransaction.pm'; -unlink '../../lib/WebGUI/i18n/English/Workflow_Activity_CacheEMSPrereqs.pm'; -unlink '../../lib/WebGUI/i18n/English/Workflow_Activity_ProcessRecurringPayments.pm'; -unlink '../../lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm'; -$session->db->write("delete from WorkflowActivity where className='WebGUI::Workflow::Activity::ProcessRecurringPayments'"); + unlink '../../lib/WebGUI/i18n/English/CommercePaymentCash.pm'; + unlink '../../lib/WebGUI/i18n/English/CommercePaymentCheck.pm'; + unlink '../../lib/WebGUI/i18n/English/CommercePaymentITransact.pm'; + unlink '../../lib/WebGUI/i18n/English/CommerceShippingByPrice.pm'; + unlink '../../lib/WebGUI/i18n/English/CommerceShippingByWeight.pm'; + unlink '../../lib/WebGUI/i18n/English/CommerceShippingPerTransaction.pm'; + unlink '../../lib/WebGUI/i18n/English/Workflow_Activity_CacheEMSPrereqs.pm'; + unlink '../../lib/WebGUI/i18n/English/Workflow_Activity_ProcessRecurringPayments.pm'; + unlink '../../lib/WebGUI/Workflow/Activity/ProcessRecurringPayments.pm'; + $session->db->write("delete from WorkflowActivity where className='WebGUI::Workflow::Activity::ProcessRecurringPayments'"); unlink '../../lib/WebGUI/Macro/Product.pm'; unlink '../../lib/WebGUI/Help/Macro_Product.pm'; unlink '../../lib/WebGUI/i18n/English/Macro_Product.pm'; @@ -1173,6 +1173,15 @@ $session->db->write("delete from WorkflowActivity where className='WebGUI::Workf unlink '../../www/extras/adminConsole/productManager.gif'; unlink '../../www/extras/adminConsole/small/productManager.gif'; + ##Delete unused templates + my $templates = $session->db->read("select distinct(assetId) from template where namespace like 'Commerce%'",[]); + while (my $hash = $templates->hashRef) { + my $template = WebGUI::Asset->newByDynamicClass($session, $hash->{assetId}); + $template->purge; + } + + ##Drop commerce specific tables; + $session->db->write('drop table commerceSettings'); #Disable the Product macro in the config file. You can't use the convenience method #deleteFromHash since the macro name is in the value, not the key.