getting rid of old commerce code. bye bye!
This commit is contained in:
parent
f3b14a227c
commit
be8ce29f57
36 changed files with 13 additions and 10753 deletions
|
|
@ -1010,9 +1010,11 @@ sub mergeProductsWithCommerce {
|
|||
#-------------------------------------------------
|
||||
sub removeOldCommerceCode {
|
||||
my $session = shift;
|
||||
my $config = $session->config;
|
||||
unlink '../../lib/WebGUI/Asset/Wobject/Product.pm';
|
||||
|
||||
rmtree '../../lib/WebGUI/Commerce.pm';
|
||||
rmtree '../../lib/WebGUI/Commerce';
|
||||
unlink '../../lib/WebGUI/Commerce.pm';
|
||||
unlink '../../lib/WebGUI/Product.pm';
|
||||
unlink '../../lib/WebGUI/Subscription.pm';
|
||||
|
||||
|
|
@ -1020,6 +1022,11 @@ sub removeOldCommerceCode {
|
|||
unlink '../../lib/WebGUI/Help/Macro_Product.pm';
|
||||
unlink '../../lib/WebGUI/i18n/English/Macro_Product.pm';
|
||||
|
||||
unlink '../../lib/WebGUI/Macro/SubscriptionItem.pm';
|
||||
unlink '../../lib/WebGUI/Macro/SubscriptionItemPurchaseUrl.pm';
|
||||
unlink '../../lib/WebGUI/Help/Macro_SubscriptionItem.pm';
|
||||
unlink '../../lib/WebGUI/i18n/English/Macro_SubscriptionItem.pm';
|
||||
|
||||
unlink '../../lib/WebGUI/Operation/ProductManager.pm';
|
||||
unlink '../../lib/WebGUI/Help/ProductManager.pm';
|
||||
unlink '../../lib/WebGUI/i18n/English/ProductManager.pm';
|
||||
|
|
@ -1034,11 +1041,14 @@ sub removeOldCommerceCode {
|
|||
|
||||
#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.
|
||||
my %macros = %{ $session->config->get('macros') };
|
||||
my %macros = %{ $config->get('macros') };
|
||||
foreach (my ($key, $value) = each %macros) {
|
||||
delete $macros{$key} if $value eq 'Product';
|
||||
delete $macros{$key} if $value eq 'SubscriptionItem';
|
||||
delete $macros{$key} if $value eq 'SubscriptionItemPurchaseUrl';
|
||||
}
|
||||
$session->config->set('macros', \%macros);
|
||||
$config->set('macros', \%macros);
|
||||
$config->deleteFromArray('WebGUI::Asset::Wobject::Product');
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue