Skip to content

Commit

Permalink
Merge pull request #2012 from mailchimp/Issue2002-2.3.6-p1
Browse files Browse the repository at this point in the history
Issue2002 2.3.6 p1
  • Loading branch information
gonzaloebiz authored Oct 1, 2024
2 parents 4f2c694 + 64a4230 commit 3868750
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 296 deletions.
50 changes: 0 additions & 50 deletions Block/Adminhtml/System/Config/CleanEcommerce.php

This file was deleted.

92 changes: 0 additions & 92 deletions Controller/Adminhtml/Ecommerce/CheckEcommerce.php

This file was deleted.

99 changes: 0 additions & 99 deletions Controller/Adminhtml/Ecommerce/CleanEcommerce.php

This file was deleted.

7 changes: 0 additions & 7 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,6 @@
<field id="*/*/active">1</field>
</depends>
</field>
<field id="clean_ecommerce" translate="button_label" type="button" sortOrder="87" showInDefault="1" showInWebsite="1" showInStore="1">
<button_label>Remove Unused Registers</button_label>
<frontend_model>Ebizmarts\MailChimp\Block\Adminhtml\System\Config\CleanEcommerce</frontend_model>
<depends>
<field id="*/*/active">1</field>
</depends>
</field>
<field id="fix_mailchimpjs" translate="button_label" type="button" sortOrder="88" showInDefault="1" showInWebsite="1" showInStore="1">
<button_label>Fix Mailchimp JS in frontend</button_label>
<frontend_model>Ebizmarts\MailChimp\Block\Adminhtml\System\Config\FixMailchimpJS</frontend_model>
Expand Down
6 changes: 0 additions & 6 deletions view/adminhtml/templates/system/config/cleanecommerce.phtml

This file was deleted.

2 changes: 0 additions & 2 deletions view/adminhtml/templates/system/config/fieldset/hint.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"getInterestUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/getInterest'));?>",
"resyncSubscribersUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/resyncSubscribers'));?>",
"resyncProductsUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/resyncProducts'));?>",
"cleanEcommerceUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/cleanEcommerce'));?>",
"checkEcommerceUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/checkEcommerce'));?>",
"fixMailchimpjsUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/fixMailchimpJS'));?>",
"scope": "<?= $block->escapeHtml($block->getScope());?>",
"scopeId": "<?= $block->escapeHtml($block->getScopeId()); ?>"
Expand Down
41 changes: 1 addition & 40 deletions view/adminhtml/web/js/configapikey.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ define(
"getInterestUrl": "",
"resyncSubscribersUrl": "",
"resyncProductsUrl": "",
"cleanEcommerceUrl": "",
"checkEcommerceUrl": "",
"fixMailchimpjsUrl": "",
"scope": "",
"scopeId": ""
Expand Down Expand Up @@ -59,10 +57,6 @@ define(
var mailchimpStoreId = $('#mailchimp_general_monkeystore').find(':selected').val();
self._resyncProducts(mailchimpStoreId);
});
self._checkCleanButton();
$('#mailchimp_general_clean_ecommerce').click(function () {
self._cleanEcommerce();
});
$('#mailchimp_general_fix_mailchimpjs').click(function () {
self._fixMailchimpJS();
});
Expand Down Expand Up @@ -179,47 +173,14 @@ define(
$("#row_mailchimp_ecommerce_reset_errors_retry").show();
$("#mailchimp_ecommerce_reset_errors_retry").show();
$("#row_mailchimp_ecommerce_reset_errors_noretry").show();
$("#mailchimp_ecommerce_reset_errors_noretry").show();
$("#row_mailchimp_ecommerce_clean_errors_months").show();
$("#mailchimp_ecommerce_clean_errors_months").show();
$("#mailchimp_ecommerce_reset_errors_noretry").show();
$("#row_mailchimp_ecommerce_delete_store").show();
$("#mailchimp_ecommerce_delete_store").show();
$("#row_mailchimp_ecommerce_resync_products").show();
$("#mailchimp_ecommerce_resync_products").show();
},
_checkCleanButton: function () {
var checkEcommerceUrl = this.options.checkEcommerceUrl;
$.ajax({
url: checkEcommerceUrl,
data: {'form_key': window.FORM_KEY},
type: 'GET',
dataType: 'json',
showLoader: true
}).done(function (data) {
if (data.valid == -1) {
alert({content: 'Error: can\'t check the unused registers'});
} else if (data.valid == 0) {
$('#row_mailchimp_general_clean_ecommerce').hide();
$('#mailchimp_general_clean_ecommerce').hide();
}
});
},
_cleanEcommerce: function () {
var cleanEcommerceUrl = this.options.cleanEcommerceUrl;
$.ajax({
url: cleanEcommerceUrl,
data: {'form_key': window.FORM_KEY},
type: 'GET',
dataType: 'json',
showLoader: true
}).done(function (data) {
if (data.valid == 0) {
alert({content: 'Error: can\'t remove the unused registers'});
} else if (data.valid == 1) {
alert({content: 'All unused registers are deleted'});
}
});
},
_fixMailchimpJS: function ()
{
var fixMailchimpjsUrl = this.options.fixMailchimpjsUrl;
Expand Down

0 comments on commit 3868750

Please sign in to comment.