Fanplayr - Version 1.0.77

Version Notes

Can add UTM tracking to cart URL after successful coupon application through Fanplayr.

Download this release

Release Info

Developer Tarwin Stroh-Spijer
Extension Fanplayr
Version 1.0.77
Comparing to
See all releases


Code changes from version 1.0.76 to 1.0.77

app/code/community/Fanplayr/Socialcoupons/Block/Adminhtml/System/Config/Form/Field/Installhelper.php CHANGED
@@ -100,6 +100,7 @@ class Fanplayr_Socialcoupons_Block_Adminhtml_System_Config_Form_Field_Installhel
100
  $useTbuy = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/use_tbuy'));
101
 
102
  $disableUserIdentifyTracking = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking'));
 
103
 
104
  // have to use this variable for backwards compatability ...
105
  $currentEmbedType = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/wait_for_onload'));
@@ -238,6 +239,8 @@ class Fanplayr_Socialcoupons_Block_Adminhtml_System_Config_Form_Field_Installhel
238
 
239
  <tr><td><label title="Set to '1' to disable">Disable User Identity Tracking</label></td><td><input type="text" id="fanplayrsocialcoupons-disableuseridentitytracking" name="fanplayrsocialcoupons-disableuseridentitytracking" value="{$disableUserIdentifyTracking}" /></td></tr>
240
 
 
 
241
  <tr><td colspan="2"><a href="#" id="fanplayrsocialcoupons-console-hide" onclick="Fanplayr.console.hide(); return false;">Hide</a></td></tr>
242
 
243
  </table>
100
  $useTbuy = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/use_tbuy'));
101
 
102
  $disableUserIdentifyTracking = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking'));
103
+ $couponApplyUtm = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/coupon_apply_utm'));
104
 
105
  // have to use this variable for backwards compatability ...
106
  $currentEmbedType = htmlspecialchars(Mage::getStoreConfig('fanplayrsocialcoupons/config/wait_for_onload'));
239
 
240
  <tr><td><label title="Set to '1' to disable">Disable User Identity Tracking</label></td><td><input type="text" id="fanplayrsocialcoupons-disableuseridentitytracking" name="fanplayrsocialcoupons-disableuseridentitytracking" value="{$disableUserIdentifyTracking}" /></td></tr>
241
 
242
+ <tr><td><label title="If set, the string will be added to the cart URL after a '?'. ie 'utm_source=Shop&utm_medium=banner&utm_campaign=FanPlayr'">Apply to Cart UTM</label></td><td><input type="text" id="fanplayrsocialcoupons-couponapplyutm" name="fanplayrsocialcoupons-couponapplyutm" value="{$couponApplyUtm}" /></td></tr>
243
+
244
  <tr><td colspan="2"><a href="#" id="fanplayrsocialcoupons-console-hide" onclick="Fanplayr.console.hide(); return false;">Hide</a></td></tr>
245
 
246
  </table>
app/code/community/Fanplayr/Socialcoupons/controllers/CompyController.php CHANGED
@@ -60,6 +60,7 @@
60
  $this->updateConfig('fanplayrsocialcoupons/config/use_tbuy', '', false);
61
 
62
  $this->updateConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking', '', false);
 
63
 
64
  //$this->addNotice('Fanplayr details removed.');
65
  echo $this->jsonMessage(false, 'Fanplayr unlink successful".');
@@ -143,6 +144,7 @@
143
  $this->updateConfig('fanplayrsocialcoupons/config/use_tbuy', array_key_exists('usetbuy', $p) ? $p['usetbuy'] : '', true);
144
 
145
  $this->updateConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking', array_key_exists('disableuseridentitytracking', $p) ? $p['disableuseridentitytracking'] : '', true);
 
146
 
147
  //$this->addNotice('Fanplayr details updated.');
148
  echo $this->jsonMessage(false, 'Fanplayr details updated".');
60
  $this->updateConfig('fanplayrsocialcoupons/config/use_tbuy', '', false);
61
 
62
  $this->updateConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking', '', false);
63
+ $this->updateConfig('fanplayrsocialcoupons/config/coupon_apply_utm', '', false);
64
 
65
  //$this->addNotice('Fanplayr details removed.');
66
  echo $this->jsonMessage(false, 'Fanplayr unlink successful".');
144
  $this->updateConfig('fanplayrsocialcoupons/config/use_tbuy', array_key_exists('usetbuy', $p) ? $p['usetbuy'] : '', true);
145
 
146
  $this->updateConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking', array_key_exists('disableuseridentitytracking', $p) ? $p['disableuseridentitytracking'] : '', true);
147
+ $this->updateConfig('fanplayrsocialcoupons/config/coupon_apply_utm', array_key_exists('couponapplyutm', $p) ? $p['couponapplyutm'] : '', true);
148
 
149
  //$this->addNotice('Fanplayr details updated.');
150
  echo $this->jsonMessage(false, 'Fanplayr details updated".');
app/code/community/Fanplayr/Socialcoupons/controllers/CouponController.php CHANGED
@@ -203,7 +203,19 @@
203
 
204
  $shopUrl = $protocol . ':' . $shopUrl;
205
 
206
- header('Location: ' . $shopUrl . 'checkout/cart/');
 
 
 
 
 
 
 
 
 
 
 
 
207
  exit(1);
208
  }
209
 
203
 
204
  $shopUrl = $protocol . ':' . $shopUrl;
205
 
206
+ $utmTracking = '';
207
+ if ($this->hasSucceeded) {
208
+ // get UTM apply cart tracking
209
+ $couponApplyUtm = Mage::getStoreConfig('fanplayrsocialcoupons/config/coupon_apply_utm');
210
+
211
+ if ($couponApplyUtm) {
212
+ $utmTracking = '?' . $couponApplyUtm;
213
+ }
214
+
215
+ }
216
+
217
+ header('Location: ' . $shopUrl . 'checkout/cart/' . $utmTracking);
218
+
219
  exit(1);
220
  }
221
 
app/etc/modules/Fanplayr_Socialcoupons.xml CHANGED
@@ -4,7 +4,7 @@
4
  <Fanplayr_Socialcoupons>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
- <version>1.0.76</version>
8
  </Fanplayr_Socialcoupons>
9
  </modules>
10
  </config>
4
  <Fanplayr_Socialcoupons>
5
  <active>true</active>
6
  <codePool>community</codePool>
7
+ <version>1.0.77</version>
8
  </Fanplayr_Socialcoupons>
9
  </modules>
10
  </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fanplayr</name>
4
- <version>1.0.76</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.fanplayr.com/Fanplayr_terms_and_conditions.pdf">Fanplayr License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Fanplayr Conversions enables Magento merchants to harness an automated solution to track, analyze and intelligently target your visitors &amp; convert them to loyal customers.</summary>
10
  <description>Fanplayr Conversion enables Magento merchants to harness an automated solution to track, analyze and intelligently target your visitors &amp; convert them to loyal customers.</description>
11
- <notes>Disable of user identity tracking for Europe</notes>
12
  <authors><author><name>Tarwin Stroh-Spijer</name><user>fanplayr</user><email>tarwin@fanplayr.com</email></author></authors>
13
- <date>2016-09-30</date>
14
- <time>22:53:47</time>
15
- <contents><target name="mageskin"><dir name="frontend"><dir name="socialcoupons"><file name="fanplayr_join.html" hash="72f2ba80caf3b3f790a3eed928c79626"/><file name="fanplayr_socialcoupons.css" hash="35999bbf31ea537f170da6324dd64450"/><file name="fanplayr_socialcoupons.js" hash="5778a902e858046aa254439b176ef415"/><file name="fanplayr_socialcoupons.min.css" hash="c6d326ff4161a090b77a0b00e2f7d81d"/><dir><dir name="images"><file name="accept.png" hash="8bfed48756f192ed7afe6eaa4799aae4"/><file name="activity.gif" hash="fc4ac1c258ac6d13be5afe5ecc5f10e6"/><file name="disable.png" hash="bb2fc85482c3e9c9a9ab4bc3e8e4ebe6"/><file name="fanplayr_logo.png" hash="3d8827fedc2ff79d3041a64265a2f7e0"/><file name="genius_16.png" hash="895bf92ff7689c8116bf1a6f7583c3ab"/><file name="pencil.png" hash="a34e71ab08a6d1162b948d26321dea50"/><file name="progress-loader.gif" hash="5243dea18965998ada5477a2117e2ead"/><file name="sales_16.png" hash="e7b77f97a81b4339c9c6b94e1077a675"/><file name="star_gold.png" hash="73541d75f70cbda977a8b04bf87ddc39"/><file name="warning.png" hash="c847e1076da70df83ef5284622b82a74"/><file name=".picasa.ini" hash="98908647c7af9a7c540c9d711b911d0c"/></dir></dir><file name="jquery-1.7.2.min.js" hash="8d1a6f9c08b59506c56b18e2b2695fc8"/></dir></dir></target><target name="magecommunity"><dir name="Fanplayr"><dir><dir name="Socialcoupons"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Installhelper.php" hash="78a42853fa0d97ab8ff32b29517867dd"/></dir></dir></dir></dir></dir></dir><dir name="Model"><file name="CartObserver.php" hash="2806ffebb289748fdbf7938180fd79ee"/><file name="EmbedObserver.php" hash="c547c8b168c6ae303637633b90bf8cfb"/><file name="OrderObserver.php" hash="cec8edcd9849fedda551cc160422a015"/></dir><dir name="controllers"><file name="AjaxController.php" hash="268fdad89fe546c27164ea15bc8d4bd2"/><file name="CompyController.php" hash="bf780c8293b6024927241c36ea7bf174"/><file name="CouponController.php" hash="63e9e74e25f929207bb57a2c05058df3"/><file name="IndexController.php" hash="8b18f83d9592433bfd4f196cf574fec3"/></dir><dir name="etc"><file name="config.xml" hash="df1c1ebc423b6e0dc0c71b6ba87e80b4"/><file name="system.xml" hash="a32e53b5dd521ca60be8b61bc49c886b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fanplayr_Socialcoupons.xml" hash="c6346df2935e4ae2ff33a2841b128ab9"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="fanplayr"><file name="embed.phtml" hash="ea84d10dcf6e173bf05d9cd989d787f3"/><file name="success.phtml" hash="1f7f7fadf2d2c051adc60bee21027d9a"/><file name="embed_ajax.phtml" hash="1248d9f1e3b294d4e43faf85b896a9ad"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="fanplayr"><file name="embed.phtml" hash="ea84d10dcf6e173bf05d9cd989d787f3"/><file name="success.phtml" hash="1f7f7fadf2d2c051adc60bee21027d9a"/><file name="embed_ajax.phtml" hash="1248d9f1e3b294d4e43faf85b896a9ad"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fanplayr</name>
4
+ <version>1.0.77</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.fanplayr.com/Fanplayr_terms_and_conditions.pdf">Fanplayr License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Fanplayr Conversions enables Magento merchants to harness an automated solution to track, analyze and intelligently target your visitors &amp; convert them to loyal customers.</summary>
10
  <description>Fanplayr Conversion enables Magento merchants to harness an automated solution to track, analyze and intelligently target your visitors &amp; convert them to loyal customers.</description>
11
+ <notes>Can add UTM tracking to cart URL after successful coupon application through Fanplayr.</notes>
12
  <authors><author><name>Tarwin Stroh-Spijer</name><user>fanplayr</user><email>tarwin@fanplayr.com</email></author></authors>
13
+ <date>2016-10-14</date>
14
+ <time>20:55:28</time>
15
+ <contents><target name="mageskin"><dir name="frontend"><dir name="socialcoupons"><file name="fanplayr_join.html" hash="72f2ba80caf3b3f790a3eed928c79626"/><file name="fanplayr_socialcoupons.css" hash="35999bbf31ea537f170da6324dd64450"/><file name="fanplayr_socialcoupons.js" hash="b431314dc54750a30c495cc13e131633"/><file name="fanplayr_socialcoupons.min.css" hash="c6d326ff4161a090b77a0b00e2f7d81d"/><dir><dir name="images"><file name="accept.png" hash="8bfed48756f192ed7afe6eaa4799aae4"/><file name="activity.gif" hash="fc4ac1c258ac6d13be5afe5ecc5f10e6"/><file name="disable.png" hash="bb2fc85482c3e9c9a9ab4bc3e8e4ebe6"/><file name="fanplayr_logo.png" hash="3d8827fedc2ff79d3041a64265a2f7e0"/><file name="genius_16.png" hash="895bf92ff7689c8116bf1a6f7583c3ab"/><file name="pencil.png" hash="a34e71ab08a6d1162b948d26321dea50"/><file name="progress-loader.gif" hash="5243dea18965998ada5477a2117e2ead"/><file name="sales_16.png" hash="e7b77f97a81b4339c9c6b94e1077a675"/><file name="star_gold.png" hash="73541d75f70cbda977a8b04bf87ddc39"/><file name="warning.png" hash="c847e1076da70df83ef5284622b82a74"/><file name=".picasa.ini" hash="98908647c7af9a7c540c9d711b911d0c"/></dir></dir><file name="jquery-1.7.2.min.js" hash="8d1a6f9c08b59506c56b18e2b2695fc8"/></dir></dir></target><target name="magecommunity"><dir name="Fanplayr"><dir><dir name="Socialcoupons"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Installhelper.php" hash="22e561184165af4bb8c55c170c69deaf"/></dir></dir></dir></dir></dir></dir><dir name="Model"><file name="CartObserver.php" hash="2806ffebb289748fdbf7938180fd79ee"/><file name="EmbedObserver.php" hash="c547c8b168c6ae303637633b90bf8cfb"/><file name="OrderObserver.php" hash="cec8edcd9849fedda551cc160422a015"/></dir><dir name="controllers"><file name="AjaxController.php" hash="268fdad89fe546c27164ea15bc8d4bd2"/><file name="CompyController.php" hash="7bae6b9eb8af02d38a3737b2ef335713"/><file name="CouponController.php" hash="809024ea1c6e289d2e2d2b356ca3cffd"/><file name="IndexController.php" hash="8b18f83d9592433bfd4f196cf574fec3"/></dir><dir name="etc"><file name="config.xml" hash="df1c1ebc423b6e0dc0c71b6ba87e80b4"/><file name="system.xml" hash="a32e53b5dd521ca60be8b61bc49c886b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fanplayr_Socialcoupons.xml" hash="3cabea19fef735a3e95ed9424ed5362f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="fanplayr"><file name="embed.phtml" hash="ea84d10dcf6e173bf05d9cd989d787f3"/><file name="success.phtml" hash="1f7f7fadf2d2c051adc60bee21027d9a"/><file name="embed_ajax.phtml" hash="1248d9f1e3b294d4e43faf85b896a9ad"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="fanplayr"><file name="embed.phtml" hash="ea84d10dcf6e173bf05d9cd989d787f3"/><file name="success.phtml" hash="1f7f7fadf2d2c051adc60bee21027d9a"/><file name="embed_ajax.phtml" hash="1248d9f1e3b294d4e43faf85b896a9ad"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
skin/frontend/socialcoupons/fanplayr_socialcoupons.js CHANGED
@@ -318,6 +318,7 @@ if (typeof Array.prototype.map !== "function") {
318
  gtmcontainerid: $('#fanplayrsocialcoupons-console-gtmcontainerid').val(),
319
  usetbuy: $('#fanplayrsocialcoupons-console-usetbuy').val(),
320
  disableuseridentitytracking: $('#fanplayrsocialcoupons-disableuseridentitytracking').val(),
 
321
  })
322
  .success(function(result) {
323
  Fanplayr.isWorking = false;
318
  gtmcontainerid: $('#fanplayrsocialcoupons-console-gtmcontainerid').val(),
319
  usetbuy: $('#fanplayrsocialcoupons-console-usetbuy').val(),
320
  disableuseridentitytracking: $('#fanplayrsocialcoupons-disableuseridentitytracking').val(),
321
+ couponapplyutm: $('#fanplayrsocialcoupons-couponapplyutm').val()
322
  })
323
  .success(function(result) {
324
  Fanplayr.isWorking = false;