Version Notes
Bugfix for category listing in Facebook Audience Pixel Tracking
Download this release
Release Info
| Developer | ShoppingFeeder |
| Extension | shoppingfeeder |
| Version | 1.4.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.4.2 to 1.4.3
- app/code/community/ShoppingFeeder/Fbtrack/Model/Observer.php +6 -11
- app/code/community/ShoppingFeeder/Service/Model/Observer.php +9 -9
- app/code/community/ShoppingFeeder/Service/controllers/VersionController.php +1 -1
- app/code/community/ShoppingFeeder/Service/etc/config.xml +1 -1
- app/design/frontend/base/default/template/shoppingfeeder/fbtrack.phtml +1 -1
- app/design/frontend/base/default/template/shoppingfeeder/fbtrack_standalone.phtml +1 -1
- package.xml +3 -3
app/code/community/ShoppingFeeder/Fbtrack/Model/Observer.php
CHANGED
|
@@ -48,7 +48,8 @@ class ShoppingFeeder_Fbtrack_Model_Observer extends Varien_Object
|
|
| 48 |
$product = Mage::registry('current_product');
|
| 49 |
if (is_null($product))
|
| 50 |
{
|
| 51 |
-
$
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
//if we still don't have a product, don't do anything
|
|
@@ -142,7 +143,7 @@ class ShoppingFeeder_Fbtrack_Model_Observer extends Varien_Object
|
|
| 142 |
{
|
| 143 |
$block->setData('action_type', 'AddToCart');
|
| 144 |
//reset the cart product
|
| 145 |
-
Mage::getModel('core/session')->
|
| 146 |
}
|
| 147 |
}
|
| 148 |
}
|
|
@@ -156,7 +157,7 @@ class ShoppingFeeder_Fbtrack_Model_Observer extends Varien_Object
|
|
| 156 |
{
|
| 157 |
$block->setData('order', $orderInfo);
|
| 158 |
$block->setData('action_type', 'Purchase');
|
| 159 |
-
Mage::getModel('core/session')->
|
| 160 |
}
|
| 161 |
}
|
| 162 |
}
|
|
@@ -173,15 +174,9 @@ class ShoppingFeeder_Fbtrack_Model_Observer extends Varien_Object
|
|
| 173 |
public function setAddToCartProduct($observer)
|
| 174 |
{
|
| 175 |
try{
|
| 176 |
-
|
| 177 |
-
//add the cart product to the session
|
| 178 |
-
$product = Mage::getModel('catalog/product')
|
| 179 |
-
->load(Mage::app()->getRequest()->getParam('product', 0));
|
| 180 |
-
|
| 181 |
-
Mage::getModel('core/session')->setProductToShoppingCartShoppingFeederFbtrack($product);
|
| 182 |
}
|
| 183 |
-
catch (Exception $e)
|
| 184 |
-
{
|
| 185 |
|
| 186 |
}
|
| 187 |
}
|
| 48 |
$product = Mage::registry('current_product');
|
| 49 |
if (is_null($product))
|
| 50 |
{
|
| 51 |
+
$productId = Mage::getSingleton('core/session')->getProductToShoppingCartShoppingFeederFbtrack();
|
| 52 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
| 53 |
}
|
| 54 |
|
| 55 |
//if we still don't have a product, don't do anything
|
| 143 |
{
|
| 144 |
$block->setData('action_type', 'AddToCart');
|
| 145 |
//reset the cart product
|
| 146 |
+
Mage::getModel('core/session')->unsProductToShoppingCartShoppingFeederFbtrack();
|
| 147 |
}
|
| 148 |
}
|
| 149 |
}
|
| 157 |
{
|
| 158 |
$block->setData('order', $orderInfo);
|
| 159 |
$block->setData('action_type', 'Purchase');
|
| 160 |
+
Mage::getModel('core/session')->unsOrderForJsTrackingShoppingFeederFbtrack();
|
| 161 |
}
|
| 162 |
}
|
| 163 |
}
|
| 174 |
public function setAddToCartProduct($observer)
|
| 175 |
{
|
| 176 |
try{
|
| 177 |
+
Mage::getModel('core/session')->setProductToShoppingCartShoppingFeederFbtrack(Mage::app()->getRequest()->getParam('product', 0));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
}
|
| 179 |
+
catch (Exception $e) {
|
|
|
|
| 180 |
|
| 181 |
}
|
| 182 |
}
|
app/code/community/ShoppingFeeder/Service/Model/Observer.php
CHANGED
|
@@ -29,7 +29,7 @@ class ShoppingFeeder_Service_Model_Observer extends Varien_Object
|
|
| 29 |
'items' => $orderItems,
|
| 30 |
'value' => $order->getGrandTotal()
|
| 31 |
);
|
| 32 |
-
Mage::
|
| 33 |
|
| 34 |
//only notify ShoppingFeeder if required
|
| 35 |
if ($sfEnabled && $sfTracking)
|
|
@@ -79,7 +79,8 @@ class ShoppingFeeder_Service_Model_Observer extends Varien_Object
|
|
| 79 |
$product = Mage::registry('current_product');
|
| 80 |
if (is_null($product))
|
| 81 |
{
|
| 82 |
-
$
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
//if we still don't have a product, don't do anything
|
|
@@ -173,7 +174,7 @@ class ShoppingFeeder_Service_Model_Observer extends Varien_Object
|
|
| 173 |
{
|
| 174 |
$block->setData('action_type', 'AddToCart');
|
| 175 |
//reset the cart product
|
| 176 |
-
Mage::
|
| 177 |
}
|
| 178 |
}
|
| 179 |
}
|
|
@@ -181,13 +182,12 @@ class ShoppingFeeder_Service_Model_Observer extends Varien_Object
|
|
| 181 |
|
| 182 |
elseif ($actionName == 'checkout_onepage_success' || $actionName == 'checkout_multishipping_success')
|
| 183 |
{
|
| 184 |
-
Mage::
|
| 185 |
-
$orderInfo = Mage::getModel('core/session')->getOrderForJsTracking();
|
| 186 |
if (!is_null($orderInfo) && $block)
|
| 187 |
{
|
| 188 |
$block->setData('order', $orderInfo);
|
| 189 |
$block->setData('action_type', 'Purchase');
|
| 190 |
-
Mage::
|
| 191 |
}
|
| 192 |
}
|
| 193 |
}
|
|
@@ -206,10 +206,10 @@ class ShoppingFeeder_Service_Model_Observer extends Varien_Object
|
|
| 206 |
try{
|
| 207 |
|
| 208 |
//add the cart product to the session
|
| 209 |
-
$product = Mage::getModel('catalog/product')
|
| 210 |
-
->load(Mage::app()->getRequest()->getParam('product', 0));
|
| 211 |
|
| 212 |
-
Mage::
|
| 213 |
}
|
| 214 |
catch (Exception $e)
|
| 215 |
{
|
| 29 |
'items' => $orderItems,
|
| 30 |
'value' => $order->getGrandTotal()
|
| 31 |
);
|
| 32 |
+
Mage::getSingleton('core/session')->setSfdrOrderForJsTracking($orderInfo);
|
| 33 |
|
| 34 |
//only notify ShoppingFeeder if required
|
| 35 |
if ($sfEnabled && $sfTracking)
|
| 79 |
$product = Mage::registry('current_product');
|
| 80 |
if (is_null($product))
|
| 81 |
{
|
| 82 |
+
$productId = Mage::getSingleton('core/session')->getSfdrProductToShoppingCart();
|
| 83 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
| 84 |
}
|
| 85 |
|
| 86 |
//if we still don't have a product, don't do anything
|
| 174 |
{
|
| 175 |
$block->setData('action_type', 'AddToCart');
|
| 176 |
//reset the cart product
|
| 177 |
+
Mage::getSingleton('core/session')->unsSfdrProductToShoppingCart();
|
| 178 |
}
|
| 179 |
}
|
| 180 |
}
|
| 182 |
|
| 183 |
elseif ($actionName == 'checkout_onepage_success' || $actionName == 'checkout_multishipping_success')
|
| 184 |
{
|
| 185 |
+
$orderInfo = Mage::getSingleton('core/session')->getSfdrOrderForJsTracking();
|
|
|
|
| 186 |
if (!is_null($orderInfo) && $block)
|
| 187 |
{
|
| 188 |
$block->setData('order', $orderInfo);
|
| 189 |
$block->setData('action_type', 'Purchase');
|
| 190 |
+
Mage::getSingleton('core/session')->unsSfdrOrderForJsTracking();
|
| 191 |
}
|
| 192 |
}
|
| 193 |
}
|
| 206 |
try{
|
| 207 |
|
| 208 |
//add the cart product to the session
|
| 209 |
+
// $product = Mage::getModel('catalog/product')
|
| 210 |
+
// ->load(Mage::app()->getRequest()->getParam('product', 0));
|
| 211 |
|
| 212 |
+
Mage::getSingleton('core/session')->setSfdrProductToShoppingCart(Mage::app()->getRequest()->getParam('product', 0));
|
| 213 |
}
|
| 214 |
catch (Exception $e)
|
| 215 |
{
|
app/code/community/ShoppingFeeder/Service/controllers/VersionController.php
CHANGED
|
@@ -5,7 +5,7 @@ require_once(Mage::getModuleDir('Controller','ShoppingFeeder_Service').DS.'Contr
|
|
| 5 |
|
| 6 |
class ShoppingFeeder_Service_VersionController extends Mage_Core_Controller_Front_Action
|
| 7 |
{
|
| 8 |
-
protected static $_version = '1.4.
|
| 9 |
|
| 10 |
public function indexAction()
|
| 11 |
{
|
| 5 |
|
| 6 |
class ShoppingFeeder_Service_VersionController extends Mage_Core_Controller_Front_Action
|
| 7 |
{
|
| 8 |
+
protected static $_version = '1.4.3';
|
| 9 |
|
| 10 |
public function indexAction()
|
| 11 |
{
|
app/code/community/ShoppingFeeder/Service/etc/config.xml
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
<config>
|
| 10 |
<modules>
|
| 11 |
<ShoppingFeeder_Service>
|
| 12 |
-
<version>1.4.
|
| 13 |
</ShoppingFeeder_Service>
|
| 14 |
</modules>
|
| 15 |
<global>
|
| 9 |
<config>
|
| 10 |
<modules>
|
| 11 |
<ShoppingFeeder_Service>
|
| 12 |
+
<version>1.4.3</version>
|
| 13 |
</ShoppingFeeder_Service>
|
| 14 |
</modules>
|
| 15 |
<global>
|
app/design/frontend/base/default/template/shoppingfeeder/fbtrack.phtml
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
// Insert Your Custom Audience Pixel ID below.
|
| 22 |
fbq('init', '<?php echo $this->getPixelId();?>');
|
| 23 |
|
| 24 |
-
<?php if ($this->getData('product') !== null):?>
|
| 25 |
fbq('track', '<?php echo addslashes($this->getData('action_type'));?>', {
|
| 26 |
content_name: '<?php echo addslashes($this->getData('product')->name);?>',
|
| 27 |
content_category: '<?php echo addslashes($this->getData('category'));?>',
|
| 21 |
// Insert Your Custom Audience Pixel ID below.
|
| 22 |
fbq('init', '<?php echo $this->getPixelId();?>');
|
| 23 |
|
| 24 |
+
<?php if ($this->getData('product') !== null && $this->getData('product')->getId() !== null):?>
|
| 25 |
fbq('track', '<?php echo addslashes($this->getData('action_type'));?>', {
|
| 26 |
content_name: '<?php echo addslashes($this->getData('product')->name);?>',
|
| 27 |
content_category: '<?php echo addslashes($this->getData('category'));?>',
|
app/design/frontend/base/default/template/shoppingfeeder/fbtrack_standalone.phtml
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
// Insert Your Custom Audience Pixel ID below.
|
| 22 |
fbq('init', '<?php echo $this->getPixelId();?>');
|
| 23 |
|
| 24 |
-
<?php if ($this->getData('product') !== null):?>
|
| 25 |
fbq('track', '<?php echo addslashes($this->getData('action_type'));?>', {
|
| 26 |
content_name: '<?php echo addslashes($this->getData('product')->name);?>',
|
| 27 |
content_category: '<?php echo addslashes($this->getData('category'));?>',
|
| 21 |
// Insert Your Custom Audience Pixel ID below.
|
| 22 |
fbq('init', '<?php echo $this->getPixelId();?>');
|
| 23 |
|
| 24 |
+
<?php if ($this->getData('product') !== null && $this->getData('product')->getId() !== null):?>
|
| 25 |
fbq('track', '<?php echo addslashes($this->getData('action_type'));?>', {
|
| 26 |
content_name: '<?php echo addslashes($this->getData('product')->name);?>',
|
| 27 |
content_category: '<?php echo addslashes($this->getData('category'));?>',
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>shoppingfeeder</name>
|
| 4 |
-
<version>1.4.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GNU General Public License (GPL)</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -19,8 +19,8 @@ To set up your ShoppingFeeder account and install this extension seamlessly, cre
|
|
| 19 |
<notes>Bugfix for category listing in Facebook Audience Pixel Tracking</notes>
|
| 20 |
<authors><author><name>ShoppingFeeder</name><user>shoppingfeeder</user><email>support@shoppingfeeder.com</email></author></authors>
|
| 21 |
<date>2015-10-22</date>
|
| 22 |
-
<time>
|
| 23 |
-
<contents><target name="mageetc"><dir name="modules"><file name="ShoppingFeeder_Service.xml" hash="90b374109c2d1281ddf527f24fa7d914"/></dir></target><target name="magecommunity"><dir name="ShoppingFeeder"><dir name="Fbtrack"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="2c0bb6d0c7f965c9583cfaae4890d053"/></dir><file name="Service.php" hash="56cd6921b7bda27e2ed66b80af1d927f"/><dir name="Tracking"><file name="Fb.php" hash="1926b36b1d6092b7566e2688559fa895"/></dir></dir><dir name="Helper"><file name="Data.php" hash="87df6b00fcfb2008697cf46d6d18cf75"/></dir><dir name="Model"><file name="Observer.php" hash="
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 26 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>shoppingfeeder</name>
|
| 4 |
+
<version>1.4.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GNU General Public License (GPL)</license>
|
| 7 |
<channel>community</channel>
|
| 19 |
<notes>Bugfix for category listing in Facebook Audience Pixel Tracking</notes>
|
| 20 |
<authors><author><name>ShoppingFeeder</name><user>shoppingfeeder</user><email>support@shoppingfeeder.com</email></author></authors>
|
| 21 |
<date>2015-10-22</date>
|
| 22 |
+
<time>20:38:11</time>
|
| 23 |
+
<contents><target name="mageetc"><dir name="modules"><file name="ShoppingFeeder_Service.xml" hash="90b374109c2d1281ddf527f24fa7d914"/></dir></target><target name="magecommunity"><dir name="ShoppingFeeder"><dir name="Fbtrack"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="2c0bb6d0c7f965c9583cfaae4890d053"/></dir><file name="Service.php" hash="56cd6921b7bda27e2ed66b80af1d927f"/><dir name="Tracking"><file name="Fb.php" hash="1926b36b1d6092b7566e2688559fa895"/></dir></dir><dir name="Helper"><file name="Data.php" hash="87df6b00fcfb2008697cf46d6d18cf75"/></dir><dir name="Model"><file name="Observer.php" hash="dc3282bb0795790a95abd781e9394ece"/></dir><dir name="etc"><file name="config.xml" hash="2cbb1a1b1f6f9ecc77bf0eb406941a17"/><file name="system.xml" hash="227c0ffc63ff10b814d42cd9a8f8bad4"/></dir></dir><dir name="Service"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="8feb1712d6aa6a6897be8f80ba5d3f0b"/></dir><file name="Service.php" hash="48874f0e80ce70686b81eb5380e9f498"/><dir name="Tracking"><file name="Fb.php" hash="060687f842c896df73feb233b68b069b"/></dir></dir><dir name="Controller"><file name="FrontAuth.php" hash="28ed32e1bf3250362911a26869f0e6d7"/></dir><dir name="Helper"><file name="Data.php" hash="17589bd08352e497806bef9884972300"/></dir><dir name="Model"><file name="Auth.php" hash="2cff17b0750ff70695b32524627b2aaf"/><file name="Observer.php" hash="eb7443554b58eeeb4687ebc2ee6db5ff"/><file name="Offers.php" hash="e387d6b513a9e6c1611f9ef74aa3782a"/><file name="Orders.php" hash="cc3c9f38ae41c11ab7dda0bcb8dd001f"/></dir><dir name="controllers"><file name="AttributesController.php" hash="e937c492f770bc8381a003a080cf878b"/><file name="FeedController.php" hash="92b70af3a048ece99d262480c51aa862"/><file name="OrdersController.php" hash="e0dcf407e15ca212b43ee0015c918675"/><file name="StoresController.php" hash="a29fa0e97299ce764fd66360cbf6632a"/><file name="TestController.php" hash="5138a844cb7cbc8e792df664057bdf9b"/><file name="VersionController.php" hash="7964346fb8fe633caff5915a1f3c1094"/></dir><dir name="data"><file name="cacert.pem" hash="380df856e8f789c1af97d0da9a243769"/></dir><dir name="etc"><file name="config.xml" hash="c6315bf64a8cc30bb3c523773399ebae"/><file name="system.xml" hash="e358d831424ccacdd393dfac49b8a994"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shoppingfeeder_service.xml" hash="4f3a5b5018c0328da4f9490d4c6042fd"/></dir><dir name="template"><dir name="shoppingfeeder"><file name="fbtrack.phtml" hash="9b07f8b42132ee2f675d67ab9e01f675"/><file name="fbtrack_standalone.phtml" hash="9b07f8b42132ee2f675d67ab9e01f675"/></dir></dir></dir></dir></dir></target></contents>
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 26 |
</package>
|
