NanoRep_Widgets_1_1_0 - Version 1.4.6

Version Notes

Fix - product categories
Fix - default cache time changed to 30 sec

Download this release

Release Info

Developer NanoRep
Extension NanoRep_Widgets_1_1_0
Version 1.4.6
Comparing to
See all releases


Code changes from version 1.4.5 to 1.4.6

app/code/local/NanoRep/Widgets/Block/Top.php CHANGED
@@ -63,29 +63,30 @@ class NanoRep_Widgets_Block_Top extends Mage_Core_Block_Template
63
  }
64
 
65
  public function getCategory(){
66
- // $_product = null;
67
- // if(!is_null($this->getProduct())){
68
- // $_product = $this->getProduct();
69
- // }
70
- // elseif(!is_null(Mage::registry('current_product'))) {
71
- // $_product = Mage::registry('current_product');
72
- // }
73
- // else{
74
- // $_product = null;
75
- // }
76
- // $categories = array();
77
- // if(!is_null($_product)){
78
- // foreach ($_product->getCategoryIds() as $cat_id) {
79
- // $category = Mage::getModel('catalog/category')->load($cat_id);
80
- // $categories[] = $category->getName();
81
- // }
82
- // echo '"Category": '. Zend_Json::encode($categories) . ',';
83
- // }
84
-
85
- $category = Mage::registry('current_category');
86
- if(!is_null($category)){
87
- echo '"Category": "'. $category->getId() . '",';
88
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  }
90
 
91
  public function getProductRelatedProducts($product){
63
  }
64
 
65
  public function getCategory(){
66
+ $_product = null;
67
+ if(!is_null($this->getProduct())){
68
+ $_product = $this->getProduct();
69
+ }
70
+ elseif(!is_null(Mage::registry('current_product'))) {
71
+ $_product = Mage::registry('current_product');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
+ else{
74
+ $_product = null;
75
+ }
76
+ $categories = array();
77
+ if(!is_null($_product)){
78
+ $cats = $_product->getCategoryIds();
79
+ foreach ($_product->getCategoryIds() as $cat_id) {
80
+ $category = Mage::getModel('catalog/category')->load($cat_id);
81
+ $categories[] = $category->getId();
82
+ }
83
+ echo '"Category": "'. join(",", $categories) . '",' . "\n";
84
+ }
85
+
86
+ // $category = Mage::registry('current_category');
87
+ // if(!is_null($category)){
88
+ // echo '"Category": "'. $category->getId() . '",';
89
+ // }
90
  }
91
 
92
  public function getProductRelatedProducts($product){
app/code/local/NanoRep/Widgets/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <NanoRep_Widgets>
15
- <version>1.4.4</version>
16
  </NanoRep_Widgets>
17
  </modules>
18
  <global>
@@ -206,7 +206,7 @@
206
  <product_faq_headline>Popular questions by other visitors:</product_faq_headline>
207
  <general_faq_headline></general_faq_headline>
208
  <question_hidden>1</question_hidden>
209
- <cache_timeout>1800</cache_timeout>
210
  </support_widget>
211
  <orders_status>
212
  <active>1</active>
12
  <config>
13
  <modules>
14
  <NanoRep_Widgets>
15
+ <version>1.4.6</version>
16
  </NanoRep_Widgets>
17
  </modules>
18
  <global>
206
  <product_faq_headline>Popular questions by other visitors:</product_faq_headline>
207
  <general_faq_headline></general_faq_headline>
208
  <question_hidden>1</question_hidden>
209
+ <cache_timeout>30</cache_timeout>
210
  </support_widget>
211
  <orders_status>
212
  <active>1</active>
app/design/frontend/default/default/layout/nanorepwidgets.xml CHANGED
@@ -38,7 +38,7 @@
38
  <action method="addItem"><type>skin_js</type><file>nanorepwidgets/head.js</file></action>
39
  <action method="addItem"><type>skin_css</type><file>nanorepwidgets/head.css</file></action>
40
  </reference>
41
- <reference name="product.info.additional">
42
  <block type="nanorepwidgets/support" before="-" name="nanorep.support.widget" as="nanorep_support_widget" template="nanorepwidgets/support.phtml" />
43
  </reference>
44
  </catalog_product_view>
38
  <action method="addItem"><type>skin_js</type><file>nanorepwidgets/head.js</file></action>
39
  <action method="addItem"><type>skin_css</type><file>nanorepwidgets/head.css</file></action>
40
  </reference>
41
+ <reference name="content">
42
  <block type="nanorepwidgets/support" before="-" name="nanorep.support.widget" as="nanorep_support_widget" template="nanorepwidgets/support.phtml" />
43
  </reference>
44
  </catalog_product_view>
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.5</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,12 @@ Agents get a 360&#xD;
45
  degree view of customers&#x2019; activity before&#xD;
46
  working on cases.&#xD;
47
  </description>
48
- <notes>Workaround for cases that the nanoRepEmbedContainer script is loaded twice</notes>
 
49
  <authors><author><name>NanoRep</name><user>avivnanore</user><email>aviv@nanorep.com</email></author></authors>
50
- <date>2014-06-13</date>
51
- <time>16:57:51</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="e55ab098f32555808974a310f2b5721e"/><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="118e232b294aac4a96a9f2c086b2c0d5"/><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="476093e6c822d86c97056718c9a7d52f"/><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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>NanoRep_Widgets_1_1_0</name>
4
+ <version>1.4.6</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>Fix - product categories&#xD;
49
+ Fix - default cache time changed to 30 sec</notes>
50
  <authors><author><name>NanoRep</name><user>avivnanore</user><email>aviv@nanorep.com</email></author></authors>
51
+ <date>2014-07-01</date>
52
+ <time>08:00:06</time>
53
+ <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="e55ab098f32555808974a310f2b5721e"/><file name="Top.php" hash="1de4cef71976b8767df923d41c315280"/></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="0f8866e797b3f4b0ee7a2127fbea866c"/><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="c13ee60a0c8ff3979d4251a634d9b947"/></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="476093e6c822d86c97056718c9a7d52f"/><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>
54
  <compatible/>
55
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
56
  </package>