LetsSyncroLLC_Oct8ne - Version 1.1.4

Version Notes

Notes

Download this release

Release Info

Developer Oct8ne
Extension LetsSyncroLLC_Oct8ne
Version 1.1.4
Comparing to
See all releases


Code changes from version 1.1.3 to 1.1.4

Files changed (22) hide show
  1. app/code/community/LetsSyncroLLC/Oct8ne/Block/Accountconfig.php +364 -364
  2. app/code/community/LetsSyncroLLC/Oct8ne/Block/Index.php +9 -9
  3. app/code/community/LetsSyncroLLC/Oct8ne/Helper/Wishlist.php +91 -86
  4. app/code/community/LetsSyncroLLC/Oct8ne/Model/Letssyncro.php +9 -9
  5. app/code/community/LetsSyncroLLC/Oct8ne/Model/Mysql4/LetsSyncro/Collection.php +19 -19
  6. app/code/community/LetsSyncroLLC/Oct8ne/Model/Mysql4/Letssyncro.php +9 -9
  7. app/code/community/LetsSyncroLLC/Oct8ne/Model/Observer.php +125 -125
  8. app/code/community/LetsSyncroLLC/Oct8ne/controllers/AccountController.php +122 -122
  9. app/code/community/LetsSyncroLLC/Oct8ne/controllers/AdminController.php +16 -16
  10. app/code/community/LetsSyncroLLC/Oct8ne/controllers/IndexController.php +13 -13
  11. app/code/community/LetsSyncroLLC/Oct8ne/controllers/letssyncro.phtml +39 -39
  12. app/code/community/LetsSyncroLLC/Oct8ne/etc/config.xml +229 -229
  13. app/code/community/LetsSyncroLLC/Oct8ne/etc/system.xml +38 -38
  14. app/code/community/LetsSyncroLLC/Oct8ne/sql/oct8ne_setup/mysql4-install-0.5.0.php +32 -32
  15. app/code/community/LetsSyncroLLC/Oct8ne/sql/oct8ne_setup/mysql4-install-1.0.0.php +32 -32
  16. app/design/frontend/default/oct8ne/template/page/1column.phtml +0 -46
  17. app/design/frontend/default/oct8ne/template/page/2columns-left.phtml +0 -46
  18. app/design/frontend/default/oct8ne/template/page/2columns-right.phtml +0 -46
  19. app/design/frontend/default/oct8ne/template/page/3columns.phtml +0 -46
  20. app/etc/modules/LetsSyncroLLC_Oct8ne.xml +16 -16
  21. app/locale/es_ES/LetsSyncroLLC_Oct8ne.csv +38 -38
  22. package.xml +4 -166
app/code/community/LetsSyncroLLC/Oct8ne/Block/Accountconfig.php CHANGED
@@ -1,364 +1,364 @@
1
- <?php
2
- class LetsSyncroLLC_Oct8ne_Block_Accountconfig extends Mage_Core_Block_Template
3
- {
4
- private $letssyncromodel;
5
- private $_html = '';
6
-
7
- protected function _toHtml()
8
- {
9
- $submitLetsSyncroCredentials = $this->getRequest()->getParam('submitLetsSyncroCredentials');
10
- $submitLetsSyncroSettings = $this->getRequest()->getParam('submitLetsSyncroSettings');
11
-
12
- $letssyncromodel = Mage::getModel('oct8ne/letssyncro')->load(1);
13
- $letssyncrooptions = $letssyncromodel->_data;
14
-
15
- if (isset($submitLetsSyncroCredentials))
16
- {
17
- $letssyncro_useremail = $this->getRequest()->getParam('letssyncro_useremail');
18
- $letssyncro_password = $this->getRequest()->getParam('letssyncro_password');
19
-
20
- if (empty($letssyncro_useremail)) {
21
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The field (Email) cannot be empty.').'</div></li></ul></li></ul><br></div>';
22
- } elseif (empty($letssyncro_password)) {
23
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The field (Password) cannot be empty.').'</div></li></ul></li></ul><br></div>';
24
- } elseif (!$this->updateLetsSyncroUserPassword($letssyncrooptions,$letssyncromodel,$letssyncro_useremail,$letssyncro_password)) {
25
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error on your credentials and cannot obtain OCT8NE integration data.').'</div></li></ul></li></ul><br></div>';
26
- } elseif (!$this->updateLetsSyncroEnabled('1',$letssyncrooptions,$letssyncromodel)) {
27
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error activating OCT8NE integration.').'</div></li></ul></li></ul><br></div>';
28
- } else {
29
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('OCT8NE integration data obtained successfully!').'</div></li></ul></li></ul><br></div>';
30
- }
31
-
32
- $letssyncromodel->save();
33
- }
34
-
35
- if (isset($_GET['deactivate']) && !isset($submitLetsSyncroCredentials))
36
- {
37
- if (!$this->updateLetsSyncroEnabled('0',$letssyncrooptions,$letssyncromodel))
38
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error deactivating OCT8NE integration.').'</div></li></ul></li></ul><br></div>';
39
- else
40
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('OCT8NE integration deactivated successfully!').'</div></li></ul></li></ul><br></div>';
41
-
42
- $letssyncromodel->save();
43
- }
44
-
45
- if (isset($_GET['activate']) && !isset($submitLetsSyncroCredentials))
46
- {
47
- if (!$this->updateLetsSyncroEnabled('1',$letssyncrooptions,$letssyncromodel))
48
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error activating OCT8NE integration.').'</div></li></ul></li></ul><br></div>';
49
- else
50
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('OCT8NE integration activated successfully!').'</div></li></ul></li></ul><br></div>';
51
-
52
- $letssyncromodel->save();
53
- }
54
-
55
- if (isset($submitLetsSyncroSettings))
56
- {
57
- $letssyncro_urlapi = $this->getRequest()->getParam('letssyncro_urlapi');
58
-
59
- if (empty($letssyncro_urlapi))
60
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The field (URL API) cannot be empty.').'</div></li></ul></li></ul><br></div>';
61
- elseif (!$this->updateLetsSyncroAPIToken($letssyncrooptions,$letssyncromodel) OR
62
- !$this->updateLetsSyncroLicenseID($letssyncrooptions,$letssyncromodel) OR
63
- !$this->updateLetsSyncroSyncroSettings($letssyncrooptions,$letssyncromodel))
64
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error saving your settings.').'</div></li></ul></li></ul><br></div>';
65
- elseif(!$this->updateLetsSyncroEnabled('1',$letssyncrooptions,$letssyncromodel))
66
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The fields (License ID and API token) are invalid.').'</div></li></ul></li></ul><br></div>';
67
- else
68
- $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('Settings updated successfully.').'</div></li></ul></li></ul><br></div>';
69
-
70
- $letssyncromodel->save();
71
- }
72
-
73
- $this->_html .= '
74
- <script type="text/javascript">
75
- function submitAccountSetup() {
76
- var passw = document.getElementById(\'letssyncro_password\').value;
77
- document.getElementById(\'submitLetsSyncroCredentials\').style.display = "none";
78
- document.getElementById(\'executing\').style.display = "block";
79
- document.getElementById(\'letssyncro_password\').value = Base64.encode(passw);
80
- document.getElementById(\'generalsettings\').submit();
81
- }
82
- </script>
83
- <link href="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/letssyncro.css" rel="stylesheet" type="text/css" />
84
- <script type="text/javascript" src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/letssyncro.js"></script>
85
- <div class="content-header">
86
- <p><img src="'.$this->getSkinUrl('images/LetsSyncro_Logo.png').'" alt="Oct8ne" title="Oct8ne" /></p>
87
- </div>
88
- <div class="entry-edit">
89
- <div class="entry-edit-head collapseable">
90
- <div class="section-config active">
91
- <div class="entry-edit-head collapseable">
92
- <a id="letssyncro_setup-head" class="open" onclick="Fieldset.toggleCollapse(\'letssyncro_setup\', \'\'); return false;" href="#">'.$this->__('Account Setup').'</a>
93
- </div>
94
- <input type="hidden" value="1" name="config_state[letssyncro_setup]" id="letssyncro_setup-state">
95
- </div>
96
- </div>';
97
-
98
- $letssyncrooptions = $letssyncromodel->_data;
99
- $currentUrl_idx = strrpos($this->helper('core/url')->getCurrentUrl(), '/', -1);
100
- $currentUrl_ex = strlen(substr($this->helper('core/url')->getCurrentUrl(), $currentUrl_idx));
101
- $currentUrl = substr($this->helper('core/url')->getCurrentUrl(), 0, strlen($this->helper('core/url')->getCurrentUrl())-$currentUrl_ex);
102
-
103
- $linked_literal_deact = '<p class="LetsSyncro">'.$this->__('Status:').' <img src="'.$this->getSkinUrl('images/fam_bullet_success.gif').'" alt="'.$this->__('Enabled').'" title="'.$this->__('Enabled').'" />
104
- <a href="'.str_replace('/?activate', '', $currentUrl).'/?deactivate">'.$this->__('(Deactivate)').'</a></p>
105
- <p class="LetsSyncro">'.$this->__('Linked account:').' <strong>'.$letssyncrooptions['email'].'</strong></p><br />';
106
- $linked_literal_act = '<p class="LetsSyncro">'.$this->__('Status:').' <img src="'. $this->getSkinUrl('images/error_msg_icon.gif') .'" alt="'.$this->__('Disabled').'" title="'.$this->__('Disabled').'" />
107
- <a href="'.str_replace('/?deactivate', '', $currentUrl).'/?activate">'.$this->__('(Activate)').'</a></p>
108
- <p class="LetsSyncro">'.$this->__('Linked account:').' <strong>'.$letssyncrooptions['email'].'</strong></p><br />';
109
-
110
- $this->_html .= '
111
- <form method="get" action="'.$currentUrl.'/" id="generalsettings" name="generalsettings" style="display:'.((!isset($_GET['letssyncro_account']) && !isset($_GET['letssyncro_syncro'])) || (isset($_GET['letssyncro_account'])) ? 'block;' : 'none;').'" >
112
- <fieldset class="config collapseable" id="letssyncro_setup">';
113
- if($letssyncrooptions['licenseid'] != '' && $letssyncrooptions['enabled'] == '0')
114
- $this->_html .= str_replace('&amp;activate', '', $linked_literal_act);
115
- elseif($letssyncrooptions['licenseid'] != '' && $letssyncrooptions['enabled'] == '1')
116
- $this->_html .= str_replace('&amp;deactivate', '', $linked_literal_deact);
117
-
118
- $this->_html .= '
119
- <legend>'.$this->__('Account Setup').'</legend>
120
- <table cellspacing="0" class="form-list">
121
- <colgroup class="label"></colgroup>
122
- <colgroup class="value"></colgroup>
123
- <colgroup class=""></colgroup>
124
- <tbody>
125
- <tr id="row_letssyncro_setup_email">
126
- <td class="label">
127
- <label for="letssyncro_useremail">'.$this->__('Email:').'</label>
128
- </td>
129
- <td class="value">
130
- <input type="text" class="validate-email input-text required-entry" name="letssyncro_useremail" id="letssyncro_useremail" value="'.(($this->error AND isset($_POST['letssyncro_useremail'])) ? $_POST['letssyncro_useremail'] : $letssyncrooptions['email']).'" />
131
- <p class="note"><span>'.$this->__('Oct8ne email').'</span></p>
132
- <div id="advice-validate-email-letssyncro_useremail" class="validation-advice" style="display:none;">'.$this->__('Please, write a valid email address. For example jdoe@domain.com').'</div>
133
- </td>
134
- <td class=""></td>
135
- </tr>
136
- <tr id="row_letssyncro_setup_password">
137
- <td class="label">
138
- <label for="letssyncro_password">'.$this->__('Password:').'</label>
139
- </td>
140
- <td class="value">
141
- <input type="password" class="input-text required-entry" name="letssyncro_password" id="letssyncro_password" value="'.(($this->error AND isset($_POST['letssyncro_password'])) ? $_POST['letssyncro_password'] : $this->urlsafe_b64decode($letssyncrooptions['password'])).'" />
142
- <p class="note"><span>'.$this->__('Oct8ne password').'</span></p>
143
- </td>
144
- <td class=""></td>
145
- </tr>
146
- <tr id="row_letssyncro_setup_linkup">
147
- <td class="label"></td>
148
- <td class="value" style="height:21px;">
149
- <img id="executing" src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/loading.gif" alt="'.$this->__('Executing...').'" title="LetsSyncro" style="display:none;padding-left:15px;padding-top:2px;" />
150
- <button type="button" id="submitLetsSyncroCredentials" onClick="submitAccountSetup();" class="scalable save" ><span>'.$this->__('Link Up').'</span></button>
151
- <input type="hidden" name="submitLetsSyncroCredentials" id="submitLetsSyncroCredentials" value="ok" />
152
- </td>
153
- <td class=""></td>
154
- </tr>
155
- </tbody>
156
- </table>
157
- <br />
158
- <p class="LetsSyncro">'.$this->__('Don\'t have a OCT8NE account?').' <a href="https://secure.oct8ne.com/signup?planselected=platform" target="_blank">'.$this->__('Sign up now').'</a></p>
159
- </fieldset>
160
- </form><br />';
161
- $this->_html .= '
162
- <form method="get" action="'.$currentUrl.'/" id="advancedsettings" name="advancedsettings" style="display:none;">
163
- <fieldset>
164
- <legend>'.$this->__('Advanced settings').'</legend>
165
- <label>'.$this->__('Enabled:').'</label>
166
- <div class="margin-form">
167
- <input type="radio" name="letssyncro_enabled" id="on" value="1" '.($letssyncrooptions['enabled'] ? 'checked="checked" ' : '').'/>
168
- <label class="t" for="display_on"> <img src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/enabled.gif" alt="'.$this->__('Enabled').'" title="'.$this->__('Enabled').'" /></label>
169
- <input type="radio" name="letssyncro_enabled" id="off" value="0" '.(!$letssyncrooptions['enabled'] ? 'checked="checked" ' : '').'/>
170
- <label class="t" for="display_off"> <img src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/disabled.gif" alt="'.$this->__('Disabled').'" title="'.$this->__('Disabled').'" /></label>
171
- <p class="clear">'.$this->__('Enable the integration with OCT8NE').'</p>
172
- </div>
173
- <label>'.$this->__('User License ID:').'</label>
174
- <div class="margin-form">
175
- <input type="text" class="LetsSyncro" name="letssyncro_licenseid" id="letssyncro_licenseid" size="60" maxlength="32" value="'.(($this->error AND isset($_POST['letssyncro_licenseid'])) ? $_POST['letssyncro_licenseid'] : $letssyncrooptions['licenseid']).'" readonly />
176
- <!-- <p class="clear">'.$this->__('32 characters length LetsSyncro User License ID').'</p> -->
177
- </div>
178
- <label>'.$this->__('API Token:').'</label>
179
- <div class="margin-form">
180
- <input type="text" class="LetsSyncro" name="letssyncro_apitoken" id="letssyncro_apitoken" size="60" maxlength="32" value="'.(($this->error AND isset($_POST['letssyncro_apitoken'])) ? $_POST['letssyncro_apitoken'] : $letssyncrooptions['apitoken']).'" readonly />
181
- <!-- <p class="clear">'.$this->__('32 characters length LetsSyncro API Token').'</p> -->
182
- </div>
183
- <label>'.$this->__('URL API:').'</label>
184
- <div class="margin-form"">
185
- <input type="text" name="letssyncro_urlapi" id="letssyncro_urlapi" size="40" value="'.(($this->error AND isset($_POST['letssyncro_urlapi'])) ? $_POST['letssyncro_urlapi'] : $letssyncrooptions['urlapi']).'" />
186
- <p class="clear">'.$this->__('URL of the API OCT8NE service. Probably you don\'t have to modify it.').'</p>
187
- </div>
188
- <div class="margin-form">
189
- <input type="submit" class="button disable" name="submitLetsSyncroSettings" style="cursor: pointer;" value="'.$this->__('Save').'" id="submitLetsSyncroSettings" />
190
- </div>
191
- </fieldset>
192
- </form>
193
- </div>';
194
-
195
- return $this->_html;
196
- }
197
-
198
- public function updateLetsSyncroLicenseID($letssyncrooptions,$letssyncromodel)
199
- {
200
- $letssyncro_licenseid = '';
201
- if(isset($_GET['letssyncro_licenseid']))
202
- $letssyncro_licenseid = $_GET['letssyncro_licenseid'];
203
- return $letssyncromodel->setLicenseid($letssyncro_licenseid);
204
- }
205
-
206
- public function updateLetsSyncroAPIToken($letssyncrooptions,$letssyncromodel)
207
- {
208
- $letssyncro_apitoken = '';
209
- if(isset($_GET['letssyncro_apitoken']))
210
- $letssyncro_apitoken = $_GET['letssyncro_apitoken'];
211
- return $letssyncromodel->setApitoken($letssyncro_apitoken);
212
- }
213
-
214
- public function updateLetsSyncroEnabled($letssyncro_enabled,$letssyncrooptions,$letssyncromodel)
215
- {
216
- $letssyncromodel->save();
217
- $letssyncrooptions = $letssyncromodel->_data;
218
- $letssyncro_licenseid = $letssyncrooptions['licenseid'];
219
- $letssyncro_apitoken = $letssyncrooptions['apitoken'];
220
-
221
- if(isset($_GET['letssyncro_enabled']))
222
- $letssyncro_enabled = $_GET['letssyncro_enabled'];
223
-
224
- if($letssyncro_enabled == '1' && ($letssyncro_licenseid == '' || strlen($letssyncro_licenseid) != 32))
225
- return false;
226
-
227
- return $letssyncromodel->setEnabled($letssyncro_enabled);
228
- }
229
-
230
- public function updateLetsSyncroSyncroSettings($letssyncrooptions,$letssyncromodel)
231
- {
232
- $letssyncro_urlapi = '';
233
- if(isset($_GET['letssyncro_urlapi']))
234
- $letssyncro_urlapi = $_GET['letssyncro_urlapi'];
235
- return $letssyncromodel->setUrlapi($letssyncro_urlapi);
236
- }
237
-
238
- public function updateLetsSyncroUserPassword($letssyncrooptions,$letssyncromodel,$letssyncro_useremail,$letssyncro_password)
239
- {
240
- if(!$letssyncromodel->setEmail($letssyncro_useremail) || !$letssyncromodel->setPassword($letssyncro_password))
241
- return false;
242
-
243
- $letssyncromodel->setApitoken('');
244
- $letssyncromodel->setLicenseid('');
245
-
246
- $xmlData = $this->createXML_Logon($letssyncro_useremail, $letssyncro_password);
247
-
248
- try
249
- {
250
- $response = $this->sendRequest($xmlData, 'logon', $letssyncrooptions['urlapi']);
251
-
252
- if(strripos($response, '<head>'))
253
- return false;
254
-
255
- $xml = new SimpleXmlElement($response);
256
-
257
- if(!isset($xml->LicenseId))
258
- {
259
- $letssyncromodel->setEnabled('0');
260
- return false;
261
- }
262
-
263
- if($xml)
264
- {
265
- if($letssyncromodel->setApitoken($xml->ApiToken) &&
266
- $letssyncromodel->setLicenseid($xml->LicenseId) &&
267
- $letssyncromodel->setEmail($letssyncro_useremail) &&
268
- $letssyncromodel->setPassword($letssyncro_password))
269
- return true;
270
- }
271
- else
272
- {
273
- return false;
274
- }
275
- }
276
- catch (Exception $e)
277
- {
278
- return false;
279
- }
280
-
281
- return true;
282
- }
283
-
284
- public function sendRequest($xmlData, $method = '', $letssyncro_url, $letssyncro_apitoken = '')
285
- {
286
- if($method == 'logon')
287
- $letssyncro_url = $letssyncro_url.'/'.$method;
288
- else
289
- $letssyncro_url = $letssyncro_url.'/updateNodes?userid='.$letssyncro_apitoken;
290
-
291
- if(function_exists('curl_init') == 1)
292
- {
293
- $ch = curl_init($letssyncro_url);
294
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
295
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
296
- curl_setopt($ch, CURLOPT_POST, 1);
297
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
298
- curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlData);
299
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
300
- $response = curl_exec($ch);
301
- curl_close($ch);
302
- }
303
- else
304
- {
305
- $opts = array('http' =>
306
- array(
307
- 'method' => 'POST',
308
- 'header' => 'Content-type: text/xml',
309
- 'content' => $xmlData
310
- )
311
- );
312
- $context = stream_context_create($opts);
313
-
314
- $response = file_get_contents($letssyncro_url, false, $context);
315
- }
316
-
317
- return $response;
318
- }
319
-
320
- public function createXML_Logon($letssyncro_useremail, $letssyncro_password)
321
- {
322
- $DOM = new DOMDocument('1.0','UTF-8');
323
- $XML = $DOM->createElement('User');
324
- $XML->setAttribute('xmlns','http://schemas.datacontract.org/2004/07/Syncro.WebService');
325
- $XML->setAttribute('xmlns:i','http://www.w3.org/2001/XMLSchema-instance');
326
- $DOM->appendChild($XML);
327
-
328
- $Email = $DOM->createElement('Email', $letssyncro_useremail);
329
- $Pass = $DOM->createElement('Pass', $this->urlsafe_b64decode($letssyncro_password));
330
- $baseurl = $DOM->createElement('BaseUrl', Mage::getBaseUrl());
331
- $checkouturl = $DOM->createElement('CheckoutUrl', Mage::helper('checkout/url')->getCheckoutUrl());
332
- $loginurl = $DOM->createElement('LoginUrl', Mage::helper('customer')->getLoginUrl());
333
- // $currency = $DOM->createElement('CheckoutUrl', Mage::helper('checkout/url')->getCheckoutUrl());
334
- $platform = $DOM->createElement('Platform', 'MAGENTO');
335
- $domain = $DOM->createElement('UrlDomain', str_replace("index.php/", "", Mage::getBaseUrl()));
336
-
337
- $XML->appendChild($baseurl);
338
- $XML->appendChild($checkouturl);
339
- // $XML->appendChild($currency); <-- habrá mas de 1 currency, preguntar que hacer
340
- $XML->appendChild($Email);
341
- $XML->appendChild($loginurl);
342
- $XML->appendChild($Pass);
343
- $XML->appendChild($platform);
344
- $XML->appendChild($domain);
345
-
346
- return $DOM->saveXML($DOM->documentElement);
347
- }
348
-
349
- function urlsafe_b64encode($string)
350
- {
351
- $data = base64_encode($string);
352
- $data = str_replace(array('+','/','='),array('-','_','.'),$data);
353
- return $data;
354
- }
355
- function urlsafe_b64decode($string)
356
- {
357
- $data = str_replace(array('-','_','.'),array('+','/','='),$string);
358
- $mod4 = strlen($data) % 4;
359
- if ($mod4) {
360
- $data .= substr('====', $mod4);
361
- }
362
- return base64_decode($data);
363
- }
364
- }
1
+ <?php
2
+ class LetsSyncroLLC_Oct8ne_Block_Accountconfig extends Mage_Core_Block_Template
3
+ {
4
+ private $letssyncromodel;
5
+ private $_html = '';
6
+
7
+ protected function _toHtml()
8
+ {
9
+ $submitLetsSyncroCredentials = $this->getRequest()->getParam('submitLetsSyncroCredentials');
10
+ $submitLetsSyncroSettings = $this->getRequest()->getParam('submitLetsSyncroSettings');
11
+
12
+ $letssyncromodel = Mage::getModel('oct8ne/letssyncro')->load(1);
13
+ $letssyncrooptions = $letssyncromodel->_data;
14
+
15
+ if (isset($submitLetsSyncroCredentials))
16
+ {
17
+ $letssyncro_useremail = $this->getRequest()->getParam('letssyncro_useremail');
18
+ $letssyncro_password = $this->getRequest()->getParam('letssyncro_password');
19
+
20
+ if (empty($letssyncro_useremail)) {
21
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The field (Email) cannot be empty.').'</div></li></ul></li></ul><br></div>';
22
+ } elseif (empty($letssyncro_password)) {
23
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The field (Password) cannot be empty.').'</div></li></ul></li></ul><br></div>';
24
+ } elseif (!$this->updateLetsSyncroUserPassword($letssyncrooptions,$letssyncromodel,$letssyncro_useremail,$letssyncro_password)) {
25
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error on your credentials and cannot obtain OCT8NE integration data.').'</div></li></ul></li></ul><br></div>';
26
+ } elseif (!$this->updateLetsSyncroEnabled('1',$letssyncrooptions,$letssyncromodel)) {
27
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error activating OCT8NE integration.').'</div></li></ul></li></ul><br></div>';
28
+ } else {
29
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('OCT8NE integration data obtained successfully!').'</div></li></ul></li></ul><br></div>';
30
+ }
31
+
32
+ $letssyncromodel->save();
33
+ }
34
+
35
+ if (isset($_GET['deactivate']) && !isset($submitLetsSyncroCredentials))
36
+ {
37
+ if (!$this->updateLetsSyncroEnabled('0',$letssyncrooptions,$letssyncromodel))
38
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error deactivating OCT8NE integration.').'</div></li></ul></li></ul><br></div>';
39
+ else
40
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('OCT8NE integration deactivated successfully!').'</div></li></ul></li></ul><br></div>';
41
+
42
+ $letssyncromodel->save();
43
+ }
44
+
45
+ if (isset($_GET['activate']) && !isset($submitLetsSyncroCredentials))
46
+ {
47
+ if (!$this->updateLetsSyncroEnabled('1',$letssyncrooptions,$letssyncromodel))
48
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error activating OCT8NE integration.').'</div></li></ul></li></ul><br></div>';
49
+ else
50
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('OCT8NE integration activated successfully!').'</div></li></ul></li></ul><br></div>';
51
+
52
+ $letssyncromodel->save();
53
+ }
54
+
55
+ if (isset($submitLetsSyncroSettings))
56
+ {
57
+ $letssyncro_urlapi = $this->getRequest()->getParam('letssyncro_urlapi');
58
+
59
+ if (empty($letssyncro_urlapi))
60
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The field (URL API) cannot be empty.').'</div></li></ul></li></ul><br></div>';
61
+ elseif (!$this->updateLetsSyncroAPIToken($letssyncrooptions,$letssyncromodel) OR
62
+ !$this->updateLetsSyncroLicenseID($letssyncrooptions,$letssyncromodel) OR
63
+ !$this->updateLetsSyncroSyncroSettings($letssyncrooptions,$letssyncromodel))
64
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('There was an error saving your settings.').'</div></li></ul></li></ul><br></div>';
65
+ elseif(!$this->updateLetsSyncroEnabled('1',$letssyncrooptions,$letssyncromodel))
66
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="error-msg"><ul><li><div id="themessage">'.$this->__('The fields (License ID and API token) are invalid.').'</div></li></ul></li></ul><br></div>';
67
+ else
68
+ $this->_html .= '<div id="messagesbox"><ul class="messages"><li class="success-msg"><ul><li><div id="themessage">'.$this->__('Settings updated successfully.').'</div></li></ul></li></ul><br></div>';
69
+
70
+ $letssyncromodel->save();
71
+ }
72
+
73
+ $this->_html .= '
74
+ <script type="text/javascript">
75
+ function submitAccountSetup() {
76
+ var passw = document.getElementById(\'letssyncro_password\').value;
77
+ document.getElementById(\'submitLetsSyncroCredentials\').style.display = "none";
78
+ document.getElementById(\'executing\').style.display = "block";
79
+ document.getElementById(\'letssyncro_password\').value = Base64.encode(passw);
80
+ document.getElementById(\'generalsettings\').submit();
81
+ }
82
+ </script>
83
+ <link href="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/letssyncro.css" rel="stylesheet" type="text/css" />
84
+ <script type="text/javascript" src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/letssyncro.js"></script>
85
+ <div class="content-header">
86
+ <p><img src="'.$this->getSkinUrl('images/LetsSyncro_Logo.png').'" alt="Oct8ne" title="Oct8ne" /></p>
87
+ </div>
88
+ <div class="entry-edit">
89
+ <div class="entry-edit-head collapseable">
90
+ <div class="section-config active">
91
+ <div class="entry-edit-head collapseable">
92
+ <a id="letssyncro_setup-head" class="open" onclick="Fieldset.toggleCollapse(\'letssyncro_setup\', \'\'); return false;" href="#">'.$this->__('Account Setup').'</a>
93
+ </div>
94
+ <input type="hidden" value="1" name="config_state[letssyncro_setup]" id="letssyncro_setup-state">
95
+ </div>
96
+ </div>';
97
+
98
+ $letssyncrooptions = $letssyncromodel->_data;
99
+ $currentUrl_idx = strrpos($this->helper('core/url')->getCurrentUrl(), '/', -1);
100
+ $currentUrl_ex = strlen(substr($this->helper('core/url')->getCurrentUrl(), $currentUrl_idx));
101
+ $currentUrl = substr($this->helper('core/url')->getCurrentUrl(), 0, strlen($this->helper('core/url')->getCurrentUrl())-$currentUrl_ex);
102
+
103
+ $linked_literal_deact = '<p class="LetsSyncro">'.$this->__('Status:').' <img src="'.$this->getSkinUrl('images/fam_bullet_success.gif').'" alt="'.$this->__('Enabled').'" title="'.$this->__('Enabled').'" />
104
+ <a href="'.str_replace('/?activate', '', $currentUrl).'/?deactivate">'.$this->__('(Deactivate)').'</a></p>
105
+ <p class="LetsSyncro">'.$this->__('Linked account:').' <strong>'.$letssyncrooptions['email'].'</strong></p><br />';
106
+ $linked_literal_act = '<p class="LetsSyncro">'.$this->__('Status:').' <img src="'. $this->getSkinUrl('images/error_msg_icon.gif') .'" alt="'.$this->__('Disabled').'" title="'.$this->__('Disabled').'" />
107
+ <a href="'.str_replace('/?deactivate', '', $currentUrl).'/?activate">'.$this->__('(Activate)').'</a></p>
108
+ <p class="LetsSyncro">'.$this->__('Linked account:').' <strong>'.$letssyncrooptions['email'].'</strong></p><br />';
109
+
110
+ $this->_html .= '
111
+ <form method="get" action="'.$currentUrl.'/" id="generalsettings" name="generalsettings" style="display:'.((!isset($_GET['letssyncro_account']) && !isset($_GET['letssyncro_syncro'])) || (isset($_GET['letssyncro_account'])) ? 'block;' : 'none;').'" >
112
+ <fieldset class="config collapseable" id="letssyncro_setup">';
113
+ if($letssyncrooptions['licenseid'] != '' && $letssyncrooptions['enabled'] == '0')
114
+ $this->_html .= str_replace('&amp;activate', '', $linked_literal_act);
115
+ elseif($letssyncrooptions['licenseid'] != '' && $letssyncrooptions['enabled'] == '1')
116
+ $this->_html .= str_replace('&amp;deactivate', '', $linked_literal_deact);
117
+
118
+ $this->_html .= '
119
+ <legend>'.$this->__('Account Setup').'</legend>
120
+ <table cellspacing="0" class="form-list">
121
+ <colgroup class="label"></colgroup>
122
+ <colgroup class="value"></colgroup>
123
+ <colgroup class=""></colgroup>
124
+ <tbody>
125
+ <tr id="row_letssyncro_setup_email">
126
+ <td class="label">
127
+ <label for="letssyncro_useremail">'.$this->__('Email:').'</label>
128
+ </td>
129
+ <td class="value">
130
+ <input type="text" class="validate-email input-text required-entry" name="letssyncro_useremail" id="letssyncro_useremail" value="'.(($this->error AND isset($_POST['letssyncro_useremail'])) ? $_POST['letssyncro_useremail'] : $letssyncrooptions['email']).'" />
131
+ <p class="note"><span>'.$this->__('Oct8ne email').'</span></p>
132
+ <div id="advice-validate-email-letssyncro_useremail" class="validation-advice" style="display:none;">'.$this->__('Please, write a valid email address. For example jdoe@domain.com').'</div>
133
+ </td>
134
+ <td class=""></td>
135
+ </tr>
136
+ <tr id="row_letssyncro_setup_password">
137
+ <td class="label">
138
+ <label for="letssyncro_password">'.$this->__('Password:').'</label>
139
+ </td>
140
+ <td class="value">
141
+ <input type="password" class="input-text required-entry" name="letssyncro_password" id="letssyncro_password" value="'.(($this->error AND isset($_POST['letssyncro_password'])) ? $_POST['letssyncro_password'] : $this->urlsafe_b64decode($letssyncrooptions['password'])).'" />
142
+ <p class="note"><span>'.$this->__('Oct8ne password').'</span></p>
143
+ </td>
144
+ <td class=""></td>
145
+ </tr>
146
+ <tr id="row_letssyncro_setup_linkup">
147
+ <td class="label"></td>
148
+ <td class="value" style="height:21px;">
149
+ <img id="executing" src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/loading.gif" alt="'.$this->__('Executing...').'" title="LetsSyncro" style="display:none;padding-left:15px;padding-top:2px;" />
150
+ <button type="button" id="submitLetsSyncroCredentials" onClick="submitAccountSetup();" class="scalable save" ><span>'.$this->__('Link Up').'</span></button>
151
+ <input type="hidden" name="submitLetsSyncroCredentials" id="submitLetsSyncroCredentials" value="ok" />
152
+ </td>
153
+ <td class=""></td>
154
+ </tr>
155
+ </tbody>
156
+ </table>
157
+ <br />
158
+ <p class="LetsSyncro">'.$this->__('Don\'t have a OCT8NE account?').' <a href="https://secure.oct8ne.com/signup?planselected=platform" target="_blank">'.$this->__('Sign up now').'</a></p>
159
+ </fieldset>
160
+ </form><br />';
161
+ $this->_html .= '
162
+ <form method="get" action="'.$currentUrl.'/" id="advancedsettings" name="advancedsettings" style="display:none;">
163
+ <fieldset>
164
+ <legend>'.$this->__('Advanced settings').'</legend>
165
+ <label>'.$this->__('Enabled:').'</label>
166
+ <div class="margin-form">
167
+ <input type="radio" name="letssyncro_enabled" id="on" value="1" '.($letssyncrooptions['enabled'] ? 'checked="checked" ' : '').'/>
168
+ <label class="t" for="display_on"> <img src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/enabled.gif" alt="'.$this->__('Enabled').'" title="'.$this->__('Enabled').'" /></label>
169
+ <input type="radio" name="letssyncro_enabled" id="off" value="0" '.(!$letssyncrooptions['enabled'] ? 'checked="checked" ' : '').'/>
170
+ <label class="t" for="display_off"> <img src="'.Mage::getStoreConfig('web/unsecure/base_url').'/app/design/adminhtml/default/default/template/oct8ne/disabled.gif" alt="'.$this->__('Disabled').'" title="'.$this->__('Disabled').'" /></label>
171
+ <p class="clear">'.$this->__('Enable the integration with OCT8NE').'</p>
172
+ </div>
173
+ <label>'.$this->__('User License ID:').'</label>
174
+ <div class="margin-form">
175
+ <input type="text" class="LetsSyncro" name="letssyncro_licenseid" id="letssyncro_licenseid" size="60" maxlength="32" value="'.(($this->error AND isset($_POST['letssyncro_licenseid'])) ? $_POST['letssyncro_licenseid'] : $letssyncrooptions['licenseid']).'" readonly />
176
+ <!-- <p class="clear">'.$this->__('32 characters length LetsSyncro User License ID').'</p> -->
177
+ </div>
178
+ <label>'.$this->__('API Token:').'</label>
179
+ <div class="margin-form">
180
+ <input type="text" class="LetsSyncro" name="letssyncro_apitoken" id="letssyncro_apitoken" size="60" maxlength="32" value="'.(($this->error AND isset($_POST['letssyncro_apitoken'])) ? $_POST['letssyncro_apitoken'] : $letssyncrooptions['apitoken']).'" readonly />
181
+ <!-- <p class="clear">'.$this->__('32 characters length LetsSyncro API Token').'</p> -->
182
+ </div>
183
+ <label>'.$this->__('URL API:').'</label>
184
+ <div class="margin-form"">
185
+ <input type="text" name="letssyncro_urlapi" id="letssyncro_urlapi" size="40" value="'.(($this->error AND isset($_POST['letssyncro_urlapi'])) ? $_POST['letssyncro_urlapi'] : $letssyncrooptions['urlapi']).'" />
186
+ <p class="clear">'.$this->__('URL of the API OCT8NE service. Probably you don\'t have to modify it.').'</p>
187
+ </div>
188
+ <div class="margin-form">
189
+ <input type="submit" class="button disable" name="submitLetsSyncroSettings" style="cursor: pointer;" value="'.$this->__('Save').'" id="submitLetsSyncroSettings" />
190
+ </div>
191
+ </fieldset>
192
+ </form>
193
+ </div>';
194
+
195
+ return $this->_html;
196
+ }
197
+
198
+ public function updateLetsSyncroLicenseID($letssyncrooptions,$letssyncromodel)
199
+ {
200
+ $letssyncro_licenseid = '';
201
+ if(isset($_GET['letssyncro_licenseid']))
202
+ $letssyncro_licenseid = $_GET['letssyncro_licenseid'];
203
+ return $letssyncromodel->setLicenseid($letssyncro_licenseid);
204
+ }
205
+
206
+ public function updateLetsSyncroAPIToken($letssyncrooptions,$letssyncromodel)
207
+ {
208
+ $letssyncro_apitoken = '';
209
+ if(isset($_GET['letssyncro_apitoken']))
210
+ $letssyncro_apitoken = $_GET['letssyncro_apitoken'];
211
+ return $letssyncromodel->setApitoken($letssyncro_apitoken);
212
+ }
213
+
214
+ public function updateLetsSyncroEnabled($letssyncro_enabled,$letssyncrooptions,$letssyncromodel)
215
+ {
216
+ $letssyncromodel->save();
217
+ $letssyncrooptions = $letssyncromodel->_data;
218
+ $letssyncro_licenseid = $letssyncrooptions['licenseid'];
219
+ $letssyncro_apitoken = $letssyncrooptions['apitoken'];
220
+
221
+ if(isset($_GET['letssyncro_enabled']))
222
+ $letssyncro_enabled = $_GET['letssyncro_enabled'];
223
+
224
+ if($letssyncro_enabled == '1' && ($letssyncro_licenseid == '' || strlen($letssyncro_licenseid) != 32))
225
+ return false;
226
+
227
+ return $letssyncromodel->setEnabled($letssyncro_enabled);
228
+ }
229
+
230
+ public function updateLetsSyncroSyncroSettings($letssyncrooptions,$letssyncromodel)
231
+ {
232
+ $letssyncro_urlapi = '';
233
+ if(isset($_GET['letssyncro_urlapi']))
234
+ $letssyncro_urlapi = $_GET['letssyncro_urlapi'];
235
+ return $letssyncromodel->setUrlapi($letssyncro_urlapi);
236
+ }
237
+
238
+ public function updateLetsSyncroUserPassword($letssyncrooptions,$letssyncromodel,$letssyncro_useremail,$letssyncro_password)
239
+ {
240
+ if(!$letssyncromodel->setEmail($letssyncro_useremail) || !$letssyncromodel->setPassword($letssyncro_password))
241
+ return false;
242
+
243
+ $letssyncromodel->setApitoken('');
244
+ $letssyncromodel->setLicenseid('');
245
+
246
+ $xmlData = $this->createXML_Logon($letssyncro_useremail, $letssyncro_password);
247
+
248
+ try
249
+ {
250
+ $response = $this->sendRequest($xmlData, 'logon', $letssyncrooptions['urlapi']);
251
+
252
+ if(strripos($response, '<head>'))
253
+ return false;
254
+
255
+ $xml = new SimpleXmlElement($response);
256
+
257
+ if(!isset($xml->LicenseId))
258
+ {
259
+ $letssyncromodel->setEnabled('0');
260
+ return false;
261
+ }
262
+
263
+ if($xml)
264
+ {
265
+ if($letssyncromodel->setApitoken($xml->ApiToken) &&
266
+ $letssyncromodel->setLicenseid($xml->LicenseId) &&
267
+ $letssyncromodel->setEmail($letssyncro_useremail) &&
268
+ $letssyncromodel->setPassword($letssyncro_password))
269
+ return true;
270
+ }
271
+ else
272
+ {
273
+ return false;
274
+ }
275
+ }
276
+ catch (Exception $e)
277
+ {
278
+ return false;
279
+ }
280
+
281
+ return true;
282
+ }
283
+
284
+ public function sendRequest($xmlData, $method = '', $letssyncro_url, $letssyncro_apitoken = '')
285
+ {
286
+ if($method == 'logon')
287
+ $letssyncro_url = $letssyncro_url.'/'.$method;
288
+ else
289
+ $letssyncro_url = $letssyncro_url.'/updateNodes?userid='.$letssyncro_apitoken;
290
+
291
+ if(function_exists('curl_init') == 1)
292
+ {
293
+ $ch = curl_init($letssyncro_url);
294
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
295
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
296
+ curl_setopt($ch, CURLOPT_POST, 1);
297
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
298
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlData);
299
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
300
+ $response = curl_exec($ch);
301
+ curl_close($ch);
302
+ }
303
+ else
304
+ {
305
+ $opts = array('http' =>
306
+ array(
307
+ 'method' => 'POST',
308
+ 'header' => 'Content-type: text/xml',
309
+ 'content' => $xmlData
310
+ )
311
+ );
312
+ $context = stream_context_create($opts);
313
+
314
+ $response = file_get_contents($letssyncro_url, false, $context);
315
+ }
316
+
317
+ return $response;
318
+ }
319
+
320
+ public function createXML_Logon($letssyncro_useremail, $letssyncro_password)
321
+ {
322
+ $DOM = new DOMDocument('1.0','UTF-8');
323
+ $XML = $DOM->createElement('User');
324
+ $XML->setAttribute('xmlns','http://schemas.datacontract.org/2004/07/Syncro.WebService');
325
+ $XML->setAttribute('xmlns:i','http://www.w3.org/2001/XMLSchema-instance');
326
+ $DOM->appendChild($XML);
327
+
328
+ $Email = $DOM->createElement('Email', $letssyncro_useremail);
329
+ $Pass = $DOM->createElement('Pass', $this->urlsafe_b64decode($letssyncro_password));
330
+ $baseurl = $DOM->createElement('BaseUrl', Mage::getBaseUrl());
331
+ $checkouturl = $DOM->createElement('CheckoutUrl', Mage::helper('checkout/url')->getCheckoutUrl());
332
+ $loginurl = $DOM->createElement('LoginUrl', Mage::helper('customer')->getLoginUrl());
333
+ // $currency = $DOM->createElement('CheckoutUrl', Mage::helper('checkout/url')->getCheckoutUrl());
334
+ $platform = $DOM->createElement('Platform', 'MAGENTO');
335
+ $domain = $DOM->createElement('UrlDomain', str_replace("index.php/", "", Mage::getBaseUrl()));
336
+
337
+ $XML->appendChild($baseurl);
338
+ $XML->appendChild($checkouturl);
339
+ // $XML->appendChild($currency); <-- habrá mas de 1 currency, preguntar que hacer
340
+ $XML->appendChild($Email);
341
+ $XML->appendChild($loginurl);
342
+ $XML->appendChild($Pass);
343
+ $XML->appendChild($platform);
344
+ $XML->appendChild($domain);
345
+
346
+ return $DOM->saveXML($DOM->documentElement);
347
+ }
348
+
349
+ function urlsafe_b64encode($string)
350
+ {
351
+ $data = base64_encode($string);
352
+ $data = str_replace(array('+','/','='),array('-','_','.'),$data);
353
+ return $data;
354
+ }
355
+ function urlsafe_b64decode($string)
356
+ {
357
+ $data = str_replace(array('-','_','.'),array('+','/','='),$string);
358
+ $mod4 = strlen($data) % 4;
359
+ if ($mod4) {
360
+ $data .= substr('====', $mod4);
361
+ }
362
+ return base64_decode($data);
363
+ }
364
+ }
app/code/community/LetsSyncroLLC/Oct8ne/Block/Index.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_Block_Index extends Mage_Core_Block_Template
4
- {
5
- protected function _toHtml()
6
- {
7
- return 'Oct8ne integration extension installed successfully.';
8
- }
9
- }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_Block_Index extends Mage_Core_Block_Template
4
+ {
5
+ protected function _toHtml()
6
+ {
7
+ return 'Oct8ne integration extension installed successfully.';
8
+ }
9
+ }
app/code/community/LetsSyncroLLC/Oct8ne/Helper/Wishlist.php CHANGED
@@ -1,87 +1,92 @@
1
- <?php
2
- class LetsSyncroLLC_Oct8ne_Helper_wishlist extends Mage_Core_Helper_Abstract
3
- {
4
- private function _getWishlist($customer_id = null)
5
- {
6
- if( $customer_id == null )
7
- {
8
- if ( !Mage::getSingleton('customer/session')->isLoggedIn() )
9
- {
10
- return null;
11
- }
12
- $customer = Mage::getSingleton('customer/session')->getCustomer();
13
- $wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
14
- }
15
- else
16
- {
17
- $wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer_id, true);
18
- }
19
- return $wishList;
20
- }
21
-
22
- public function getWishlist($customer_id = null)
23
- {
24
- $wishList = $this->_getWishlist($customer_id);
25
- if($wishList == null)
26
- return array();
27
-
28
- $wishListItemCollection = $wishList->getItemCollection();
29
-
30
- $result = array();
31
- if (count($wishListItemCollection)) {
32
- foreach ($wishListItemCollection as $item) {
33
- /* @var $product Mage_Catalog_Model_Product */
34
- $product = $item->getProduct();
35
- $result[] = Mage::helper('oct8ne')->getProductInfo($product->getId()); // array('id' => $product->getId(), 'name' => $product->getName());
36
- }
37
- }
38
- return $result;
39
- }
40
-
41
- public function addToWishlist($productId, $customer_id = null)
42
- {
43
- $wishList = $this->_getWishlist($customer_id);
44
- if($wishList == null)
45
- return false;
46
-
47
- /*
48
- $requestParams = $this->getRequest()->getParams();
49
- $buyRequest = new Varien_Object($requestParams);
50
- */
51
-
52
- $buyRequest = new Varien_Object(array(
53
- 'storeId' => Mage::app()->getStore()->getId()
54
- ));
55
-
56
- $product = Mage::getModel('catalog/product')->load($productId);
57
-
58
- $wishList->addNewItem($product, $buyRequest);
59
- if (is_string($result)) {
60
- Mage::throwException($result);
61
- }
62
- $wishList->save();
63
- return true;
64
- }
65
-
66
- public function removeFromWishlist($productId, $customer_id = null)
67
- {
68
- $wishList = $this->_getWishlist($customer_id);
69
- if($wishList == null)
70
- return false;
71
-
72
- $wishListItemCollection = $wishList->getItemCollection();
73
-
74
- if (count($wishListItemCollection)) {
75
- foreach ($wishListItemCollection as $item) {
76
- /* @var $product Mage_Catalog_Model_Product */
77
- if($item->getProductId() == $productId)
78
- $item->delete();
79
- }
80
- }
81
-
82
- $wishList->save();
83
- return true;
84
- }
85
-
86
-
 
 
 
 
 
87
  }
1
+ <?php
2
+ class LetsSyncroLLC_Oct8ne_Helper_wishlist extends Mage_Core_Helper_Abstract
3
+ {
4
+ private function _getWishlist($customer_id = null)
5
+ {
6
+ if( $customer_id == null )
7
+ {
8
+ if ( !Mage::getSingleton('customer/session')->isLoggedIn() )
9
+ {
10
+ return null;
11
+ }
12
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
13
+ $wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
14
+ }
15
+ else
16
+ {
17
+ $wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer_id, true);
18
+ }
19
+ return $wishList;
20
+ }
21
+
22
+ public function getWishlist($customer_id = null)
23
+ {
24
+ $wishList = $this->_getWishlist($customer_id);
25
+ if($wishList == null)
26
+ return array();
27
+
28
+ $wishListItemCollection = $wishList->getItemCollection();
29
+
30
+ $result = array();
31
+ if (count($wishListItemCollection)) {
32
+ foreach ($wishListItemCollection as $item) {
33
+ /* @var $product Mage_Catalog_Model_Product */
34
+ $product = $item->getProduct();
35
+ $result[] = Mage::helper('oct8ne')->getProductInfo($product->getId()); // array('id' => $product->getId(), 'name' => $product->getName());
36
+ }
37
+ }
38
+ return $result;
39
+ }
40
+
41
+ public function addToWishlist($productId, $customer_id = null)
42
+ {
43
+ if(is_null($customer_id)){
44
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
45
+ $customer_id = Mage::getSingleton('customer/session')->getId();
46
+ }
47
+ }
48
+ $wishList = $this->_getWishlist($customer_id);
49
+ if($wishList == null)
50
+ return false;
51
+
52
+ /*
53
+ $requestParams = $this->getRequest()->getParams();
54
+ $buyRequest = new Varien_Object($requestParams);
55
+ */
56
+
57
+ $buyRequest = new Varien_Object(array(
58
+ 'storeId' => Mage::app()->getStore()->getId()
59
+ ));
60
+
61
+ $product = Mage::getModel('catalog/product')->load($productId);
62
+
63
+ $wishList->addNewItem($product, $buyRequest);
64
+ if (is_string($result)) {
65
+ Mage::throwException($result);
66
+ }
67
+ $wishList->save();
68
+ return true;
69
+ }
70
+
71
+ public function removeFromWishlist($productId, $customer_id = null)
72
+ {
73
+ $wishList = $this->_getWishlist($customer_id);
74
+ if($wishList == null)
75
+ return false;
76
+
77
+ $wishListItemCollection = $wishList->getItemCollection();
78
+
79
+ if (count($wishListItemCollection)) {
80
+ foreach ($wishListItemCollection as $item) {
81
+ /* @var $product Mage_Catalog_Model_Product */
82
+ if($item->getProductId() == $productId)
83
+ $item->delete();
84
+ }
85
+ }
86
+
87
+ $wishList->save();
88
+ return true;
89
+ }
90
+
91
+
92
  }
app/code/community/LetsSyncroLLC/Oct8ne/Model/Letssyncro.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_Model_LetsSyncro extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct()
6
- {
7
- $this->_init('oct8ne/letssyncro');
8
- }
9
- }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_Model_LetsSyncro extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('oct8ne/letssyncro');
8
+ }
9
+ }
app/code/community/LetsSyncroLLC/Oct8ne/Model/Mysql4/LetsSyncro/Collection.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_Model_Mysql4_LetsSyncro_Collection extends Varien_Data_Collection_Db
4
- {
5
- protected $_letssyncroTable;
6
-
7
- public function __construct()
8
- {
9
- $resources = Mage::getSingleton('core/resource');
10
- parent::__construct($resources->getConnection('letssyncro_read'));
11
- $this->_letssyncroTable = $resources->getTableName('oct8ne/letssyncro');
12
-
13
- $this->_select->from(
14
- array('letssyncro'=>$this->_letssyncroTable),
15
- array('*')
16
- );
17
- $this->setItemObjectClass(Mage::getConfig()->getModelClassName('oct8ne/letssyncro'));
18
- }
19
- }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_Model_Mysql4_LetsSyncro_Collection extends Varien_Data_Collection_Db
4
+ {
5
+ protected $_letssyncroTable;
6
+
7
+ public function __construct()
8
+ {
9
+ $resources = Mage::getSingleton('core/resource');
10
+ parent::__construct($resources->getConnection('letssyncro_read'));
11
+ $this->_letssyncroTable = $resources->getTableName('oct8ne/letssyncro');
12
+
13
+ $this->_select->from(
14
+ array('letssyncro'=>$this->_letssyncroTable),
15
+ array('*')
16
+ );
17
+ $this->setItemObjectClass(Mage::getConfig()->getModelClassName('oct8ne/letssyncro'));
18
+ }
19
+ }
app/code/community/LetsSyncroLLC/Oct8ne/Model/Mysql4/Letssyncro.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_Model_Mysql4_LetsSyncro extends Mage_Core_Model_Mysql4_Abstract
4
- {
5
- protected function _construct()
6
- {
7
- $this->_init('oct8ne/letssyncro', 'letssyncro_id');
8
- }
9
- }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_Model_Mysql4_LetsSyncro extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('oct8ne/letssyncro', 'letssyncro_id');
8
+ }
9
+ }
app/code/community/LetsSyncroLLC/Oct8ne/Model/Observer.php CHANGED
@@ -1,125 +1,125 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_Model_Observer
4
- {
5
- public function interceptMethod($observer)
6
- {
7
- $request = $observer->getEvent()->getData('front')->getRequest();
8
-
9
- if(isset($request->oct8ne))
10
- {
11
- $package = Mage::getStoreConfig('design/oct8nedesign/package');
12
- $theme = Mage::getStoreConfig('design/oct8nedesign/theme');
13
-
14
- if(empty($package))
15
- $package = "default";
16
-
17
- if(empty($theme))
18
- $theme = "oct8ne";
19
-
20
- Mage::getDesign()->setPackageName($package);
21
- Mage::getDesign()->setTheme($theme);
22
- Mage::register('oct8ne', 1);
23
- // Mage::getModel('core/url')->setRouteParam('oct8ne', 1);
24
- }
25
- }
26
-
27
- public function layoutRenderBefore($observer)
28
- {
29
- $session = Mage::getSingleton('core/session');
30
- $logged_in = $session->getData("notify_oct8ne", null);
31
- if(!is_null($logged_in))
32
- {
33
- $customer = Mage::getSingleton('customer/session')->getCustomer();
34
-
35
- $session->unsetData("notify_oct8ne");
36
- $layout = Mage::getSingleton('core/layout');
37
-
38
- $head = $layout->getBlock('root')->getChild('head');
39
- if (is_object($head)) {
40
- $head->addItem("script", "oct8ne-notify", <<<EOT
41
- function lookForOct8neIFrameLoaded() {
42
- var iframe = document.getElementById( 'oct8ne-iframe-return' );
43
- if ( iframe == null )
44
- setTimeout( 'lookForOct8neIFrameLoaded()', 500 );
45
- else {
46
- var post_data = {
47
- user: {
48
- id: {$customer->getId()},
49
- firstName: "{$customer->getFirstname()}",
50
- lastName: "{$customer->getLastname()}",
51
- email: "{$customer->getEmail()}"
52
- }
53
- };
54
- iframe.contentWindow.postMessage( JSON.stringify(post_data), '*' );
55
- }
56
- };
57
- lookForOct8neIFrameLoaded();
58
- EOT
59
- );
60
-
61
- }
62
- }
63
-
64
- $logged_out = $session->getData("notify_oct8ne_logout", null);
65
- if(!is_null($logged_out))
66
- {
67
- // $customer = Mage::getSingleton('customer/session')->getCustomer();
68
-
69
- $session->unsetData("notify_oct8ne_logout");
70
- $layout = Mage::getSingleton('core/layout');
71
-
72
- $head = $layout->getBlock('root')->getChild('head');
73
- if (is_object($head)) {
74
- $head->addItem("script", "oct8ne-notify", <<<EOT
75
- function lookForOct8neIFrameLoaded() {
76
- var iframe = document.getElementById( 'oct8ne-iframe-return' );
77
- if ( iframe == null )
78
- setTimeout( 'lookForOct8neIFrameLoaded()', 500 );
79
- else
80
- iframe.contentWindow.postMessage( 'logout', '*' );
81
- }
82
- lookForOct8neIFrameLoaded();
83
- EOT
84
- );
85
-
86
- }
87
- }
88
- }
89
-
90
- /**
91
- * Get checkout session model instance
92
- *
93
- * @return Mage_Checkout_Model_Session
94
- */
95
- protected function _getSession() { return Mage::getSingleton('checkout/session'); }
96
-
97
- public function placeOrderBefore($observer)
98
- {
99
- $order = $observer->getEvent()->getOrder();
100
- $oct8ne_products = $this->_getSession()->getOct8neProducts();
101
- if(!is_array($oct8ne_products))
102
- $oct8ne_products = array();
103
-
104
- $items = $order->getAllItems();
105
- foreach($items as $item)
106
- {
107
- $product = $item->getProduct();
108
- /*
109
- foreach($oct8ne_products as $op)
110
- {
111
- $found = false;
112
- if($op->getId() == $product->getId())
113
- $found = true;
114
- }
115
- */
116
- $found = in_array($product->getId(), $oct8ne_products);
117
-
118
- $model = Mage::getModel('oct8ne/orderproducts');
119
- $model->setOrderId($order->getId());
120
- $model->setProductId($product->getId());
121
- $model->setOct8ne($found?'Y':'N');
122
- $model->save();
123
- }
124
- }
125
- }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_Model_Observer
4
+ {
5
+ public function interceptMethod($observer)
6
+ {
7
+ $request = $observer->getEvent()->getData('front')->getRequest();
8
+
9
+ if(isset($request->oct8ne))
10
+ {
11
+ $package = Mage::getStoreConfig('design/oct8nedesign/package');
12
+ $theme = Mage::getStoreConfig('design/oct8nedesign/theme');
13
+
14
+ if(empty($package))
15
+ $package = "default";
16
+
17
+ if(empty($theme))
18
+ $theme = "oct8ne";
19
+
20
+ Mage::getDesign()->setPackageName($package);
21
+ Mage::getDesign()->setTheme($theme);
22
+ Mage::register('oct8ne', 1);
23
+ // Mage::getModel('core/url')->setRouteParam('oct8ne', 1);
24
+ }
25
+ }
26
+
27
+ public function layoutRenderBefore($observer)
28
+ {
29
+ $session = Mage::getSingleton('core/session');
30
+ $logged_in = $session->getData("notify_oct8ne", null);
31
+ if(!is_null($logged_in))
32
+ {
33
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
34
+
35
+ $session->unsetData("notify_oct8ne");
36
+ $layout = Mage::getSingleton('core/layout');
37
+
38
+ $head = $layout->getBlock('root')->getChild('head');
39
+ if (is_object($head)) {
40
+ $head->addItem("script", "oct8ne-notify", <<<EOT
41
+ function lookForOct8neIFrameLoaded() {
42
+ var iframe = document.getElementById( 'oct8ne-iframe-return' );
43
+ if ( iframe == null )
44
+ setTimeout( 'lookForOct8neIFrameLoaded()', 500 );
45
+ else {
46
+ var post_data = {
47
+ user: {
48
+ id: {$customer->getId()},
49
+ firstName: "{$customer->getFirstname()}",
50
+ lastName: "{$customer->getLastname()}",
51
+ email: "{$customer->getEmail()}"
52
+ }
53
+ };
54
+ iframe.contentWindow.postMessage( JSON.stringify(post_data), '*' );
55
+ }
56
+ };
57
+ lookForOct8neIFrameLoaded();
58
+ EOT
59
+ );
60
+
61
+ }
62
+ }
63
+
64
+ $logged_out = $session->getData("notify_oct8ne_logout", null);
65
+ if(!is_null($logged_out))
66
+ {
67
+ // $customer = Mage::getSingleton('customer/session')->getCustomer();
68
+
69
+ $session->unsetData("notify_oct8ne_logout");
70
+ $layout = Mage::getSingleton('core/layout');
71
+
72
+ $head = $layout->getBlock('root')->getChild('head');
73
+ if (is_object($head)) {
74
+ $head->addItem("script", "oct8ne-notify", <<<EOT
75
+ function lookForOct8neIFrameLoaded() {
76
+ var iframe = document.getElementById( 'oct8ne-iframe-return' );
77
+ if ( iframe == null )
78
+ setTimeout( 'lookForOct8neIFrameLoaded()', 500 );
79
+ else
80
+ iframe.contentWindow.postMessage( 'logout', '*' );
81
+ }
82
+ lookForOct8neIFrameLoaded();
83
+ EOT
84
+ );
85
+
86
+ }
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Get checkout session model instance
92
+ *
93
+ * @return Mage_Checkout_Model_Session
94
+ */
95
+ protected function _getSession() { return Mage::getSingleton('checkout/session'); }
96
+
97
+ public function placeOrderBefore($observer)
98
+ {
99
+ $order = $observer->getEvent()->getOrder();
100
+ $oct8ne_products = $this->_getSession()->getOct8neProducts();
101
+ if(!is_array($oct8ne_products))
102
+ $oct8ne_products = array();
103
+
104
+ $items = $order->getAllItems();
105
+ foreach($items as $item)
106
+ {
107
+ $product = $item->getProduct();
108
+ /*
109
+ foreach($oct8ne_products as $op)
110
+ {
111
+ $found = false;
112
+ if($op->getId() == $product->getId())
113
+ $found = true;
114
+ }
115
+ */
116
+ $found = in_array($product->getId(), $oct8ne_products);
117
+
118
+ $model = Mage::getModel('oct8ne/orderproducts');
119
+ $model->setOrderId($order->getId());
120
+ $model->setProductId($product->getId());
121
+ $model->setOct8ne($found?'Y':'N');
122
+ $model->save();
123
+ }
124
+ }
125
+ }
app/code/community/LetsSyncroLLC/Oct8ne/controllers/AccountController.php CHANGED
@@ -1,122 +1,122 @@
1
- <?php
2
- require_once(Mage::getModuleDir('controllers','Mage_Customer').DS.'AccountController.php');
3
- class LetsSyncroLLC_Oct8ne_AccountController extends Mage_Customer_AccountController
4
- {
5
- /**
6
- * Define target URL and redirect customer after logging in
7
- */
8
- protected function _loginPostRedirect()
9
- {
10
- if(!is_null(Mage::registry('oct8ne')))
11
- {
12
- /*
13
- // die("login!!!");
14
-
15
- */
16
- if(Mage::getSingleton('customer/session')->isLoggedIn())
17
- {
18
- echo <<< EOT
19
- <h2 class="add2cart-msg">Logged in</h2>
20
-
21
- <script type="text/javascript">
22
- parent.postMessage("loginOK", "*");
23
- </script>
24
- EOT;
25
- die();
26
- }
27
-
28
- // en caso de que no se haga login
29
- $this->loadLayout();
30
- $this->renderLayout();
31
- }
32
- else
33
- {
34
- if(Mage::getSingleton('customer/session')->isLoggedIn()) {
35
-
36
- $session = Mage::getSingleton('core/session');
37
- $customerData = Mage::getSingleton('customer/session')->getCustomer();
38
- $url = $session->getBeforeAuthUrl();
39
- // if(substr($url, -24) == '/checkout/onepage/index/') <<------------------ activar esto para notificar sólamente en el checkout
40
- //Mage::register("notify_oct8ne", $customerData->getId());
41
- $session->setData("notify_oct8ne", $customerData->getId());
42
- }
43
-
44
-
45
- parent::_loginPostRedirect();
46
- }
47
- }
48
-
49
- /**
50
- * Add welcome message and send new account email.
51
- * Returns success URL
52
- *
53
- * @param Mage_Customer_Model_Customer $customer
54
- * @param bool $isJustConfirmed
55
- * @return string
56
- */
57
- protected function _welcomeCustomer(Mage_Customer_Model_Customer $customer, $isJustConfirmed = false)
58
- {
59
- if(!is_null(Mage::registry('oct8ne')))
60
- {
61
- /*
62
- // die("login!!!");
63
-
64
- */
65
- if(Mage::getSingleton('customer/session')->isLoggedIn())
66
- {
67
- echo <<< EOT
68
- <h2 class="add2cart-msg">Logged in</h2>
69
-
70
- <script type="text/javascript">
71
- parent.postMessage("loginOK", "*");
72
- </script>
73
- EOT;
74
- die();
75
- }
76
-
77
- }
78
- else
79
- {
80
- if(Mage::getSingleton('customer/session')->isLoggedIn()) {
81
-
82
- $session = Mage::getSingleton('core/session');
83
- $customerData = Mage::getSingleton('customer/session')->getCustomer();
84
- $url = $session->getBeforeAuthUrl();
85
- // if(substr($url, -24) == '/checkout/onepage/index/') <<------------------ activar esto para notificar sólamente en el checkout
86
- //Mage::register("notify_oct8ne", $customerData->getId());
87
- $session->setData("notify_oct8ne", $customerData->getId());
88
- }
89
-
90
-
91
- // ent::_loginPostRedirect();
92
-
93
- }
94
-
95
- return parent::_welcomeCustomer($customer, $isJustConfirmed);
96
- }
97
-
98
- /**
99
- * Customer logout action
100
- */
101
- /*
102
- public function logoutAction()
103
- {
104
- $session = Mage::getSingleton('core/session');
105
- $customerData = Mage::getSingleton('customer/session')->getCustomer();
106
- $session->setData("notify_oct8ne_logout", $customerData->getId());
107
- parent::logoutAction();
108
- }
109
- */
110
-
111
- /**
112
- * Logout success page
113
- */
114
- public function logoutSuccessAction()
115
- {
116
- $session = Mage::getSingleton('core/session');
117
- $session->setData("notify_oct8ne_logout", TRUE);
118
- parent::logoutSuccessAction();
119
- // $this->loadLayout();
120
- // $this->renderLayout();
121
- }
122
- }
1
+ <?php
2
+ require_once(Mage::getModuleDir('controllers','Mage_Customer').DS.'AccountController.php');
3
+ class LetsSyncroLLC_Oct8ne_AccountController extends Mage_Customer_AccountController
4
+ {
5
+ /**
6
+ * Define target URL and redirect customer after logging in
7
+ */
8
+ protected function _loginPostRedirect()
9
+ {
10
+ if(!is_null(Mage::registry('oct8ne')))
11
+ {
12
+ /*
13
+ // die("login!!!");
14
+
15
+ */
16
+ if(Mage::getSingleton('customer/session')->isLoggedIn())
17
+ {
18
+ echo <<< EOT
19
+ <h2 class="add2cart-msg">Logged in</h2>
20
+
21
+ <script type="text/javascript">
22
+ parent.postMessage("loginOK", "*");
23
+ </script>
24
+ EOT;
25
+ die();
26
+ }
27
+
28
+ // en caso de que no se haga login
29
+ $this->loadLayout();
30
+ $this->renderLayout();
31
+ }
32
+ else
33
+ {
34
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
35
+
36
+ $session = Mage::getSingleton('core/session');
37
+ $customerData = Mage::getSingleton('customer/session')->getCustomer();
38
+ $url = $session->getBeforeAuthUrl();
39
+ // if(substr($url, -24) == '/checkout/onepage/index/') <<------------------ activar esto para notificar sólamente en el checkout
40
+ //Mage::register("notify_oct8ne", $customerData->getId());
41
+ $session->setData("notify_oct8ne", $customerData->getId());
42
+ }
43
+
44
+
45
+ parent::_loginPostRedirect();
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Add welcome message and send new account email.
51
+ * Returns success URL
52
+ *
53
+ * @param Mage_Customer_Model_Customer $customer
54
+ * @param bool $isJustConfirmed
55
+ * @return string
56
+ */
57
+ protected function _welcomeCustomer(Mage_Customer_Model_Customer $customer, $isJustConfirmed = false)
58
+ {
59
+ if(!is_null(Mage::registry('oct8ne')))
60
+ {
61
+ /*
62
+ // die("login!!!");
63
+
64
+ */
65
+ if(Mage::getSingleton('customer/session')->isLoggedIn())
66
+ {
67
+ echo <<< EOT
68
+ <h2 class="add2cart-msg">Logged in</h2>
69
+
70
+ <script type="text/javascript">
71
+ parent.postMessage("loginOK", "*");
72
+ </script>
73
+ EOT;
74
+ die();
75
+ }
76
+
77
+ }
78
+ else
79
+ {
80
+ if(Mage::getSingleton('customer/session')->isLoggedIn()) {
81
+
82
+ $session = Mage::getSingleton('core/session');
83
+ $customerData = Mage::getSingleton('customer/session')->getCustomer();
84
+ $url = $session->getBeforeAuthUrl();
85
+ // if(substr($url, -24) == '/checkout/onepage/index/') <<------------------ activar esto para notificar sólamente en el checkout
86
+ //Mage::register("notify_oct8ne", $customerData->getId());
87
+ $session->setData("notify_oct8ne", $customerData->getId());
88
+ }
89
+
90
+
91
+ // ent::_loginPostRedirect();
92
+
93
+ }
94
+
95
+ return parent::_welcomeCustomer($customer, $isJustConfirmed);
96
+ }
97
+
98
+ /**
99
+ * Customer logout action
100
+ */
101
+ /*
102
+ public function logoutAction()
103
+ {
104
+ $session = Mage::getSingleton('core/session');
105
+ $customerData = Mage::getSingleton('customer/session')->getCustomer();
106
+ $session->setData("notify_oct8ne_logout", $customerData->getId());
107
+ parent::logoutAction();
108
+ }
109
+ */
110
+
111
+ /**
112
+ * Logout success page
113
+ */
114
+ public function logoutSuccessAction()
115
+ {
116
+ $session = Mage::getSingleton('core/session');
117
+ $session->setData("notify_oct8ne_logout", TRUE);
118
+ parent::logoutSuccessAction();
119
+ // $this->loadLayout();
120
+ // $this->renderLayout();
121
+ }
122
+ }
app/code/community/LetsSyncroLLC/Oct8ne/controllers/AdminController.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_AdminController extends Mage_Adminhtml_Controller_Action
4
- {
5
- public function accountconfigAction()
6
- {
7
- $this->loadLayout()
8
- ->_addContent($this->getLayout()->createBlock('oct8ne/accountconfig'))
9
- ->renderLayout();
10
- }
11
-
12
- public function indexAction()
13
- {
14
- accountconfigAction();
15
- }
16
- }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_AdminController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ public function accountconfigAction()
6
+ {
7
+ $this->loadLayout()
8
+ ->_addContent($this->getLayout()->createBlock('oct8ne/accountconfig'))
9
+ ->renderLayout();
10
+ }
11
+
12
+ public function indexAction()
13
+ {
14
+ accountconfigAction();
15
+ }
16
+ }
app/code/community/LetsSyncroLLC/Oct8ne/controllers/IndexController.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php
2
-
3
- class LetsSyncroLLC_Oct8ne_IndexController extends Mage_Core_Controller_Front_Action
4
- {
5
- public function indexAction()
6
- {
7
- $this->loadLayout();
8
- $this->getLayout()
9
- ->getBlock('content')->append(
10
- $this->getLayout()->createBlock('oct8ne/index')
11
- );
12
- $this->renderLayout();
13
- }
14
  }
1
+ <?php
2
+
3
+ class LetsSyncroLLC_Oct8ne_IndexController extends Mage_Core_Controller_Front_Action
4
+ {
5
+ public function indexAction()
6
+ {
7
+ $this->loadLayout();
8
+ $this->getLayout()
9
+ ->getBlock('content')->append(
10
+ $this->getLayout()->createBlock('oct8ne/index')
11
+ );
12
+ $this->renderLayout();
13
+ }
14
  }
app/code/community/LetsSyncroLLC/Oct8ne/controllers/letssyncro.phtml CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
- global $letssyncro;
3
- if (!isset($letssyncro)) {
4
- $letssyncro = Mage::getModel('oct8ne/letssyncro')->load(1);
5
- $letssyncrooptions = $letssyncro->_data;
6
- if ($letssyncrooptions["licenseid"] != '' && $letssyncrooptions["enabled"] == '1' && strlen($letssyncrooptions['licenseid']) == 32 )
7
- {
8
- /*
9
- echo "
10
- <!-- LetsSyncro block (idnovate.com for LetsSyncro LLC)-->
11
- <script type= 'text/javascript'>
12
- var syncro = document.createElement(\"script\");
13
- syncro.type = \"text/javascript\";
14
- syncro.async = true;
15
- syncro.license = ".$letssyncrooptions["licenseid"].";
16
- (function () {
17
- syncro.src = (document.location.protocol == \"https:\" ? \"https://\" : \"http://\") + 'backoffice.oct8ne.com/api/source/js/api/oct8ne-api.js';
18
- var s = document.getElementsByTagName(\"script\")[0];
19
- s.parentNode.insertBefore(syncro, s);
20
- })();
21
- </script>
22
- <!-- LetsSyncro block (idnovate.com for LetsSyncro LLC)-->
23
- ";
24
- */
25
- echo <<<EOT
26
- <script type= "text/javascript">
27
- var oct8ne = document.createElement("script");
28
- oct8ne.type = "text/javascript";
29
- oct8ne.async = true;
30
- oct8ne.license = "{$letssyncrooptions["licenseid"]}";
31
- oct8ne.apiUrl = "backoffice.oct8ne.com/";
32
- oct8ne.src = (document.location.protocol == "https:" ? "https://" : "http://") + oct8ne.apiUrl + 'api/source/js/api/oct8ne-api.js';
33
- var s = document.getElementsByTagName("script")[0];
34
- s.parentNode.insertBefore(oct8ne, s);
35
- </script>
36
- EOT;
37
- }
38
- }
39
- ?>
1
+ <?php
2
+ global $letssyncro;
3
+ if (!isset($letssyncro)) {
4
+ $letssyncro = Mage::getModel('oct8ne/letssyncro')->load(1);
5
+ $letssyncrooptions = $letssyncro->_data;
6
+ if ($letssyncrooptions["licenseid"] != '' && $letssyncrooptions["enabled"] == '1' && strlen($letssyncrooptions['licenseid']) == 32 )
7
+ {
8
+ /*
9
+ echo "
10
+ <!-- LetsSyncro block (idnovate.com for LetsSyncro LLC)-->
11
+ <script type= 'text/javascript'>
12
+ var syncro = document.createElement(\"script\");
13
+ syncro.type = \"text/javascript\";
14
+ syncro.async = true;
15
+ syncro.license = ".$letssyncrooptions["licenseid"].";
16
+ (function () {
17
+ syncro.src = (document.location.protocol == \"https:\" ? \"https://\" : \"http://\") + 'backoffice.oct8ne.com/api/source/js/api/oct8ne-api.js';
18
+ var s = document.getElementsByTagName(\"script\")[0];
19
+ s.parentNode.insertBefore(syncro, s);
20
+ })();
21
+ </script>
22
+ <!-- LetsSyncro block (idnovate.com for LetsSyncro LLC)-->
23
+ ";
24
+ */
25
+ echo <<<EOT
26
+ <script type= "text/javascript">
27
+ var oct8ne = document.createElement("script");
28
+ oct8ne.type = "text/javascript";
29
+ oct8ne.async = true;
30
+ oct8ne.license = "{$letssyncrooptions["licenseid"]}";
31
+ oct8ne.apiUrl = "backoffice.oct8ne.com/";
32
+ oct8ne.src = (document.location.protocol == "https:" ? "https://" : "http://") + oct8ne.apiUrl + 'api/source/js/api/oct8ne-api.js';
33
+ var s = document.getElementsByTagName("script")[0];
34
+ s.parentNode.insertBefore(oct8ne, s);
35
+ </script>
36
+ EOT;
37
+ }
38
+ }
39
+ ?>
app/code/community/LetsSyncroLLC/Oct8ne/etc/config.xml CHANGED
@@ -1,229 +1,229 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <LetsSyncroLLC_Oct8ne>
5
- <version>1.1.3</version>
6
- </LetsSyncroLLC_Oct8ne>
7
- </modules>
8
- <global>
9
- <models>
10
- <oct8ne>
11
- <class>LetsSyncroLLC_Oct8ne_Model</class>
12
- <resourceModel>oct8ne_mysql4</resourceModel>
13
- </oct8ne>
14
- <oct8ne_mysql4>
15
- <class>LetsSyncroLLC_Oct8ne_Model_Mysql4</class>
16
- <entities>
17
- <letssyncro>
18
- <table>letssyncro</table>
19
- </letssyncro>
20
-
21
- <orderproducts>
22
- <table>orderproducts</table>
23
- </orderproducts>
24
- </entities>
25
- </oct8ne_mysql4>
26
-
27
-
28
- <core>
29
- <rewrite>
30
- <url>LetsSyncroLLC_Oct8ne_Model_Mage_Url</url>
31
- </rewrite>
32
- </core>
33
-
34
- <checkout>
35
- <rewrite>
36
- <type_onepage>LetsSyncroLLC_Oct8ne_Model_Mage_Onepage</type_onepage>
37
- </rewrite>
38
- </checkout>
39
-
40
- </models>
41
- <blocks>
42
- <oct8ne>
43
- <class>LetsSyncroLLC_Oct8ne_Block</class>
44
- </oct8ne>
45
-
46
- <page>
47
- <rewrite>
48
- <html_head>LetsSyncroLLC_Oct8ne_Block_Html_Head</html_head>
49
- </rewrite>
50
- </page>
51
-
52
- </blocks>
53
- <helpers>
54
- <oct8ne>
55
- <class>LetsSyncroLLC_Oct8ne_Helper</class>
56
- </oct8ne>
57
- </helpers>
58
- <resources>
59
- <oct8ne_setup>
60
- <setup>
61
- <module>LetsSyncroLLC_Oct8ne</module>
62
- </setup>
63
- <connection>
64
- <use>core_setup</use>
65
- </connection>
66
- </oct8ne_setup>
67
- <oct8ne_write>
68
- <connection>
69
- <use>core_write</use>
70
- </connection>
71
- </oct8ne_write>
72
- <oct8ne_read>
73
- <connection>
74
- <use>core_read</use>
75
- </connection>
76
- </oct8ne_read>
77
- </resources>
78
-
79
-
80
- <events>
81
- <controller_front_init_routers>
82
- <observers>
83
- <LetsSyncroLLC_Oct8ne_Intercept>
84
- <type>singleton</type>
85
- <class>LetsSyncroLLC_Oct8ne_Model_Observer</class>
86
- <method>interceptMethod</method>
87
- </LetsSyncroLLC_Oct8ne_Intercept>
88
- </observers>
89
- </controller_front_init_routers>
90
-
91
- <controller_action_layout_render_before>
92
- <observers>
93
- <LetsSyncroLLC_Oct8ne_Layout>
94
- <type>singleton</type>
95
- <class>LetsSyncroLLC_Oct8ne_Model_Observer</class>
96
- <method>layoutRenderBefore</method>
97
- </LetsSyncroLLC_Oct8ne_Layout>
98
- </observers>
99
- </controller_action_layout_render_before>
100
-
101
- <sales_order_place_after>
102
- <observers>
103
- <LetsSyncroLLC_Oct8ne_Order>
104
- <type>singleton</type>
105
- <class>LetsSyncroLLC_Oct8ne_Model_Observer</class>
106
- <method>placeOrderBefore</method>
107
- </LetsSyncroLLC_Oct8ne_Order>
108
- </observers>
109
- </sales_order_place_after>
110
- </events>
111
- </global>
112
- <frontend>
113
- <routers>
114
- <oct8ne>
115
- <!-- <LetsSyncroLLC_LetsSyncro> -->
116
- <use>standard</use>
117
- <args>
118
- <module>LetsSyncroLLC_Oct8ne</module>
119
- <frontName>oct8ne</frontName>
120
- </args>
121
- <!-- </LetsSyncroLLC_LetsSyncro> -->
122
- </oct8ne>
123
-
124
- <customer>
125
- <args>
126
- <modules>
127
- <oct8ne before="Mage_Customer">LetsSyncroLLC_Oct8ne</oct8ne>
128
- </modules>
129
- </args>
130
- </customer>
131
- </routers>
132
- <layout>
133
- <updates>
134
- <LetsSyncroLLC_Oct8ne>
135
- <file>oct8ne.xml</file>
136
- </LetsSyncroLLC_Oct8ne>
137
- </updates>
138
- </layout>
139
- </frontend>
140
- <admin>
141
- <routers>
142
- <!-- <LetsSyncroLLC_LetsSyncro> -->
143
- <oct8ne>
144
- <use>admin</use>
145
- <args>
146
- <module>LetsSyncroLLC_Oct8ne</module>
147
- <frontName>oct8ne</frontName>
148
- </args>
149
- </oct8ne>
150
- <!-- </LetsSyncroLLC_LetsSyncro> -->
151
- </routers>
152
- </admin>
153
- <adminhtml>
154
- <translate>
155
- <modules>
156
- <LetsSyncroLLC_Oct8ne>
157
- <files>
158
- <default>LetsSyncroLLC_Oct8ne.csv</default>
159
- </files>
160
- </LetsSyncroLLC_Oct8ne>
161
- </modules>
162
- </translate>
163
- <menu>
164
- <oct8ne translate="title" module="oct8ne">
165
- <title>Oct8ne</title>
166
- <sort_order>1000</sort_order>
167
- <children>
168
- <accountconfig translate="title" module="oct8ne">
169
- <title>Account Setup</title>
170
- <action>oct8ne/admin/accountconfig</action>
171
- <sort_order>0</sort_order>
172
- </accountconfig>
173
- <!--<dashboard translate="title" module="oct8ne">
174
- <title>Dashboard</title>
175
- <action>oct8ne/admin/dashboard</action>
176
- <sort_order>20</sort_order>
177
- </dashboard>
178
- <syncrodata translate="title" module="oct8ne">
179
- <title>Syncro Data</title>
180
- <action>oct8ne/admin/syncrodata</action>
181
- <sort_order>40</sort_order>
182
- </syncrodata>-->
183
- </children>
184
- </oct8ne>
185
- </menu>
186
- <acl>
187
- <resources>
188
- <admin>
189
- <children>
190
- <oct8ne translate="title" module="oct8ne">
191
- <title>Oct8ne</title>
192
- <sort_order>1000</sort_order>
193
- <children>
194
- <accountconfig translate="title" module="oct8ne">
195
- <title>Account Setup</title>
196
- <action>oct8ne/admin/accountconfig</action>
197
- <sort_order>0</sort_order>
198
- </accountconfig>
199
- <!--<dashboard translate="title" module="oct8ne">
200
- <title>Dashboard</title>
201
- <action>oct8ne/admin/dashboard</action>
202
- <sort_order>20</sort_order>
203
- </dashboard>
204
- <syncrodata translate="title" module="oct8ne">
205
- <title>Syncro Data</title>
206
- <action>oct8ne/admin/syncrodata</action>
207
- <sort_order>40</sort_order>
208
- </syncrodata>-->
209
- </children>
210
- </oct8ne>
211
- </children>
212
- </admin>
213
-
214
- </resources>
215
-
216
-
217
- </acl>
218
- </adminhtml>
219
-
220
- <default>
221
- <design>
222
- <oct8nedesign>
223
- <package>default</package>
224
- <theme>oct8ne</theme>
225
- </oct8nedesign>
226
- </design>
227
- </default>
228
- </config>
229
-
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <LetsSyncroLLC_Oct8ne>
5
+ <version>1.1.4</version>
6
+ </LetsSyncroLLC_Oct8ne>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <oct8ne>
11
+ <class>LetsSyncroLLC_Oct8ne_Model</class>
12
+ <resourceModel>oct8ne_mysql4</resourceModel>
13
+ </oct8ne>
14
+ <oct8ne_mysql4>
15
+ <class>LetsSyncroLLC_Oct8ne_Model_Mysql4</class>
16
+ <entities>
17
+ <letssyncro>
18
+ <table>letssyncro</table>
19
+ </letssyncro>
20
+
21
+ <orderproducts>
22
+ <table>orderproducts</table>
23
+ </orderproducts>
24
+ </entities>
25
+ </oct8ne_mysql4>
26
+
27
+
28
+ <core>
29
+ <rewrite>
30
+ <url>LetsSyncroLLC_Oct8ne_Model_Mage_Url</url>
31
+ </rewrite>
32
+ </core>
33
+
34
+ <checkout>
35
+ <rewrite>
36
+ <type_onepage>LetsSyncroLLC_Oct8ne_Model_Mage_Onepage</type_onepage>
37
+ </rewrite>
38
+ </checkout>
39
+
40
+ </models>
41
+ <blocks>
42
+ <oct8ne>
43
+ <class>LetsSyncroLLC_Oct8ne_Block</class>
44
+ </oct8ne>
45
+
46
+ <page>
47
+ <rewrite>
48
+ <html_head>LetsSyncroLLC_Oct8ne_Block_Html_Head</html_head>
49
+ </rewrite>
50
+ </page>
51
+
52
+ </blocks>
53
+ <helpers>
54
+ <oct8ne>
55
+ <class>LetsSyncroLLC_Oct8ne_Helper</class>
56
+ </oct8ne>
57
+ </helpers>
58
+ <resources>
59
+ <oct8ne_setup>
60
+ <setup>
61
+ <module>LetsSyncroLLC_Oct8ne</module>
62
+ </setup>
63
+ <connection>
64
+ <use>core_setup</use>
65
+ </connection>
66
+ </oct8ne_setup>
67
+ <oct8ne_write>
68
+ <connection>
69
+ <use>core_write</use>
70
+ </connection>
71
+ </oct8ne_write>
72
+ <oct8ne_read>
73
+ <connection>
74
+ <use>core_read</use>
75
+ </connection>
76
+ </oct8ne_read>
77
+ </resources>
78
+
79
+
80
+ <events>
81
+ <controller_front_init_routers>
82
+ <observers>
83
+ <LetsSyncroLLC_Oct8ne_Intercept>
84
+ <type>singleton</type>
85
+ <class>LetsSyncroLLC_Oct8ne_Model_Observer</class>
86
+ <method>interceptMethod</method>
87
+ </LetsSyncroLLC_Oct8ne_Intercept>
88
+ </observers>
89
+ </controller_front_init_routers>
90
+
91
+ <controller_action_layout_render_before>
92
+ <observers>
93
+ <LetsSyncroLLC_Oct8ne_Layout>
94
+ <type>singleton</type>
95
+ <class>LetsSyncroLLC_Oct8ne_Model_Observer</class>
96
+ <method>layoutRenderBefore</method>
97
+ </LetsSyncroLLC_Oct8ne_Layout>
98
+ </observers>
99
+ </controller_action_layout_render_before>
100
+
101
+ <sales_order_place_after>
102
+ <observers>
103
+ <LetsSyncroLLC_Oct8ne_Order>
104
+ <type>singleton</type>
105
+ <class>LetsSyncroLLC_Oct8ne_Model_Observer</class>
106
+ <method>placeOrderBefore</method>
107
+ </LetsSyncroLLC_Oct8ne_Order>
108
+ </observers>
109
+ </sales_order_place_after>
110
+ </events>
111
+ </global>
112
+ <frontend>
113
+ <routers>
114
+ <oct8ne>
115
+ <!-- <LetsSyncroLLC_LetsSyncro> -->
116
+ <use>standard</use>
117
+ <args>
118
+ <module>LetsSyncroLLC_Oct8ne</module>
119
+ <frontName>oct8ne</frontName>
120
+ </args>
121
+ <!-- </LetsSyncroLLC_LetsSyncro> -->
122
+ </oct8ne>
123
+
124
+ <customer>
125
+ <args>
126
+ <modules>
127
+ <oct8ne before="Mage_Customer">LetsSyncroLLC_Oct8ne</oct8ne>
128
+ </modules>
129
+ </args>
130
+ </customer>
131
+ </routers>
132
+ <layout>
133
+ <updates>
134
+ <LetsSyncroLLC_Oct8ne>
135
+ <file>oct8ne.xml</file>
136
+ </LetsSyncroLLC_Oct8ne>
137
+ </updates>
138
+ </layout>
139
+ </frontend>
140
+ <admin>
141
+ <routers>
142
+ <!-- <LetsSyncroLLC_LetsSyncro> -->
143
+ <oct8ne>
144
+ <use>admin</use>
145
+ <args>
146
+ <module>LetsSyncroLLC_Oct8ne</module>
147
+ <frontName>oct8ne</frontName>
148
+ </args>
149
+ </oct8ne>
150
+ <!-- </LetsSyncroLLC_LetsSyncro> -->
151
+ </routers>
152
+ </admin>
153
+ <adminhtml>
154
+ <translate>
155
+ <modules>
156
+ <LetsSyncroLLC_Oct8ne>
157
+ <files>
158
+ <default>LetsSyncroLLC_Oct8ne.csv</default>
159
+ </files>
160
+ </LetsSyncroLLC_Oct8ne>
161
+ </modules>
162
+ </translate>
163
+ <menu>
164
+ <oct8ne translate="title" module="oct8ne">
165
+ <title>Oct8ne</title>
166
+ <sort_order>1000</sort_order>
167
+ <children>
168
+ <accountconfig translate="title" module="oct8ne">
169
+ <title>Account Setup</title>
170
+ <action>oct8ne/admin/accountconfig</action>
171
+ <sort_order>0</sort_order>
172
+ </accountconfig>
173
+ <!--<dashboard translate="title" module="oct8ne">
174
+ <title>Dashboard</title>
175
+ <action>oct8ne/admin/dashboard</action>
176
+ <sort_order>20</sort_order>
177
+ </dashboard>
178
+ <syncrodata translate="title" module="oct8ne">
179
+ <title>Syncro Data</title>
180
+ <action>oct8ne/admin/syncrodata</action>
181
+ <sort_order>40</sort_order>
182
+ </syncrodata>-->
183
+ </children>
184
+ </oct8ne>
185
+ </menu>
186
+ <acl>
187
+ <resources>
188
+ <admin>
189
+ <children>
190
+ <oct8ne translate="title" module="oct8ne">
191
+ <title>Oct8ne</title>
192
+ <sort_order>1000</sort_order>
193
+ <children>
194
+ <accountconfig translate="title" module="oct8ne">
195
+ <title>Account Setup</title>
196
+ <action>oct8ne/admin/accountconfig</action>
197
+ <sort_order>0</sort_order>
198
+ </accountconfig>
199
+ <!--<dashboard translate="title" module="oct8ne">
200
+ <title>Dashboard</title>
201
+ <action>oct8ne/admin/dashboard</action>
202
+ <sort_order>20</sort_order>
203
+ </dashboard>
204
+ <syncrodata translate="title" module="oct8ne">
205
+ <title>Syncro Data</title>
206
+ <action>oct8ne/admin/syncrodata</action>
207
+ <sort_order>40</sort_order>
208
+ </syncrodata>-->
209
+ </children>
210
+ </oct8ne>
211
+ </children>
212
+ </admin>
213
+
214
+ </resources>
215
+
216
+
217
+ </acl>
218
+ </adminhtml>
219
+
220
+ <default>
221
+ <design>
222
+ <oct8nedesign>
223
+ <package>default</package>
224
+ <theme>oct8ne</theme>
225
+ </oct8nedesign>
226
+ </design>
227
+ </default>
228
+ </config>
229
+
app/code/community/LetsSyncroLLC/Oct8ne/etc/system.xml CHANGED
@@ -1,39 +1,39 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <sections>
4
- <design>
5
- <groups>
6
- <oct8nedesign translate="label">
7
- <label>Oct8ne Design</label>
8
- <frontend_type>text</frontend_type>
9
- <sort_order>1</sort_order>
10
- <show_in_default>1</show_in_default>
11
- <show_in_website>1</show_in_website>
12
- <show_in_store>1</show_in_store>
13
- <fields>
14
- <package translate="label">
15
- <label>Package Name</label>
16
- <frontend_type>text</frontend_type>
17
- <backend_model>adminhtml/system_config_backend_design_package</backend_model>
18
- <sort_order>1</sort_order>
19
- <show_in_default>1</show_in_default>
20
- <show_in_website>1</show_in_website>
21
- <show_in_store>1</show_in_store>
22
- </package>
23
-
24
- <theme translate="label">
25
- <label>Theme</label>
26
- <frontend_type>text</frontend_type>
27
- <sort_order>10</sort_order>
28
- <show_in_default>1</show_in_default>
29
- <show_in_website>1</show_in_website>
30
- <show_in_store>1</show_in_store>
31
- </theme>
32
- </fields>
33
-
34
-
35
- </oct8nedesign>
36
- </groups>
37
- </design>
38
- </sections>
39
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <design>
5
+ <groups>
6
+ <oct8nedesign translate="label">
7
+ <label>Oct8ne Design</label>
8
+ <frontend_type>text</frontend_type>
9
+ <sort_order>1</sort_order>
10
+ <show_in_default>1</show_in_default>
11
+ <show_in_website>1</show_in_website>
12
+ <show_in_store>1</show_in_store>
13
+ <fields>
14
+ <package translate="label">
15
+ <label>Package Name</label>
16
+ <frontend_type>text</frontend_type>
17
+ <backend_model>adminhtml/system_config_backend_design_package</backend_model>
18
+ <sort_order>1</sort_order>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>1</show_in_store>
22
+ </package>
23
+
24
+ <theme translate="label">
25
+ <label>Theme</label>
26
+ <frontend_type>text</frontend_type>
27
+ <sort_order>10</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
+ </theme>
32
+ </fields>
33
+
34
+
35
+ </oct8nedesign>
36
+ </groups>
37
+ </design>
38
+ </sections>
39
  </config>
app/code/community/LetsSyncroLLC/Oct8ne/sql/oct8ne_setup/mysql4-install-0.5.0.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
-
5
- $installer->run("
6
- CREATE TABLE IF NOT EXISTS {$this->getTable('letssyncro')} (
7
- `letssyncro_id` int(5) NOT NULL auto_increment,
8
- `email` varchar(100) NULL,
9
- `password` varchar(100) NULL,
10
- `urlapi` varchar(100) NOT NULL,
11
- `licenseid` varchar(32) NULL,
12
- `apitoken` varchar(32) NULL,
13
- `enabled` varchar(1) NULL,
14
- PRIMARY KEY (`letssyncro_id`)
15
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
- ");
17
-
18
- try
19
- {
20
- $installer->run("
21
- INSERT INTO {$this->getTable('letssyncro')}
22
- (`letssyncro_id`, `email`, `password`, `urlapi`, `licenseid`, `apitoken`, `enabled`) VALUES
23
- (1, '', '', 'https://webservice.oct8ne.com/SyncroService', '', '', '0');
24
- ");
25
- }
26
- catch(\Exception $e)
27
- {
28
- // the insert may fail if we run it more than once (duplicate key)
29
- // we need this check to prevent errors during the rename of the module
30
- }
31
-
32
- $installer->endSetup();
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $installer->run("
6
+ CREATE TABLE IF NOT EXISTS {$this->getTable('letssyncro')} (
7
+ `letssyncro_id` int(5) NOT NULL auto_increment,
8
+ `email` varchar(100) NULL,
9
+ `password` varchar(100) NULL,
10
+ `urlapi` varchar(100) NOT NULL,
11
+ `licenseid` varchar(32) NULL,
12
+ `apitoken` varchar(32) NULL,
13
+ `enabled` varchar(1) NULL,
14
+ PRIMARY KEY (`letssyncro_id`)
15
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
+ ");
17
+
18
+ try
19
+ {
20
+ $installer->run("
21
+ INSERT INTO {$this->getTable('letssyncro')}
22
+ (`letssyncro_id`, `email`, `password`, `urlapi`, `licenseid`, `apitoken`, `enabled`) VALUES
23
+ (1, '', '', 'https://webservice.oct8ne.com/SyncroService', '', '', '0');
24
+ ");
25
+ }
26
+ catch(\Exception $e)
27
+ {
28
+ // the insert may fail if we run it more than once (duplicate key)
29
+ // we need this check to prevent errors during the rename of the module
30
+ }
31
+
32
+ $installer->endSetup();
app/code/community/LetsSyncroLLC/Oct8ne/sql/oct8ne_setup/mysql4-install-1.0.0.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
-
5
- $installer->run("
6
- CREATE TABLE IF NOT EXISTS {$this->getTable('letssyncro')} (
7
- `letssyncro_id` int(5) NOT NULL auto_increment,
8
- `email` varchar(100) NULL,
9
- `password` varchar(100) NULL,
10
- `urlapi` varchar(100) NOT NULL,
11
- `licenseid` varchar(32) NULL,
12
- `apitoken` varchar(32) NULL,
13
- `enabled` varchar(1) NULL,
14
- PRIMARY KEY (`letssyncro_id`)
15
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
- ");
17
-
18
- try
19
- {
20
- $installer->run("
21
- INSERT INTO {$this->getTable('letssyncro')}
22
- (`letssyncro_id`, `email`, `password`, `urlapi`, `licenseid`, `apitoken`, `enabled`) VALUES
23
- (1, '', '', 'https://webservice.oct8ne.com/SyncroService', '', '', '0');
24
- ");
25
- }
26
- catch(\Exception $e)
27
- {
28
- // the insert may fail if we run it more than once (duplicate key)
29
- // we need this check to prevent errors during the rename of the module
30
- }
31
-
32
- $installer->endSetup();
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $installer->run("
6
+ CREATE TABLE IF NOT EXISTS {$this->getTable('letssyncro')} (
7
+ `letssyncro_id` int(5) NOT NULL auto_increment,
8
+ `email` varchar(100) NULL,
9
+ `password` varchar(100) NULL,
10
+ `urlapi` varchar(100) NOT NULL,
11
+ `licenseid` varchar(32) NULL,
12
+ `apitoken` varchar(32) NULL,
13
+ `enabled` varchar(1) NULL,
14
+ PRIMARY KEY (`letssyncro_id`)
15
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
+ ");
17
+
18
+ try
19
+ {
20
+ $installer->run("
21
+ INSERT INTO {$this->getTable('letssyncro')}
22
+ (`letssyncro_id`, `email`, `password`, `urlapi`, `licenseid`, `apitoken`, `enabled`) VALUES
23
+ (1, '', '', 'https://webservice.oct8ne.com/SyncroService', '', '', '0');
24
+ ");
25
+ }
26
+ catch(\Exception $e)
27
+ {
28
+ // the insert may fail if we run it more than once (duplicate key)
29
+ // we need this check to prevent errors during the rename of the module
30
+ }
31
+
32
+ $installer->endSetup();
app/design/frontend/default/oct8ne/template/page/1column.phtml DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Template for Mage_Page_Block_Html
30
- */
31
- ?>
32
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
34
- <head>
35
- <?php echo $this->getChildHtml('head') ?>
36
- </head>
37
- <body class="page-empty <?php echo $this->getBodyClass()?$this->getBodyClass():'' ?>">
38
- <div>
39
- <?php echo $this->getChildHtml('after_body_start') ?>
40
- <?php echo $this->getChildHtml('global_messages') ?>
41
- <?php echo $this->getChildHtml('content') ?>
42
- <?php echo $this->getChildHtml('before_body_end') ?>
43
- <?php echo $this->getAbsoluteFooter() ?>
44
- </div>
45
- </body>
46
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/default/oct8ne/template/page/2columns-left.phtml DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Template for Mage_Page_Block_Html
30
- */
31
- ?>
32
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
34
- <head>
35
- <?php echo $this->getChildHtml('head') ?>
36
- </head>
37
- <body class="page-empty <?php echo $this->getBodyClass()?$this->getBodyClass():'' ?>">
38
- <div>
39
- <?php echo $this->getChildHtml('after_body_start') ?>
40
- <?php echo $this->getChildHtml('global_messages') ?>
41
- <?php echo $this->getChildHtml('content') ?>
42
- <?php echo $this->getChildHtml('before_body_end') ?>
43
- <?php echo $this->getAbsoluteFooter() ?>
44
- </div>
45
- </body>
46
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/default/oct8ne/template/page/2columns-right.phtml DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Template for Mage_Page_Block_Html
30
- */
31
- ?>
32
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
34
- <head>
35
- <?php echo $this->getChildHtml('head') ?>
36
- </head>
37
- <body class="page-empty <?php echo $this->getBodyClass()?$this->getBodyClass():'' ?>">
38
- <div>
39
- <?php echo $this->getChildHtml('after_body_start') ?>
40
- <?php echo $this->getChildHtml('global_messages') ?>
41
- <?php echo $this->getChildHtml('content') ?>
42
- <?php echo $this->getChildHtml('before_body_end') ?>
43
- <?php echo $this->getAbsoluteFooter() ?>
44
- </div>
45
- </body>
46
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/default/oct8ne/template/page/3columns.phtml DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Academic Free License (AFL 3.0)
8
- * that is bundled with this package in the file LICENSE_AFL.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/afl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category design
22
- * @package base_default
23
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
- */
26
- ?>
27
- <?php
28
- /**
29
- * Template for Mage_Page_Block_Html
30
- */
31
- ?>
32
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
33
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
34
- <head>
35
- <?php echo $this->getChildHtml('head') ?>
36
- </head>
37
- <body class="page-empty <?php echo $this->getBodyClass()?$this->getBodyClass():'' ?>">
38
- <div>
39
- <?php echo $this->getChildHtml('after_body_start') ?>
40
- <?php echo $this->getChildHtml('global_messages') ?>
41
- <?php echo $this->getChildHtml('content') ?>
42
- <?php echo $this->getChildHtml('before_body_end') ?>
43
- <?php echo $this->getAbsoluteFooter() ?>
44
- </div>
45
- </body>
46
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/LetsSyncroLLC_Oct8ne.xml CHANGED
@@ -1,16 +1,16 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <LetsSyncroLLC_Oct8ne>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- <version>1.0.0</version>
8
- <depends>
9
- <Mage_Eav/>
10
- <Mage_Dataflow/>
11
- <Mage_Cms/>
12
- <Mage_Index/>
13
- </depends>
14
- </LetsSyncroLLC_Oct8ne>
15
- </modules>
16
- </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <LetsSyncroLLC_Oct8ne>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ <depends>
9
+ <Mage_Eav/>
10
+ <Mage_Dataflow/>
11
+ <Mage_Cms/>
12
+ <Mage_Index/>
13
+ </depends>
14
+ </LetsSyncroLLC_Oct8ne>
15
+ </modules>
16
+ </config>
app/locale/es_ES/LetsSyncroLLC_Oct8ne.csv CHANGED
@@ -1,39 +1,39 @@
1
- "1 - Manual execution clicking the next button:","1 - Ejecución manual haciendo click en el siguiente botón:"
2
- "There are 2 ways to execute the synchronization:","Existen 2 maneras para ejecutar la sincronización:"
3
- "2 - Automatic execution scheduled and unattended. Two different ways for doing that:","2 - Ejecución automática planificada y desatendida. 2 formas diferentes para hacer esto:"
4
- "a - Call the PHP script via Web externally. Directly calling","a - Llamar al script PHP vía Web externamente. Directamente llamando"
5
- "b - Call the PHP script via Web internally. For example:","b - Llamar al script PHP vía Web internamente. Por ejemplo:"
6
- "Syncro Data","Sincronización de datos"
7
- "Dashboard","Panel de control"
8
- "Account Setup","Configuración de la cuenta"
9
- "Execute synchronization","Ejecutar sincronización"
10
- "OCT8NE Dashboard","Panel de control OCT8NE"
11
- "Status:","Estado:"
12
- "Linked account:","Cuenta enlazada:"
13
- "Email:","Email:"
14
- "Password:","Password:"
15
- "OCT8NE email","Email OCT8NE"
16
- "OCT8NE password","Password OCT8NE"
17
- "Don't have a OCT8NE account?","¿No tienes una cuenta OCT8NE?"
18
- "Sign up now","Regístrate ahora"
19
- "Link Up","Enlazar"
20
- "Synchronization finished successfully.","Sincronización finalizada correctamente."
21
- "Products added:","Productos añadidos:"
22
- "Products updated:","Productos actualizados:"
23
- "There was an error synchronizing with OCT8NE.","Ha ocurrido un error sincronizando con OCT8NE."
24
- "Does the account is properly linked up in Account Setup?","¿Está la cuenta correctamente enlazada en la configuración?"
25
- "The field (Email) cannot be empty.","El campo (Email) no puede estar vacío."
26
- "The field (Password) cannot be empty.","El campo (Password) no puede estar vacío."
27
- "The field (URL API) cannot be empty.","El campo (URL API) no puede estar vacío."
28
- "Account not linked. Please, link up your account before at OCT8NE/Account Setup.","Cuenta no enlazada. Por favor, enlace antes su cuenta en OCT8NE/Configuración de la cuenta."
29
- "There was an error on your credentials and cannot obtain OCT8NE integration data.","Hay un error en sus credenciales y no se han podido obtener los datos de integración con OCT8NE."
30
- "There was an error activating OCT8NE integration.","Ha ocurrido un error activando la integración con OCT8NE."
31
- "OCT8NE integration data obtained successfully!","¡Datos de integración con OCT8NE obtenidos correctamente!"
32
- "There was an error deactivating OCT8NE integration.","Ha ocurrido un error desactivando la integración con OCT8NE."
33
- "OCT8NE integration deactivated successfully!","¡Integración con OCT8NE desactivada correctamente!"
34
- "OCT8NE integration activated successfully!","¡Integración con OCT8NE activada correctamente!"
35
- "There was an error saving your settings.","Ha ocurrido un error grabando los ajustes."
36
- "The fields (License ID and API token) are invalid.","Los campos (License ID and API token) son inválidos."
37
- "Settings updated successfully.","Ajustes actualizados correctamente."
38
- "(Deactivate)","(Desactivar)"
39
  "(Activate)","(Activar)"
1
+ "1 - Manual execution clicking the next button:","1 - Ejecución manual haciendo click en el siguiente botón:"
2
+ "There are 2 ways to execute the synchronization:","Existen 2 maneras para ejecutar la sincronización:"
3
+ "2 - Automatic execution scheduled and unattended. Two different ways for doing that:","2 - Ejecución automática planificada y desatendida. 2 formas diferentes para hacer esto:"
4
+ "a - Call the PHP script via Web externally. Directly calling","a - Llamar al script PHP vía Web externamente. Directamente llamando"
5
+ "b - Call the PHP script via Web internally. For example:","b - Llamar al script PHP vía Web internamente. Por ejemplo:"
6
+ "Syncro Data","Sincronización de datos"
7
+ "Dashboard","Panel de control"
8
+ "Account Setup","Configuración de la cuenta"
9
+ "Execute synchronization","Ejecutar sincronización"
10
+ "OCT8NE Dashboard","Panel de control OCT8NE"
11
+ "Status:","Estado:"
12
+ "Linked account:","Cuenta enlazada:"
13
+ "Email:","Email:"
14
+ "Password:","Password:"
15
+ "OCT8NE email","Email OCT8NE"
16
+ "OCT8NE password","Password OCT8NE"
17
+ "Don't have a OCT8NE account?","¿No tienes una cuenta OCT8NE?"
18
+ "Sign up now","Regístrate ahora"
19
+ "Link Up","Enlazar"
20
+ "Synchronization finished successfully.","Sincronización finalizada correctamente."
21
+ "Products added:","Productos añadidos:"
22
+ "Products updated:","Productos actualizados:"
23
+ "There was an error synchronizing with OCT8NE.","Ha ocurrido un error sincronizando con OCT8NE."
24
+ "Does the account is properly linked up in Account Setup?","¿Está la cuenta correctamente enlazada en la configuración?"
25
+ "The field (Email) cannot be empty.","El campo (Email) no puede estar vacío."
26
+ "The field (Password) cannot be empty.","El campo (Password) no puede estar vacío."
27
+ "The field (URL API) cannot be empty.","El campo (URL API) no puede estar vacío."
28
+ "Account not linked. Please, link up your account before at OCT8NE/Account Setup.","Cuenta no enlazada. Por favor, enlace antes su cuenta en OCT8NE/Configuración de la cuenta."
29
+ "There was an error on your credentials and cannot obtain OCT8NE integration data.","Hay un error en sus credenciales y no se han podido obtener los datos de integración con OCT8NE."
30
+ "There was an error activating OCT8NE integration.","Ha ocurrido un error activando la integración con OCT8NE."
31
+ "OCT8NE integration data obtained successfully!","¡Datos de integración con OCT8NE obtenidos correctamente!"
32
+ "There was an error deactivating OCT8NE integration.","Ha ocurrido un error desactivando la integración con OCT8NE."
33
+ "OCT8NE integration deactivated successfully!","¡Integración con OCT8NE desactivada correctamente!"
34
+ "OCT8NE integration activated successfully!","¡Integración con OCT8NE activada correctamente!"
35
+ "There was an error saving your settings.","Ha ocurrido un error grabando los ajustes."
36
+ "The fields (License ID and API token) are invalid.","Los campos (License ID and API token) son inválidos."
37
+ "Settings updated successfully.","Ajustes actualizados correctamente."
38
+ "(Deactivate)","(Desactivar)"
39
  "(Activate)","(Activar)"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LetsSyncroLLC_Oct8ne</name>
4
- <version>1.1.3</version>
5
  <stability>stable</stability>
6
  <license>license</license>
7
  <channel>community</channel>
@@ -10,171 +10,9 @@
10
  <description>Oct8ne extension description</description>
11
  <notes>Notes</notes>
12
  <authors><author><name>Oct8ne</name><user>Oct8ne</user><email>xavier.gonzalez@oct8ne.com</email></author></authors>
13
- <date>2014-02-14</date>
14
- <time>19:48:21</time>
15
- <contents><target name="magecommunity">
16
- <dir name="LetsSyncroLLC">
17
- <dir name="Oct8ne">
18
- <dir name="Block">
19
- <file name="Accountconfig.php"/>
20
- <dir name="Customer">
21
- <file name="Notifier.php"/>
22
- </dir>
23
- <dir name="Html">
24
- <file name="Head.php"/>
25
- </dir>
26
- <file name="Index.php"/>
27
- </dir>
28
- <dir name="Helper">
29
- <dir name="Customer">
30
- <file name="Data.php"/>
31
- </dir>
32
- <file name="Data.php"/>
33
- <file name="Search.php"/>
34
- <file name="Url.php"/>
35
- <file name="Wishlist.php"/>
36
- </dir>
37
- <dir name="Model">
38
- <file name="Cron.php"/>
39
- <file name="Letssyncro.php"/>
40
- <dir name="Mage">
41
- <file name="Onepage.php"/>
42
- <file name="Url.php"/>
43
- </dir>
44
- <dir name="Mysql4">
45
- <dir name="LetsSyncro">
46
- <file name="Collection.php"/>
47
- </dir>
48
- <file name="Letssyncro.php"/>
49
- <dir name="Orderproducts">
50
- <file name="Collection.php"/>
51
- </dir>
52
- <file name="Orderproducts.php"/>
53
- </dir>
54
- <file name="Observer.php"/>
55
- <file name="Orderproducts.php"/>
56
- </dir>
57
- <dir name="controllers">
58
- <file name="AccountController.php"/>
59
- <file name="AdminController.php"/>
60
- <file name="FrameController.php"/>
61
- <file name="IndexController.php"/>
62
- <file name="letssyncro.phtml"/>
63
- </dir>
64
- <dir name="etc">
65
- <file name="config.xml"/>
66
- <file name="system.xml"/>
67
- </dir>
68
- <dir name="sql">
69
- <dir name="oct8ne_setup">
70
- <file name="mysql4-install-0.5.0.php"/>
71
- <file name="mysql4-install-1.0.0.php"/>
72
- <file name="mysql4-upgrade-1.0.0-1.1.0.php"/>
73
- </dir>
74
- </dir>
75
- </dir>
76
- </dir></target><target name="mageetc">
77
- <dir name="modules">
78
- <file name="LetsSyncroLLC_Oct8ne.xml"/>
79
- </dir></target><target name="magedesign">
80
- <dir name="frontend">
81
- <dir name="default">
82
- <dir name="default">
83
- <dir name="layout">
84
- <file name="oct8ne.xml"/>
85
- </dir>
86
- <dir name="template">
87
- <dir name="oct8ne">
88
- <dir name="frame">
89
- <file name="add2cart.phtml"/>
90
- <file name="addtowishlist.phtml"/>
91
- <file name="clean-page.phtml"/>
92
- <dir name="customer">
93
- <file name="data.phtml"/>
94
- <file name="notifier.phtml"/>
95
- </dir>
96
- <file name="getcart.phtml"/>
97
- <file name="getwishlist.phtml"/>
98
- <file name="json-page.phtml"/>
99
- <file name="loginpost.phtml"/>
100
- <file name="naked-page.phtml"/>
101
- <file name="productinfo.phtml"/>
102
- <file name="productrelated.phtml"/>
103
- <dir name="productview">
104
- <file name="additional.phtml"/>
105
- <file name="addto.phtml"/>
106
- <file name="addtocart.phtml"/>
107
- <file name="attributes.phtml"/>
108
- <file name="description.phtml"/>
109
- <file name="media.phtml"/>
110
- <file name="media.phtml.ORIGINAL"/>
111
- <dir name="options">
112
- <file name="js.phtml"/>
113
- <dir name="type">
114
- <file name="date.phtml"/>
115
- <file name="default.phtml"/>
116
- <file name="file.phtml"/>
117
- <file name="select.phtml"/>
118
- <file name="text.phtml"/>
119
- </dir>
120
- <dir name="wrapper">
121
- <file name="bottom.phtml"/>
122
- </dir>
123
- <file name="wrapper.phtml"/>
124
- </dir>
125
- <file name="options.phtml"/>
126
- <file name="price.phtml"/>
127
- <file name="price_clone.phtml"/>
128
- <file name="tierprices.phtml"/>
129
- <dir name="type">
130
- <file name="configurable.phtml"/>
131
- <file name="default.phtml"/>
132
- <file name="grouped.phtml"/>
133
- <dir name="options">
134
- <file name="configurable.phtml"/>
135
- </dir>
136
- <file name="simple.phtml"/>
137
- <file name="virtual.phtml"/>
138
- </dir>
139
- </dir>
140
- <file name="productview-FROM-SCRATCH.phtml"/>
141
- <file name="productview.phtml"/>
142
- <file name="removefromwishlist.phtml"/>
143
- <file name="search.phtml"/>
144
- </dir>
145
- <file name="letssyncro.phtml"/>
146
- </dir>
147
- </dir>
148
- </dir>
149
- <dir name="oct8ne">
150
- <dir name="template">
151
- <dir name="page">
152
- <file name="1column.phtml" />
153
- <file name="2columns-left.phtml" />
154
- <file name="2columns-right.phtml" />
155
- <file name="3columns.phtml" />
156
- </dir>
157
- </dir>
158
- </dir>
159
- </dir>
160
- </dir></target><target name="magelocale">
161
- <dir>
162
- <dir name="en_US">
163
- <file name="LetsSyncroLLC_Oct8ne.csv"/>
164
- </dir>
165
- <dir name="es_ES">
166
- <file name="LetsSyncroLLC_Oct8ne.csv"/>
167
- </dir>
168
- </dir></target><target name="mageskin">
169
- <dir name="adminhtml">
170
- <dir name="default">
171
- <dir name="default">
172
- <dir name="images">
173
- <file name="LetsSyncro_Logo.png"/>
174
- </dir>
175
- </dir>
176
- </dir>
177
- </dir></target></contents>
178
  <compatible/>
179
  <dependencies><required><php><min>5.3.0</min><max>5.4.12</max></php></required></dependencies>
180
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LetsSyncroLLC_Oct8ne</name>
4
+ <version>1.1.4</version>
5
  <stability>stable</stability>
6
  <license>license</license>
7
  <channel>community</channel>
10
  <description>Oct8ne extension description</description>
11
  <notes>Notes</notes>
12
  <authors><author><name>Oct8ne</name><user>Oct8ne</user><email>xavier.gonzalez@oct8ne.com</email></author></authors>
13
+ <date>2014-03-21</date>
14
+ <time>10:39:11</time>
15
+ <contents><target name="magecommunity"><dir name="LetsSyncroLLC"><dir name="Oct8ne"><dir name="Block"><file name="Accountconfig.php" hash="b9493cd1f56a490bc8fc31f9315ff871"/><dir name="Customer"><file name="Notifier.php" hash="4e5c509e127119a8b402832c6f2f2b23"/></dir><dir name="Html"><file name="Head.php" hash="3052f7a7e9d8adfe0eb0f4484f789b36"/></dir><file name="Index.php" hash="d4cc07e7e6412cb9f3cedf2508f56461"/></dir><dir name="Helper"><dir name="Customer"><file name="Data.php" hash="4ad2ac2fc06fd5a491a48308ee92c9b7"/></dir><file name="Data.php" hash="ed5fb834be3848ad452f98fabd954147"/><file name="Search.php" hash="b340e551645723143fb98bd1cb558a41"/><file name="Url.php" hash="8b305c993f1a026d3fd67d1bfe88d3e9"/><file name="Wishlist.php" hash="29c9447eb52548708918f07aaec9f7ef"/></dir><dir name="Model"><file name="Cron.php" hash="b2c54b02b18a4a4b8386278aa1b4b438"/><file name="Letssyncro.php" hash="a7755ee759fa31f004207823314a907d"/><dir name="Mage"><file name="Onepage.php" hash="09bdc97f5328062520758798a2b5545c"/><file name="Url.php" hash="9811f73a73b5f1bd216442150f854a70"/></dir><dir name="Mysql4"><dir name="LetsSyncro"><file name="Collection.php" hash="1820b31106065627aa81007f966de6b7"/></dir><file name="Letssyncro.php" hash="81b49a4f7770d408eacd230a41434cbf"/><dir name="Orderproducts"><file name="Collection.php" hash="d41809333ca198109c3e0511790a333b"/></dir><file name="Orderproducts.php" hash="4c05fe63b71bbc669d7053915969ea0c"/></dir><file name="Observer.php" hash="35c7a2608b071457d02ef3d0bc31f542"/><file name="Orderproducts.php" hash="96432b6c3a3abdd58d9f9657a6432e18"/></dir><dir name="controllers"><file name="AccountController.php" hash="492f053985eca9a14bc1abf698966d77"/><file name="AdminController.php" hash="c5206f6bbbdc7d98d93e99d948aa241d"/><file name="FrameController.php" hash="579c3a25d80cf4f4276661b99896f397"/><file name="IndexController.php" hash="5a63469c2dead9b78a262fd580a3e43b"/><file name="letssyncro.phtml" hash="3e6771c4f2010f678d19c3363f0c8c85"/></dir><dir name="etc"><file name="config.xml" hash="5522d65fca36340aec368c46cad348ce"/><file name="system.xml" hash="69b466103caeefe73a618b350872d90d"/></dir><dir name="sql"><dir name="oct8ne_setup"><file name="mysql4-install-0.5.0.php" hash="51668af264bb01c6607c68964ac6bdb7"/><file name="mysql4-install-1.0.0.php" hash="51668af264bb01c6607c68964ac6bdb7"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="0de801ad4896defa9491391754ee7229"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LetsSyncroLLC_Oct8ne.xml" hash="c964f1f25c986f91785da5189565d4a1"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="oct8ne.xml" hash="852d97d55ef98d7c7157b54eed0b9459"/></dir><dir name="template"><dir name="oct8ne"><dir name="frame"><file name="add2cart.phtml" hash="c5e128243cfdf8b6b4abe2f297ec8335"/><file name="addtowishlist.phtml" hash="00d4f2f3b3ef337de28e5cca3bc8df6a"/><file name="clean-page.phtml" hash="edc071b2173758821d2a27fbce26ef2b"/><dir name="customer"><file name="data.phtml" hash="44133496fb036a5c9989d52c5f85b19b"/><file name="notifier.phtml" hash="c97f29ac7ae1754284721bdffe06250b"/></dir><file name="getcart.phtml" hash="f67bacfaf225c8972a52de542cac1d69"/><file name="getwishlist.phtml" hash="4e00716786afcebad70c7f72000b998e"/><file name="json-page.phtml" hash="509893c584213ad7d78e17a1a53249d1"/><file name="loginpost.phtml" hash="ea57cb60b282d1fc60186503f6909176"/><file name="naked-page.phtml" hash="6b9275b9ba11e9c79610b52e423e5dda"/><file name="productinfo.phtml" hash="4ed7ed6dab345d43d3095b95daf98114"/><file name="productrelated.phtml" hash="72e36adb79a36c00f8153ae777710402"/><dir name="productview"><file name="additional.phtml" hash="7bab9dbcc43d46b0aa057dd92547e49e"/><file name="addto.phtml" hash="4aadc1acfec31347887991ef0c192e01"/><file name="addtocart.phtml" hash="d6b9ff292fb9e482184e909200c8138d"/><file name="attributes.phtml" hash="a234143e664549fbca1d49c1e950efc5"/><file name="description.phtml" hash="a9ee13db96558372435034562dbdaa7a"/><file name="media.phtml" hash="d50c7b227b03a647ea0ec2172182a232"/><file name="media.phtml.ORIGINAL" hash="385cb80abc228301060ffafa147c9783"/><dir name="options"><file name="js.phtml" hash="9d5c5c4786c5b9fb7125f6f3cc8c7309"/><dir name="type"><file name="date.phtml" hash="5bdfd7dc4817a500095e076a21a2c467"/><file name="default.phtml" hash="f1acbd98563c6640c4a0b6cf5abc994f"/><file name="file.phtml" hash="b72f9363f049dd486ff0a3c8b667cbc9"/><file name="select.phtml" hash="5dbbe91d0581ccb291737992c5188121"/><file name="text.phtml" hash="1aaef71a9e81521aab601aa281fa0b8e"/></dir><dir name="wrapper"><file name="bottom.phtml" hash="6a612992021e3e65ca7b5f6e897821d5"/></dir><file name="wrapper.phtml" hash="472e04ad6c1a35dfeaa54b3012884ed6"/></dir><file name="options.phtml" hash="c1227dcadb83af6708d78a032ffd8d6c"/><file name="price.phtml" hash="f2ae6daff42b8ee7074d27c8bf5f1e6c"/><file name="price_clone.phtml" hash="732daf46245f4ee7068d5ae26defc750"/><file name="tierprices.phtml" hash="0b7f122253b505c45772eff069203a5d"/><dir name="type"><file name="configurable.phtml" hash="1a0a77285960b4227f000855e8194ed7"/><file name="default.phtml" hash="dd5d4b8859956d79ec7d42522b4f42a8"/><file name="grouped.phtml" hash="f5d7db323383b19a80ab3c55a1736dd5"/><dir name="options"><file name="configurable.phtml" hash="c37919561a3cde0d9b92fd34d44c69c1"/></dir><file name="simple.phtml" hash="1a0a77285960b4227f000855e8194ed7"/><file name="virtual.phtml" hash="1a0a77285960b4227f000855e8194ed7"/></dir></dir><file name="productview-FROM-SCRATCH.phtml" hash="5dfc5225e6e0986b3fa9d2d091dd759e"/><file name="productview.phtml" hash="5425b92fb7fbc5fe426ed07174c7a9a2"/><file name="removefromwishlist.phtml" hash="00d4f2f3b3ef337de28e5cca3bc8df6a"/><file name="search.phtml" hash="0834fe5ae26493351fbee92c2b996cdc"/></dir><file name="letssyncro.phtml" hash="8394bc898da079723a621bb586a3438c"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="LetsSyncroLLC_Oct8ne.csv" hash="686df4107da7e35e243b629c5ee57963"/></dir><dir name="es_ES"><file name="LetsSyncroLLC_Oct8ne.csv" hash="eb0b3ddaae1e2e52005e9ab23cb37163"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="LetsSyncro_Logo.png" hash="2104af20cc380d0c745531e1dca2f97c"/></dir></dir></dir></dir></target></contents>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>5.4.12</max></php></required></dependencies>
18
  </package>