Chapagain_ProductTooltip - Version 0.1.2

Version Notes

Bug Fix: Showing html content when hovered on product name

Download this release

Release Info

Developer Mukesh Chapagain
Extension Chapagain_ProductTooltip
Version 0.1.2
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.2

app/code/community/Chapagain/ProductTooltip/Helper/Data.php CHANGED
@@ -101,6 +101,12 @@ class Chapagain_ProductTooltip_Helper_Data extends Mage_Core_Helper_Abstract
101
  return $value > 0 ? $value : null;
102
  }
103
 
 
 
 
 
 
 
104
  public function getIconDesktop()
105
  {
106
  $value = Mage::getStoreConfig('chapagain_producttooltip/design/icon_desktop');
101
  return $value > 0 ? $value : null;
102
  }
103
 
104
+ public function getIcon()
105
+ {
106
+ $value = trim(Mage::getStoreConfig('chapagain_producttooltip/design/icon'));
107
+ return empty($value) ? '(?)' : $value;
108
+ }
109
+
110
  public function getIconDesktop()
111
  {
112
  $value = Mage::getStoreConfig('chapagain_producttooltip/design/icon_desktop');
app/code/community/Chapagain/ProductTooltip/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Chapagain_ProductTooltip>
5
- <version>0.1.1</version>
6
  </Chapagain_ProductTooltip>
7
  </modules>
8
  <frontend>
@@ -98,8 +98,9 @@
98
  <delay>200</delay>
99
  <min_width>0</min_width>
100
  <max_width>300</max_width>
 
101
  <icon_desktop>0</icon_desktop>
102
- <icon_touch>0</icon_touch>
103
  <position>top</position>
104
  <speed>350</speed>
105
  <theme>shadow</theme>
2
  <config>
3
  <modules>
4
  <Chapagain_ProductTooltip>
5
+ <version>0.1.2</version>
6
  </Chapagain_ProductTooltip>
7
  </modules>
8
  <frontend>
98
  <delay>200</delay>
99
  <min_width>0</min_width>
100
  <max_width>300</max_width>
101
+ <icon>(?)</icon>
102
  <icon_desktop>0</icon_desktop>
103
+ <icon_touch>1</icon_touch>
104
  <position>top</position>
105
  <speed>350</speed>
106
  <theme>shadow</theme>
app/code/community/Chapagain/ProductTooltip/etc/system.xml CHANGED
@@ -151,6 +151,15 @@
151
  <show_in_website>1</show_in_website>
152
  <show_in_store>1</show_in_store>
153
  </max_width>
 
 
 
 
 
 
 
 
 
154
  <icon_desktop translate="label comment">
155
  <label>Icon Desktop</label>
156
  <comment>Generate an icon next to your content that is responsible for activating the tooltip on non-touch devices. Default: No</comment>
151
  <show_in_website>1</show_in_website>
152
  <show_in_store>1</show_in_store>
153
  </max_width>
154
+ <icon translate="label comment">
155
+ <label>Icon</label>
156
+ <comment>If using the iconDesktop or iconTouch options, this sets the content for your icon. Default: '(?)'</comment>
157
+ <frontend_type>text</frontend_type>
158
+ <sort_order>45</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ </icon>
163
  <icon_desktop translate="label comment">
164
  <label>Icon Desktop</label>
165
  <comment>Generate an icon next to your content that is responsible for activating the tooltip on non-touch devices. Default: No</comment>
app/design/frontend/base/default/template/chapagain_producttooltip/producttooltip.phtml CHANGED
@@ -27,6 +27,8 @@ jQuery(document).ready(function() {
27
 
28
  maxWidth: <?php echo $this->helper('producttooltip')->getMaxWidth() ?>, // Set a maximum width for the tooltip. Default: null (no max width)
29
 
 
 
30
  iconDesktop: <?php echo $this->helper('producttooltip')->getIconDesktop() ?>, // Generate an icon next to your content that is responsible for activating the tooltip on non-touch devices. Default: false
31
 
32
  iconTouch: <?php echo $this->helper('producttooltip')->getIconTouch() ?>, // Generate an icon next to your content that is responsible for activating the tooltip on touch devices (tablets, phones, etc). Default: false
@@ -76,7 +78,7 @@ foreach ($_productCollection as $_product):
76
 
77
  ?>
78
 
79
- jQuery("a[href='<?php echo $_product->getProductUrl() ?>']").attr("title", "<?php echo "<div style='text-align:left'>" . $name . $price . $rating . $shortDescription . $attributes . '</div>' ?>");
80
 
81
  <?php endforeach; ?>
82
 
27
 
28
  maxWidth: <?php echo $this->helper('producttooltip')->getMaxWidth() ?>, // Set a maximum width for the tooltip. Default: null (no max width)
29
 
30
+ icon: '<?php echo $this->helper('producttooltip')->getIcon() ?>', // If using the iconDesktop or iconTouch options, this sets the content for your icon. Default: '(?)'
31
+
32
  iconDesktop: <?php echo $this->helper('producttooltip')->getIconDesktop() ?>, // Generate an icon next to your content that is responsible for activating the tooltip on non-touch devices. Default: false
33
 
34
  iconTouch: <?php echo $this->helper('producttooltip')->getIconTouch() ?>, // Generate an icon next to your content that is responsible for activating the tooltip on touch devices (tablets, phones, etc). Default: false
78
 
79
  ?>
80
 
81
+ jQuery("a.product-image[href='<?php echo $_product->getProductUrl() ?>']").attr("title", "<?php echo "<div style='text-align:left'>" . $name . $price . $rating . $shortDescription . $attributes . '</div>' ?>");
82
 
83
  <?php endforeach; ?>
84
 
app/etc/modules/Chapagain_ProductTooltip.xml CHANGED
File without changes
package.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <package><name>Chapagain_ProductTooltip</name><version>0.1.1</version><stability>stable</stability><license>OSL v3.0</license><channel>community</channel><extends></extends><summary>This extension shows product's information as tooltip on category page (product listing page).</summary><description>When users hover on the product image on category page (product listing page) then a tooltip will appear displaying product's information like product name, price, ratings, short description, and additional attribute information.
3
 
4
  Configuration Settings
5
 
@@ -30,4 +30,4 @@ Theme: There are five different tooltip themes available. They are default, noir
30
  Tooltip Javascript
31
 
32
  A jQuery plugin called Tooltipster (http://iamceege.github.io/tooltipster/) is used to create tooltip.
33
- </description><notes>Initial Release</notes><authors><author><name>Mukesh Chapagain</name><user>chapagain</user><email>mukesh.chapagain@gmail.com</email></author></authors><date>2015-09-09</date><time>5:28:18</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="chapagain_producttooltip.xml" hash="0cdd3cebcb0b4518d1d89559fa70cdce"/></dir><dir name="template"><dir name="chapagain_producttooltip"><file name="producttooltip.phtml" hash="c713fdb92f78a66cbafb79c8b902b40f"/></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="Chapagain_ProductTooltip.csv" hash="0003108922c3fffb650b725f56e01ec9"/></dir></dir><dir name="code"><dir name="community"><dir name="Chapagain"><dir name="ProductTooltip"><dir name="Model"><file name="Observer.php" hash="59f022b22e3505cd9c4cff9f1ca6ba73"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Animation.php" hash="6be50be161fc4344e062eada880a15d9"/><file name="Position.php" hash="3c95fa8609582dbf22dc9389c87b270d"/><file name="Theme.php" hash="e8c53483fe3474ab6ab1b2dd6cf1eedb"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f321e317a7a86a794949d7b558ccf21f"/><file name="config.xml" hash="239cfd631a5be9414b3bb13e016b0d6a"/><file name="system.xml" hash="c5cdad2a8e39e4ac872b578ef0ebc8bf"/></dir><dir name="Helper"><file name="Data.php" hash="26f62da7628eb2390e8560d3ddee1c78"/></dir><dir name="Block"><file name="Producttooltip.php" hash="d7326e7ffea5c19af3c85f5a7d331174"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Chapagain_ProductTooltip.xml" hash="577b88e3fa6a6f5be5a960de393ccce9"/></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="chapagain_producttooltip"><file name="tooltipster.css" hash="3380d1b08264fc854bf34db6980d7f4f"/><dir name="themes"><file name="tooltipster-light.css" hash="0a806050fa1776d5cd34df77e79036ac"/><file name="tooltipster-noir.css" hash="fabc083a3a6e952cfcf0867eb6269349"/><file name="tooltipster-punk.css" hash="b59a6be39055f65900d5a69723ebed38"/><file name="tooltipster-shadow.css" hash="5ac53c95f247585328d4509d0b33c3c8"/></dir></dir></dir><dir name="js"><dir name="chapagain_producttooltip"><file name="jquery-1.7.0.min.js" hash="25721ced154b3a99e818431446d7506d"/><file name="jquery-noconflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="jquery.tooltipster.min.js" hash="ff2f685494b400ea2098c79332759a8f"/></dir></dir></dir></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>Chapagain_ProductTooltip</name><version>0.1.2</version><stability>stable</stability><license>OSL v3.0</license><channel>community</channel><extends></extends><summary>This extension shows product's information as tooltip on category page (product listing page).</summary><description>When users hover on the product image on category page (product listing page) then a tooltip will appear displaying product's information like product name, price, ratings, short description, and additional attribute information.
3
 
4
  Configuration Settings
5
 
30
  Tooltip Javascript
31
 
32
  A jQuery plugin called Tooltipster (http://iamceege.github.io/tooltipster/) is used to create tooltip.
33
+ </description><notes>Bug Fix: Showing html content when hovered on product name</notes><authors><author><name>Mukesh Chapagain</name><user>chapagain</user><email>mukesh.chapagain@gmail.com</email></author></authors><date>2015-10-13</date><time>8:04:49</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="chapagain_producttooltip.xml" hash="0cdd3cebcb0b4518d1d89559fa70cdce"/></dir><dir name="template"><dir name="chapagain_producttooltip"><file name="producttooltip.phtml" hash="861b8851bfc5cda6046c946276274be8"/></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="Chapagain_ProductTooltip.csv" hash="0003108922c3fffb650b725f56e01ec9"/></dir></dir><dir name="code"><dir name="community"><dir name="Chapagain"><dir name="ProductTooltip"><dir name="Model"><file name="Observer.php" hash="59f022b22e3505cd9c4cff9f1ca6ba73"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Animation.php" hash="6be50be161fc4344e062eada880a15d9"/><file name="Position.php" hash="3c95fa8609582dbf22dc9389c87b270d"/><file name="Theme.php" hash="e8c53483fe3474ab6ab1b2dd6cf1eedb"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f321e317a7a86a794949d7b558ccf21f"/><file name="config.xml" hash="2f32466f7f7ec445e97f7b29de5657ec"/><file name="system.xml" hash="c422c13b036304c230033b110f9602cf"/></dir><dir name="Helper"><file name="Data.php" hash="e2cc5932e577849904f22625ee4c13c7"/></dir><dir name="Block"><file name="Producttooltip.php" hash="d7326e7ffea5c19af3c85f5a7d331174"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Chapagain_ProductTooltip.xml" hash="577b88e3fa6a6f5be5a960de393ccce9"/></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="chapagain_producttooltip"><file name="tooltipster.css" hash="3380d1b08264fc854bf34db6980d7f4f"/><dir name="themes"><file name="tooltipster-light.css" hash="0a806050fa1776d5cd34df77e79036ac"/><file name="tooltipster-noir.css" hash="fabc083a3a6e952cfcf0867eb6269349"/><file name="tooltipster-punk.css" hash="b59a6be39055f65900d5a69723ebed38"/><file name="tooltipster-shadow.css" hash="5ac53c95f247585328d4509d0b33c3c8"/></dir></dir></dir><dir name="js"><dir name="chapagain_producttooltip"><file name="jquery-1.7.0.min.js" hash="25721ced154b3a99e818431446d7506d"/><file name="jquery-noconflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="jquery.tooltipster.min.js" hash="ff2f685494b400ea2098c79332759a8f"/></dir></dir></dir></dir></dir></dir></target></contents></package>