-
Notifications
You must be signed in to change notification settings - Fork 94
Unistall the extension
Gonzalo Dominguez edited this page Aug 31, 2021
·
1 revision
To remove completely the extension copy this script in your Magento root directory p.e. with the name m4mremove.sh, give it run permission and run it passing --user --pass and --db parameters this whay:
./m4mremove.sh --user YOURDEBUSER --pass YOURUSERDBPASS --db YOURMAGENTODBNAME\
#!/bin/bash
helpFunction()
{
echo ""
echo "Usage: $0 --user dbuser --pass dbpass --db dbname"
exit 1
}
user=${user:-empty}
pass=${pass:-empty}
db=${db:-empty}
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
param="${1/--/}"
declare $param="$2"
fi
shift
done
if [ "$user" = "empty" ];
then
echo "The user can't be empty"
helpFunction
fi
if [ "$pass" = "empty" ];
then
echo "The pass can't be empty"
helpFunction
fi
if [ "$db" = "empty" ];
then
echo "The db can't be empty"
helpFunction
fi
rm -rf app/code/community/Ebizmarts/MailChimp
rm -rf lib/Ebizmarts
rm -rf lib/Mandrill
rm -rf app/design/adminhtml/default/default/layout/ebizmarts
rm -rf app/design/adminhtml/default/default/template/ebizmarts
rm -rf app/design/frontend/base/default/layout/ebizmarts
rm -rf app/design/frontend/base/default/template/ebizmarts/mailchimp
rm -rf js/ebizmarts/mailchimp
rm -rf skin/adminhtml/default/default/ebizmarts/mailchimp
rm -rf skin/adminhtml/default/default/ebizmarts/mandrill
rm -rf dev/tests/mailchimp
rm -rf var/mailchimp;
rm app/etc/modules/Ebizmarts_MailChimp.xml
rm app/locale/en_US/Ebizmarts_MailChimp.csv
rm shell/getMailchimpResponse.php
rm shell/m4mlogs.sh
mysql -u "$user" -p"$pass" "$db" <<ENDSQL
drop table mailchimp_ecommerce_sync_data;
drop table mailchimp_errors;
drop table mailchimp_interest_group;
drop table mailchimp_stores;
drop table mailchimp_sync_batches;
drop table mailchimp_webhook_request;
alter table newsletter_subscriber drop column subscriber_firstname;
alter table newsletter_subscriber drop column subscriber_lastname;
alter table newsletter_subscriber drop column mailchimp_sync_delta;
alter table newsletter_subscriber drop column mailchimp_sync_error;
alter table newsletter_subscriber drop column mailchimp_sync_modified;
alter table sales_flat_order drop column mailchimp_campaign_id;
alter table sales_flat_order drop column mailchimp_abandonedcart_flag;
alter table sales_flat_order drop column mailchimp_landing_page;
alter table sales_flat_quote drop column mailchimp_abandonedcart_flag;
alter table sales_flat_quote drop column mailchimp_landing_page;
alter table sales_flat_quote drop column mailchimp_campaign_id;
delete from customer_eav_attribute where attribute_id = (select attribute_id from eav_attribute where attribute_code = 'mailchimp_store_view');
delete from eav_attribute where attribute_code = 'mailchimp_store_view';
delete from core_config_data where path like 'mailchimp%';
ENDSQL