StarSMP_Customers_Tracking_Integration - Version 1.0.5

Version Notes

checkout page updated

Download this release

Release Info

Developer KremsaDigital
Extension StarSMP_Customers_Tracking_Integration
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.4 to 1.0.5

app/code/community/KremsaDigital/StarSocial/Helper/Data.php CHANGED
@@ -1,23 +1,25 @@
1
- <?php
2
-
3
- class KremsaDigital_StarSocial_Helper_Data extends Mage_Core_Helper_Abstract
4
- {
5
-
6
- private $moduleActive = null;
7
-
8
- public function isModuleActive() {
9
- if ($this->moduleActive == null) {
10
- $act = Mage::getStoreConfig('starsocial/conf/active');
11
- $lid = Mage::getStoreConfig('starsocial/conf/loyalty_id');
12
- $cid = Mage::getStoreConfig('starsocial/conf/client_id');
13
- $cs = Mage::getStoreConfig('starsocial/conf/client_secret');
14
- $ret = (isset($act) && ($act == '1') && !empty($lid) && !empty($cid) && !empty($cs));
15
- }
16
- $this->moduleActive = $ret;
17
- return $ret;
18
- }
19
-
20
- public function getLibUrl() {
21
- return '/js/KremsaDigital/StarSocial';
22
- }
 
 
23
  }
1
+ <?php
2
+
3
+ class KremsaDigital_StarSocial_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ private $moduleActive = null;
7
+
8
+ public function isModuleActive() {
9
+ if ($this->moduleActive == null) {
10
+ $act = Mage::getStoreConfig('starsocial/conf/active');
11
+ $lid = Mage::getStoreConfig('starsocial/conf/loyalty_id');
12
+ $cid = Mage::getStoreConfig('starsocial/conf/client_id');
13
+ $cs = Mage::getStoreConfig('starsocial/conf/client_secret');
14
+ $ret = (isset($act) && ($act == '1') && !empty($lid) && !empty($cid) && !empty($cs));
15
+ $this->moduleActive = $ret;
16
+ } else {
17
+ $ret = $this->moduleActive;
18
+ }
19
+ return $ret;
20
+ }
21
+
22
+ public function getLibUrl() {
23
+ return '/js/KremsaDigital/StarSocial';
24
+ }
25
  }
app/design/frontend/default/default/template/starsocial/tags.phtml CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
- if (Mage::helper('starsocial')->isModuleActive()):
3
- echo Mage::getStoreConfig('starsocial/conf/tag_starsmp');
4
- ?>
5
- <div id="smp-root"></div>
6
-
7
- <script>
8
-
9
- var STARSMP_API_PATH = <?php if (Mage::getStoreConfig('starsocial/conf/is_beta') == '1'):?>'//api.starsmp.com-beta.com'<?php else:?>'//api.starsmp.com'<?php endif; ?>;
10
- window.smpAsyncInit = function() {
11
- StarSMP.init({
12
- loyaltyId: <?php echo json_encode(Mage::getStoreConfig('starsocial/conf/loyalty_id'))?>,
13
- apiServer: STARSMP_API_PATH + '/api/',
14
- clientId: <?php echo json_encode(Mage::getStoreConfig('starsocial/conf/client_id'))?>,
15
- channelUrl: '//' + document.location.host + <?php echo json_encode(Mage::helper('starsocial')->getLibUrl())?> + '/channel.html',
16
- smpLoginService: '//' + document.location.host + <?php echo json_encode(Mage::helper('starsocial')->getLibUrl())?> + '/smp_login.php' // TODO update path to smp_login.php from PHP sdk
17
- }, function(data) {
18
-
19
- // method call
20
- StarSMP.api("auth.token", {"grant_type":"none","client_id":<?php echo json_encode(Mage::getStoreConfig('starsocial/conf/client_id'))?>,"return":"true"}, function(data) {
21
- if(typeof StarSMP.accessToken!='undefined') {
22
- jQuery.post(
23
- '//' + document.location.host + <?php echo json_encode(Mage::helper('starsocial')->getLibUrl())?> + '/smp_login.php',
24
- { tkn: StarSMP.accessToken },
25
- function(resp) {}
26
- );
27
- }
28
- });
29
- });
30
- };
31
-
32
-
33
- var e = document.createElement("script"); e.async = true;
34
- e.src = document.location.protocol + STARSMP_API_PATH + "/connect/all.js";
35
- document.getElementById("smp-root").appendChild(e);
36
-
37
- </script>
38
- <?php
39
- endif;
1
+ <?php
2
+ if (Mage::helper('starsocial')->isModuleActive()):
3
+ echo Mage::getStoreConfig('starsocial/conf/tag_starsmp');
4
+ ?>
5
+ <div id="smp-root"></div>
6
+
7
+ <script>
8
+
9
+ var STARSMP_API_PATH = <?php if (Mage::getStoreConfig('starsocial/conf/is_beta') == '1'):?>'//api.starsmp.com-beta.com'<?php else:?>'//api.starsmp.com'<?php endif; ?>;
10
+ window.smpAsyncInit = function() {
11
+ StarSMP.init({
12
+ loyaltyId: <?php echo json_encode(Mage::getStoreConfig('starsocial/conf/loyalty_id'))?>,
13
+ apiServer: STARSMP_API_PATH + '/api/',
14
+ clientId: <?php echo json_encode(Mage::getStoreConfig('starsocial/conf/client_id'))?>,
15
+ channelUrl: '//' + document.location.host + <?php echo json_encode(Mage::helper('starsocial')->getLibUrl())?> + '/channel.html',
16
+ smpLoginService: '//' + document.location.host + <?php echo json_encode(Mage::helper('starsocial')->getLibUrl())?> + '/smp_login.php' // TODO update path to smp_login.php from PHP sdk
17
+ }, function(data) {
18
+
19
+ // method call
20
+ StarSMP.api("auth.token", {"grant_type":"none","client_id":<?php echo json_encode(Mage::getStoreConfig('starsocial/conf/client_id'))?>,"return":"true"}, function(data) {
21
+ if(typeof StarSMP.accessToken!='undefined') {
22
+ jQuery.post(
23
+ '//' + document.location.host + <?php echo json_encode(Mage::helper('starsocial')->getLibUrl())?> + '/smp_login.php',
24
+ { tkn: StarSMP.accessToken },
25
+ function(resp) {}
26
+ );
27
+ }
28
+ });
29
+ });
30
+ };
31
+
32
+
33
+ var e = document.createElement("script"); e.async = true;
34
+ e.src = document.location.protocol + STARSMP_API_PATH + "/connect/all.js";
35
+ document.getElementById("smp-root").appendChild(e);
36
+
37
+ </script>
38
+ <?php
39
+ endif;
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>StarSMP_Customers_Tracking_Integration</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -21,11 +21,11 @@ StarSMP Universal Tag Features: &#xD;
21
  - add custom tracking codes&#xD;
22
  - automatically deploys to your Magento e-shop&#xD;
23
  - control access to your tracking codes</description>
24
- <notes>working update + JS</notes>
25
  <authors><author><name>KremsaDigital</name><user>kremsa_design</user><email>kremsa.office.sk@gmail.com</email></author></authors>
26
- <date>2014-10-09</date>
27
- <time>19:52:47</time>
28
- <contents><target name="magecommunity"><dir name="KremsaDigital"><dir name="StarSocial"><dir name="Helper"><file name="Data.php" hash="57738c870b8074617d374e0e158018db"/></dir><dir name="Model"><file name="Observer.php" hash="f1af5f191e0cb9116b0015fd02cafa06"/><file name="Track.php" hash="5fae090c6ae99f6599bd8db080cf5b5f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="735e6dfffa1e18830ec0f9a061eaa480"/><file name="config.xml" hash="5ba3521633493ef0b9ef9b9d4943fe47"/><file name="system.xml" hash="5c4f4fdb3735ea7c3396dcf681509e86"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="KremsaDesign_StarSocial.xml" hash="f07ad022b4e7aaa1c67f0bd9d2458f99"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="StarSocial.xml" hash="44aa76355559f1ab659e76fa5767dbd2"/></dir><dir name="template"><dir name="starsocial"><file name="tags-checkout.phtml" hash="f1986a33e545c1246ad07fa7fa5d2a4b"/><file name="tags.phtml" hash="82ccdaaf43964967d385abb163b6a7bf"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="KremsaDigital"><dir name="StarSocial"><file name="channel.html" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="smp_login.php" hash="6edf68fb880bee500976a3a1a833a2fe"/></dir></dir></dir></target><target name="magelib"><dir name="KremsaDigital"><dir name="StarSocial"><file name="starsmp.php" hash="d6c0f4ca17813c9ce955fab7b10cb40a"/></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>StarSMP_Customers_Tracking_Integration</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
21
  - add custom tracking codes&#xD;
22
  - automatically deploys to your Magento e-shop&#xD;
23
  - control access to your tracking codes</description>
24
+ <notes>checkout page updated</notes>
25
  <authors><author><name>KremsaDigital</name><user>kremsa_design</user><email>kremsa.office.sk@gmail.com</email></author></authors>
26
+ <date>2014-10-12</date>
27
+ <time>08:59:22</time>
28
+ <contents><target name="magecommunity"><dir name="KremsaDigital"><dir name="StarSocial"><dir name="Helper"><file name="Data.php" hash="85963ac4a639c694b7db915ef5905c44"/></dir><dir name="Model"><file name="Observer.php" hash="f1af5f191e0cb9116b0015fd02cafa06"/><file name="Track.php" hash="3de832a0f158cd173a036b93eb0dd028"/></dir><dir name="etc"><file name="adminhtml.xml" hash="735e6dfffa1e18830ec0f9a061eaa480"/><file name="config.xml" hash="5ba3521633493ef0b9ef9b9d4943fe47"/><file name="system.xml" hash="5c4f4fdb3735ea7c3396dcf681509e86"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="KremsaDesign_StarSocial.xml" hash="f07ad022b4e7aaa1c67f0bd9d2458f99"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="StarSocial.xml" hash="44aa76355559f1ab659e76fa5767dbd2"/></dir><dir name="template"><dir name="starsocial"><file name="tags-checkout.phtml" hash="f1986a33e545c1246ad07fa7fa5d2a4b"/><file name="tags.phtml" hash="833114f709760c4b7dd578675a9d564e"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="KremsaDigital"><dir name="StarSocial"><file name="channel.html" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="smp_login.php" hash="6edf68fb880bee500976a3a1a833a2fe"/></dir></dir></dir></target><target name="magelib"><dir name="KremsaDigital"><dir name="StarSocial"><file name="starsmp.php" hash="d6c0f4ca17813c9ce955fab7b10cb40a"/></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>