Chapagain_ProductTooltip - Version 0.1.1

Version Notes

Initial Release

Download this release

Release Info

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


Code changes from version 0.1.0 to 0.1.1

app/code/community/Chapagain/ProductTooltip/Helper/Data.php CHANGED
@@ -41,6 +41,41 @@ class Chapagain_ProductTooltip_Helper_Data extends Mage_Core_Helper_Abstract
41
  return Mage::getStoreConfig('chapagain_producttooltip/general/show_attribute_product_listing');
42
  }
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  /**
45
  * Tooltip Design Configuration Settings
46
  */
41
  return Mage::getStoreConfig('chapagain_producttooltip/general/show_attribute_product_listing');
42
  }
43
 
44
+ public function getShowInGridMode()
45
+ {
46
+ return Mage::getStoreConfig('chapagain_producttooltip/general/show_in_grid_mode');
47
+ }
48
+
49
+ public function getShowInListMode()
50
+ {
51
+ return Mage::getStoreConfig('chapagain_producttooltip/general/show_in_list_mode');
52
+ }
53
+
54
+ public function getCurrentDisplayMode()
55
+ {
56
+ return Mage::app()->getLayout()->createBlock('catalog/product_list_toolbar')->getCurrentMode();
57
+ }
58
+
59
+ public function checkDisplayMode()
60
+ {
61
+ $displayMode = array();
62
+
63
+ if ($this->getShowInGridMode()) {
64
+ $displayMode[] = 'grid';
65
+ }
66
+
67
+ if ($this->getShowInListMode()) {
68
+ $displayMode[] = 'list';
69
+ }
70
+
71
+ if (in_array($this->getCurrentDisplayMode(), $displayMode)) {
72
+ return true;
73
+ }
74
+
75
+ return false;
76
+ }
77
+
78
+
79
  /**
80
  * Tooltip Design Configuration Settings
81
  */
app/code/community/Chapagain/ProductTooltip/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Chapagain_ProductTooltip>
5
- <version>0.1.0</version>
6
  </Chapagain_ProductTooltip>
7
  </modules>
8
  <frontend>
@@ -90,6 +90,8 @@
90
  <show_short_description>1</show_short_description>
91
  <show_attribute>1</show_attribute>
92
  <show_attribute_product_listing>1</show_attribute_product_listing>
 
 
93
  </general>
94
  <design>
95
  <animation>fade</animation>
2
  <config>
3
  <modules>
4
  <Chapagain_ProductTooltip>
5
+ <version>0.1.1</version>
6
  </Chapagain_ProductTooltip>
7
  </modules>
8
  <frontend>
90
  <show_short_description>1</show_short_description>
91
  <show_attribute>1</show_attribute>
92
  <show_attribute_product_listing>1</show_attribute_product_listing>
93
+ <show_in_grid_mode>1</show_in_grid_mode>
94
+ <show_in_list_mode>1</show_in_list_mode>
95
  </general>
96
  <design>
97
  <animation>fade</animation>
app/code/community/Chapagain/ProductTooltip/etc/system.xml CHANGED
@@ -84,6 +84,26 @@
84
  <show_in_website>1</show_in_website>
85
  <show_in_store>1</show_in_store>
86
  </show_attribute_product_listing>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  </fields>
88
  </general>
89
  <design translate="label">
84
  <show_in_website>1</show_in_website>
85
  <show_in_store>1</show_in_store>
86
  </show_attribute_product_listing>
87
+ <show_in_grid_mode translate="label comment">
88
+ <label>Show in Grid Mode</label>
89
+ <comment></comment>
90
+ <frontend_type>select</frontend_type>
91
+ <source_model>adminhtml/system_config_source_yesno</source_model>
92
+ <sort_order>80</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>
96
+ </show_in_grid_mode>
97
+ <show_in_list_mode translate="label comment">
98
+ <label>Show in List Mode</label>
99
+ <comment></comment>
100
+ <frontend_type>select</frontend_type>
101
+ <source_model>adminhtml/system_config_source_yesno</source_model>
102
+ <sort_order>90</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
+ </show_in_list_mode>
107
  </fields>
108
  </general>
109
  <design translate="label">
app/design/frontend/base/default/template/chapagain_producttooltip/producttooltip.phtml CHANGED
@@ -1,7 +1,9 @@
1
  <?php
2
  echo $this->getChildHtml('child.product_list');
3
 
4
- if ($this->helper('producttooltip')->getIsEnabled()):
 
 
5
 
6
  $_productCollection=$this->getLoadedProductCollection();
7
  ?>
1
  <?php
2
  echo $this->getChildHtml('child.product_list');
3
 
4
+ if ($this->helper('producttooltip')->getIsEnabled() &&
5
+ $this->helper('producttooltip')->checkDisplayMode()
6
+ ):
7
 
8
  $_productCollection=$this->getLoadedProductCollection();
9
  ?>
package.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <package><name>Chapagain_ProductTooltip</name><version>0.1.0</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-07-29</date><time>8:14:38</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="717751f32444c30bbc7f08f8501534bc"/></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="347e798ceb34aeea2baf38ca84e4f917"/><file name="system.xml" hash="65c760eed458f546d2e146fb09e02d95"/></dir><dir name="Helper"><file name="Data.php" hash="9af357f71920ea1db07ca3a99dff370f"/></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.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
  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>