Webwinkelkeur_Connector - Version 1.0.5

Version Notes

Stable release

Download this release

Release Info

Developer Magento Core Team
Extension Webwinkelkeur_Connector
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.5

app/code/local/Webwinkelkeur/Connector/Helper/Data.php CHANGED
@@ -16,7 +16,7 @@
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
 
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
 
app/code/local/Webwinkelkeur/Connector/Model/Observer.php CHANGED
@@ -16,7 +16,7 @@
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  *
22
  */
@@ -60,7 +60,7 @@ class Webwinkelkeur_Connector_Model_Observer {
60
  $order = $shipment->getOrder();
61
  if((Mage::getStoreConfig('connector/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('connector/api/api_key', $order->getStoreId()))):
62
  if($order->getStatus() == Mage::getStoreConfig('connector/invitation/status', $order->getStoreId())):
63
- if(Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId())):
64
  $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
65
  if($date_diff < Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId())):
66
  $this->sendInvitation($order);
@@ -78,7 +78,7 @@ class Webwinkelkeur_Connector_Model_Observer {
78
  $order = $observer->getEvent()->getOrder();
79
  if((Mage::getStoreConfig('connector/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('connector/api/api_key', $order->getStoreId()))):
80
  if($order->getStatus() == Mage::getStoreConfig('connector/invitation/status', $order->getStoreId())):
81
- if(Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId())):
82
  $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
83
  if($date_diff < Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId())):
84
  $this->sendInvitation($order);
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  *
22
  */
60
  $order = $shipment->getOrder();
61
  if((Mage::getStoreConfig('connector/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('connector/api/api_key', $order->getStoreId()))):
62
  if($order->getStatus() == Mage::getStoreConfig('connector/invitation/status', $order->getStoreId())):
63
+ if(Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId()) > 0):
64
  $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
65
  if($date_diff < Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId())):
66
  $this->sendInvitation($order);
78
  $order = $observer->getEvent()->getOrder();
79
  if((Mage::getStoreConfig('connector/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('connector/api/api_key', $order->getStoreId()))):
80
  if($order->getStatus() == Mage::getStoreConfig('connector/invitation/status', $order->getStoreId())):
81
+ if(Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId()) > 0):
82
  $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
83
  if($date_diff < Mage::getStoreConfig('connector/invitation/backlog', $order->getStoreId())):
84
  $this->sendInvitation($order);
app/code/local/Webwinkelkeur/Connector/Model/System/Config/Source/Position.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WebwinkelKeur
4
+ * https://www.webwinkelkeur.nl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to info@magmodules.eu so we can send you a copy immediately.
15
+ *
16
+ * @category Webwinkelkeur
17
+ * @package Magmodules_Connector
18
+ * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ *
22
+ **/
23
+
24
+ class Webwinkelkeur_Connector_Model_System_Config_Source_Position {
25
+
26
+ public function toOptionArray()
27
+ {
28
+ $position = array();
29
+ $position[] = array('value'=>'left', 'label'=> Mage::helper('connector')->__('Links'));
30
+ $position[] = array('value'=>'right', 'label'=> Mage::helper('connector')->__('Rechts'));
31
+ return $position;
32
+ }
33
+
34
+ }
app/code/local/Webwinkelkeur/Connector/Model/System/Config/Source/Status.php CHANGED
@@ -16,7 +16,7 @@
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  *
22
  **/
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  *
22
  **/
app/code/local/Webwinkelkeur/Connector/etc/adminhtml.xml CHANGED
@@ -17,7 +17,7 @@
17
  * @category Webwinkelkeur
18
  * @package Magmodules_Connector
19
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
20
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
  */
23
  -->
17
  * @category Webwinkelkeur
18
  * @package Magmodules_Connector
19
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
20
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
  */
23
  -->
app/code/local/Webwinkelkeur/Connector/etc/config.xml CHANGED
@@ -17,14 +17,14 @@
17
  * @category Webwinkelkeur
18
  * @package Magmodules_Connector
19
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
20
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
  */
23
  -->
24
  <config>
25
  <modules>
26
  <Webwinkelkeur_Connector>
27
- <version>1.0.1</version>
28
  </Webwinkelkeur_Connector>
29
  </modules>
30
  <global>
17
  * @category Webwinkelkeur
18
  * @package Magmodules_Connector
19
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
20
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
  */
23
  -->
24
  <config>
25
  <modules>
26
  <Webwinkelkeur_Connector>
27
+ <version>1.0.5</version>
28
  </Webwinkelkeur_Connector>
29
  </modules>
30
  <global>
app/code/local/Webwinkelkeur/Connector/etc/system.xml CHANGED
@@ -17,7 +17,7 @@
17
  * @category Webwinkelkeur
18
  * @package Magmodules_Connector
19
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
20
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
  */
23
  -->
@@ -79,7 +79,7 @@
79
  <expanded>1</expanded>
80
  <fields>
81
  <enabled translate="label">
82
- <label>Sidebar tonen</label>
83
  <frontend_type>select</frontend_type>
84
  <source_model>adminhtml/system_config_source_yesno</source_model>
85
  <sort_order>1</sort_order>
@@ -88,7 +88,47 @@
88
  <show_in_store>1</show_in_store>
89
  <comment>Plaats de inter-actieve WebwinkelKeur sidebar</comment>
90
  <tooltip>Het tonen van de sidebar zorgt voor een hoger vertrouwen. Tevens hoeven bezoekers jouw webwinkel niet te verlaten om jouw gegevens te controleren. Dit verhoogt de conversie.</tooltip>
91
- </enabled>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  </fields>
93
  </frontend>
94
  <invitation translate="label">
@@ -146,7 +186,6 @@
146
  <tooltip>Aantal dagen dat afronden bestelling mag duren, duurt het langer dan wordt er geen uitnodiging verzonden. Zie ook de uitleg op webwinkelkeur.nl.</tooltip>
147
  <depends><enabled>1</enabled></depends>
148
  </backlog>
149
-
150
  <debug translate="label">
151
  <label>Debug</label>
152
  <frontend_type>select</frontend_type>
@@ -155,8 +194,9 @@
155
  <show_in_default>1</show_in_default>
156
  <show_in_website>1</show_in_website>
157
  <show_in_store>1</show_in_store>
158
- <comment>Aktiveer debug optie</comment>
159
  <tooltip>Schrijft API connecties weg naar de log.</tooltip>
 
160
  </debug>
161
  </fields>
162
  </invitation>
17
  * @category Webwinkelkeur
18
  * @package Magmodules_Connector
19
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
20
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
  */
23
  -->
79
  <expanded>1</expanded>
80
  <fields>
81
  <enabled translate="label">
82
+ <label>Javascript integratie</label>
83
  <frontend_type>select</frontend_type>
84
  <source_model>adminhtml/system_config_source_yesno</source_model>
85
  <sort_order>1</sort_order>
88
  <show_in_store>1</show_in_store>
89
  <comment>Plaats de inter-actieve WebwinkelKeur sidebar</comment>
90
  <tooltip>Het tonen van de sidebar zorgt voor een hoger vertrouwen. Tevens hoeven bezoekers jouw webwinkel niet te verlaten om jouw gegevens te controleren. Dit verhoogt de conversie.</tooltip>
91
+ </enabled>
92
+ <sidebar translate="label">
93
+ <label>Sidebar tonen</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>adminhtml/system_config_source_yesno</source_model>
96
+ <sort_order>2</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ <comment>Plaats de inter-actieve WebwinkelKeur sidebar</comment>
101
+ <tooltip>Het tonen van de sidebar zorgt voor een hoger vertrouwen. Tevens hoeven bezoekers jouw webwinkel niet te verlaten om jouw gegevens te controleren. Dit verhoogt de conversie.</tooltip>
102
+ </sidebar>
103
+ <tooltip translate="label">
104
+ <label>Tooltip</label>
105
+ <frontend_type>select</frontend_type>
106
+ <source_model>adminhtml/system_config_source_yesno</source_model>
107
+ <sort_order>3</sort_order>
108
+ <show_in_default>1</show_in_default>
109
+ <show_in_website>1</show_in_website>
110
+ <show_in_store>1</show_in_store>
111
+ <comment>Wel of niet weergeven van de mouse-over tooltip</comment>
112
+ </tooltip>
113
+ <sidebar_position translate="label">
114
+ <label>Sidebar positie</label>
115
+ <frontend_type>select</frontend_type>
116
+ <source_model>connector/system_config_source_position</source_model>
117
+ <sort_order>4</sort_order>
118
+ <show_in_default>1</show_in_default>
119
+ <show_in_website>1</show_in_website>
120
+ <show_in_store>1</show_in_store>
121
+ <comment>De positie van de sidebar</comment>
122
+ </sidebar_position>
123
+ <sidebar_height translate="label">
124
+ <label>Plek plaatsing sidebar</label>
125
+ <frontend_type>text</frontend_type>
126
+ <sort_order>5</sort_order>
127
+ <show_in_default>1</show_in_default>
128
+ <show_in_website>1</show_in_website>
129
+ <show_in_store>1</show_in_store>
130
+ <comment>Plaatsing vanaf bovenkant scherm</comment>
131
+ </sidebar_height>
132
  </fields>
133
  </frontend>
134
  <invitation translate="label">
186
  <tooltip>Aantal dagen dat afronden bestelling mag duren, duurt het langer dan wordt er geen uitnodiging verzonden. Zie ook de uitleg op webwinkelkeur.nl.</tooltip>
187
  <depends><enabled>1</enabled></depends>
188
  </backlog>
 
189
  <debug translate="label">
190
  <label>Debug</label>
191
  <frontend_type>select</frontend_type>
194
  <show_in_default>1</show_in_default>
195
  <show_in_website>1</show_in_website>
196
  <show_in_store>1</show_in_store>
197
+ <comment>Activeer debug optie</comment>
198
  <tooltip>Schrijft API connecties weg naar de log.</tooltip>
199
+ <depends><enabled>1</enabled></depends>
200
  </debug>
201
  </fields>
202
  </invitation>
app/design/frontend/base/default/template/webwinkelkeur/sidebar.phtml CHANGED
@@ -16,21 +16,33 @@
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
- * @copyright Copyright (c) 2013 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  *
22
  */
23
- $webwinkelkeur_id = (int)Mage::getStoreConfig('connector/api/webstore_id', Mage::app()->getStore()->getId());
24
- $enabled = Mage::getStoreConfig('connector/frontend/enabled', Mage::app()->getStore()->getId());
 
 
 
 
 
25
  ?>
26
 
27
  <?php if($webwinkelkeur_id && $enabled): ?>
28
  <script type="text/javascript">
29
  (function() {
30
  _webwinkelkeur_id = <?php echo $webwinkelkeur_id; ?>;
31
- var js = document.createElement("script"); js.type = "text/javascript";
32
- js.async = true; js.src = "//www.webwinkelkeur.nl/js/sidebar.js";
33
- var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(js, s);
 
 
 
 
 
 
 
34
  })();
35
  </script>
36
  <?php endif; ?>
16
  * @category Webwinkelkeur
17
  * @package Magmodules_Connector
18
  * @author WebwinkelKeur <info@webwinkelkeur.nl>
19
+ * @copyright Copyright (c) 2014 (https://www.webwinkelkeur.nl)
20
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  *
22
  */
23
+
24
+ $webwinkelkeur_id = (int)Mage::getStoreConfig('connector/api/webstore_id');
25
+ $enabled = Mage::getStoreConfig('connector/frontend/enabled');
26
+ $sidebar = (Mage::getStoreConfig('connector/frontend/sidebar') ? 'true' : 'false');
27
+ $tooltip = (Mage::getStoreConfig('connector/frontend/tooltip') ? 'true' : 'false');
28
+ $sidebar_position = Mage::getStoreConfig('connector/frontend/sidebar_position');
29
+ $sidebar_top = Mage::getStoreConfig('connector/frontend/sidebar_height');
30
  ?>
31
 
32
  <?php if($webwinkelkeur_id && $enabled): ?>
33
  <script type="text/javascript">
34
  (function() {
35
  _webwinkelkeur_id = <?php echo $webwinkelkeur_id; ?>;
36
+ _webwinkelkeur_sidebar = <?php echo $sidebar; ?>;
37
+ _webwinkelkeur_tooltip = <?php echo $tooltip; ?>;
38
+ _webwinkelkeur_sidebar_position = '<?php echo $sidebar_position; ?>';
39
+ _webwinkelkeur_sidebar_top = '<?php echo $sidebar_top; ?>';
40
+ var js = document.createElement("script");
41
+ js.type = "text/javascript";
42
+ js.async = true;
43
+ js.src = "//www.webwinkelkeur.nl/js/sidebar.js";
44
+ var s = document.getElementsByTagName("script")[0];
45
+ s.parentNode.insertBefore(js, s);
46
  })();
47
  </script>
48
  <?php endif; ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Webwinkelkeur_Connector</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license/>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>The WebwinkelKeur Foundation is a non-profit Dutch organisation. For members of WebwinkelKeur this module allows the integration of the innovative WebwinkelKeur Sidebar which increases the overall conversion of the webshop. For PLUS members the module also allows for automatic invitation of customers to add a review on the WebwinkelKeur page. The module is recommended for every WebwinkelKeur member with a Magento webshop. For more information visit www.webwinkelkeur.nl.</description>
11
  <notes>Stable release</notes>
12
  <authors><author><name>WebwinkelKeur</name><user>auto-converted</user><email>info@webwinkelkeur.nl</email></author></authors>
13
- <date>2013-11-25</date>
14
- <time>13:49:12</time>
15
- <contents><target name="magelocal"><dir name="Webwinkelkeur"><dir name="Connector"><dir name="Helper"><file name="Data.php" hash="a8e67bff8161f1b9f12f19725131ffb6"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Status.php" hash="a1fa4a988b053aab05d74a5523cdb116"/></dir></dir></dir><file name="Observer.php" hash="e7b77b146de66881648c4711f611c1e5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="713256c74e15173febfb41aa13ae8bb7"/><file name="config.xml" hash="49a9390d37f2dcde54b4389b06b429a1"/><file name="system.xml" hash="31e81c7150a3aca016880d8359d6a570"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="webwinkelkeur_connector.xml" hash="71f5b22be9372771c036ccd3b3425d3a"/></dir><dir name="template"><dir name="webwinkelkeur"><file name="sidebar.phtml" hash="edca3ed36455397e366d8a83322b9258"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webwinkelkeur_Connector.xml" hash="a0d5f43a744a12057798959cb9f4a25e"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Webwinkelkeur_Connector</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license/>
7
  <channel>community</channel>
10
  <description>The WebwinkelKeur Foundation is a non-profit Dutch organisation. For members of WebwinkelKeur this module allows the integration of the innovative WebwinkelKeur Sidebar which increases the overall conversion of the webshop. For PLUS members the module also allows for automatic invitation of customers to add a review on the WebwinkelKeur page. The module is recommended for every WebwinkelKeur member with a Magento webshop. For more information visit www.webwinkelkeur.nl.</description>
11
  <notes>Stable release</notes>
12
  <authors><author><name>WebwinkelKeur</name><user>auto-converted</user><email>info@webwinkelkeur.nl</email></author></authors>
13
+ <date>2014-02-28</date>
14
+ <time>11:51:51</time>
15
+ <contents><target name="magelocal"><dir name="Webwinkelkeur"><dir name="Connector"><dir name="Helper"><file name="Data.php" hash="1dae53995e12abc529004cda2dc63017"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Position.php" hash="9d17c7379d3c65ad1834727c40c34d2d"/><file name="Status.php" hash="5aae6fd2d908091c393e13879d5f24b9"/></dir></dir></dir><file name="Observer.php" hash="8535394d5ea0d88d0e387016c74eac07"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4bf9050731990078f20f72c3c2c4bd94"/><file name="config.xml" hash="597a078cd05561801f02e1ce04f26376"/><file name="system.xml" hash="2193e42bd585e12dca1587ac600253be"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="webwinkelkeur_connector.xml" hash="71f5b22be9372771c036ccd3b3425d3a"/></dir><dir name="template"><dir name="webwinkelkeur"><file name="sidebar.phtml" hash="dc301b5236fbc42c8d23cc2bee7f0d28"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Webwinkelkeur_Connector.xml" hash="a0d5f43a744a12057798959cb9f4a25e"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>