Ometria_Magento_Extension - Version 1.1.10

Version Notes

Add more ways to work out if a product is in stock and saleable.

Download this release

Release Info

Developer Alastair James
Extension Ometria_Magento_Extension
Version 1.1.10
Comparing to
See all releases


Code changes from version 1.1.9 to 1.1.10

app/code/community/Ometria/AbandonedCarts/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ometria_AbandonedCarts>
5
- <version>1.1.9</version>
6
  </Ometria_AbandonedCarts>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Ometria_AbandonedCarts>
5
+ <version>1.1.10</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.9</version>
6
  </Ometria_Api>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Ometria_Api>
5
+ <version>1.1.10</version>
6
  </Ometria_Api>
7
  </modules>
8
 
app/code/community/Ometria/Core/Block/Head.php CHANGED
@@ -17,8 +17,6 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
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';
24
  $page = array();
@@ -101,14 +99,23 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
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');
@@ -124,21 +131,6 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
124
  return null;
125
  }
126
 
127
- protected function _getProductPageData(){
128
-
129
- $product = Mage::registry("current_product");
130
-
131
- if (!$product && $id = $this->getProductId()) {
132
- $product = Mage::getModel("catalog/product")->load($id);
133
- }
134
-
135
- if ($product) {
136
- return $this->_getProductInfo($product);
137
- }
138
-
139
- return false;
140
- }
141
-
142
  /**
143
  * Get limited product info from product
144
  * Used in listing, baskets, transactions
@@ -154,7 +146,12 @@ class Ometria_Core_Block_Head extends Mage_Core_Block_Template {
154
  'sku' => $product->getSku(),
155
  'name' => $product->getName(),
156
  'url' => $product->getProductUrl(),
157
- self::PRODUCT_IN_STOCK => $this->_getProductInStock($product)
 
 
 
 
 
158
  );
159
  }
160
 
17
  const OM_PAGE_TYPE = 'type';
18
  const OM_PAGE_DATA = 'data';
19
 
 
 
20
  public function getDataLayer() {
21
  $category = 'null';
22
  $page = array();
99
  return Mage::getSingleton('checkout/session');
100
  }
101
 
102
+ protected function _getProductPageData(){
103
+
104
+ $product = Mage::registry("current_product");
105
 
106
  if (!$product && $id = $this->getProductId()) {
107
  $product = Mage::getModel("catalog/product")->load($id);
108
+ }
109
+
110
+ if ($product) {
111
+ return $this->_getProductInfo($product);
112
+ }
113
+
114
+ return false;
115
+ }
116
 
117
+ protected function _getProductInStock($product)
118
+ {
119
  $stock = false;
120
  if ($product) {
121
  $api = Mage::getModel('cataloginventory/stock_item_api');
131
  return null;
132
  }
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  /**
135
  * Get limited product info from product
136
  * Used in listing, baskets, transactions
146
  'sku' => $product->getSku(),
147
  'name' => $product->getName(),
148
  'url' => $product->getProductUrl(),
149
+ 'in_stock' => $this->_getProductInStock($product),
150
+ 'is_available' => method_exists($product, 'isAvailable') ? $product->isAvailable() : null,
151
+ 'is_saleable' => method_exists($product, 'isSaleable') ? $product->isSaleable() : null,
152
+ 'is_getsaleable' => method_exists($product, 'getIsSalable') ? $product->getIsSalable() : null,
153
+ 'price' => method_exists($product, 'getFinalPrice') ? $product->getFinalPrice() : null,
154
+ 'currency' => Mage::app()->getStore()->getCurrentCurrencyCode()
155
  );
156
  }
157
 
app/code/community/Ometria/Core/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ometria_Core>
5
- <version>1.1.9</version>
6
  </Ometria_Core>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Ometria_Core>
5
+ <version>1.1.10</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.9</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,11 +21,11 @@ Enough Data already. Tell me what to do!&#xD;
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.&#xD;
22
  &#xD;
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 with "HTTPONLY" cookies being issued in some circumstances. </notes>
25
  <authors><author><name>Alastair James</name><user>aljames1981</user><email>al.james@gmail.com</email></author></authors>
26
- <date>2016-04-29</date>
27
- <time>10:49:25</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="4d49fbfd8b062fc16168c03287233875"/><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="ff47f93d20c4d3c6404819c0a4bde174"/></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="ecfda0f5b909c2dc00cf623aeddbb4c5"/><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="50e1d2a6af7a89b75abedb2ee2a74495"/><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>
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.10</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.&#xD;
22
  &#xD;
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>Add more ways to work out if a product is in stock and saleable.</notes>
25
  <authors><author><name>Alastair James</name><user>aljames1981</user><email>al.james@gmail.com</email></author></authors>
26
+ <date>2016-08-23</date>
27
+ <time>14:17:49</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="9911c5112badf5d65fccfb5314d76920"/><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="d75a26bc24e6a1a909f303e48bab774a"/></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="5f15b4c29b1aefb311c418f33e5fd4dd"/></dir><dir name="Helper"><file name="Config.php" hash="2d9a42f28c768aac826a590aaf571488"/><file name="Cookiechannel.php" hash="ecfda0f5b909c2dc00cf623aeddbb4c5"/><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="1925eabfc8a491d8cc05768aa2e2e15e"/><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>
29
  <compatible/>
30
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>