Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vulnerability issues 10.0.32 #520

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
422 commits
Select commit Hold shift + click to select a range
758591d
issue #194
gonzaloebiz Feb 19, 2018
09b9ad0
issue #194
gonzaloebiz Feb 19, 2018
fbe5bb3
issue #194
gonzaloebiz Feb 19, 2018
00dea28
closes #210
gonzaloebiz Feb 19, 2018
c6976b2
closes #194
gonzaloebiz Feb 19, 2018
570af1e
closes #194
gonzaloebiz Feb 19, 2018
25383c7
Merge branch 'develop' into Issue194
gonzaloebiz Feb 19, 2018
854809d
Merge pull request #211 from mailchimp/Issue194
gonzaloebiz Feb 19, 2018
63d777a
closes #197
gonzaloebiz Feb 20, 2018
cbfc3b7
closes #212
gonzaloebiz Feb 20, 2018
d6e2c48
Merge pull request #213 from mailchimp/Issue197
gonzaloebiz Feb 20, 2018
845ea2f
put a warning in not connected stores closes #214
gonzaloebiz Feb 21, 2018
65ac09d
Merge pull request #215 from mailchimp/Issue214
gonzaloebiz Feb 21, 2018
ae228ab
closes #216
gonzaloebiz Feb 21, 2018
3130520
Merge pull request #217 from mailchimp/Issue216
gonzaloebiz Feb 21, 2018
3d9ac02
closes #112
gonzaloebiz Feb 22, 2018
ae1a9aa
Merge pull request #218 from mailchimp/Issue112
gonzaloebiz Feb 22, 2018
17c1ef1
change version to 1.0.28
gonzaloebiz Feb 23, 2018
e47773d
Merge pull request #219 from mailchimp/NewVersion
gonzaloebiz Feb 23, 2018
bf16d4f
add changelog
gonzaloebiz Feb 27, 2018
f0b0cee
Merge pull request #221 from mailchimp/Changelog
gonzaloebiz Feb 27, 2018
42a197f
closes #207
gonzaloebiz Feb 28, 2018
626e836
Merge pull request #222 from mailchimp/Issue207
gonzaloebiz Feb 28, 2018
a14f55a
Merge pull request #180 from jhruehl/patch-1
gonzaloebiz Feb 28, 2018
d75791d
test #207
gonzaloebiz Mar 9, 2018
5587166
add the phtml for create webhook button
gonzaloebiz Mar 12, 2018
866a9f8
add the block for create webhook button #229
gonzaloebiz Mar 12, 2018
1955ad3
add the create webhook button #229
gonzaloebiz Mar 12, 2018
e8eda06
Update README.md
Santiagoebizmarts Mar 13, 2018
d902dea
add configuration url for create webhook #229
gonzaloebiz Mar 13, 2018
45e9d8c
move the js logic to configapikey #229
gonzaloebiz Mar 13, 2018
782bb28
add the logic for the create webhook button #229
gonzaloebiz Mar 13, 2018
500b2b2
remove comments #229
gonzaloebiz Mar 13, 2018
fed9fad
create webhook controller #229
gonzaloebiz Mar 13, 2018
e33574f
fix the create webhook function #229
gonzaloebiz Mar 13, 2018
4b8a358
fix the create webhook function #229
gonzaloebiz Mar 13, 2018
a3d49cb
Merge pull request #233 from mailchimp/Issue229
gonzaloebiz Mar 13, 2018
e210203
add loader, change message
gonzaloebiz Mar 13, 2018
4245f59
Merge pull request #234 from mailchimp/Issue229
gonzaloebiz Mar 13, 2018
83dcfa7
Merge pull request #231 from mailchimp/fix-doc-link
gonzaloebiz Mar 13, 2018
893e797
Fix getJsUrl method to use config cache properly
Mar 14, 2018
c926134
Merge pull request #236 from wojtekn/fix_js_url_cache
gonzaloebiz Mar 14, 2018
dd661c4
enable apikeylist in website and store view #240
gonzaloebiz Mar 15, 2018
67e3dd4
add the getallapikeys, used for retrieve all the possible apikeys use…
gonzaloebiz Mar 15, 2018
5b555a1
add storeId #240
gonzaloebiz Mar 15, 2018
0b57461
add storeId #240
gonzaloebiz Mar 15, 2018
a26a07a
add all the possible apikeys in the magento installation #240
gonzaloebiz Mar 15, 2018
20668a6
closes #241
gonzaloebiz Mar 16, 2018
8297f5c
closes #243
gonzaloebiz Mar 16, 2018
56296ca
Merge pull request #244 from mailchimp/Issue243
gonzaloebiz Mar 16, 2018
82b3b1b
Merge pull request #242 from mailchimp/Issue241
gonzaloebiz Mar 16, 2018
4baf450
compare the to and from date of special price
gonzaloebiz Mar 19, 2018
212664a
Merge pull request #245 from mailchimp/Issue194
gonzaloebiz Mar 19, 2018
2ecbe0d
closes #246
gonzaloebiz Mar 19, 2018
f5f8e59
Merge pull request #247 from mailchimp/Issue246
gonzaloebiz Mar 19, 2018
d15ce82
change the entire approach
gonzaloebiz Mar 20, 2018
adde914
fixes the dates comparision
gonzaloebiz Mar 20, 2018
0372f0b
Merge pull request #249 from mailchimp/Issue194
gonzaloebiz Mar 20, 2018
f2ea315
remove echo
gonzaloebiz Mar 21, 2018
8d5b189
Merge pull request #251 from mailchimp/Issue248
gonzaloebiz Mar 21, 2018
f7cd2f4
fix the date issue with special prices
gonzaloebiz Mar 21, 2018
4a529e9
Merge pull request #252 from mailchimp/Issue194
gonzaloebiz Mar 21, 2018
e0f4b2e
closes #253
gonzaloebiz Mar 22, 2018
96b3ec6
Merge pull request #254 from mailchimp/Issue253
gonzaloebiz Mar 22, 2018
64e2a5c
closes #255
gonzaloebiz Mar 22, 2018
98a5b58
closes #256
gonzaloebiz Mar 22, 2018
792263e
closes #257
gonzaloebiz Mar 23, 2018
f1a1cac
closes #223
gonzaloebiz Mar 26, 2018
c58df1a
change CHANGELOG
gonzaloebiz Mar 27, 2018
1f7950c
Merge pull request #259 from mailchimp/Version1.0.28
gonzaloebiz Mar 27, 2018
d260a6e
Merge pull request #261 from mailchimp/Issue256
gonzaloebiz Mar 27, 2018
3363ef2
Merge pull request #262 from mailchimp/Issue257
gonzaloebiz Mar 27, 2018
ca624d3
Merge pull request #260 from mailchimp/Issue255
gonzaloebiz Mar 27, 2018
e52ada7
Merge pull request #263 from mailchimp/Issue223
gonzaloebiz Mar 27, 2018
acc5b80
fix decodeArrayFieldValue when run setup:upgrade
gundamkid Mar 28, 2018
c9e6b09
Merge pull request #265 from gundamkid/develop
gonzaloebiz Mar 29, 2018
d200651
closes #267
gonzaloebiz Mar 29, 2018
3dad322
closes #266
gonzaloebiz Mar 29, 2018
369a70a
Merge pull request #269 from mailchimp/Issue266
gonzaloebiz Mar 29, 2018
ad06d40
Merge pull request #268 from mailchimp/Issue267
gonzaloebiz Mar 29, 2018
12b2a72
closes #258
gonzaloebiz Apr 2, 2018
4dd7b8e
Merge pull request #270 from mailchimp/Issue258
gonzaloebiz Apr 2, 2018
a8a35ee
Merge pull request #271 from mailchimp/Issue240
gonzaloebiz Apr 2, 2018
c365e6a
closes #147
gonzaloebiz Apr 5, 2018
84cebaf
Merge pull request #272 from mailchimp/Issue147
gonzaloebiz Apr 5, 2018
dcd8d22
fix issue with the order_id
gonzaloebiz Apr 11, 2018
6a71722
Merge pull request #275 from mailchimp/Issue274
gonzaloebiz Apr 11, 2018
e18ffc5
closes #278 Webhook cronjob fails when updating customer
ebizmarts-keller Apr 16, 2018
e9d0e96
Merge pull request #279 from mailchimp/Issue278
ebizmarts-keller Apr 16, 2018
2f6b2bc
Change cron group id to 'mailchimp'.
jhruehl Apr 17, 2018
e8106e2
Add check before renaming 'address_address1' table column
Apr 17, 2018
9d32364
Merge pull request #282 from jhruehl/patch-2
gonzaloebiz Apr 18, 2018
bfcb69b
Merge pull request #283 from RobAimes/feature/schema-upgrade-patch
gonzaloebiz Apr 18, 2018
ccf9b7f
closes #277
gundamkid Apr 18, 2018
62275cb
Merge pull request #284 from gundamkid/products
gonzaloebiz Apr 18, 2018
a36dd90
closes #280
gundamkid Apr 18, 2018
0cf91e5
Merge pull request #285 from gundamkid/products
gonzaloebiz Apr 18, 2018
01ee70c
include de closes recomendation
gonzaloebiz Apr 18, 2018
bbe645f
Merge pull request #286 from mailchimp/contributing
Santiagoebizmarts Apr 18, 2018
30004ca
closes #293
gonzaloebiz Apr 26, 2018
27e8aee
Merge pull request #294 from mailchimp/Issue293
gonzaloebiz Apr 26, 2018
550bb71
closes #295
gonzaloebiz Apr 26, 2018
1e15df7
Merge pull request #296 from mailchimp/Issue295
gonzaloebiz Apr 26, 2018
e3687d8
closes #289
gonzaloebiz Apr 26, 2018
edab5df
Merge pull request #297 from mailchimp/Issue289
gonzaloebiz Apr 26, 2018
28ad7f7
closes #302 Add additional checks for merge fields
ebizmarts-keller May 4, 2018
a21ee9e
Merge pull request #304 from mailchimp/Issue302
ebizmarts-keller May 4, 2018
46b1c1e
closes #307
gonzaloebiz May 11, 2018
8280efc
Merge pull request #308 from mailchimp/Issue307
gonzaloebiz May 11, 2018
c8640ee
can't merge a simple operation with an array of operations
gonzaloebiz May 22, 2018
92da414
Merge pull request #311 from mailchimp/Issue277
gonzaloebiz May 22, 2018
6c60be5
closes #313
gonzaloebiz May 23, 2018
875e679
closes #313
gonzaloebiz May 23, 2018
729fa96
Merge pull request #315 from mailchimp/Issue313
gonzaloebiz May 23, 2018
29a1508
closes #316
gonzaloebiz May 28, 2018
964eab5
Merge pull request #317 from mailchimp/Issue316
gonzaloebiz May 28, 2018
788e0d7
closes #220
gonzaloebiz May 31, 2018
9e61c25
Merge pull request #319 from mailchimp/Issue220
gonzaloebiz May 31, 2018
da375aa
change version
gonzaloebiz May 31, 2018
9accd5d
Merge pull request #320 from mailchimp/Issue220
gonzaloebiz May 31, 2018
aba5aca
closes #321
gonzaloebiz Jun 5, 2018
b6d960f
Merge pull request #322 from mailchimp/Issue321
gonzaloebiz Jun 5, 2018
fa086a3
add control to see if mailchimp is available
gonzaloebiz Jun 27, 2018
e3a2b5c
Merge pull request #334 from mailchimp/Issue325
gonzaloebiz Jun 27, 2018
79a72d4
closes #335
gonzaloebiz Jul 3, 2018
7c8ced2
Merge pull request #336 from mailchimp/Issue335
gonzaloebiz Jul 3, 2018
7c6a9c0
control if the extension is enabled
gonzaloebiz Jul 6, 2018
594c5be
Merge pull request #341 from mailchimp/Issue339
gonzaloebiz Jul 6, 2018
c573f4f
check if some magento store has an specific mailchimp list
gonzaloebiz Jul 6, 2018
076b574
Merge pull request #342 from mailchimp/Issue337
gonzaloebiz Jul 6, 2018
4cccf9d
Issue345: Ensure variable active is assigned
Jul 11, 2018
537c392
Merge pull request #346 from RidRack/Issue345-Envphp-null-check
gonzaloebiz Jul 11, 2018
2bd3c2e
closes #351
gonzaloebiz Jul 17, 2018
c008698
Merge pull request #352 from mailchimp/Issue351
gonzaloebiz Jul 17, 2018
f6a8b09
closes #355
gonzaloebiz Jul 26, 2018
1f3b4b7
Merge pull request #356 from mailchimp/Issue355
gonzaloebiz Jul 26, 2018
8cafa43
add calls to new function getFriendlyMessage in mailchimp-lib
gonzaloebiz Aug 1, 2018
59d22c9
closes #359
gonzaloebiz Aug 2, 2018
4b149da
you must use ebizmarts/mailchimp-lib 3.0.26 and up #359
gonzaloebiz Aug 2, 2018
1a31499
Merge pull request #360 from mailchimp/Issue359
gonzaloebiz Aug 2, 2018
c9a2836
add counters for resume the cron activity
gonzaloebiz Aug 7, 2018
f348b5f
closes #366
gonzaloebiz Aug 7, 2018
a543771
Merge pull request #367 from mailchimp/Issue366
gonzaloebiz Aug 7, 2018
2c748fb
closes #361
gonzaloebiz Aug 16, 2018
fe0431f
closes #361
gonzaloebiz Aug 16, 2018
9761be7
closes #368
gonzaloebiz Aug 16, 2018
5d1e846
closes #368
gonzaloebiz Aug 16, 2018
c643314
Merge pull request #369 from mailchimp/Issue368
gonzaloebiz Aug 16, 2018
f4124f2
closes #370
gonzaloebiz Aug 16, 2018
4410cf9
Merge pull request #371 from mailchimp/Issue370
gonzaloebiz Aug 16, 2018
350c60c
add option to manage the the emails with magento
gonzaloebiz Aug 21, 2018
ae83be7
add const for magento emails #372
gonzaloebiz Aug 21, 2018
32db959
add control to use magento emails configuration
gonzaloebiz Aug 21, 2018
5679df8
Merge pull request #373 from mailchimp/Issue372
gonzaloebiz Aug 21, 2018
60ecfe2
Adding extra logging on import parts of the Cronjob
maximbaibakov Aug 27, 2018
75d570c
Move mailchimp_sales_model_service_quote_submit_after observer to fro…
Aug 27, 2018
acb4ff4
Merge pull request #379 from wojtekn/develop
gonzaloebiz Aug 27, 2018
2afdc32
Merge pull request #380 from mailchimp/Issue361
gonzaloebiz Aug 27, 2018
58b1e11
change version to 1.0.30
gonzaloebiz Aug 28, 2018
82242f5
Merge pull request #381 from mailchimp/Version-1.0.30
gonzaloebiz Aug 28, 2018
9475143
closes #357
gonzaloebiz Aug 29, 2018
9bd68d5
Merge pull request #382 from mailchimp/Issue357
gonzaloebiz Aug 29, 2018
c71529b
Create temporary directory, if that does not exist
maximbaibakov Sep 12, 2018
231fc8a
Merge pull request #1 from maximbaibakov/bugfix-388
maximbaibakov Sep 12, 2018
0fbca05
Update Ecommerce.php
maximbaibakov Sep 12, 2018
da8e08b
Update Ecommerce.php
maximbaibakov Sep 12, 2018
2ae0a80
closes #309
gonzaloebiz Sep 12, 2018
f65d7b2
closes #309
gonzaloebiz Sep 12, 2018
6aabf03
Merge pull request #390 from mailchimp/Issue309
gonzaloebiz Sep 12, 2018
25189aa
closes #391
gonzaloebiz Sep 12, 2018
3eca2a5
Merge pull request #392 from mailchimp/Issue391
gonzaloebiz Sep 12, 2018
6a9f799
Merge pull request #389 from maximbaibakov/bugfix-388
gonzaloebiz Sep 12, 2018
94041ea
Update Result.php
maximbaibakov Sep 13, 2018
d9c7d7c
Update Result.php
maximbaibakov Sep 13, 2018
b7a1387
Merge pull request #377 from maximbaibakov/develop
gonzaloebiz Sep 13, 2018
5106f39
closes #388
gonzaloebiz Sep 13, 2018
b374a06
closes #393
gonzaloebiz Sep 13, 2018
a9fc850
Merge pull request #394 from mailchimp/maxi
gonzaloebiz Sep 13, 2018
5bb0365
changelog version 1.0.30
gonzaloebiz Sep 13, 2018
6de7387
#361
gonzaloebiz Sep 18, 2018
d363070
Merge pull request #397 from mailchimp/changelog
gonzaloebiz Sep 18, 2018
362d1ef
This fix sets price to 0 if it's NULL
arendarenko Sep 28, 2018
5fdc5c8
closes #404
gonzaloebiz Sep 28, 2018
1593709
Merge pull request #405 from mailchimp/Issue404
gonzaloebiz Sep 28, 2018
dc3a08e
closes #406
gonzaloebiz Sep 28, 2018
4cd9ef3
Merge pull request #407 from mailchimp/Issue406
gonzaloebiz Sep 28, 2018
d45d3fb
closes #409
gonzaloebiz Oct 1, 2018
aef490c
closes #409
gonzaloebiz Oct 1, 2018
b846d51
Merge pull request #410 from mailchimp/Issue409
gonzaloebiz Oct 1, 2018
17ed133
Add condition to check if there is a special price (for cases when ti…
arendarenko Oct 4, 2018
a9158b8
Code improvements
arendarenko Oct 4, 2018
27d33e5
Merge pull request #403 from alexeya-ven/fix-nullable-price
gonzaloebiz Oct 5, 2018
e707866
#420 Fix filter when creating collection
ebizmarts-keller Oct 5, 2018
5854c1f
closes #420 Initialize total order count and total spent on 0
ebizmarts-keller Oct 5, 2018
ab00493
Merge pull request #421 from mailchimp/Issue420
ebizmarts-keller Oct 5, 2018
7738a96
add the block for the mailchimp combo #423
gonzaloebiz Oct 10, 2018
4295f3b
change the text field for mailchimp tag for a combo #423
gonzaloebiz Oct 10, 2018
a7f7dd1
add management for the mc combo #423
gonzaloebiz Oct 10, 2018
25bafb6
add name and type to the tag
gonzaloebiz Oct 10, 2018
51c4c07
Merge pull request #424 from mailchimp/Issue423
gonzaloebiz Oct 10, 2018
70257d9
Fix for #427
arendarenko Oct 11, 2018
1a141df
Fix for #427
arendarenko Oct 11, 2018
ae4f760
closes #429
gonzaloebiz Oct 11, 2018
26a1270
Merge pull request #430 from mailchimp/Issue429
gonzaloebiz Oct 11, 2018
62fb0bf
Merge remote-tracking branch 'mc-magento2/develop' into incorrect-sub…
arendarenko Oct 12, 2018
5d77add
Merge pull request #428 from alexeya-ven/incorrect-subscriber-storeid…
gonzaloebiz Oct 12, 2018
40dea67
closes #432
gonzaloebiz Oct 19, 2018
fae668e
Merge pull request #433 from mailchimp/Issue432
gonzaloebiz Oct 19, 2018
a4c6796
closes #431
gonzaloebiz Oct 19, 2018
ad3cb4c
remove log
gonzaloebiz Oct 19, 2018
53e973e
Merge pull request #434 from mailchimp/Issue431
gonzaloebiz Oct 19, 2018
da27208
closes #425
gonzaloebiz Oct 22, 2018
e4ea419
Merge pull request #436 from mailchimp/Issue425
gonzaloebiz Oct 22, 2018
7ca98ac
change main version
gonzaloebiz Oct 22, 2018
54ca6c7
Merge pull request #437 from mailchimp/changeversion
gonzaloebiz Oct 22, 2018
3f83fbd
closes #425
gonzaloebiz Oct 23, 2018
da38a3a
Merge pull request #441 from mailchimp/Issue425
gonzaloebiz Oct 23, 2018
2b68b64
closes #425
gonzaloebiz Oct 24, 2018
15122d9
closes #442
gonzaloebiz Oct 24, 2018
6fb0789
Merge pull request #443 from mailchimp/Issue425
gonzaloebiz Oct 24, 2018
ac9bdeb
Merge pull request #444 from mailchimp/Issue442
gonzaloebiz Oct 24, 2018
704847d
closes #445
gonzaloebiz Oct 25, 2018
d674b4e
Merge pull request #446 from mailchimp/Issue445
gonzaloebiz Oct 25, 2018
c83fc84
closes #448
gonzaloebiz Oct 30, 2018
e1fede6
Merge pull request #449 from mailchimp/Issue448
gonzaloebiz Oct 30, 2018
92a2dfb
Fix unique type validation in di.xml
ihor-sviziev Oct 31, 2018
965ab31
Merge pull request #450 from ihor-sviziev/patch-1
gonzaloebiz Oct 31, 2018
a6159df
change all the serialize an unserialize calls for \Magento\Framework\…
gonzaloebiz Oct 31, 2018
04ba3c8
convert all the serialized data in db
gonzaloebiz Nov 2, 2018
4ca399e
remove unused parameters
gonzaloebiz Nov 2, 2018
af91533
remove logs
gonzaloebiz Nov 2, 2018
986111e
Merge pull request #452 from mailchimp/Issue451
gonzaloebiz Nov 2, 2018
a43b7ec
put some try/catch to avoid that the upgrade fails closes #451
gonzaloebiz Nov 2, 2018
a4e1014
Merge pull request #453 from mailchimp/Issue451
gonzaloebiz Nov 2, 2018
8da5fb1
missing file closes #451
gonzaloebiz Nov 2, 2018
cf8b888
Merge pull request #454 from mailchimp/Issue451
gonzaloebiz Nov 2, 2018
068cb3a
closes #455
gonzaloebiz Nov 2, 2018
8b808c8
Merge pull request #456 from mailchimp/Issue455
gonzaloebiz Nov 2, 2018
0c5d379
modifications from phpcbf
gonzaloebiz Nov 6, 2018
1560693
changelog
gonzaloebiz Nov 6, 2018
c8c7b0e
Merge pull request #461 from mailchimp/changelog
gonzaloebiz Nov 8, 2018
d7497ed
closes #451
gonzaloebiz Nov 8, 2018
543d726
Merge pull request #462 from mailchimp/changelog
gonzaloebiz Nov 8, 2018
37c80b2
Fixing Bad Version on MarketPlace
gonzaloebiz Nov 8, 2018
f2cf73c
Merge pull request #463 from mailchimp/BadVersion
gonzaloebiz Nov 8, 2018
4005a70
Fixing Bad Version on MarketPlace
gonzaloebiz Nov 8, 2018
18de302
Merge pull request #464 from mailchimp/BadVersion
gonzaloebiz Nov 8, 2018
342df54
Fixing Bad Version on MarketPlace
gonzaloebiz Nov 8, 2018
0b9ec20
Merge pull request #466 from mailchimp/BadVersion
gonzaloebiz Nov 8, 2018
679a84f
Fix vulnerability issues
arendarenko Dec 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions Block/Adminhtml/Customer/Edit/Tabs/Mailchimp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?php
/**
* MailChimp Magento Component
*
* @category Ebizmarts
* @package MailChimp
* @author Ebizmarts Team <[email protected]>
* @copyright Ebizmarts (http://ebizmarts.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @date: 11/29/17 1:55 PM
* @file: Mailchimp.php
*/

namespace Ebizmarts\MailChimp\Block\Adminhtml\Customer\Edit\Tabs;

use Magento\Customer\Controller\RegistryConstants;
use Magento\Ui\Component\Layout\Tabs\TabInterface;
use Magento\Backend\Block\Widget\Form;
use Magento\Backend\Block\Widget\Form\Generic;

class Mailchimp extends \Magento\Backend\Block\Template implements TabInterface
{
/**
* @var \Magento\Store\Model\System\Store
*/
protected $_systemStore;
/**
* @var \Magento\Framework\Registry
*/
protected $_coreRegistry;

/**
* Mailchimp constructor.
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Data\FormFactory $formFactory
* @param \Magento\Store\Model\System\Store $systemStore
* @param \Ebizmarts\MailChimp\Helper\Data $helper
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Data\FormFactory $formFactory,
\Magento\Store\Model\System\Store $systemStore,
\Ebizmarts\MailChimp\Helper\Data $helper,
array $data = []
) {
$this->_coreRegistry = $registry;
$this->_systemStore = $systemStore;
parent::__construct($context, $data);
}

public function getCustomerId()
{
return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
}

/**
* @return \Magento\Framework\Phrase
*/
public function getTabLabel()
{
return __('MailChimp');
}

/**
* @return \Magento\Framework\Phrase
*/
public function getTabTitle()
{
return __('MailChimp');
}

/**
* @return bool
*/
public function canShowTab()
{
if ($this->getCustomerId()) {
return true;
}
return false;
}

/**
* @return bool
*/
public function isHidden()
{
if ($this->getCustomerId()) {
return false;
}
return true;
}

/**
* Tab class getter
*
* @return string
*/
public function getTabClass()
{
return '';
}

/**
* Return URL link to Tab content
*
* @return string
*/
public function getTabUrl()
{
return '';
}

/**
* Tab should be loaded trough Ajax call
*
* @return bool
*/
public function isAjaxLoaded()
{
return false;
}
}
61 changes: 61 additions & 0 deletions Block/Adminhtml/Customer/Edit/Tabs/View/Customer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* MailChimp Magento Component
*
* @category Ebizmarts
* @package MailChimp
* @author Ebizmarts Team <[email protected]>
* @copyright Ebizmarts (http://ebizmarts.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @date: 11/29/17 2:49 PM
* @file: Customer.php
*/

namespace Ebizmarts\MailChimp\Block\Adminhtml\Customer\Edit\Tabs\View;

class Customer extends \Magento\Backend\Block\Template
{
/**
* @var \Ebizmarts\MailChimp\Helper\Data
*/
protected $helper;
/**
* @var \Magento\Newsletter\Model\SubscriberFactory
*/
protected $subscriberFactory;

/**
* @var \Magento\Framework\Registry
*/
protected $registry;

/**
* Customer constructor.
* @param \Magento\Backend\Block\Template\Context $context
* @param \Ebizmarts\MailChimp\Helper\Data $helper
* @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
* @param \Magento\Framework\Registry $registry
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Ebizmarts\MailChimp\Helper\Data $helper,
\Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
\Magento\Framework\Registry $registry,
array $data
) {

parent::__construct($context, $data);
$this->helper = $helper;
$this->subscriberFactory = $subscriberFactory;
$this->registry = $registry;
}

public function getInterest()
{
$subscriber = $this->subscriberFactory->create();
$customerId = $this->registry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID);
$subscriber->loadByCustomerId($customerId);
return $this->helper->getSubscriberInterest($subscriber->getSubscriberId(), $subscriber->getStoreId());
}
}
12 changes: 1 addition & 11 deletions Block/Adminhtml/Stores/Edit/Tab/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ protected function _prepareForm()
['name' => 'storeid']
);
} else {
$this->_apikey->getAllApiKeys();
$apikey = $this->_apikey->toOptionArray();
$apikeyArray = [];
foreach ($apikey as $a) {
Expand Down Expand Up @@ -142,17 +143,6 @@ protected function _prepareForm()
]
);

// $fieldset->addField(
// 'is_sync',
// 'select',
// [
// 'name' => 'is_sync',
// 'label' => __('Synced'),
// 'required' => true,
// 'options' => $this->_yesno->toArray(),
// ]
// );

$fieldset->addField(
'domain',
'text',
Expand Down
76 changes: 76 additions & 0 deletions Block/Adminhtml/System/Config/CreateWebhook.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?php
/**
* Created by PhpStorm.
* User: gonzalo
* Date: 3/12/18
* Time: 2:12 PM
*/
namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config;

class CreateWebhook extends \Magento\Config\Block\System\Config\Form\Field
{
/**
* @var \Ebizmarts\MailChimp\Helper\Data
*/
private $_helper;

/**
* ResetErrors constructor.
* @param \Magento\Backend\Block\Template\Context $context
* @param \Ebizmarts\MailChimp\Helper\Data $helper
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Ebizmarts\MailChimp\Helper\Data $helper,
array $data = []
) {

$this->_helper = $helper;
parent::__construct($context, $data);
}

protected function _construct()
{
parent::_construct();
$this->setTemplate('system/config/createwebhook.phtml');
}

protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
$originalData = $element->getOriginalData();
$this->addData(
[
'button_label' => __($originalData['button_label']),
'button_url' => $this->getAjaxCheckUrl(),
'html_id' => $element->getHtmlId(),
]
);
return $this->_toHtml();
}

public function getButtonHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{


$originalData = $element->getOriginalData();
$label = $originalData['button_label'];
$this->addData([
'button_label' => __($label),
'button_url' => $this->getAjaxCreateWebhookUrl(),
'html_id' => $element->getHtmlId(),
]);
return $this->_toHtml();
}
public function getAjaxCreateWebhookUrl()
{
$params = $this->getRequest()->getParams();
$scope = [];
if (isset($params['website'])) {
$scope = ['website'=>$params['website']];
} elseif (isset($params['store'])) {
$scope = ['store'=>$params['store']];
}
return $this->_urlBuilder->getUrl('mailchimp/ecommerce/CreateWebhook', $scope);
}
}
75 changes: 75 additions & 0 deletions Block/Adminhtml/System/Config/Form/Field/CustomerMap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php
/**
* mc-magento2 Magento Component
*
* @category Ebizmarts
* @package mc-magento2
* @author Ebizmarts Team <[email protected]>
* @copyright Ebizmarts (http://ebizmarts.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @date: 10/27/17 12:01 PM
* @file: CustomerMap.php
*/

namespace Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field;

class CustomerMap extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray
{
/**
* @var VarsMap
*/
protected $_varsRenderer=null;
protected $_mailchimpRenderer=null;

protected function _getVarsRenderer()
{
if (!$this->_varsRenderer) {
$this->_varsRenderer = $this->getLayout()->createBlock(
'Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field\VarsMap',
'',
['data' => ['is_render_to_js_template' => true]]
);
$this->_varsRenderer->setClass('customer_field_select');
}
return $this->_varsRenderer;
}
protected function _getMailchimpRenderer()
{
if (!$this->_mailchimpRenderer) {
$this->_mailchimpRenderer = $this->getLayout()->createBlock(
'Ebizmarts\MailChimp\Block\Adminhtml\System\Config\Form\Field\MailchimpMap',
'',
['data' => ['is_render_to_js_template' => true]]
);
$this->_mailchimpRenderer->setClass('mailchimp_field_select');
}
return $this->_mailchimpRenderer;
}

protected function _prepareToRender()
{
// $this->addColumn('mailchimp', ['label' => __('Mailchimp')]);
$this->addColumn(
'mailchimp_field_id',
['label' => __('Mailchimp'), 'renderer' => $this->_getMailchimpRenderer()]
);
$this->addColumn(
'customer_field_id',
['label' => __('Magento'), 'renderer' => $this->_getVarsRenderer()]
);
$this->_addAfter = false;
$this->_addButtonLabel = __('Add');
}
protected function _prepareArrayRow(\Magento\Framework\DataObject $row)
{
$optionExtraAttr = [];
$optionExtraAttr['option_' . $this->_getVarsRenderer()->calcOptionHash($row->getData('customer_field_id'))] =
'selected="selected"';
$optionExtraAttr['option_' . $this->_getMailchimpRenderer()->calcOptionHash($row->getData('mailchimp_field_id'))] =
'selected="selected"';
$row->setData(
'option_extra_attrs',
$optionExtraAttr
);
}
}
Loading