Skip to content

Commit

Permalink
Merge pull request #1844 from mailchimp/Issue1841-2.3.6-p1
Browse files Browse the repository at this point in the history
closes #1841 for magento 2.3.6-p1
  • Loading branch information
gonzaloebiz authored Oct 2, 2023
2 parents 5179a38 + 09a7b94 commit 409f97d
Show file tree
Hide file tree
Showing 20 changed files with 128 additions and 127 deletions.
50 changes: 25 additions & 25 deletions view/adminhtml/templates/customer/edit/tabs/mailchimp.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ $interest = $block->getInterest();
?>
<div class="fieldset-wrapper">
<div class="fieldset-wrapper-title">
<span class="title"><?php /* @escapeNotVerified */ echo __('MailChimp Information') ?></span>
<span class="title"><?= $block->escapeHtml(__('MailChimp Information')) ?></span>
</div>
<div class="admin__fieldset-wrapper-content">
<fieldset class="admin__fieldset">
<?php if (count($interest)): ?>
<?php foreach($interest as $i): ?>
<?php foreach ($interest as $i): ?>
<div class="admin__field">
<label class="admin__field-label" for="<?php echo $i['interest']['id'] ?>">
<span><?php echo $i['interest']['title'] ?></span>
<label class="admin__field-label" for="<?= $block->escapeHtml($i['interest']['id']) ?>">
<span><?= $block->escapeHtml($i['interest']['title']) ?></span>
</label>
<div class="admin__field-control control">
<div class="fields">
<?php switch($i['interest']['type']):
<?php switch ($i['interest']['type']):
case 'checkboxes': ?>
<ul class="admin_field_field field" style="list-style: none">
<?php foreach($i['category'] as $c): ?>
<?php foreach ($i['category'] as $c): ?>
<li class="field no-label">
<input
name="customer[interestgroup][<?php echo $i['interest']['id'] ?>][<?php echo $c['id']?>]"
name="customer[interestgroup][<?= $block->escapeHtml($i['interest']['id']) ?>][<?= $block->escapeHtml($c['id']) ?>]"
type="checkbox"
data-form-part="customer_form"
value="<?php echo $c['id'] ?>"
id="<?php echo 'mailchimp_group_'.$c['id'] ?>"
title="<?php echo $c['name'] ?>"
<?php if($c['checked']) { echo 'checked';} ?>
value="<?= $block->escapeHtml($c['id']) ?>"
id="<?= $block->escapeHtml('mailchimp_group_'.$c['id']) ?>"
title="<?= $block->escapeHtml($c['name']) ?>"
<?php if ($c['checked']) { echo $block->escapeHtml('checked');} ?>
/>
<label class="field label"><?php echo $c['name']?></label>
<label class="field label"><?= $block->escapeHtml($c['name'])?></label>
</li>
<?php endforeach; ?>
</ul>
Expand All @@ -41,31 +41,31 @@ $interest = $block->getInterest();
<div class="field no-label">
<select class="admin_field_field field"
data-form-part="customer_form"
name="customer[interestgroup][<?php echo $i['interest']['id'] ?>]"
id="<?php echo 'mailchimp_group_'.$i['interest']['id'] ?>"
title="<?php echo $i['interest']['title'] ?>">
name="customer[interestgroup][<?= $block->escapeHtml($i['interest']['id']) ?>]"
id="<?= $block->escapeHtml('mailchimp_group_'.$i['interest']['id']) ?>"
title="<?= $block->escapeHtml($i['interest']['title']) ?>">
<option value=""></option>
<?php foreach($i['category'] as $c): ?>
<option value="<?php echo $c['id']?>" <?php if($c['checked']) { echo 'selected'; } ?>><?php echo $c['name'] ?></option>
<?php foreach ($i['category'] as $c): ?>
<option value="<?= $block->escapeHtml($c['id'])?>" <?php if ($c['checked']) { echo $block->escapeHtml('selected'); } ?>><?= $block->escapeHtml($c['name']) ?></option>
<?php endforeach; ?>
</select>

</div>
<?php break;
case 'radio': ?>
<ul class="admin_field_field field">
<?php foreach($i['category'] as $c): ?>
<?php foreach ($i['category'] as $c): ?>
<li class="field no-label" style="list-style: none">
<input class=""
name="customer[interestgroup][<?php echo $i['interest']['id'] ?>]"
name="customer[interestgroup][<?= $block->escapeHtml($i['interest']['id']) ?>]"
type="radio"
data-form-part="customer_form"
value="<?php echo $c['id'] ?>"
id="<?php echo 'mailchimp_group_'.$c['id'] ?>"
title="<?php echo $c['name'] ?>"
<?php if($c['checked']) { echo 'checked';} ?>
value="<?= $block->escapeHtml($c['id']) ?>"
id="<?= $block->escapeHtml('mailchimp_group_'.$c['id']) ?>"
title="<?= $block->escapeHtml($c['name']) ?>"
<?php if ($c['checked']) { echo $block->escapeHtml('checked');} ?>
/>
<label class="field label"><?php echo $c['name']?></label>
<label class="field label"><?= $block->escapeHtml($c['name'])?></label>
</li>
<?php endforeach; ?>
</ul>
Expand All @@ -77,7 +77,7 @@ $interest = $block->getInterest();
<?php endforeach; ?>
<?php else: ?>
<div class="admin__field">
<?php echo __("No Interest groups found"); ?>
<?= $block->escapeHtml(__("No Interest groups found")); ?>
</div>
<?php endif; ?>
</fieldset>
Expand Down
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/cleanecommerce.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="actions actions-clean-ecommerce">
<div id="validation_result" class="message-validation hidden"></div>
<button class="action-clean-ecommerce" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button class="action-clean-ecommerce" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="actions actions-get-apikey">
<button onclick="javascript:window.open('<?php echo $this->authorizeRequestUrl() ?>', 'apiwizard','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=100, top=100, width=800, height=600'); return false;" class="action-get-apikey" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button onclick="javascript:window.open('<?= $block->escapeUrl($block->authorizeRequestUrl()) ?>', 'apiwizard','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=100, top=100, width=800, height=600'); return false;" class="action-get-apikey" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/createwebhook.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="actions actions-create-webhook">
<div id="validation_result" class="message-validation hidden"></div>
<button class="action-create-webhook" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button class="action-create-webhook" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/deletestore.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</div>
<div class="actions actions-delete-store">
<div id="validation_result" class="message-validation hidden"></div>
<button onclick="mailchimpdeleteconfirmation('<?php echo $this->getAjaxCheckUrl() ?>')" class="action-delete-store" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button onclick="mailchimpdeleteconfirmation('<?= $block->escapeHtml($block->getAjaxCheckUrl()) ?>')" class="action-delete-store" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
34 changes: 17 additions & 17 deletions view/adminhtml/templates/system/config/fieldset/hint.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@
?>
<div id="configmonkey_apikey" class="admin__page-section-item" style="display:none;"
data-mage-init='{"configmonkeyapikey":{
"storeUrl": "<?php echo $this->getUrl('mailchimp/stores/get');?>",
"detailsUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/getaccountdetails');?>",
"storeGridUrl": "<?php echo $this->getUrl('mailchimp/stores/index');?>",
"createWebhookUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/createWebhook');?>",
"getInterestUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/getInterest');?>",
"resyncSubscribersUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/resyncSubscribers');?>",
"resyncProductsUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/resyncProducts');?>",
"cleanEcommerceUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/cleanEcommerce');?>",
"checkEcommerceUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/checkEcommerce');?>",
"fixMailchimpjsUrl": "<?php echo $this->getUrl('mailchimp/ecommerce/fixMailchimpJS');?>",
"scope": "<?php echo $this->getScope();?>",
"scopeId": "<?php echo $this->getScopeId(); ?>"
"storeUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/stores/get'));?>",
"detailsUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/getaccountdetails'));?>",
"storeGridUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/stores/index'));?>",
"createWebhookUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/ecommerce/createWebhook'));?>",
"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()); ?>"
}}'>
</div>
<div style="background:#EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:11px 0 0 10px;">
<h4>
<img width="224px" style="padding-left: 15px;" height="60px" src="https://ebizmarts-website.s3.amazonaws.com/Logo_Ebizmarts.png"/><br><br>
<div style="padding-left: 15px;">
<p> <strong style="color:#EA7601;"><?php echo __('Mailchimp v') ?><?php echo $this->getModuleVersion() ?><?php echo __(' by') ?></strong> <a target="_blank" href="http://ebizmarts.com"><strong>ebizmarts</strong></a></p>
<p><?php echo __('Need help? See our ') ?><a href="https://github.com/mailchimp/mc-magento2/wiki" target="_blank"><?php echo __('Wiki') ?></a><?php echo __(' Got feedback? ') ?><a href="mailto:[email protected]?Subject=MailChimp For Magento Version <?php echo $this->getModuleVersion()?>"><?php echo __('Email us') ?></a></p>
<p><?php echo __('You can find more extension in our ') ?><a href="http://store.ebizmarts.com" target="_blank"><?php echo __('Store') ?></a></p>
<?php if (!$this->getHasApiKey() ) : ?>
<p> <strong style="color:#EA7601;"><?= $block->escapeHtml(__('Mailchimp v')) ?><?= $block->escapeHtml($block->getModuleVersion()) ?><?= $block->escapeHtml(__(' by')) ?></strong> <a target="_blank" href="http://ebizmarts.com"><strong>ebizmarts</strong></a></p>
<p><?= $block->escapeHtml(__('Need help? See our ')) ?><a href="https://github.com/mailchimp/mc-magento2/wiki" target="_blank"><?= $block->escapeHtml(__('Wiki')) ?></a><?= $block->escapeHtml(__(' Got feedback? ')) ?><a href="mailto:[email protected]?Subject=MailChimp For Magento Version <?= $block->escapeHtml($block->getModuleVersion())?>"><?= $block->escapeHtml(__('Email us')) ?></a></p>
<p><?= $block->escapeHtml(__('You can find more extension in our ')) ?><a href="http://store.ebizmarts.com" target="_blank"><?= $block->escapeHtml(__('Store')) ?></a></p>
<?php if (!$block->getHasApiKey()): ?>
<p><a style="padding-top: 5px;padding-bottom:5px;padding-left: 30px;padding-right: 30px;background-color:#D75F07 ;color:white;font-weight: bold" href="https://bit.ly/2KpDH5C" target="_blank">Support Mailchimp4Magento, Subscribe for a free Mailchimp Account!</a> </p>
<?php endif; ?>
</div>
</h4>
</div>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/fixmailchimpjs.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="actions actions-fix-mailchimp-js">
<div id="validation_result" class="message-validation hidden"></div>
<button class="action-fix-mailchimp-js" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button class="action-fix-mailchimp-js" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/js.phtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div id="monkey_apikey" class="admin__page-section-item" style="display:none;"
data-mage-init='{"monkeyapikey":{"apikeyUrl": "<?php echo $this->getUrl('mailchimp/lists/get');?>"}}'>
</div>
data-mage-init='{"monkeyapikey":{"apikeyUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/lists/get'));?>"}}'>
</div>
6 changes: 3 additions & 3 deletions view/adminhtml/templates/system/config/oauth_wizard.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="actions actions-get-apikey">
<div id="validation_result" class="message-validation hidden"></div>
<button onclick="javascript:window.open('<?php echo $this->authorizeRequestUrl() ?>', 'apiwizard','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=100, top=100, width=500, height=700'); return false;" class="action-get-apikey" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button onclick="javascript:window.open('<?= $block->escapeUrl($block->authorizeRequestUrl()) ?>', 'apiwizard','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=100, top=100, width=500, height=700'); return false;" class="action-get-apikey" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/reseterrors.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</div>
<div class="actions actions-reset-errors">
<div id="validation_result" class="message-validation hidden"></div>
<button onclick="mailchimpdeleteconfirmation('<?php echo $this->getAjaxCheckUrl() ?>')" class="action-reset-errors" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button onclick="mailchimpdeleteconfirmation('<?= $block->escapeUrl($block->getAjaxCheckUrl()) ?>')" class="action-reset-errors" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</div>
<div class="actions actions-reset-errors">
<div id="validation_result" class="message-validation hidden"></div>
<button onclick="mailchimpdeleteconfirmation('<?php echo $this->getAjaxCheckUrl() ?>')" class="action-reset-errors" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button onclick="mailchimpdeleteconfirmation('<?= $block->escapeUrl($block->getAjaxCheckUrl()) ?>')" class="action-reset-errors" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
8 changes: 4 additions & 4 deletions view/adminhtml/templates/system/config/resetstore.phtml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script type="text/javascript">
<script>
//<![CDATA[
function resetStore() {
jQuery.ajax({
url: '<?php echo $this->getAjaxCheckUrl() ?>',
url: '<?= $block->escapeUrl($block->getAjaxCheckUrl()) ?>',
data: {form_key: window.FORM_KEY},
type: 'POST',
success: function(data){
Expand All @@ -26,7 +26,7 @@

<div class="actions actions-reset-store">
<div id="validation_result" class="message-validation hidden"></div>
<button onclick="javascript:resetStore(); return false;" class="action-reset-store" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button onclick="javascript:resetStore(); return false;" class="action-reset-store" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/resyncproducts.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="actions actions-resync-products">
<div id="validation_result" class="message-validation hidden"></div>
<button class="action-resync-products" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button class="action-resync-products" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
4 changes: 2 additions & 2 deletions view/adminhtml/templates/system/config/resyncsubscriber.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="actions actions-resync-customer">
<div id="validation_result" class="message-validation hidden"></div>
<button class="action-resync-subscribers" type="button" id="<?php echo $block->getHtmlId() ?>">
<span><?php echo $block->escapeHtml($block->getButtonLabel()) ?></span>
<button class="action-resync-subscribers" type="button" id="<?= $block->getHtmlId() ?>">
<span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
</button>
</div>
3 changes: 2 additions & 1 deletion view/adminhtml/templates/tab/view.phtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?php
/** @var $block \Ebizmarts\MailChimp\Block\Adminhtml\Customer\Edit\Tabs\Mailchimp */
echo $block->getChildHtml();
?>
<?= $block->getChildHtml(); ?>
4 changes: 2 additions & 2 deletions view/frontend/templates/catcher.phtml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div id="monkey_campaign" style="display:none;"
data-mage-init='{"campaigncatcher":{"checkCampaignUrl": "<?php echo $this->getUrl('mailchimp/campaign/check');?>"}}'>
</div>
data-mage-init='{"campaigncatcher":{"checkCampaignUrl": "<?= $block->escapeUrl($block->getUrl('mailchimp/campaign/check'));?>"}}'>
</div>
Loading

0 comments on commit 409f97d

Please sign in to comment.