Remarkety_Mgconnector - Version 1.5.1.4

Version Notes

No comments

Download this release

Release Info

Developer Remarkety
Extension Remarkety_Mgconnector
Version 1.5.1.4
Comparing to
See all releases


Code changes from version 1.5.1.2 to 1.5.1.4

CHANGELOG.txt CHANGED
@@ -1,3 +1,11 @@
1
1.5.1.2
2
--------
3
Detect cart email from session if visitor subscribed before creating the cart
1
+ 1.5.1.4
2
+ -------
3
+ Bugfix - Single store in website can get all customers from website id
4
+
5
+ 1.5.1.3
6
+ -------
7
+ Support password-protected websites
8
+
9
1.5.1.2
10
--------
11
Detect cart email from session if visitor subscribed before creating the cart
app/code/community/Remarkety/Mgconnector/Block/Adminhtml/Configuration/Install/Form.php CHANGED
@@ -16,12 +16,12 @@ class Remarkety_Mgconnector_Block_Adminhtml_Configuration_Install_Form extends M
16
*/
17
protected function _prepareForm()
18
{
19
- $form = new Varien_Data_Form(
20
array(
21
'id' => 'edit_form',
22
'action' => $this->getUrl('*/*/complete'),
23
'method' => 'post',
24
- )
25
);
26
$form->setFieldContainerIdPrefix('data');
27
$form->setUseContainer(true);
@@ -34,32 +34,32 @@ class Remarkety_Mgconnector_Block_Adminhtml_Configuration_Install_Form extends M
34
)
35
);
36
37
- $fieldset->addField(
38
'mode', 'hidden', array(
39
'name' => 'data[mode]',
40
'value' => 'install',
41
- )
42
);
43
44
- $instruction = $fieldset->addField(
45
'instruction', 'note', array(
46
'text' => '',
47
'label' => false,
48
'after_element_html' =>
49
- '<p style="font-weight:bold;">' . $this->__(
50
'Thank you for installing the Remarkety Magento plugin.
51
- You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!'
52
)
53
. '<br><br>'
54
- . $this->__(
55
'The plugin will automatically create a Magento WebService API user so that
56
- Remarkety can synchronize with your store.'
57
) . '</p>',
58
- )
59
);
60
$instruction->getRenderer()->setTemplate('mgconnector/widget/form/renderer/fieldset/element.phtml');
61
62
- $fieldset->addField(
63
'email', 'text', array(
64
'label' => $this->__('Email address for the Remarkety account:'),
65
'name' => 'data[email]',
@@ -71,19 +71,41 @@ class Remarkety_Mgconnector_Block_Adminhtml_Configuration_Install_Form extends M
71
to choose your password.'
72
) . '</small>',
73
'style' => 'float:left',
74
- )
75
);
76
77
- $fieldset->addField(
78
'store_id', 'select', array(
79
'name' => 'data[store_id]',
80
'label' => $this->__('Sync Remarkety with this view:'),
81
'required' => true,
82
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
83
- )
84
);
85
86
- $fieldset->addField(
87
'terms', 'checkbox', array(
88
'label' => false,
89
'name' => 'data[terms]',
@@ -91,16 +113,16 @@ class Remarkety_Mgconnector_Block_Adminhtml_Configuration_Install_Form extends M
91
'value' => '1',
92
'class' => 'required-entry',
93
'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#'),
94
- )
95
);
96
97
- $fieldset->addField(
98
'button', 'note', array(
99
'label' => false,
100
'name' => 'button',
101
'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>'
102
. $this->__('Complete Installation') . '</span></span></button>'
103
- )
104
);
105
106
return parent::_prepareForm();
16
*/
17
protected function _prepareForm()
18
{
19
+ $form = new Varien_Data_Form(
20
array(
21
'id' => 'edit_form',
22
'action' => $this->getUrl('*/*/complete'),
23
'method' => 'post',
24
+ )
25
);
26
$form->setFieldContainerIdPrefix('data');
27
$form->setUseContainer(true);
34
)
35
);
36
37
+ $fieldset->addField(
38
'mode', 'hidden', array(
39
'name' => 'data[mode]',
40
'value' => 'install',
41
+ )
42
);
43
44
+ $instruction = $fieldset->addField(
45
'instruction', 'note', array(
46
'text' => '',
47
'label' => false,
48
'after_element_html' =>
49
+ '<p style="font-weight:bold;">' . $this->__(
50
'Thank you for installing the Remarkety Magento plugin.
51
+ You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!'
52
)
53
. '<br><br>'
54
+ . $this->__(
55
'The plugin will automatically create a Magento WebService API user so that
56
+ Remarkety can synchronize with your store.'
57
) . '</p>',
58
+ )
59
);
60
$instruction->getRenderer()->setTemplate('mgconnector/widget/form/renderer/fieldset/element.phtml');
61
62
+ $fieldset->addField(
63
'email', 'text', array(
64
'label' => $this->__('Email address for the Remarkety account:'),
65
'name' => 'data[email]',
71
to choose your password.'
72
) . '</small>',
73
'style' => 'float:left',
74
+ )
75
);
76
77
+ $fieldset->addField(
78
'store_id', 'select', array(
79
'name' => 'data[store_id]',
80
'label' => $this->__('Sync Remarkety with this view:'),
81
'required' => true,
82
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
83
+ )
84
+ );
85
+
86
+ $fieldset->addField(
87
+ 'http_notes', 'note', array(
88
+ 'label' => false,
89
+ 'name' => 'http_notes',
90
+ 'after_element_html' => 'If your website is password-protected, please enter the credentials here:'
91
+ )
92
);
93
94
+ $fieldset->addField(
95
+ 'http_user', 'text', array(
96
+ 'label' => $this->__('Website Basic Auth Username:'),
97
+ 'name' => 'data[http_user]'
98
+ )
99
+ );
100
+
101
+ $fieldset->addField(
102
+ 'http_password', 'password', array(
103
+ 'label' => $this->__('Website Basic Auth Password:'),
104
+ 'name' => 'data[http_password]'
105
+ )
106
+ );
107
+
108
+ $fieldset->addField(
109
'terms', 'checkbox', array(
110
'label' => false,
111
'name' => 'data[terms]',
113
'value' => '1',
114
'class' => 'required-entry',
115
'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#'),
116
+ )
117
);
118
119
+ $fieldset->addField(
120
'button', 'note', array(
121
'label' => false,
122
'name' => 'button',
123
'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>'
124
. $this->__('Complete Installation') . '</span></span></button>'
125
+ )
126
);
127
128
return parent::_prepareForm();
app/code/community/Remarkety/Mgconnector/Block/Adminhtml/Install/Install/Create/Form.php CHANGED
@@ -16,12 +16,12 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Create_Form extends
16
*/
17
protected function _prepareForm()
18
{
19
- $form = new Varien_Data_Form(
20
array(
21
'id' => 'edit_form',
22
'action' => $this->getUrl('*/install/complete'),
23
'method' => 'post',
24
- )
25
);
26
$form->setFieldContainerIdPrefix('data');
27
$form->setUseContainer(true);
@@ -37,49 +37,49 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Create_Form extends
37
)
38
);
39
40
- $fieldset->addField(
41
'mode', 'hidden', array(
42
'name' => 'data[mode]',
43
'value' => 'install_create',
44
- )
45
);
46
47
$headingHtml =
48
- '<p><b>' . $this->__(
49
'Thank you for installing the Remarkety Magento plugin.
50
- You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!'
51
)
52
. '</b><br><br>'
53
- . $this->__(
54
'The plugin will automatically create a Magento WebService API user so that
55
- Remarkety can synchronize with your store.'
56
) . '</p><hr/>'
57
. '<h2>'.$this->__('Create a new Remarkety account') . '</h2>'
58
. '<p>'.
59
- sprintf(
60
$this->__(
61
'Already registered to Remarkety? <a href="%s">Click here</a>'
62
- ), $accountWithLoginUrl
63
)
64
. '</p>';
65
66
- $instruction = $fieldset->addField(
67
'instruction', 'note', array(
68
'text' => '',
69
'label' => false,
70
'after_element_html' => $headingHtml,
71
72
- )
73
);
74
$instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
75
76
- $html = '<small style="float:left;width:100%;">' . sprintf(
77
$this->__(
78
'Already registered to Remarkety? <a href="%s">Click here</a>'
79
- ), $accountWithLoginUrl
80
) . '</small>';
81
82
- $fieldset->addField(
83
'email', 'text', array(
84
'label' => $this->__('Email address for the Remarkety account:'),
85
'name' => 'data[email]',
@@ -87,56 +87,56 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Create_Form extends
87
'class' => 'validate-email',
88
//'after_element_html' => $html,
89
'style' => 'float:left',
90
- )
91
);
92
93
- $fieldset->addField(
94
'first_name', 'text', array(
95
'label' => $this->__('First Name:'),
96
'name' => 'data[first_name]',
97
'required' => true,
98
'class' => 'required-entry'
99
- )
100
);
101
102
- $fieldset->addField(
103
'last_name', 'text', array(
104
'label' => $this->__('Last Name:'),
105
'name' => 'data[last_name]',
106
'required' => true,
107
'class' => 'required-entry'
108
- )
109
);
110
111
- $fieldset->addField(
112
'phone', 'text', array(
113
'label' => $this->__('Phone:'),
114
'name' => 'data[phone]',
115
'required' => true,
116
'class' => 'required-entry'
117
- )
118
);
119
120
- $fieldset->addField(
121
'password', 'password', array(
122
'label' => $this->__('Password:'),
123
'name' => 'data[password]',
124
'required' => true,
125
'class' => 'required-entry'
126
- )
127
);
128
129
130
- $fieldset->addField(
131
'store_id', $multipleStores ? 'multiselect' : 'select', array(
132
'name' => 'data[store_id]',
133
'label' => $this->__('Sync Remarkety with this view:'),
134
'required' => true,
135
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
136
- )
137
);
138
139
- $fieldset->addField(
140
'terms', 'checkbox', array(
141
'label' => false,
142
'name' => 'data[terms]',
@@ -144,16 +144,38 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Create_Form extends
144
'value' => '1',
145
'class' => 'required-entry',
146
'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#'),
147
- )
148
);
149
150
- $fieldset->addField(
151
'create', 'note', array(
152
'label' => false,
153
'name' => 'button',
154
'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>'
155
. $this->__('Create New Account And Connect') . '</span></span></button>',
156
- )
157
);
158
159
// $fieldset->addField('login', 'note', array(
16
*/
17
protected function _prepareForm()
18
{
19
+ $form = new Varien_Data_Form(
20
array(
21
'id' => 'edit_form',
22
'action' => $this->getUrl('*/install/complete'),
23
'method' => 'post',
24
+ )
25
);
26
$form->setFieldContainerIdPrefix('data');
27
$form->setUseContainer(true);
37
)
38
);
39
40
+ $fieldset->addField(
41
'mode', 'hidden', array(
42
'name' => 'data[mode]',
43
'value' => 'install_create',
44
+ )
45
);
46
47
$headingHtml =
48
+ '<p><b>' . $this->__(
49
'Thank you for installing the Remarkety Magento plugin.
50
+ You are one click away from finishing setting up Remarkety on your store and sending effective, targeted emails!'
51
)
52
. '</b><br><br>'
53
+ . $this->__(
54
'The plugin will automatically create a Magento WebService API user so that
55
+ Remarkety can synchronize with your store.'
56
) . '</p><hr/>'
57
. '<h2>'.$this->__('Create a new Remarkety account') . '</h2>'
58
. '<p>'.
59
+ sprintf(
60
$this->__(
61
'Already registered to Remarkety? <a href="%s">Click here</a>'
62
+ ), $accountWithLoginUrl
63
)
64
. '</p>';
65
66
+ $instruction = $fieldset->addField(
67
'instruction', 'note', array(
68
'text' => '',
69
'label' => false,
70
'after_element_html' => $headingHtml,
71
72
+ )
73
);
74
$instruction->getRenderer()->setTemplate('mgconnector/element.phtml');
75
76
+ $html = '<small style="float:left;width:100%;">' . sprintf(
77
$this->__(
78
'Already registered to Remarkety? <a href="%s">Click here</a>'
79
+ ), $accountWithLoginUrl
80
) . '</small>';
81
82
+ $fieldset->addField(
83
'email', 'text', array(
84
'label' => $this->__('Email address for the Remarkety account:'),
85
'name' => 'data[email]',
87
'class' => 'validate-email',
88
//'after_element_html' => $html,
89
'style' => 'float:left',
90
+ )
91
);
92
93
+ $fieldset->addField(
94
'first_name', 'text', array(
95
'label' => $this->__('First Name:'),
96
'name' => 'data[first_name]',
97
'required' => true,
98
'class' => 'required-entry'
99
+ )
100
);
101
102
+ $fieldset->addField(
103
'last_name', 'text', array(
104
'label' => $this->__('Last Name:'),
105
'name' => 'data[last_name]',
106
'required' => true,
107
'class' => 'required-entry'
108
+ )
109
);
110
111
+ $fieldset->addField(
112
'phone', 'text', array(
113
'label' => $this->__('Phone:'),
114
'name' => 'data[phone]',
115
'required' => true,
116
'class' => 'required-entry'
117
+ )
118
);
119
120
+ $fieldset->addField(
121
'password', 'password', array(
122
'label' => $this->__('Password:'),
123
'name' => 'data[password]',
124
'required' => true,
125
'class' => 'required-entry'
126
+ )
127
);
128
129
130
+ $fieldset->addField(
131
'store_id', $multipleStores ? 'multiselect' : 'select', array(
132
'name' => 'data[store_id]',
133
'label' => $this->__('Sync Remarkety with this view:'),
134
'required' => true,
135
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
136
+ )
137
);
138
139
+ $fieldset->addField(
140
'terms', 'checkbox', array(
141
'label' => false,
142
'name' => 'data[terms]',
144
'value' => '1',
145
'class' => 'required-entry',
146
'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#'),
147
+ )
148
);
149
150
+ $fieldset->addField(
151
+ 'http_notes', 'note', array(
152
+ 'label' => false,
153
+ 'name' => 'http_notes',
154
+ 'after_element_html' => 'If your website is password-protected, please enter the credentials here:'
155
+ )
156
+ );
157
+
158
+ $fieldset->addField(
159
+ 'http_user', 'text', array(
160
+ 'label' => $this->__('Website Basic Auth Username:'),
161
+ 'name' => 'data[http_user]'
162
+ )
163
+ );
164
+
165
+ $fieldset->addField(
166
+ 'http_password', 'password', array(
167
+ 'label' => $this->__('Website Basic Auth Password:'),
168
+ 'name' => 'data[http_password]'
169
+ )
170
+ );
171
+
172
+ $fieldset->addField(
173
'create', 'note', array(
174
'label' => false,
175
'name' => 'button',
176
'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span><span>'
177
. $this->__('Create New Account And Connect') . '</span></span></button>',
178
+ )
179
);
180
181
// $fieldset->addField('login', 'note', array(
app/code/community/Remarkety/Mgconnector/Block/Adminhtml/Install/Install/Login/Form.php CHANGED
@@ -16,12 +16,12 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Login_Form extends M
16
*/
17
protected function _prepareForm()
18
{
19
- $form = new Varien_Data_Form(
20
array(
21
'id' => 'edit_form',
22
'action' => $this->getUrl('*/install/complete'),
23
'method' => 'post',
24
- )
25
);
26
$form->setFieldContainerIdPrefix('data');
27
$form->setUseContainer(true);
@@ -34,11 +34,11 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Login_Form extends M
34
)
35
);
36
37
- $fieldset->addField(
38
'mode', 'hidden', array(
39
'name' => 'data[mode]',
40
'value' => 'install_login',
41
- )
42
);
43
$noAccountUrl = $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_CREATE));
44
@@ -69,13 +69,13 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Login_Form extends M
69
70
$noAccountUrl = $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_CREATE));
71
72
- $html = '<small style="float:left;width:100%;">' . sprintf(
73
$this->__(
74
'Don\'t have a Remarkety account yet? <a href="%s">Click here</a>'
75
- ), $noAccountUrl
76
) . '</small>';
77
78
- $fieldset->addField(
79
'email', 'text', array(
80
'label' => $this->__('Email address for the Remarkety account:'),
81
'name' => 'data[email]',
@@ -89,26 +89,48 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Login_Form extends M
89
) . '</small>',
90
*/
91
'style' => 'float:left',
92
- )
93
);
94
95
- $fieldset->addField(
96
'password', 'password', array(
97
'label' => $this->__('Password:'),
98
'name' => 'data[password]',
99
'required' => true,
100
'class' => 'required-entry'
101
- )
102
);
103
104
- $fieldset->addField(
105
'store_id', 'select', array(
106
'name' => 'data[store_id]',
107
'label' => $this->__('Connect this view:'),
108
'required' => true,
109
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
110
//'value' => $this->getRequest()->getParam('store'),
111
- )
112
);
113
114
// $fieldset->addField('terms', 'checkbox', array(
@@ -120,14 +142,14 @@ class Remarkety_Mgconnector_Block_Adminhtml_Install_Install_Login_Form extends M
120
// 'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#'),
121
// ));
122
123
- $fieldset->addField(
124
'login', 'note', array(
125
'label' => false,
126
'name' => 'button',
127
'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span>'
128
. $this->__('Login And Connect') . '
129
</span></button>',
130
- )
131
);
132
133
// $fieldset->addField('create', 'note', array(
16
*/
17
protected function _prepareForm()
18
{
19
+ $form = new Varien_Data_Form(
20
array(
21
'id' => 'edit_form',
22
'action' => $this->getUrl('*/install/complete'),
23
'method' => 'post',
24
+ )
25
);
26
$form->setFieldContainerIdPrefix('data');
27
$form->setUseContainer(true);
34
)
35
);
36
37
+ $fieldset->addField(
38
'mode', 'hidden', array(
39
'name' => 'data[mode]',
40
'value' => 'install_login',
41
+ )
42
);
43
$noAccountUrl = $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_CREATE));
44
69
70
$noAccountUrl = $this->getUrl('*/install/install', array('mode' => Remarkety_Mgconnector_Model_Install::MODE_INSTALL_CREATE));
71
72
+ $html = '<small style="float:left;width:100%;">' . sprintf(
73
$this->__(
74
'Don\'t have a Remarkety account yet? <a href="%s">Click here</a>'
75
+ ), $noAccountUrl
76
) . '</small>';
77
78
+ $fieldset->addField(
79
'email', 'text', array(
80
'label' => $this->__('Email address for the Remarkety account:'),
81
'name' => 'data[email]',
89
) . '</small>',
90
*/
91
'style' => 'float:left',
92
+ )
93
);
94
95
+ $fieldset->addField(
96
'password', 'password', array(
97
'label' => $this->__('Password:'),
98
'name' => 'data[password]',
99
'required' => true,
100
'class' => 'required-entry'
101
+ )
102
);
103
104
+ $fieldset->addField(
105
'store_id', 'select', array(
106
'name' => 'data[store_id]',
107
'label' => $this->__('Connect this view:'),
108
'required' => true,
109
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
110
//'value' => $this->getRequest()->getParam('store'),
111
+ )
112
+ );
113
+
114
+ $fieldset->addField(
115
+ 'http_notes', 'note', array(
116
+ 'label' => false,
117
+ 'name' => 'http_notes',
118
+ 'after_element_html' => 'If your website is password-protected, please enter the credentials here:'
119
+ )
120
+ );
121
+
122
+ $fieldset->addField(
123
+ 'http_user', 'text', array(
124
+ 'label' => $this->__('Website Basic Auth Username:'),
125
+ 'name' => 'data[http_user]'
126
+ )
127
+ );
128
+
129
+ $fieldset->addField(
130
+ 'http_password', 'password', array(
131
+ 'label' => $this->__('Website Basic Auth Password:'),
132
+ 'name' => 'data[http_password]'
133
+ )
134
);
135
136
// $fieldset->addField('terms', 'checkbox', array(
142
// 'after_element_html' => $this->__('I agree to Remarkety’s <a href="%s">terms of use</a>.', '#'),
143
// ));
144
145
+ $fieldset->addField(
146
'login', 'note', array(
147
'label' => false,
148
'name' => 'button',
149
'after_element_html' => '<button type="button" class="save" onclick="editForm.submit();"><span>'
150
. $this->__('Login And Connect') . '
151
</span></button>',
152
+ )
153
);
154
155
// $fieldset->addField('create', 'note', array(
app/code/community/Remarkety/Mgconnector/Model/Core.php CHANGED
@@ -431,12 +431,26 @@ class Remarkety_Mgconnector_Model_Core extends Mage_Core_Model_Abstract
431
$rewardPointsInstance->modifyCustomersCollection($customersCollection);
432
}
433
434
- // $customersCollection->addFieldToFilter('store_id', array('eq' => $mage_store_view_id));
435
-
436
$store = Mage::getModel('core/store')->load($mage_store_view_id);
437
- $name = $store->getName();
438
- // $viewName = Mage::getModel(""); XXX
439
- $customersCollection->addFieldToFilter('store_id', array('eq' => $mage_store_view_id)); //$mage_store_id));
440
if ($updated_at_min != null) {
441
$customersCollection->addAttributeToFilter('updated_at', array('gt' => $updated_at_min));
442
}
431
$rewardPointsInstance->modifyCustomersCollection($customersCollection);
432
}
433
434
+ /**
435
+ * @var $store Mage_Core_Model_Store
436
+ */
437
$store = Mage::getModel('core/store')->load($mage_store_view_id);
438
+ $website = $store->getWebsite();
439
+ $stores_in_website = $website->getStoreIds();
440
+ $singleStore = !empty($stores_in_website) &&
441
+ count($stores_in_website) === 1 &&
442
+ isset($stores_in_website[$mage_store_view_id]) &&
443
+ $stores_in_website[$mage_store_view_id] == $mage_store_view_id;
444
+
445
+ if($singleStore) {
446
+ //returns all customers for the website, includes admin (store_id = 0)
447
+ $this->_debug(__FUNCTION__, REMARKETY_MGCONNECTOR_SUCCESS_STATUS, 'Single store in website - using website_id filter', '');
448
+ $customersCollection->addFieldToFilter('website_id', array('eq' => $website->getId()));
449
+ } else {
450
+ //returns only customer in a specific store view
451
+ $this->_debug(__FUNCTION__, REMARKETY_MGCONNECTOR_SUCCESS_STATUS, 'Multi store in website - using store_id filter', '');
452
+ $customersCollection->addFieldToFilter('store_id', array('eq' => $mage_store_view_id));
453
+ }
454
if ($updated_at_min != null) {
455
$customersCollection->addAttributeToFilter('updated_at', array('gt' => $updated_at_min));
456
}
app/code/community/Remarkety/Mgconnector/Model/Install.php CHANGED
@@ -87,7 +87,8 @@ class Remarkety_Mgconnector_Model_Install
87
$this->_data['terms'] = array_key_exists('terms', $data) ? ($data['terms']== '1' ? 'true' : 'false') : null;
88
$this->_data['store_id'] = array_key_exists('store_id', $data) ? $data['store_id'] : null;
89
$this->_data['key'] = array_key_exists('key', $data) ? $data['key'] : null;
90
-
91
return $this;
92
}
93
@@ -216,6 +217,9 @@ class Remarkety_Mgconnector_Model_Install
216
$this->_data['store_id'] = (array)$this->_data['store_id'];
217
}
218
219
// Create request for each store view separately
220
foreach($this->_data['store_id'] as $_storeId) {
221
$store = Mage::getModel('core/store')->load($_storeId);
@@ -237,6 +241,8 @@ class Remarkety_Mgconnector_Model_Install
237
'lastName' => $this->_data['last_name'],
238
'phone' => $this->_data['phone'],
239
'storeFrontUrl' => $store->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK),
240
'viewName' => $store->name,
241
'ip' => Mage::helper('core/http')->getRemoteAddr()
242
)
@@ -278,6 +284,9 @@ class Remarkety_Mgconnector_Model_Install
278
$this->_data['store_id'] = (array)$this->_data['store_id'];
279
}
280
281
// Create request for each store view separately
282
foreach($this->_data['store_id'] as $_storeId) {
283
$store = Mage::getModel('core/store')->load($_storeId);
@@ -297,6 +306,8 @@ class Remarkety_Mgconnector_Model_Install
297
),
298
'isNewUser' => false,
299
'storeFrontUrl' => $store->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK),
300
'viewName' => $store->name,
301
'ip' => Mage::helper('core/http')->getRemoteAddr()
302
)
87
$this->_data['terms'] = array_key_exists('terms', $data) ? ($data['terms']== '1' ? 'true' : 'false') : null;
88
$this->_data['store_id'] = array_key_exists('store_id', $data) ? $data['store_id'] : null;
89
$this->_data['key'] = array_key_exists('key', $data) ? $data['key'] : null;
90
+ $this->_data['http_user'] = array_key_exists('http_user', $data) ? $data['http_user'] : null;
91
+ $this->_data['http_password'] = array_key_exists('http_password', $data) ? $data['http_password'] : null;
92
return $this;
93
}
94
217
$this->_data['store_id'] = (array)$this->_data['store_id'];
218
}
219
220
+ $httpUser = array_key_exists('http_user', $this->_data) ? $this->_data['http_user'] : '';
221
+ $httpPassword = array_key_exists('http_password', $this->_data) ? $this->_data['http_password'] : '';
222
+
223
// Create request for each store view separately
224
foreach($this->_data['store_id'] as $_storeId) {
225
$store = Mage::getModel('core/store')->load($_storeId);
241
'lastName' => $this->_data['last_name'],
242
'phone' => $this->_data['phone'],
243
'storeFrontUrl' => $store->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK),
244
+ 'httpUser' => $httpUser,
245
+ 'httpPassword' => $httpPassword,
246
'viewName' => $store->name,
247
'ip' => Mage::helper('core/http')->getRemoteAddr()
248
)
284
$this->_data['store_id'] = (array)$this->_data['store_id'];
285
}
286
287
+ $httpUser = array_key_exists('http_user', $this->_data) ? $this->_data['http_user'] : '';
288
+ $httpPassword = array_key_exists('http_password', $this->_data) ? $this->_data['http_password'] : '';
289
+
290
// Create request for each store view separately
291
foreach($this->_data['store_id'] as $_storeId) {
292
$store = Mage::getModel('core/store')->load($_storeId);
306
),
307
'isNewUser' => false,
308
'storeFrontUrl' => $store->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK),
309
+ 'httpUser' => $httpUser,
310
+ 'httpPassword' => $httpPassword,
311
'viewName' => $store->name,
312
'ip' => Mage::helper('core/http')->getRemoteAddr()
313
)
app/code/community/Remarkety/Mgconnector/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
<config>
3
<modules>
4
<Remarkety_Mgconnector>
5
- <version>1.5.1.2</version>
6
</Remarkety_Mgconnector>
7
</modules>
8
<global>
2
<config>
3
<modules>
4
<Remarkety_Mgconnector>
5
+ <version>1.5.1.4</version>
6
</Remarkety_Mgconnector>
7
</modules>
8
<global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Remarkety_Mgconnector</name>
4
- <version>1.5.1.2</version>
5
<stability>stable</stability>
6
<license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
7
<channel>community</channel>
@@ -9,11 +9,11 @@
9
<summary>Remarkety Magento Connector</summary>
10
<description>Remarkety Magento Connector</description>
11
<notes>No comments</notes>
12
- <date>2017-05-14</date>
13
- <time>14-44-42</time>
14
<contents>
15
<target name="magecommunity">
16
- <dir name="Remarkety"><dir name="Mgconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><dir name="Complete"><file name="Form.php" hash="e6dc10d742071fe8d041801d4ae605ff"/></dir><file name="Complete.php" hash="d816f575e8ef99c8dbb4440666963bd0"/><dir name="Configuration"><file name="Form.php" hash="861b674ee5ac1e384fd68e29bd59bb02"/></dir><file name="Configuration.php" hash="8f8c4988205d9d1e2c7cd23c27a9483f"/><dir name="Install"><file name="Form.php" hash="cede3e19bde805c40342ea26e1deeda5"/></dir><file name="Install.php" hash="9c093e25a8cc9a1fe16c87cfea2e3819"/><dir name="Upgrade"><file name="Form.php" hash="9af9dbeae95cbcdae2ec32632447f9c6"/></dir><file name="Upgrade.php" hash="93222bbdfff6b417b4b6ecbfc7c3d764"/></dir><file name="Configuration.php" hash="4df74b83acfbbe6e6fdaa708f0d9ba7e"/><dir name="Extension"><file name="RewardPoints.php" hash="82e320930f59dfd45e5aa73005118833"/></dir><dir name="Install"><dir name="Complete"><file name="Form.php" hash="fd219a65921dba3099ba77166f59e8da"/></dir><file name="Complete.php" hash="c20351873d05cde757620ae6458c1ec4"/><dir name="Install"><dir name="Create"><file name="Form.php" hash="af271c9df233ac8164dfa73216a524fc"/></dir><file name="Create.php" hash="bcd942c4fd64543c1b65001ec84d0d71"/><dir name="Login"><file name="Form.php" hash="bb431cadabe945c82df6cb921c5e2c30"/></dir><file name="Login.php" hash="6f7e30f2c36e56925be25496fde1e29a"/></dir><dir name="Upgrade"><file name="Form.php" hash="490a20b1e39d153af18e90844593c772"/></dir><file name="Upgrade.php" hash="5e30edfcc5954ccf65dcd36192356bed"/><dir name="Welcome"><file name="Form.php" hash="b4f135c3c0106a8391931d6d5865d599"/><file name="Store.php" hash="0eea3b94c83c8e4c3a4b1a022d5c02b4"/></dir><file name="Welcome.php" hash="de47e1c94e4073e2d2af94a0b5455250"/></dir><dir name="Queue"><dir name="Configure"><file name="Form.php" hash="a6c97ade5c3c3714f40dd121351f4902"/></dir><file name="Configure.php" hash="87841e46d93c568bdd09304d016de589"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="EventType.php" hash="13fd2faaa07dc11d6052ab9e0c6a4261"/><file name="Status.php" hash="7f087c6d8e55b67d5a7781a31d1ed924"/></dir></dir></dir><file name="Grid.php" hash="80be08c235836e185bec22d439d4e95b"/></dir><file name="Queue.php" hash="b778ce9202431147083365b8021103d0"/></dir><dir name="Tracking"><file name="Base.php" hash="ab4abb09bcff0e5465ed4ac6b8f78a6e"/><file name="General.php" hash="2fbff52cfe2924412376bbb4328068be"/><file name="Product.php" hash="11fd52b220b73fb5f2dc87a4684b056a"/></dir></dir><dir name="Helper"><file name="Configuration.php" hash="d969dee27dbf9dcf3fc5e76ebf5ce628"/><file name="Data.php" hash="e07e033f6594609aa78c82a45708dd85"/><file name="Extension.php" hash="5788a232ffaa32674b4bfc1e12e4ea98"/><file name="Links.php" hash="9f154ee8056f27f8b42f1a42880bb90a"/><file name="Urls.php" hash="2d431aa22e9cd1595c421502ecda62b8"/></dir><dir name="Model"><dir name="Core"><file name="Api.php" hash="3e87c7f2c0fc116ccba52e4f9e933ad2"/></dir><file name="Core.php" hash="37ee61793937affa32e1ea8189f3a99d"/><dir name="Extension"><dir name="RewardPoints"><file name="AbstractIntegration.php" hash="4ac34942072ce49d2971065a82d1068c"/><file name="IntegrationInterface.php" hash="f95f9f1e243c9fd920d27b9299b90f72"/><file name="MagestoreRewardPoints.php" hash="70c4c74fedd4bfb717132d6d825e438d"/><dir name="Observer"><file name="AbstractObserver.php" hash="c3842e2d9cf4714f1692422aee344fd8"/><file name="MagestoreRewardPoints.php" hash="a730c68034ca481fee11472677d3ab2e"/></dir></dir></dir><file name="Install.php" hash="40103918588761c11fd3abe846269761"/><file name="Observer.php" hash="7d73279e08ea5f7b35bbb906805a240d"/><file name="Queue.php" hash="afda656a56b9d44d2ce18a60fdce0912"/><file name="Recovery.php" hash="69bd78f2a3d92db91601cf2afa9c131c"/><file name="Request.php" hash="e7e8860a186ae21a7eee44f6f49d6a8c"/><dir name="Resource"><file name="Coupon.php" hash="6079c05e422e9c1ad5327fc881cee7e3"/><dir name="Queue"><file name="Collection.php" hash="61b5b2fb72b1cbc9465b8efa6f161e46"/></dir><file name="Queue.php" hash="fd9ce12e48148c2eb88db7336b43e5ac"/><dir name="Rule"><file name="Collection.php" hash="d38eed437f15d67b21c3be935053fea5"/></dir><file name="Setup.php" hash="5387a1470bf28911ba531ed88e156569"/></dir><file name="Webtracking.php" hash="215ef9c2e62d6312a336dab044eb691d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConfigureController.php" hash="0b7a6beed2fc4eed01ad7c3363a73dbb"/><dir name="Extension"><file name="AbstractController.php" hash="fa816f490f29820c3b3faa17a3fc00e5"/><file name="RewardPointsController.php" hash="3e94e5ae4d467abf03f41e260b0421f9"/></dir><file name="InstallController.php" hash="ce0898cd92b4d581a2991287f9796029"/><file name="MgconnectorController.php" hash="8eecb0d7625336661d2b541d64999f8a"/><file name="QueueController.php" hash="1c8bfd4b778afbbcc99850f8ad27e3cf"/></dir><file name="RecoveryController.php" hash="a2493669b27287ceb4ada2f9128f5c08"/><file name="WebtrackingController.php" hash="03835c6f4760d203ed81dcea6b591de5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a417737a2225ef9f70b47eef77d75b7c"/><file name="api.xml" hash="fce44705bb4418403d2b9494bf32415c"/><file name="config.xml" hash="149cc672bdecefe7910626fe5175a55c"/></dir><dir name="sql"><dir name="mgconnector_setup"><file name="mysql4-install-1.0.0.13.php" hash="6d0bc421987b0238e350003629e8c464"/><file name="mysql4-upgrade-1.0.0.13-1.0.0.14.php" hash="2c28f665f2a8f78cdfc0b121703734af"/><file name="mysql4-upgrade-1.0.0.14-1.0.0.15.php" hash="284433b68df4ce4e83389db33f4a197c"/><file name="mysql4-upgrade-1.0.0.14-1.1.0.0.php" hash="2042704f23d7337ba3d0901f662096a8"/><file name="mysql4-upgrade-1.1.0.5-1.1.0.6.php" hash="2cc5dc8b986cd4ea1a70519ca59a7be9"/><file name="mysql4-upgrade-1.1.2.8-1.1.2.9.php" hash="ef7be7f476ed01e81fe8f9a62b63d008"/><file name="mysql4-upgrade-1.1.2.8-1.3.0.0.php" hash="fef6b0ee2a43cd42036ca12915885794"/><file name="mysql4-upgrade-1.1.2.9-1.1.3.0.php" hash="4871718266ef707c3b136e6d5591ed25"/><file name="mysql4-upgrade-1.4.10.4-1.5.0.0.php" hash="e4057db88fb1a28b0bdf5a8317cb7996"/><file name="mysql4-upgrade-1.4.7.2-1.4.8.0.php" hash="d2b686bdedc6645a5c4f9609c6cea434"/><file name="mysql4-upgrade-1.5.0.0-1.5.0.1.php" hash="6164dd763580d0dbcdd489250d800f86"/></dir></dir></dir></dir></target>
17
<target name="mageetc">
18
<dir name="modules"><file name="Remarkety_Mgconnector.xml" hash="d584b234f653fbf34376e7dcb8caf117"/></dir></target>
19
<target name="magedesign">
1
<?xml version="1.0"?>
2
<package>
3
<name>Remarkety_Mgconnector</name>
4
+ <version>1.5.1.4</version>
5
<stability>stable</stability>
6
<license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
7
<channel>community</channel>
9
<summary>Remarkety Magento Connector</summary>
10
<description>Remarkety Magento Connector</description>
11
<notes>No comments</notes>
12
+ <date>2017-06-04</date>
13
+ <time>13-40-59</time>
14
<contents>
15
<target name="magecommunity">
16
+ <dir name="Remarkety"><dir name="Mgconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><dir name="Complete"><file name="Form.php" hash="e6dc10d742071fe8d041801d4ae605ff"/></dir><file name="Complete.php" hash="d816f575e8ef99c8dbb4440666963bd0"/><dir name="Configuration"><file name="Form.php" hash="861b674ee5ac1e384fd68e29bd59bb02"/></dir><file name="Configuration.php" hash="8f8c4988205d9d1e2c7cd23c27a9483f"/><dir name="Install"><file name="Form.php" hash="03f1bcb7b302825f5fecffd05358aa54"/></dir><file name="Install.php" hash="9c093e25a8cc9a1fe16c87cfea2e3819"/><dir name="Upgrade"><file name="Form.php" hash="9af9dbeae95cbcdae2ec32632447f9c6"/></dir><file name="Upgrade.php" hash="93222bbdfff6b417b4b6ecbfc7c3d764"/></dir><file name="Configuration.php" hash="4df74b83acfbbe6e6fdaa708f0d9ba7e"/><dir name="Extension"><file name="RewardPoints.php" hash="82e320930f59dfd45e5aa73005118833"/></dir><dir name="Install"><dir name="Complete"><file name="Form.php" hash="fd219a65921dba3099ba77166f59e8da"/></dir><file name="Complete.php" hash="c20351873d05cde757620ae6458c1ec4"/><dir name="Install"><dir name="Create"><file name="Form.php" hash="22db1b2653b7ab9cca359a779f413d2a"/></dir><file name="Create.php" hash="bcd942c4fd64543c1b65001ec84d0d71"/><dir name="Login"><file name="Form.php" hash="acebe35949c5cf55e4b15fc04f5de086"/></dir><file name="Login.php" hash="6f7e30f2c36e56925be25496fde1e29a"/></dir><dir name="Upgrade"><file name="Form.php" hash="490a20b1e39d153af18e90844593c772"/></dir><file name="Upgrade.php" hash="5e30edfcc5954ccf65dcd36192356bed"/><dir name="Welcome"><file name="Form.php" hash="b4f135c3c0106a8391931d6d5865d599"/><file name="Store.php" hash="0eea3b94c83c8e4c3a4b1a022d5c02b4"/></dir><file name="Welcome.php" hash="de47e1c94e4073e2d2af94a0b5455250"/></dir><dir name="Queue"><dir name="Configure"><file name="Form.php" hash="a6c97ade5c3c3714f40dd121351f4902"/></dir><file name="Configure.php" hash="87841e46d93c568bdd09304d016de589"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="EventType.php" hash="13fd2faaa07dc11d6052ab9e0c6a4261"/><file name="Status.php" hash="7f087c6d8e55b67d5a7781a31d1ed924"/></dir></dir></dir><file name="Grid.php" hash="80be08c235836e185bec22d439d4e95b"/></dir><file name="Queue.php" hash="b778ce9202431147083365b8021103d0"/></dir><dir name="Tracking"><file name="Base.php" hash="ab4abb09bcff0e5465ed4ac6b8f78a6e"/><file name="General.php" hash="2fbff52cfe2924412376bbb4328068be"/><file name="Product.php" hash="11fd52b220b73fb5f2dc87a4684b056a"/></dir></dir><dir name="Helper"><file name="Configuration.php" hash="d969dee27dbf9dcf3fc5e76ebf5ce628"/><file name="Data.php" hash="e07e033f6594609aa78c82a45708dd85"/><file name="Extension.php" hash="5788a232ffaa32674b4bfc1e12e4ea98"/><file name="Links.php" hash="9f154ee8056f27f8b42f1a42880bb90a"/><file name="Urls.php" hash="2d431aa22e9cd1595c421502ecda62b8"/></dir><dir name="Model"><dir name="Core"><file name="Api.php" hash="3e87c7f2c0fc116ccba52e4f9e933ad2"/></dir><file name="Core.php" hash="3f7624757e56f17b141a62c871a75f9a"/><dir name="Extension"><dir name="RewardPoints"><file name="AbstractIntegration.php" hash="4ac34942072ce49d2971065a82d1068c"/><file name="IntegrationInterface.php" hash="f95f9f1e243c9fd920d27b9299b90f72"/><file name="MagestoreRewardPoints.php" hash="70c4c74fedd4bfb717132d6d825e438d"/><dir name="Observer"><file name="AbstractObserver.php" hash="c3842e2d9cf4714f1692422aee344fd8"/><file name="MagestoreRewardPoints.php" hash="a730c68034ca481fee11472677d3ab2e"/></dir></dir></dir><file name="Install.php" hash="0424ebff627edb0898bcdd64a7a0cdf8"/><file name="Observer.php" hash="7d73279e08ea5f7b35bbb906805a240d"/><file name="Queue.php" hash="afda656a56b9d44d2ce18a60fdce0912"/><file name="Recovery.php" hash="69bd78f2a3d92db91601cf2afa9c131c"/><file name="Request.php" hash="e7e8860a186ae21a7eee44f6f49d6a8c"/><dir name="Resource"><file name="Coupon.php" hash="6079c05e422e9c1ad5327fc881cee7e3"/><dir name="Queue"><file name="Collection.php" hash="61b5b2fb72b1cbc9465b8efa6f161e46"/></dir><file name="Queue.php" hash="fd9ce12e48148c2eb88db7336b43e5ac"/><dir name="Rule"><file name="Collection.php" hash="d38eed437f15d67b21c3be935053fea5"/></dir><file name="Setup.php" hash="5387a1470bf28911ba531ed88e156569"/></dir><file name="Webtracking.php" hash="215ef9c2e62d6312a336dab044eb691d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConfigureController.php" hash="0b7a6beed2fc4eed01ad7c3363a73dbb"/><dir name="Extension"><file name="AbstractController.php" hash="fa816f490f29820c3b3faa17a3fc00e5"/><file name="RewardPointsController.php" hash="3e94e5ae4d467abf03f41e260b0421f9"/></dir><file name="InstallController.php" hash="ce0898cd92b4d581a2991287f9796029"/><file name="MgconnectorController.php" hash="8eecb0d7625336661d2b541d64999f8a"/><file name="QueueController.php" hash="1c8bfd4b778afbbcc99850f8ad27e3cf"/></dir><file name="RecoveryController.php" hash="a2493669b27287ceb4ada2f9128f5c08"/><file name="WebtrackingController.php" hash="03835c6f4760d203ed81dcea6b591de5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a417737a2225ef9f70b47eef77d75b7c"/><file name="api.xml" hash="fce44705bb4418403d2b9494bf32415c"/><file name="config.xml" hash="86a73d140c0129fdacd28d09daa9f99e"/></dir><dir name="sql"><dir name="mgconnector_setup"><file name="mysql4-install-1.0.0.13.php" hash="6d0bc421987b0238e350003629e8c464"/><file name="mysql4-upgrade-1.0.0.13-1.0.0.14.php" hash="2c28f665f2a8f78cdfc0b121703734af"/><file name="mysql4-upgrade-1.0.0.14-1.0.0.15.php" hash="284433b68df4ce4e83389db33f4a197c"/><file name="mysql4-upgrade-1.0.0.14-1.1.0.0.php" hash="2042704f23d7337ba3d0901f662096a8"/><file name="mysql4-upgrade-1.1.0.5-1.1.0.6.php" hash="2cc5dc8b986cd4ea1a70519ca59a7be9"/><file name="mysql4-upgrade-1.1.2.8-1.1.2.9.php" hash="ef7be7f476ed01e81fe8f9a62b63d008"/><file name="mysql4-upgrade-1.1.2.8-1.3.0.0.php" hash="fef6b0ee2a43cd42036ca12915885794"/><file name="mysql4-upgrade-1.1.2.9-1.1.3.0.php" hash="4871718266ef707c3b136e6d5591ed25"/><file name="mysql4-upgrade-1.4.10.4-1.5.0.0.php" hash="e4057db88fb1a28b0bdf5a8317cb7996"/><file name="mysql4-upgrade-1.4.7.2-1.4.8.0.php" hash="d2b686bdedc6645a5c4f9609c6cea434"/><file name="mysql4-upgrade-1.5.0.0-1.5.0.1.php" hash="6164dd763580d0dbcdd489250d800f86"/></dir></dir></dir></dir></target>
17
<target name="mageetc">
18
<dir name="modules"><file name="Remarkety_Mgconnector.xml" hash="d584b234f653fbf34376e7dcb8caf117"/></dir></target>
19
<target name="magedesign">