NanoRep_Widgets_1_1_0 - Version 1.4.4

Version Notes

Support Widget support for diffrent ProductID attributes

Download this release

Release Info

Developer NanoRep
Extension NanoRep_Widgets_1_1_0
Version 1.4.4
Comparing to
See all releases


Code changes from version 1.4.3 to 1.4.4

app/code/local/NanoRep/Widgets/Block/Support.php CHANGED
@@ -31,8 +31,29 @@ class NanoRep_Widgets_Block_Support extends Mage_Core_Block_Template
31
  if($forProduct){
32
  $context = null;
33
  if($product){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  $context = array();
35
- $context["ProductID"] = $product->getId();
36
  }
37
  }
38
  $cacheTime = $helper -> getSupportWidgetCacheTimeout(); // how long to store the data in the cache (seconds)
@@ -62,6 +83,7 @@ class NanoRep_Widgets_Block_Support extends Mage_Core_Block_Template
62
  $contextStr = str_replace($replace, $replacer, $contextStr);
63
  }
64
  $url = "https://".$server."/common/api/kbExport.xml?byPopularity=".$byPopularity."&username=".$username."&pw=".$password."&kb=".$kb."&skip=".$skip."&maxItems=".$maxItems."&days=".$days."&labelId=".$labelId."&textFilter=".$textFilter."&context=".$contextStr;
 
65
  $cache_file = Mage::getBaseDir('cache') . "/nanorepcachekb.txt";
66
  if($forProduct){
67
  $cache_file = Mage::getBaseDir('cache') . "/nanorepcachekb-p".$product->getId().".txt";
31
  if($forProduct){
32
  $context = null;
33
  if($product){
34
+ $productID = "";
35
+ $productIdAttribute = Mage::getStoreConfig('nanorepwidgets/account_settings/product_id_attribute');
36
+ if($productIdAttribute == "id"){
37
+ $productID = $product->getId();
38
+ }
39
+ elseif($productIdAttribute == "sku"){
40
+ $productID = $product->getsku();
41
+ }
42
+
43
+ if($productID == ""){
44
+ if($_product->getData($productIdAttribute) != ""){
45
+ $productID = $product->getData($productIdAttribute);
46
+ }
47
+ else{
48
+ $productID = $product->getAttributeText($productIdAttribute);
49
+ }
50
+ if($productID == ""){
51
+ $productID = $product->getId();
52
+ }
53
+ }
54
+
55
  $context = array();
56
+ $context["ProductID"] = $productID;
57
  }
58
  }
59
  $cacheTime = $helper -> getSupportWidgetCacheTimeout(); // how long to store the data in the cache (seconds)
83
  $contextStr = str_replace($replace, $replacer, $contextStr);
84
  }
85
  $url = "https://".$server."/common/api/kbExport.xml?byPopularity=".$byPopularity."&username=".$username."&pw=".$password."&kb=".$kb."&skip=".$skip."&maxItems=".$maxItems."&days=".$days."&labelId=".$labelId."&textFilter=".$textFilter."&context=".$contextStr;
86
+
87
  $cache_file = Mage::getBaseDir('cache') . "/nanorepcachekb.txt";
88
  if($forProduct){
89
  $cache_file = Mage::getBaseDir('cache') . "/nanorepcachekb-p".$product->getId().".txt";
app/code/local/NanoRep/Widgets/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <NanoRep_Widgets>
15
- <version>1.4.3</version>
16
  </NanoRep_Widgets>
17
  </modules>
18
  <global>
12
  <config>
13
  <modules>
14
  <NanoRep_Widgets>
15
+ <version>1.4.4</version>
16
  </NanoRep_Widgets>
17
  </modules>
18
  <global>
app/design/frontend/default/default/template/nanorepwidgets/top.phtml CHANGED
@@ -24,7 +24,7 @@
24
  $productID = $_product->getId();
25
  }
26
  elseif($productIdAttribute == "sku"){
27
- $productID = $_product->getSku();
28
  }
29
 
30
  if($productID == ""){
24
  $productID = $_product->getId();
25
  }
26
  elseif($productIdAttribute == "sku"){
27
+ $productID = $_product->getsku();
28
  }
29
 
30
  if($productID == ""){
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>NanoRep_Widgets_1_1_0</name>
4
- <version>1.4.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GPL v3.0</license>
7
  <channel>community</channel>
@@ -45,11 +45,11 @@ Agents get a 360&#xD;
45
  degree view of customers&#x2019; activity before&#xD;
46
  working on cases.&#xD;
47
  </description>
48
- <notes>Configuration change Account field to required</notes>
49
  <authors><author><name>NanoRep</name><user>avivnanore</user><email>aviv@nanorep.com</email></author></authors>
50
- <date>2014-05-13</date>
51
- <time>17:47:21</time>
52
- <contents><target name="magelocal"><dir name="NanoRep"><dir name="Widgets"><dir name="Block"><dir name="Adminhtml"><file name="Mynanorep.php" hash="8d2fc0ec21bf7c5583c308e81d4cabd8"/><dir name="Order"><file name="Grid.php" hash="4c2d639873e7d5dd099c9cbaa2013a50"/><dir name="View"><file name="Queries.php" hash="87b00acce9293ff50893be42e27e0542"/></dir></dir></dir><file name="Customerhistoryjson.php" hash="fa7ce0515f0de6e479d669691f5b85b2"/><file name="Events.php" hash="3ed310081949aa73c80710b29d559413"/><file name="General.php" hash="0e591128716cdf4fafd71a69ce98c755"/><file name="Success.php" hash="6ae59952edefcd75006f5f8323444765"/><file name="Support.php" hash="5356b2420c1bf8facce79888e1a2f62f"/><file name="Top.php" hash="8ab75cf1143182f643b91a88d9ce569e"/></dir><dir name="Helper"><file name="Data.php" hash="ea377f4c8590004eca92a98f5aa425f1"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="170f0dfbdcfa9b67bc18b0d03494e23b"/><file name="ProductIdAttribute.php" hash="f61e5d9a386bc030a78c012f81e88c2d"/></dir></dir></dir></dir><file name="History.php" hash="99ed12e3dfcb7a563825fd8418a50e59"/><dir name="Mysql4"><file name="Query.php" hash="c5f69b8c5e93e7d06fc1ff16c873790d"/><file name="Setup.php" hash="be89f73150df986eb994ebcf3dc7416e"/></dir><file name="Observer.php" hash="ccb1fff903eabbc01711a9bed8111689"/><file name="Query.php" hash="9f0f7f077766745d88535ae2a1805cb5"/><file name="Session.php" hash="4cd0cfe4a67bade3eb710aac7f8cfb40"/><dir name="System"><dir name="Config"><dir name="Source"><file name="FloatWidgetActivePages.php" hash="8feb17fe6ee045cba82f481a0bf90d5d"/><file name="OrdersStatusActivePages.php" hash="6bd1beff14a6fa24b78e3393a03245a4"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MynanorepController.php" hash="6846f66016c3faddcd8f6f4fb2b9deca"/></dir><file name="IndexController.php" hash="fddc21b9390b15e04b0aa391919f3930"/><file name="QueryController.php" hash="35975131cad35dcea58801613b3ab960"/></dir><dir name="etc"><file name="config.xml" hash="5c539c011060a1d8432071216aac31ab"/><file name="system.xml" hash="f5c8df021b8ee710d40a723363913247"/></dir><dir name="sql"><dir name="nanorepwidgets_setup"><file name="mysql4-data-upgrade-1.2.2-1.2.3.php" hash="feaf8b31078707d0df7ff6758ec7a5d6"/><file name="mysql4-install-1.2.2.php" hash="869d64ee7d1d121a3b617c22b875949b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NanoRep_Widgets.xml" hash="4fbaad20e02fa3ed2147ba15864c3cab"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="nanorepwidgets.xml" hash="241defd94ed9b85e64923c548caa5981"/></dir><dir name="template"><dir name="nanorepwidgets"><file name="cdc.phtml" hash="ccc4e010b3ee2b8229b36ca9b6a87c0b"/><file name="events.phtml" hash="cbdce563c3e4032c6bf23ed732485c7d"/><file name="general.phtml" hash="e5505af4b24fbb6d719962ca986cf589"/><file name="grid.phtml" hash="5d3d5cadd384525b13d4f5b8e1a40f22"/><file name="success.phtml" hash="c637a727aa20ec91105f3dbeb20832a7"/><file name="support.phtml" hash="cca1d2073e3d312173a6120c6ffd9f01"/><file name="top.phtml" hash="4544b2a97b61771a17d63d40a606817a"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir><dir name="default"><dir name="default"><dir name="template"><dir name="nanorepwidgets"><file name="mynanorep.phtml" hash="270b613ddddc94ad3e617c397f1f53a1"/><dir name="order"><dir name="view"><file name="queries.phtml" hash="bfb44dd77bba62629277aae45239ea6b"/><dir name="tab"><file name="info.phtml" hash="6dde16c3fe3bdddb65ca977d99872811"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="nanorepwidgets.xml" hash="d818dd9f9b17bedccba27a8f715b71dd"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="nanorepwidgets"><file name="head.css" hash="1779a092e2c2a771a0725e1cdd682a46"/><file name="head.js" hash="8bafa94d8432b42e2e6e7f6af91db39e"/></dir></dir></dir></dir></target></contents>
53
  <compatible/>
54
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
55
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>NanoRep_Widgets_1_1_0</name>
4
+ <version>1.4.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GPL v3.0</license>
7
  <channel>community</channel>
45
  degree view of customers&#x2019; activity before&#xD;
46
  working on cases.&#xD;
47
  </description>
48
+ <notes>Support Widget support for diffrent ProductID attributes</notes>
49
  <authors><author><name>NanoRep</name><user>avivnanore</user><email>aviv@nanorep.com</email></author></authors>
50
+ <date>2014-05-14</date>
51
+ <time>14:16:14</time>
52
+ <contents><target name="magelocal"><dir name="NanoRep"><dir name="Widgets"><dir name="Block"><dir name="Adminhtml"><file name="Mynanorep.php" hash="8d2fc0ec21bf7c5583c308e81d4cabd8"/><dir name="Order"><file name="Grid.php" hash="4c2d639873e7d5dd099c9cbaa2013a50"/><dir name="View"><file name="Queries.php" hash="87b00acce9293ff50893be42e27e0542"/></dir></dir></dir><file name="Customerhistoryjson.php" hash="fa7ce0515f0de6e479d669691f5b85b2"/><file name="Events.php" hash="3ed310081949aa73c80710b29d559413"/><file name="General.php" hash="0e591128716cdf4fafd71a69ce98c755"/><file name="Success.php" hash="6ae59952edefcd75006f5f8323444765"/><file name="Support.php" hash="b518abded0469abe8d52aea1a4736d2b"/><file name="Top.php" hash="8ab75cf1143182f643b91a88d9ce569e"/></dir><dir name="Helper"><file name="Data.php" hash="ea377f4c8590004eca92a98f5aa425f1"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="170f0dfbdcfa9b67bc18b0d03494e23b"/><file name="ProductIdAttribute.php" hash="f61e5d9a386bc030a78c012f81e88c2d"/></dir></dir></dir></dir><file name="History.php" hash="99ed12e3dfcb7a563825fd8418a50e59"/><dir name="Mysql4"><file name="Query.php" hash="c5f69b8c5e93e7d06fc1ff16c873790d"/><file name="Setup.php" hash="be89f73150df986eb994ebcf3dc7416e"/></dir><file name="Observer.php" hash="ccb1fff903eabbc01711a9bed8111689"/><file name="Query.php" hash="9f0f7f077766745d88535ae2a1805cb5"/><file name="Session.php" hash="4cd0cfe4a67bade3eb710aac7f8cfb40"/><dir name="System"><dir name="Config"><dir name="Source"><file name="FloatWidgetActivePages.php" hash="8feb17fe6ee045cba82f481a0bf90d5d"/><file name="OrdersStatusActivePages.php" hash="6bd1beff14a6fa24b78e3393a03245a4"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MynanorepController.php" hash="6846f66016c3faddcd8f6f4fb2b9deca"/></dir><file name="IndexController.php" hash="fddc21b9390b15e04b0aa391919f3930"/><file name="QueryController.php" hash="35975131cad35dcea58801613b3ab960"/></dir><dir name="etc"><file name="config.xml" hash="d745b1e8836c469cc7b51a0e72cb541f"/><file name="system.xml" hash="f5c8df021b8ee710d40a723363913247"/></dir><dir name="sql"><dir name="nanorepwidgets_setup"><file name="mysql4-data-upgrade-1.2.2-1.2.3.php" hash="feaf8b31078707d0df7ff6758ec7a5d6"/><file name="mysql4-install-1.2.2.php" hash="869d64ee7d1d121a3b617c22b875949b"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NanoRep_Widgets.xml" hash="4fbaad20e02fa3ed2147ba15864c3cab"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="nanorepwidgets.xml" hash="241defd94ed9b85e64923c548caa5981"/></dir><dir name="template"><dir name="nanorepwidgets"><file name="cdc.phtml" hash="ccc4e010b3ee2b8229b36ca9b6a87c0b"/><file name="events.phtml" hash="cbdce563c3e4032c6bf23ed732485c7d"/><file name="general.phtml" hash="e5505af4b24fbb6d719962ca986cf589"/><file name="grid.phtml" hash="5d3d5cadd384525b13d4f5b8e1a40f22"/><file name="success.phtml" hash="c637a727aa20ec91105f3dbeb20832a7"/><file name="support.phtml" hash="cca1d2073e3d312173a6120c6ffd9f01"/><file name="top.phtml" hash="8bf4d9024cdf2dbecc005a53c65a814e"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir><dir name="default"><dir name="default"><dir name="template"><dir name="nanorepwidgets"><file name="mynanorep.phtml" hash="270b613ddddc94ad3e617c397f1f53a1"/><dir name="order"><dir name="view"><file name="queries.phtml" hash="bfb44dd77bba62629277aae45239ea6b"/><dir name="tab"><file name="info.phtml" hash="6dde16c3fe3bdddb65ca977d99872811"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="nanorepwidgets.xml" hash="d818dd9f9b17bedccba27a8f715b71dd"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="nanorepwidgets"><file name="head.css" hash="1779a092e2c2a771a0725e1cdd682a46"/><file name="head.js" hash="8bafa94d8432b42e2e6e7f6af91db39e"/></dir></dir></dir></dir></target></contents>
53
  <compatible/>
54
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
55
  </package>