NanoRep_Widgets_1_1_0 - Version 1.3.8

Version Notes

Added Support to define a different product id

Download this release

Release Info

Developer NanoRep
Extension NanoRep_Widgets_1_1_0
Version 1.3.8
Comparing to
See all releases


Code changes from version 1.3.7 to 1.3.8

app/code/local/NanoRep/Widgets/Model/Adminhtml/System/Config/Source/ProductIdAttribute.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NanoRep Widgets Extension
4
+ *
5
+ * @package NanoRep_Widgets
6
+ * @company Omniscience Co.
7
+ * @website http://www.omniscience.co.il
8
+ * @author Dan Aharon-Shalom
9
+ */
10
+ class NanoRep_Widgets_Model_Adminhtml_System_Config_Source_ProductIdAttribute
11
+ {
12
+ protected $_options;
13
+
14
+ public function toOptionArray($isMultiselect=false)
15
+ {
16
+ if (!$this->_options) {
17
+ $attributes = Mage::getSingleton('eav/config')
18
+ ->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getAttributeCollection();
19
+ $this->_options[] = array('value'=>"id", 'label'=> Mage::helper('adminhtml')->__('Product Id'));
20
+ foreach ($attributes as $attr) {
21
+ $label = $attr->getStoreLabel() ? $attr->getStoreLabel() . " (".$attr->getAttributeCode().")" : $attr->getFrontendLabel() . " (".$attr->getAttributeCode().")";
22
+ $value = $attr->getAttributeCode();
23
+ if ($value != "price"){
24
+ if($label != ""){
25
+ $this->_options[] = array('value'=>$value, 'label'=> $label);
26
+ }
27
+ }
28
+ }
29
+ }
30
+
31
+ $options = $this->_options;
32
+ if(!$isMultiselect){
33
+ array_unshift($options, array('value'=>'', 'label'=> Mage::helper('adminhtml')->__('--Please Select--')));
34
+ }
35
+
36
+ return $options;
37
+ }
38
+ }
app/code/local/NanoRep/Widgets/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <NanoRep_Widgets>
15
- <version>1.3.7</version>
16
  </NanoRep_Widgets>
17
  </modules>
18
  <global>
@@ -184,6 +184,7 @@
184
  <nanorepwidgets>
185
  <account_settings>
186
  <attribute_select>all</attribute_select>
 
187
  <related_products>1</related_products>
188
  <upsells_products>1</upsells_products>
189
  <crosssells_products>1</crosssells_products>
12
  <config>
13
  <modules>
14
  <NanoRep_Widgets>
15
+ <version>1.3.8</version>
16
  </NanoRep_Widgets>
17
  </modules>
18
  <global>
184
  <nanorepwidgets>
185
  <account_settings>
186
  <attribute_select>all</attribute_select>
187
+ <product_id_attribute>id</product_id_attribute>
188
  <related_products>1</related_products>
189
  <upsells_products>1</upsells_products>
190
  <crosssells_products>1</crosssells_products>
app/code/local/NanoRep/Widgets/etc/system.xml CHANGED
@@ -76,11 +76,20 @@
76
  <show_in_website>1</show_in_website>
77
  <show_in_store>1</show_in_store>
78
  </attribute_select>
 
 
 
 
 
 
 
 
 
79
  <related_products translate="label">
80
  <label>Load Related Products</label>
81
  <frontend_type>select</frontend_type>
82
  <source_model>adminhtml/system_config_source_yesno</source_model>
83
- <sort_order>5</sort_order>
84
  <show_in_default>1</show_in_default>
85
  <show_in_website>1</show_in_website>
86
  <show_in_store>1</show_in_store>
@@ -89,7 +98,7 @@
89
  <label>Load Up Sells Products</label>
90
  <frontend_type>select</frontend_type>
91
  <source_model>adminhtml/system_config_source_yesno</source_model>
92
- <sort_order>6</sort_order>
93
  <show_in_default>1</show_in_default>
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>1</show_in_store>
@@ -98,7 +107,7 @@
98
  <label>Load Cross Sells Products</label>
99
  <frontend_type>select</frontend_type>
100
  <source_model>adminhtml/system_config_source_yesno</source_model>
101
- <sort_order>7</sort_order>
102
  <show_in_default>1</show_in_default>
103
  <show_in_website>1</show_in_website>
104
  <show_in_store>1</show_in_store>
76
  <show_in_website>1</show_in_website>
77
  <show_in_store>1</show_in_store>
78
  </attribute_select>
79
+ <product_id_attribute translate="label">
80
+ <label>Define ProductID for nanoRep</label>
81
+ <frontend_type>select</frontend_type>
82
+ <source_model>nanorepwidgets/adminhtml_system_config_source_productIdAttribute</source_model>
83
+ <sort_order>5</sort_order>
84
+ <show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>1</show_in_store>
87
+ </product_id_attribute>
88
  <related_products translate="label">
89
  <label>Load Related Products</label>
90
  <frontend_type>select</frontend_type>
91
  <source_model>adminhtml/system_config_source_yesno</source_model>
92
+ <sort_order>6</sort_order>
93
  <show_in_default>1</show_in_default>
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>1</show_in_store>
98
  <label>Load Up Sells Products</label>
99
  <frontend_type>select</frontend_type>
100
  <source_model>adminhtml/system_config_source_yesno</source_model>
101
+ <sort_order>7</sort_order>
102
  <show_in_default>1</show_in_default>
103
  <show_in_website>1</show_in_website>
104
  <show_in_store>1</show_in_store>
107
  <label>Load Cross Sells Products</label>
108
  <frontend_type>select</frontend_type>
109
  <source_model>adminhtml/system_config_source_yesno</source_model>
110
+ <sort_order>8</sort_order>
111
  <show_in_default>1</show_in_default>
112
  <show_in_website>1</show_in_website>
113
  <show_in_store>1</show_in_store>
app/design/frontend/default/default/template/nanorepwidgets/top.phtml CHANGED
@@ -15,10 +15,32 @@
15
  <div class='nanorep_loadingData' id='nanoRepProxyContainer' style='position:absolute;top:-500px;left:0px;'>
16
  </div>
17
  <script type='text/javascript'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  var _nRepData = _nRepData || [];
19
  _nRepData["context"] = {
20
  "Website" : "<?php echo $_SERVER['HTTP_HOST']; ?>"<?php if(!is_null($_product)): ?>,
21
- "ProductID" : "<?php echo $_product->getId(); ?>"<?php if($_product->getAttributeText('manufacturer') != ""): ?>,
22
  "Manufacturer" : "<?php echo $_product->getAttributeText('manufacturer'); ?>"<?php endif; ?><?php if(!is_null($_product->getCategory())): ?>,
23
  <?php endif; ?>
24
  <?php endif; ?>
@@ -29,7 +51,7 @@
29
  <?php if(!is_null($_product)): ?>
30
  "productName": "<?php echo htmlspecialchars($_product->getName()); ?>",
31
  <?php $this->getCategory(); ?>
32
- "ProductID" : "<?php echo $_product->getId(); ?>",
33
  "Price" : "<?php echo $_product->getFinalPrice(); ?>",
34
  <?php $this->getProductRelatedProducts($_product); ?>
35
  <?php $this->getProductUpSellsProducts($_product); ?>
15
  <div class='nanorep_loadingData' id='nanoRepProxyContainer' style='position:absolute;top:-500px;left:0px;'>
16
  </div>
17
  <script type='text/javascript'>
18
+ <?php
19
+ $productID = "";
20
+ $productIdAttribute = Mage::getStoreConfig('nanorepwidgets/account_settings/product_id_attribute');
21
+ if($productIdAttribute == "id"){
22
+ $productID = $_product->getId();
23
+ }
24
+ elseif($productIdAttribute == "sku"){
25
+ $productID = $_product->getData($productIdAttribute);
26
+ }
27
+
28
+ if($productID == ""){
29
+ if($_product->getData($productIdAttribute) != ""){
30
+ $productID = $_product->getData($productIdAttribute);
31
+ }
32
+ else{
33
+ $productID = $_product->getAttributeText($productIdAttribute);
34
+ }
35
+ }
36
+ if($productID == ""){
37
+ $productID = $_product->getId();
38
+ }
39
+ ?>
40
  var _nRepData = _nRepData || [];
41
  _nRepData["context"] = {
42
  "Website" : "<?php echo $_SERVER['HTTP_HOST']; ?>"<?php if(!is_null($_product)): ?>,
43
+ "ProductID" : "<?php echo $productID?>"<?php if($_product->getAttributeText('manufacturer') != ""): ?>,
44
  "Manufacturer" : "<?php echo $_product->getAttributeText('manufacturer'); ?>"<?php endif; ?><?php if(!is_null($_product->getCategory())): ?>,
45
  <?php endif; ?>
46
  <?php endif; ?>
51
  <?php if(!is_null($_product)): ?>
52
  "productName": "<?php echo htmlspecialchars($_product->getName()); ?>",
53
  <?php $this->getCategory(); ?>
54
+ "ProductID" : "<?php echo $productID?>",
55
  "Price" : "<?php echo $_product->getFinalPrice(); ?>",
56
  <?php $this->getProductRelatedProducts($_product); ?>
57
  <?php $this->getProductUpSellsProducts($_product); ?>
package.xml CHANGED
@@ -1,22 +1,55 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>NanoRep_Widgets_1_1_0</name>
4
- <version>1.3.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GPL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Increases online sales</summary>
 
 
 
10
  <description>The nanoRep solution improves customer&#xD;
11
  experience and significantly increases&#xD;
12
  conversion and online sales. nanoRep is&#xD;
13
  your virtual shopping assistant &#x2013; it&#xD;
14
- answers questions, offers rewards</description>
15
- <notes>Conversion Tracking bug fix</notes>
16
- <authors><author><name>NanoRep</name><user>auto-converted</user><email>aviv@nanorep.com</email></author></authors>
17
- <date>2013-11-29</date>
18
- <time>16:36:15</time>
19
- <contents><target name="magelocal"><dir name="NanoRep"><dir name="Widgets"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><dir name="View"><file name="Queries.php" hash="87b00acce9293ff50893be42e27e0542"/></dir><file name="Grid.php" hash="4c2d639873e7d5dd099c9cbaa2013a50"/></dir><file name="Mynanorep.php" hash="8d2fc0ec21bf7c5583c308e81d4cabd8"/></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="b1d926b2febb4bac5a2601f636437ab3"/><file name="Top.php" hash="8ab75cf1143182f643b91a88d9ce569e"/></dir><dir name="Helper"><file name="Data.php" hash="34982e32e23953ccba4d48905f0203c5"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="170f0dfbdcfa9b67bc18b0d03494e23b"/></dir></dir></dir></dir><dir name="Mysql4"><file name="Query.php" hash="c5f69b8c5e93e7d06fc1ff16c873790d"/><file name="Setup.php" hash="be89f73150df986eb994ebcf3dc7416e"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="FloatWidgetActivePages.php" hash="8feb17fe6ee045cba82f481a0bf90d5d"/><file name="OrdersStatusActivePages.php" hash="6bd1beff14a6fa24b78e3393a03245a4"/></dir></dir></dir><file name="History.php" hash="99ed12e3dfcb7a563825fd8418a50e59"/><file name="Observer.php" hash="edb358cbed835123f8e53b2e57d5960c"/><file name="Query.php" hash="9f0f7f077766745d88535ae2a1805cb5"/><file name="Session.php" hash="4cd0cfe4a67bade3eb710aac7f8cfb40"/></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="186112e8c79c3ea02d493d6ecc7097d3"/><file name="system.xml" hash="ca083c256fe9659c39ead7c79c2cef12"/></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="5a1ec84c4f03f7ed7ba59e47b478e18b"/></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="c98da8432e6722cdf1a7762770873ab5"/><file name="top.phtml" hash="c376f23a08097ae41a128b255758b03e"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="nanorepwidgets"><dir name="order"><dir name="view"><dir name="tab"><file name="info.phtml" hash="6dde16c3fe3bdddb65ca977d99872811"/></dir><file name="queries.phtml" hash="bfb44dd77bba62629277aae45239ea6b"/></dir></dir><file name="mynanorep.phtml" hash="270b613ddddc94ad3e617c397f1f53a1"/></dir></dir><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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  <compatible/>
21
- <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>NanoRep_Widgets_1_1_0</name>
4
+ <version>1.3.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GPL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Increases online sales &amp; improves service&#xD;
10
+ by enabling direct purchases from nanoRep&#xD;
11
+ widget and providing detailed purchasing&#xD;
12
+ history to agents.</summary>
13
  <description>The nanoRep solution improves customer&#xD;
14
  experience and significantly increases&#xD;
15
  conversion and online sales. nanoRep is&#xD;
16
  your virtual shopping assistant &#x2013; it&#xD;
17
+ answers questions, offers rewards &amp;&#xD;
18
+ coupons, suggests products and collects&#xD;
19
+ visitors' information. nanoRep&#x2019;s self-&#xD;
20
+ learning knowledge base helps customers&#xD;
21
+ interact with your brand via self-service&#xD;
22
+ widgets across your website (every page),&#xD;
23
+ mobile and Facebook. nanoRep lets your&#xD;
24
+ customers stay focus &#x2013; all the information&#xD;
25
+ they need is readily available, reducing site&#xD;
26
+ and shopping cart abandonment.&#xD;
27
+ &#xD;
28
+ nanoRep increases customer engagement&#xD;
29
+ on e-commerce websites resulting in a&#xD;
30
+ better customer experience, higher&#xD;
31
+ satisfaction rate and increased online sales.&#xD;
32
+ Customer intelligence is provided&#xD;
33
+ throughout the process, so you can make&#xD;
34
+ customer driven decision that will further&#xD;
35
+ increase online conversion and sales.&#xD;
36
+ &#xD;
37
+ nanoRep Connect&#xD;
38
+ Purchasing history - The integration with&#xD;
39
+ Magento brings&#xD;
40
+ customers&#x2019;&#xD;
41
+ purchasing history&#xD;
42
+ to nanoRep&#x2019;s&#xD;
43
+ ticketing system.&#xD;
44
+ Agents get a 360&#xD;
45
+ degree view of customers&#x2019; activity before&#xD;
46
+ working on cases.&#xD;
47
+ </description>
48
+ <notes>Added Support to define a different product id</notes>
49
+ <authors><author><name>NanoRep</name><user>avivnanore</user><email>aviv@nanorep.com</email></author></authors>
50
+ <date>2014-04-01</date>
51
+ <time>11:20:39</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="b1d926b2febb4bac5a2601f636437ab3"/><file name="Top.php" hash="8ab75cf1143182f643b91a88d9ce569e"/></dir><dir name="Helper"><file name="Data.php" hash="34982e32e23953ccba4d48905f0203c5"/></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="edb358cbed835123f8e53b2e57d5960c"/><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="b6519dc0398ea8c0187d5838c7085d10"/><file name="system.xml" hash="dd97a773480aae8450be4d21ac9752f8"/></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="5a1ec84c4f03f7ed7ba59e47b478e18b"/></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="c98da8432e6722cdf1a7762770873ab5"/><file name="top.phtml" hash="9a41873114eaa0531357e8e0759c0768"/></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>