Apptrian_Facebook_Pixel - Version 1.1.1

Version Notes

+ Compatibility with onepagecheckout extension
* Fixed extension tarball (.tgz) file name

Download this release

Release Info

Developer Apptrian
Extension Apptrian_Facebook_Pixel
Version 1.1.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.1.1

app/code/community/Apptrian/FacebookPixel/Block/Adminhtml/About.php CHANGED
@@ -3,7 +3,7 @@
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Block_Adminhtml_About
@@ -21,7 +21,7 @@ class Apptrian_FacebookPixel_Block_Adminhtml_About
21
$element = null;
22
$version = Mage::helper('apptrian_facebookpixel')
23
->getExtensionVersion();
24
- $logopath = 'http://www.apptrian.com/media/apptrian.gif';
25
$html = <<<HTML
26
<div style="background:url('$logopath') no-repeat scroll 15px 15px #e7efef;
27
border:1px solid #ccc; min-height:100px; margin:5px 0;
@@ -33,12 +33,12 @@ validation. Easy to install and use.
33
</p>
34
<p>
35
Website:
36
- <a href="http://www.apptrian.com" target="_blank">www.apptrian.com</a><br />
37
Like, share and follow us on
38
<a href="https://www.facebook.com/apptrian" target="_blank">Facebook</a>,
39
<a href="https://plus.google.com/+ApptrianCom" target="_blank">Google+</a>,
40
- <a href="http://www.pinterest.com/apptrian" target="_blank">Pinterest</a>, and
41
- <a href="http://twitter.com/apptrian" target="_blank">Twitter</a>.<br />
42
If you have any questions send email at
43
<a href="mailto:service@apptrian.com">service@apptrian.com</a>.
44
</p>
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Block_Adminhtml_About
21
$element = null;
22
$version = Mage::helper('apptrian_facebookpixel')
23
->getExtensionVersion();
24
+ $logopath = 'https://www.apptrian.com/media/apptrian.gif';
25
$html = <<<HTML
26
<div style="background:url('$logopath') no-repeat scroll 15px 15px #e7efef;
27
border:1px solid #ccc; min-height:100px; margin:5px 0;
33
</p>
34
<p>
35
Website:
36
+ <a href="https://www.apptrian.com" target="_blank">www.apptrian.com</a><br />
37
Like, share and follow us on
38
<a href="https://www.facebook.com/apptrian" target="_blank">Facebook</a>,
39
<a href="https://plus.google.com/+ApptrianCom" target="_blank">Google+</a>,
40
+ <a href="https://www.pinterest.com/apptrian" target="_blank">Pinterest</a>, and
41
+ <a href="https://twitter.com/apptrian" target="_blank">Twitter</a>.<br />
42
If you have any questions send email at
43
<a href="mailto:service@apptrian.com">service@apptrian.com</a>.
44
</p>
app/code/community/Apptrian/FacebookPixel/Block/Adminhtml/Info.php CHANGED
@@ -3,7 +3,7 @@
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Block_Adminhtml_Info
@@ -19,78 +19,78 @@ class Apptrian_FacebookPixel_Block_Adminhtml_Info
19
public function render(Varien_Data_Form_Element_Abstract $element)
20
{
21
$element = null;
22
- $logopath = 'http://www.apptrian.com/media/apptrian.gif';
23
$html = <<<HTML
24
<div style="background:url('$logopath') no-repeat scroll 15px 15px #e7efef;
25
border:1px solid #ccc; min-height:100px; margin:5px 0;
26
padding:15px 15px 15px 140px;">
27
<p>
28
<strong>Magento Online Stores &amp; Extensions</strong><br />
29
- <a href="http://www.apptrian.com" target="_blank">Apptrian</a> offers a wide
30
choice of products and services for your online business.
31
</p>
32
<p>
33
- Website: <a href="http://www.apptrian.com" target="_blank">www.apptrian.com</a>
34
<br />
35
Like, share and follow us on
36
<a href="https://www.facebook.com/apptrian" target="_blank">Facebook</a>,
37
<a href="https://plus.google.com/+ApptrianCom" target="_blank">Google+</a>,
38
- <a href="http://www.pinterest.com/apptrian" target="_blank">Pinterest</a>, and
39
- <a href="http://twitter.com/apptrian" target="_blank">Twitter</a>.<br />
40
If you have any questions send email at
41
<a href="mailto:service@apptrian.com">service@apptrian.com</a>.
42
</p>
43
</div>
44
<div>
45
<p><strong>Products and services you might be interested in:</strong></p>
46
- <a href="http://www.apptrian.com/facebook-pixel-for-magento"
47
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
48
- <img src="http://www.apptrian.com/media/facebook-pixel.jpg"
49
alt="Facebook Pixel" style="border:1px solid #ccc;" />
50
</a>
51
- <a href="http://www.apptrian.com/image-optimizer-for-magento"
52
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
53
- <img src="http://www.apptrian.com/media/image-optimizer.jpg"
54
alt="Image Optimizer" style="border:1px solid #ccc;" />
55
</a>
56
- <a href="http://www.apptrian.com/minify-html-css-js-for-magento"
57
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
58
- <img src="http://www.apptrian.com/media/minify-html-css-js.jpg"
59
alt="Minify HTML CSS JS" style="border:1px solid #ccc;" />
60
</a>
61
- <a href="http://www.apptrian.com/professional-magento-installation"
62
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
63
- <img src="http://www.apptrian.com/media/professional-magento-installation.jpg"
64
alt="Professional Magento Installation" style="border:1px solid #ccc;" />
65
</a>
66
- <a href="http://www.apptrian.com/quick-search-for-magento"
67
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
68
- <img src="http://www.apptrian.com/media/quick-search.jpg"
69
alt="Quick Search" style="border:1px solid #ccc;" />
70
</a>
71
- <a href="http://www.apptrian.com/responsive-product-slider-for-magento"
72
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
73
- <img src="http://www.apptrian.com/media/responsive-product-slider.jpg"
74
alt="Responsive Product Slider" style="border:1px solid #ccc;" />
75
</a>
76
- <a href="http://www.apptrian.com/schema-org-microdata-for-magento"
77
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
78
- <img src="http://www.apptrian.com/media/schema-org-microdata-for-magento.jpg"
79
alt="Schema.org Microdata for Magento" style="border:1px solid #ccc;" />
80
</a>
81
- <a href="http://www.apptrian.com/snippets-generator-for-magento"
82
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
83
- <img src="http://www.apptrian.com/media/snippets-generator.jpg"
84
alt="Snippets Generator" style="border:1px solid #ccc;" />
85
</a>
86
- <a href="http://www.apptrian.com/social-integrator-for-magento"
87
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
88
- <img src="http://www.apptrian.com/media/social-integrator.jpg"
89
alt="Social Integrator" style="border:1px solid #ccc;" />
90
</a>
91
- <a href="http://www.apptrian.com/subcategories-grid-list-for-magento"
92
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
93
- <img src="http://www.apptrian.com/media/subcategories-grid-list.jpg"
94
alt="Subcategories Grid/List" style="border:1px solid #ccc;" />
95
</a>
96
</div>
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Block_Adminhtml_Info
19
public function render(Varien_Data_Form_Element_Abstract $element)
20
{
21
$element = null;
22
+ $logopath = 'https://www.apptrian.com/media/apptrian.gif';
23
$html = <<<HTML
24
<div style="background:url('$logopath') no-repeat scroll 15px 15px #e7efef;
25
border:1px solid #ccc; min-height:100px; margin:5px 0;
26
padding:15px 15px 15px 140px;">
27
<p>
28
<strong>Magento Online Stores &amp; Extensions</strong><br />
29
+ <a href="https://www.apptrian.com" target="_blank">Apptrian</a> offers a wide
30
choice of products and services for your online business.
31
</p>
32
<p>
33
+ Website: <a href="https://www.apptrian.com" target="_blank">www.apptrian.com</a>
34
<br />
35
Like, share and follow us on
36
<a href="https://www.facebook.com/apptrian" target="_blank">Facebook</a>,
37
<a href="https://plus.google.com/+ApptrianCom" target="_blank">Google+</a>,
38
+ <a href="https://www.pinterest.com/apptrian" target="_blank">Pinterest</a>, and
39
+ <a href="https://twitter.com/apptrian" target="_blank">Twitter</a>.<br />
40
If you have any questions send email at
41
<a href="mailto:service@apptrian.com">service@apptrian.com</a>.
42
</p>
43
</div>
44
<div>
45
<p><strong>Products and services you might be interested in:</strong></p>
46
+ <a href="https://www.apptrian.com/facebook-pixel-for-magento"
47
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
48
+ <img src="https://www.apptrian.com/media/facebook-pixel.jpg"
49
alt="Facebook Pixel" style="border:1px solid #ccc;" />
50
</a>
51
+ <a href="https://www.apptrian.com/image-optimizer-for-magento"
52
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
53
+ <img src="https://www.apptrian.com/media/image-optimizer.jpg"
54
alt="Image Optimizer" style="border:1px solid #ccc;" />
55
</a>
56
+ <a href="https://www.apptrian.com/minify-html-css-js-for-magento"
57
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
58
+ <img src="https://www.apptrian.com/media/minify-html-css-js.jpg"
59
alt="Minify HTML CSS JS" style="border:1px solid #ccc;" />
60
</a>
61
+ <a href="https://www.apptrian.com/professional-magento-installation"
62
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
63
+ <img src="https://www.apptrian.com/media/professional-magento-installation.jpg"
64
alt="Professional Magento Installation" style="border:1px solid #ccc;" />
65
</a>
66
+ <a href="https://www.apptrian.com/quick-search-for-magento"
67
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
68
+ <img src="https://www.apptrian.com/media/quick-search.jpg"
69
alt="Quick Search" style="border:1px solid #ccc;" />
70
</a>
71
+ <a href="https://www.apptrian.com/responsive-product-slider-for-magento"
72
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
73
+ <img src="https://www.apptrian.com/media/responsive-product-slider.jpg"
74
alt="Responsive Product Slider" style="border:1px solid #ccc;" />
75
</a>
76
+ <a href="https://www.apptrian.com/schema-org-microdata-for-magento"
77
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
78
+ <img src="https://www.apptrian.com/media/schema-org-microdata-for-magento.jpg"
79
alt="Schema.org Microdata for Magento" style="border:1px solid #ccc;" />
80
</a>
81
+ <a href="https://www.apptrian.com/snippets-generator-for-magento"
82
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
83
+ <img src="https://www.apptrian.com/media/snippets-generator.jpg"
84
alt="Snippets Generator" style="border:1px solid #ccc;" />
85
</a>
86
+ <a href="https://www.apptrian.com/social-integrator-for-magento"
87
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
88
+ <img src="https://www.apptrian.com/media/social-integrator.jpg"
89
alt="Social Integrator" style="border:1px solid #ccc;" />
90
</a>
91
+ <a href="https://www.apptrian.com/subcategories-grid-list-for-magento"
92
target="_blank" style="margin: 0 15px 15px 0; display: inline-block;">
93
+ <img src="https://www.apptrian.com/media/subcategories-grid-list.jpg"
94
alt="Subcategories Grid/List" style="border:1px solid #ccc;" />
95
</a>
96
</div>
app/code/community/Apptrian/FacebookPixel/Block/Code.php CHANGED
@@ -3,15 +3,14 @@
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
10
{
11
-
12
/**
13
* Used in code.phtml and returns needed data.
14
- *
15
* @return array
16
*/
17
public function getFacebookPixelData()
@@ -30,7 +29,7 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
30
31
/**
32
* Returns product data needed for dynamic ads tracking.
33
- *
34
* @return array
35
*/
36
public function getProductData()
@@ -43,17 +42,19 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
43
$data['content_ids'] = $this->escapeSingleQuotes($p->getSku());
44
$data['content_type'] = 'product';
45
$data['value'] = number_format(
46
- $this->getCalculatedPrice(), 2, '.', ''
47
);
48
$data['currency'] = $this->getCurrencyCode();
49
50
return $data;
51
-
52
}
53
54
/**
55
* Returns data needed for purchase tracking.
56
- *
57
* @return array|null
58
*/
59
public function getOrderData()
@@ -87,7 +88,10 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
87
$data['content_ids'] = trim($ids, ", ");
88
$data['content_type'] = 'product';
89
$data['value'] = number_format(
90
- $order->getGrandTotal(), 2, '.', ''
91
);
92
$data['currency'] = $order->getOrderCurrencyCode();
93
@@ -95,7 +99,6 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
95
} else {
96
return null;
97
}
98
-
99
}
100
101
/**
@@ -153,12 +156,11 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
153
}
154
155
return $calculatedPrice;
156
-
157
}
158
159
/**
160
* Returns 3 letter currency code like USD, GBP, EUR, etc.
161
- *
162
* @return string
163
*/
164
public function getCurrencyCode()
@@ -168,7 +170,7 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
168
169
/**
170
* Add slashes to string and prepares string for javascript.
171
- *
172
* @param string $str
173
* @return string
174
*/
@@ -176,5 +178,4 @@ class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
176
{
177
return str_replace("'", "\'", $str);
178
}
179
-
180
}
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Block_Code extends Mage_Core_Block_Template
10
{
11
/**
12
* Used in code.phtml and returns needed data.
13
+ *
14
* @return array
15
*/
16
public function getFacebookPixelData()
29
30
/**
31
* Returns product data needed for dynamic ads tracking.
32
+ *
33
* @return array
34
*/
35
public function getProductData()
42
$data['content_ids'] = $this->escapeSingleQuotes($p->getSku());
43
$data['content_type'] = 'product';
44
$data['value'] = number_format(
45
+ $this->getCalculatedPrice(),
46
+ 2,
47
+ '.',
48
+ ''
49
);
50
$data['currency'] = $this->getCurrencyCode();
51
52
return $data;
53
}
54
55
/**
56
* Returns data needed for purchase tracking.
57
+ *
58
* @return array|null
59
*/
60
public function getOrderData()
88
$data['content_ids'] = trim($ids, ", ");
89
$data['content_type'] = 'product';
90
$data['value'] = number_format(
91
+ $order->getGrandTotal(),
92
+ 2,
93
+ '.',
94
+ ''
95
);
96
$data['currency'] = $order->getOrderCurrencyCode();
97
99
} else {
100
return null;
101
}
102
}
103
104
/**
156
}
157
158
return $calculatedPrice;
159
}
160
161
/**
162
* Returns 3 letter currency code like USD, GBP, EUR, etc.
163
+ *
164
* @return string
165
*/
166
public function getCurrencyCode()
170
171
/**
172
* Add slashes to string and prepares string for javascript.
173
+ *
174
* @param string $str
175
* @return string
176
*/
178
{
179
return str_replace("'", "\'", $str);
180
}
181
}
app/code/community/Apptrian/FacebookPixel/Helper/Data.php CHANGED
@@ -3,12 +3,11 @@
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Helper_Data extends Mage_Core_Helper_Abstract
10
{
11
-
12
/**
13
* Returns extension version.
14
*
@@ -19,5 +18,4 @@ class Apptrian_FacebookPixel_Helper_Data extends Mage_Core_Helper_Abstract
19
return (string) Mage::getConfig()->getNode()
20
->modules->Apptrian_FacebookPixel->version;
21
}
22
-
23
}
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
class Apptrian_FacebookPixel_Helper_Data extends Mage_Core_Helper_Abstract
10
{
11
/**
12
* Returns extension version.
13
*
18
return (string) Mage::getConfig()->getNode()
19
->modules->Apptrian_FacebookPixel->version;
20
}
21
}
app/code/community/Apptrian/FacebookPixel/Model/Config/Pixelid.php CHANGED
@@ -3,16 +3,14 @@
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
- class Apptrian_FacebookPixel_Model_Config_Pixelid
10
extends Mage_Core_Model_Config_Data
11
{
12
-
13
public function _beforeSave()
14
{
15
-
16
$result = $this->validate();
17
18
if ($result !== true) {
@@ -20,17 +18,17 @@ class Apptrian_FacebookPixel_Model_Config_Pixelid
20
}
21
22
return parent::_beforeSave();
23
-
24
}
25
26
public function validate()
27
{
28
-
29
$errors = array();
30
$helper = Mage::helper('apptrian_facebookpixel');
31
$value = $this->getValue();
32
$validator = Zend_Validate::is(
33
- $value, 'Regex', array('pattern' => '/^[0-9]+#x2F;')
34
);
35
36
if (!$validator) {
@@ -42,7 +40,5 @@ class Apptrian_FacebookPixel_Model_Config_Pixelid
42
}
43
44
return $errors;
45
-
46
}
47
-
48
}
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
+ class Apptrian_FacebookPixel_Model_Config_Pixelid
10
extends Mage_Core_Model_Config_Data
11
{
12
public function _beforeSave()
13
{
14
$result = $this->validate();
15
16
if ($result !== true) {
18
}
19
20
return parent::_beforeSave();
21
}
22
23
public function validate()
24
{
25
$errors = array();
26
$helper = Mage::helper('apptrian_facebookpixel');
27
$value = $this->getValue();
28
$validator = Zend_Validate::is(
29
+ $value,
30
+ 'Regex',
31
+ array('pattern' => '/^[0-9]+#x2F;')
32
);
33
34
if (!$validator) {
40
}
41
42
return $errors;
43
}
44
}
app/code/community/Apptrian/FacebookPixel/etc/config.xml CHANGED
@@ -4,14 +4,14 @@
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
11
<config>
12
<modules>
13
<Apptrian_FacebookPixel>
14
- <version>1.1.0</version>
15
</Apptrian_FacebookPixel>
16
</modules>
17
<global>
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
11
<config>
12
<modules>
13
<Apptrian_FacebookPixel>
14
+ <version>1.1.1</version>
15
</Apptrian_FacebookPixel>
16
</modules>
17
<global>
app/code/community/Apptrian/FacebookPixel/etc/system.xml CHANGED
@@ -4,7 +4,7 @@
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
app/design/frontend/base/default/layout/apptrian_facebookpixel.xml CHANGED
@@ -4,7 +4,7 @@
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
@@ -90,6 +90,15 @@
90
</block>
91
</reference>
92
</checkout_onepage_index>
93
<onestepcheckout_index_index>
94
<reference name="before_body_end">
95
<block type="apptrian_facebookpixel/code" name="apptrian.facebookpixel.checkout" after="-">
@@ -117,6 +126,15 @@
117
</block>
118
</reference>
119
</checkout_onepage_success>
120
<wishlist_index_index>
121
<reference name="before_body_end">
122
<block type="apptrian_facebookpixel/code" name="apptrian.facebookpixel.wishlist" after="-">
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
90
</block>
91
</reference>
92
</checkout_onepage_index>
93
+ <onepagecheckout_index_index>
94
+ <reference name="before_body_end">
95
+ <block type="apptrian_facebookpixel/code" name="apptrian.facebookpixel.checkout" after="-">
96
+ <action method="setTemplate" ifconfig="apptrian_facebookpixel/general/enabled">
97
+ <template>apptrian/facebookpixel/code.phtml</template>
98
+ </action>
99
+ </block>
100
+ </reference>
101
+ </onepagecheckout_index_index>
102
<onestepcheckout_index_index>
103
<reference name="before_body_end">
104
<block type="apptrian_facebookpixel/code" name="apptrian.facebookpixel.checkout" after="-">
126
</block>
127
</reference>
128
</checkout_onepage_success>
129
+ <onepagecheckout_index_success>
130
+ <reference name="before_body_end">
131
+ <block type="apptrian_facebookpixel/code" name="apptrian.facebookpixel.purchase" after="-">
132
+ <action method="setTemplate" ifconfig="apptrian_facebookpixel/general/enabled">
133
+ <template>apptrian/facebookpixel/code.phtml</template>
134
+ </action>
135
+ </block>
136
+ </reference>
137
+ </onepagecheckout_index_success>
138
<wishlist_index_index>
139
<reference name="before_body_end">
140
<block type="apptrian_facebookpixel/code" name="apptrian.facebookpixel.wishlist" after="-">
app/design/frontend/base/default/template/apptrian/facebookpixel/code.phtml CHANGED
@@ -3,7 +3,7 @@
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
?>
@@ -35,7 +35,7 @@ fbq('track', 'ViewContent');
35
<?php elseif ($action == 'cms_page_view'): ?>
36
fbq('track', 'ViewContent');
37
<?php elseif ($action == 'catalog_category_view'
38
- || $action == 'catalog_category_default'
39
|| $action == 'catalog_category_layered'): ?>
40
fbq('track', 'ViewContent');
41
<?php elseif ($action == 'catalog_product_view'): ?>
@@ -68,16 +68,18 @@ if (typeof jQuery != 'undefined') {
68
}
69
<?php endif; ?>
70
71
- <?php elseif ($action == 'catalogsearch_result_index'
72
|| $action == 'catalogsearch_advanced_result'): ?>
73
fbq('track', 'Search');
74
<?php elseif ($action == 'customer_account_create'): ?>
75
fbq('track', 'CompleteRegistration');
76
- <?php elseif ($action == 'checkout_onepage_index'
77
|| $action == 'onestepcheckout_index_index'
78
|| $action == 'opc_index_index'): ?>
79
fbq('track', 'InitiateCheckout');
80
- <?php elseif ($action == 'checkout_onepage_success'): ?>
81
82
<?php
83
$orderData = $this->getOrderData();
3
* @category Apptrian
4
* @package Apptrian_FacebookPixel
5
* @author Apptrian
6
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
7
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
8
*/
9
?>
35
<?php elseif ($action == 'cms_page_view'): ?>
36
fbq('track', 'ViewContent');
37
<?php elseif ($action == 'catalog_category_view'
38
+ || $action == 'catalog_category_default'
39
|| $action == 'catalog_category_layered'): ?>
40
fbq('track', 'ViewContent');
41
<?php elseif ($action == 'catalog_product_view'): ?>
68
}
69
<?php endif; ?>
70
71
+ <?php elseif ($action == 'catalogsearch_result_index'
72
|| $action == 'catalogsearch_advanced_result'): ?>
73
fbq('track', 'Search');
74
<?php elseif ($action == 'customer_account_create'): ?>
75
fbq('track', 'CompleteRegistration');
76
+ <?php elseif ($action == 'checkout_onepage_index'
77
+ || $action == 'onepagecheckout_index_index'
78
|| $action == 'onestepcheckout_index_index'
79
|| $action == 'opc_index_index'): ?>
80
fbq('track', 'InitiateCheckout');
81
+ <?php elseif ($action == 'checkout_onepage_success'
82
+ || $action == 'onepagecheckout_index_success'): ?>
83
84
<?php
85
$orderData = $this->getOrderData();
app/etc/modules/Apptrian_FacebookPixel.xml CHANGED
@@ -4,7 +4,7 @@
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
- * @copyright Copyright (c) 2016 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
4
* @category Apptrian
5
* @package Apptrian_FacebookPixel
6
* @author Apptrian
7
+ * @copyright Copyright (c) 2017 Apptrian (http://www.apptrian.com)
8
* @license http://opensource.org/licenses/osl-3.0.php Open Software License
9
*/
10
-->
package.xml CHANGED
@@ -1,19 +1,19 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Apptrian_Facebook_Pixel</name>
4
- <version>1.1.0</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Adds Facebook Pixel with Dynamic Ads code. Passes W3C validation. Easy to install and use.</summary>
10
<description>Apptrian Facebook Pixel Extension for Magento adds Facebook Pixel with Dynamic Ads code on CMS pages (including home page), category pages, product pages, catalog search pages, catalog advanced search pages, customer registration page, checkout page (default Magento one but also IWD One Page Checkout and IDEV OneStepCheckout - others can be easily supported), checkout success page, and wishlist page. Optionally Facebook Pixel block can be added to any other Magento page or any other extension page (blogs, form pages, etc.) via xml layout updates.</description>
11
- <notes>+ Facebook Dynamic Ads code&#xD;
12
- + Compliance with Magento's Extension Quality Program (EQP)</notes>
13
<authors><author><name>Apptrian</name><user>apptrian</user><email>apptrian@yahoo.com</email></author></authors>
14
- <date>2016-11-23</date>
15
- <time>21:35:57</time>
16
- <contents><target name="magecommunity"><dir name="Apptrian"><dir name="FacebookPixel"><dir name="Block"><dir name="Adminhtml"><file name="About.php" hash="a4a2606d0c6c275eb61520cd019d3f57"/><file name="Info.php" hash="2657afb23a33a8f0ba69f95aaf609587"/></dir><file name="Code.php" hash="4c4b559998d234f80dbdb9f39f4cec18"/></dir><dir name="Helper"><file name="Data.php" hash="ce582ef825fb7071ad52da24ddd703f6"/></dir><dir name="Model"><dir name="Config"><file name="Pixelid.php" hash="3a7be57f685ecca7f832127d008277b4"/></dir></dir><dir name="etc"><file name="config.xml" hash="bd22a7c78974f38fff2df8048cd88e43"/><file name="system.xml" hash="23422fba35bb9730ee604228d99a1e1a"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="apptrian_facebookpixel.xml" hash="476c3c581a20d4da36f2623154ec1615"/></dir><dir name="template"><dir name="apptrian"><dir name="facebookpixel"><file name="code.phtml" hash="bf0077f3e69c19d2af37313eb8edfe63"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Apptrian_FacebookPixel.xml" hash="70949175d38bd066823f7b31b2a0a53e"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Apptrian_FacebookPixel.csv" hash="1918e6bffdadf5063923338d2fb30fcd"/></dir></target></contents>
17
<compatible/>
18
<dependencies><required><php><min>5.1.0</min><max>8.0.0</max></php></required></dependencies>
19
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Apptrian_Facebook_Pixel</name>
4
+ <version>1.1.1</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
<channel>community</channel>
8
<extends/>
9
<summary>Adds Facebook Pixel with Dynamic Ads code. Passes W3C validation. Easy to install and use.</summary>
10
<description>Apptrian Facebook Pixel Extension for Magento adds Facebook Pixel with Dynamic Ads code on CMS pages (including home page), category pages, product pages, catalog search pages, catalog advanced search pages, customer registration page, checkout page (default Magento one but also IWD One Page Checkout and IDEV OneStepCheckout - others can be easily supported), checkout success page, and wishlist page. Optionally Facebook Pixel block can be added to any other Magento page or any other extension page (blogs, form pages, etc.) via xml layout updates.</description>
11
+ <notes>+ Compatibility with onepagecheckout extension&#xD;
12
+ * Fixed extension tarball (.tgz) file name</notes>
13
<authors><author><name>Apptrian</name><user>apptrian</user><email>apptrian@yahoo.com</email></author></authors>
14
+ <date>2017-02-15</date>
15
+ <time>23:18:18</time>
16
+ <contents><target name="magecommunity"><dir name="Apptrian"><dir name="FacebookPixel"><dir name="Block"><dir name="Adminhtml"><file name="About.php" hash="b1c2ba2de693ce95c0d50e8661d8e1bb"/><file name="Info.php" hash="d548468a4815627fd406702c4cff6739"/></dir><file name="Code.php" hash="14d36afe79a3a4c2dc143ddf01a70096"/></dir><dir name="Helper"><file name="Data.php" hash="35a8019de9dbbfa869885e7dbd4dabdd"/></dir><dir name="Model"><dir name="Config"><file name="Pixelid.php" hash="341b39a8e118742349b27461a25e7c90"/></dir></dir><dir name="etc"><file name="config.xml" hash="b864efdb1a01523772baf98ef29693b3"/><file name="system.xml" hash="4aac99cd08de61d6f3ab5272abb83de3"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="apptrian_facebookpixel.xml" hash="9614f0d10260dcd38ebed2ef94be3aca"/></dir><dir name="template"><dir name="apptrian"><dir name="facebookpixel"><file name="code.phtml" hash="f84ba836cc3c36ca388faaf31d3ae48a"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Apptrian_FacebookPixel.xml" hash="2fc17ab7c627e7f506dd8078f59f078e"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Apptrian_FacebookPixel.csv" hash="1918e6bffdadf5063923338d2fb30fcd"/></dir></target></contents>
17
<compatible/>
18
<dependencies><required><php><min>5.1.0</min><max>8.0.0</max></php></required></dependencies>
19
</package>