Version Notes
Fix issue where field in newsletter subscribe observer can be undefined.
Added 'in_stock' flag to products data.
Download this release
Release Info
Developer | Alastair James |
Extension | Ometria_Magento_Extension |
Version | 1.1.8 |
Comparing to | |
See all releases |
Code changes from version 1.1.7 to 1.1.8
- app/code/community/Ometria/AbandonedCarts/etc/config.xml +1 -1
- app/code/community/Ometria/Api/etc/config.xml +1 -1
- app/code/community/Ometria/Core/Block/Head.php +29 -5
- app/code/community/Ometria/Core/Model/Observer/Newsletter.php +2 -0
- app/code/community/Ometria/Core/etc/config.xml +1 -1
- package.xml +7 -5
app/code/community/Ometria/AbandonedCarts/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ometria_AbandonedCarts>
|
5 |
-
<version>1.1.
|
6 |
</Ometria_AbandonedCarts>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ometria_AbandonedCarts>
|
5 |
+
<version>1.1.8</version>
|
6 |
</Ometria_AbandonedCarts>
|
7 |
</modules>
|
8 |
|
app/code/community/Ometria/Api/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ometria_Api>
|
5 |
-
<version>1.1.
|
6 |
</Ometria_Api>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ometria_Api>
|
5 |
+
<version>1.1.8</version>
|
6 |
</Ometria_Api>
|
7 |
</modules>
|
8 |
|
app/code/community/Ometria/Core/Block/Head.php
CHANGED
@@ -17,6 +17,7 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
|
|
17 |
const OM_PAGE_TYPE = 'type';
|
18 |
const OM_PAGE_DATA = 'data';
|
19 |
|
|
|
20 |
|
21 |
public function getDataLayer() {
|
22 |
$category = 'null';
|
@@ -45,7 +46,6 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
|
|
45 |
} elseif ($this->_isProduct()) {
|
46 |
$page[self::OM_PAGE_TYPE] = self::PAGE_TYPE_PRODUCT;
|
47 |
$page[self::OM_PAGE_DATA] = $this->_getProductPageData();
|
48 |
-
|
49 |
} elseif ($this->_isBasket()) {
|
50 |
$page[self::OM_PAGE_TYPE] = self::PAGE_TYPE_BASKET;
|
51 |
|
@@ -101,6 +101,29 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
|
|
101 |
return Mage::getSingleton('checkout/session');
|
102 |
}
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
protected function _getProductPageData(){
|
105 |
|
106 |
$product = Mage::registry("current_product");
|
@@ -127,10 +150,11 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
|
|
127 |
|
128 |
if($product instanceof Mage_Catalog_Model_Product) {
|
129 |
return array(
|
130 |
-
'id'
|
131 |
-
'sku'
|
132 |
-
'name'
|
133 |
-
'url'
|
|
|
134 |
);
|
135 |
}
|
136 |
|
17 |
const OM_PAGE_TYPE = 'type';
|
18 |
const OM_PAGE_DATA = 'data';
|
19 |
|
20 |
+
const PRODUCT_IN_STOCK = 'in_stock';
|
21 |
|
22 |
public function getDataLayer() {
|
23 |
$category = 'null';
|
46 |
} elseif ($this->_isProduct()) {
|
47 |
$page[self::OM_PAGE_TYPE] = self::PAGE_TYPE_PRODUCT;
|
48 |
$page[self::OM_PAGE_DATA] = $this->_getProductPageData();
|
|
|
49 |
} elseif ($this->_isBasket()) {
|
50 |
$page[self::OM_PAGE_TYPE] = self::PAGE_TYPE_BASKET;
|
51 |
|
101 |
return Mage::getSingleton('checkout/session');
|
102 |
}
|
103 |
|
104 |
+
protected function _getProductInStock($product)
|
105 |
+
{
|
106 |
+
/*$product = Mage::registry("current_product");
|
107 |
+
|
108 |
+
if (!$product && $id = $this->getProductId()) {
|
109 |
+
$product = Mage::getModel("catalog/product")->load($id);
|
110 |
+
}*/
|
111 |
+
|
112 |
+
$stock = false;
|
113 |
+
if ($product) {
|
114 |
+
$api = Mage::getModel('cataloginventory/stock_item_api');
|
115 |
+
$stock_objects = $api->items(array($product->getId()));
|
116 |
+
$stock = array_shift($stock_objects);
|
117 |
+
}
|
118 |
+
|
119 |
+
if($stock && array_key_exists('is_in_stock', $stock))
|
120 |
+
{
|
121 |
+
return (boolean) $stock['is_in_stock'];
|
122 |
+
}
|
123 |
+
|
124 |
+
return null;
|
125 |
+
}
|
126 |
+
|
127 |
protected function _getProductPageData(){
|
128 |
|
129 |
$product = Mage::registry("current_product");
|
150 |
|
151 |
if($product instanceof Mage_Catalog_Model_Product) {
|
152 |
return array(
|
153 |
+
'id' => $ometria_product_helper->getIdentifierForProduct($product),
|
154 |
+
'sku' => $product->getSku(),
|
155 |
+
'name' => $product->getName(),
|
156 |
+
'url' => $product->getProductUrl(),
|
157 |
+
self::PRODUCT_IN_STOCK => $this->_getProductInStock($product)
|
158 |
);
|
159 |
}
|
160 |
|
app/code/community/Ometria/Core/Model/Observer/Newsletter.php
CHANGED
@@ -16,6 +16,8 @@ class Ometria_Core_Model_Observer_Newsletter {
|
|
16 |
$status_change = true;
|
17 |
} elseif (isset($original_data['subscriber_status'])) {
|
18 |
$status_change = $data['subscriber_status'] != $original_data['subscriber_status'];
|
|
|
|
|
19 |
}
|
20 |
|
21 |
// Only if status has changed
|
16 |
$status_change = true;
|
17 |
} elseif (isset($original_data['subscriber_status'])) {
|
18 |
$status_change = $data['subscriber_status'] != $original_data['subscriber_status'];
|
19 |
+
} else {
|
20 |
+
$status_change = false;
|
21 |
}
|
22 |
|
23 |
// Only if status has changed
|
app/code/community/Ometria/Core/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ometria_Core>
|
5 |
-
<version>1.1.
|
6 |
</Ometria_Core>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Ometria_Core>
|
5 |
+
<version>1.1.8</version>
|
6 |
</Ometria_Core>
|
7 |
</modules>
|
8 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ometria_Magento_Extension</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Source License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -21,11 +21,13 @@ Enough Data already. Tell me what to do!
|
|
21 |
We don't just pull the right data together in one place, we also create insights. Our team of data scientists have created a set of algorithms to spot weaknesses, under-performance and opportunities, so every time a retailer logs into their dashboards we present a short list of top revenue wins.
|
22 |

|
23 |
Whether it's with our multi-dimension funnel analysis which flags up specific channels that may be under-performing, or our customer dashboard which spots channels that deliver customers with the best CLV, our 'actionable insights' come ready to go.</description>
|
24 |
-
<notes>
|
|
|
|
|
25 |
<authors><author><name>Alastair James</name><user>aljames1981</user><email>al.james@gmail.com</email></author></authors>
|
26 |
-
<date>2016-
|
27 |
-
<time>
|
28 |
-
<contents><target name="magecommunity"><dir name="Ometria"><dir name="AbandonedCarts"><dir name="Helper"><file name="Config.php" hash="4ea2f9de193a510a1438a1911f6e9a8d"/><file name="Data.php" hash="1348c35f00b49b2b30034f0d9a819ae8"/></dir><dir name="controllers"><file name="CartlinkController.php" hash="e46a511a87ca264a8df96829905545dc"/></dir><dir name="etc"><file name="config.xml" hash="
|
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>Ometria_Magento_Extension</name>
|
4 |
+
<version>1.1.8</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Source License (OSL)</license>
|
7 |
<channel>community</channel>
|
21 |
We don't just pull the right data together in one place, we also create insights. Our team of data scientists have created a set of algorithms to spot weaknesses, under-performance and opportunities, so every time a retailer logs into their dashboards we present a short list of top revenue wins.
|
22 |

|
23 |
Whether it's with our multi-dimension funnel analysis which flags up specific channels that may be under-performing, or our customer dashboard which spots channels that deliver customers with the best CLV, our 'actionable insights' come ready to go.</description>
|
24 |
+
<notes>Fix issue where field in newsletter subscribe observer can be undefined.
|
25 |
+

|
26 |
+
Added 'in_stock' flag to products data.</notes>
|
27 |
<authors><author><name>Alastair James</name><user>aljames1981</user><email>al.james@gmail.com</email></author></authors>
|
28 |
+
<date>2016-03-29</date>
|
29 |
+
<time>16:18:29</time>
|
30 |
+
<contents><target name="magecommunity"><dir name="Ometria"><dir name="AbandonedCarts"><dir name="Helper"><file name="Config.php" hash="4ea2f9de193a510a1438a1911f6e9a8d"/><file name="Data.php" hash="1348c35f00b49b2b30034f0d9a819ae8"/></dir><dir name="controllers"><file name="CartlinkController.php" hash="e46a511a87ca264a8df96829905545dc"/></dir><dir name="etc"><file name="config.xml" hash="403810deb0ef992ee1a54f59ced324d7"/><file name="system.xml" hash="11db59f5c2f864525e4c1cdd06283ac1"/></dir></dir><dir name="Api"><dir name="Helper"><file name="Data.php" hash="8a19a3bf39de93fab7d2e1333c3c0806"/></dir><dir name="Model"><file name="Api.php" hash="792413443cc6f22152904fb58873c27c"/><file name="Api2.php" hash="e34e5530d8e828fcdb2ce09f6abef01d"/><file name="FixedCouponGenerator.php" hash="b37f5df7471dca9437a7aed70b4c53c0"/></dir><dir name="etc"><file name="api.xml" hash="51d02f0154ac396ef90f4ff484253af3"/><file name="config.xml" hash="abbdda286690236aa12808c9e46c44e4"/></dir></dir><dir name="Core"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Startwizard.php" hash="48c0cc3736f8a7fbd871d92d1aed9a81"/></dir></dir><dir name="Wizard"><file name="Finished.php" hash="3325319ce22b23c3661a15b7ab6cbb83"/><dir name="Start"><file name="Form.php" hash="e5d6f86a9718da044104245b46230674"/></dir><file name="Start.php" hash="befc4575e361b7a9916f929e2fc58c45"/></dir></dir><file name="Head.php" hash="a0a38d13e149decca0dca8e0a0e2d3fe"/></dir><dir name="Helper"><file name="Config.php" hash="2d9a42f28c768aac826a590aaf571488"/><file name="Cookiechannel.php" hash="550d4bb7ca1c0516bb7071cf3cae8e94"/><file name="Data.php" hash="26c20107047db9e3911118efbf083135"/><file name="Ping.php" hash="d81761aa5908e3683918fac5d27742fe"/><file name="Product.php" hash="60e3b6bcb43884af7e4a4ed48c3e3411"/><file name="Session.php" hash="798245d7d20c523b3c386c8bf25979d2"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="Productmode.php" hash="3b37b999e8d49fc23af6229bcae86bb9"/></dir></dir><dir name="Observer"><file name="Cart.php" hash="531cfab8170a72ee6c30172dc81660f3"/><file name="Customer.php" hash="c801c52474228cc56857505d38fa9db7"/><file name="Newsletter.php" hash="b52e6df6fa30ed563c7197209d2e730a"/><file name="Order.php" hash="a93bd9b9dc73f1c48f70beee71aff7fc"/><file name="Product.php" hash="9bf6ec5b2be5103da7b1585db8cc9beb"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="Test"><dir name="Config"><file name="Base.php" hash="997583679f0981fbd2f0560cf40855d1"/></dir><dir name="Model"><dir name="Observer"><file name="Order.php" hash="d4655e7789a87b3fe8093355e862bfc4"/><file name="Product.php" hash="b9d3920d0d489c39245f747f15187085"/></dir></dir></dir><dir name="controllers"><file name="WizardController.php" hash="558e829a66e2ad9a7b7c1ad9d7d4a530"/></dir><dir name="etc"><file name="config.xml" hash="73f29e499dd0cc7137d2b569e28c3e7f"/><file name="system.xml" hash="f494e9ed2da1f2554196847753629cb4"/></dir><file name=".DS_Store" hash="d8b910e9c4677fce43c430c2bb123061"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="ometria"><file name="core.xml" hash="d8d696fec5b40262b9307a0bb89bcede"/></dir></dir><dir name="template"><dir name="ometria"><file name="head.phtml" hash="1ef17e826431c85e14532d7660b38ee8"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="ometria"><file name="core.xml" hash="4fd702d8159187002eebb40c9b3ebe1b"/></dir></dir><dir name="template"><dir name="ometria"><dir name="system"><dir name="config"><file name="start_wizard.phtml" hash="d4a4e6d6ab16048f1e436793cb24a668"/></dir></dir><dir name="wizard"><file name="finished.phtml" hash="e475e0a7fb28b2b054a1b26cae5fd9b8"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ometria_Core.xml" hash="f8ec0ef46b669bf0070d9064300fc0fd"/><file name="Ometria_Api.xml" hash="e9309a378992b51f710a9fca17a3055e"/><file name="Ometria_AbandonedCarts.xml" hash="a69a03804840e784362410c2596c0a08"/></dir></target><target name="mageweb"><dir name="js"><dir name="ometria"><file name="checkout.js" hash="78b5fed53276d65a42c5cad4bf92a35f"/></dir></dir></target></contents>
|
31 |
<compatible/>
|
32 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
33 |
</package>
|