MntsInfotech_CookieConsent - Version 0.1.6

Version Notes

Added speed optimization options.

Download this release

Release Info

Developer Sukhvir Kushwah
Extension MntsInfotech_CookieConsent
Version 0.1.6
Comparing to
See all releases


Code changes from version 0.1.5 to 0.1.6

app/code/community/MntsInfotech/CookieConsent/Helper/Data.php CHANGED
@@ -1,13 +1,4 @@
1
  <?php
2
-
3
- /**
4
- * Optimiseweb CookieNotice Helper Data
5
- *
6
- * @package Optimiseweb_CookieNotice
7
- * @author Kathir Vel (sid@optimiseweb.co.uk)
8
- * @copyright Copyright (c) 2014 Optimise Web
9
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
10
- */
11
  class MntsInfotech_CookieConsent_Helper_Data extends Mage_Core_Helper_Abstract
12
  {
13
  /**
@@ -25,10 +16,13 @@ class MntsInfotech_CookieConsent_Helper_Data extends Mage_Core_Helper_Abstract
25
  );
26
 
27
  public function getFiles(){
28
- return $this->_files;
 
 
 
29
  }
30
 
31
  public function getJQueryPath($file){
32
- return "mntsinfotech/".$file.".js";
33
  }
34
  }
1
  <?php
 
 
 
 
 
 
 
 
 
2
  class MntsInfotech_CookieConsent_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
  /**
16
  );
17
 
18
  public function getFiles(){
19
+ if(Mage::getStoreConfig('mntsinfotechcookieconsent/speed/enabled')==1) {
20
+ unset($this->_files[0]);
21
+ }
22
+ return $this->_files;
23
  }
24
 
25
  public function getJQueryPath($file){
26
+ return "js/mntsinfotech/".$file.".js";
27
  }
28
  }
app/code/community/MntsInfotech/CookieConsent/Model/Observer.php CHANGED
@@ -3,16 +3,17 @@ class MntsInfotech_CookieConsent_Model_Observer
3
  {
4
  public function prepareLayoutBefore(Varien_Event_Observer $observer)
5
  {
6
- /*if (!Mage::helper('cookieconsent')->isEnabled()) {
7
  return $this;
8
- }*/
9
 
10
  /* @var $block Mage_Page_Block_Html_Head */
11
  $block = $observer->getEvent()->getBlock();
12
 
13
  if ("head" == $block->getNameInLayout()) {
14
  foreach (Mage::helper('cookieconsent')->getFiles() as $file) {
15
- $block->addJs(Mage::helper('cookieconsent')->getJQueryPath($file));
 
16
  }
17
  }
18
 
3
  {
4
  public function prepareLayoutBefore(Varien_Event_Observer $observer)
5
  {
6
+ if (Mage::getStoreConfig('mntsinfotechcookieconsent/general/enabled')!=1) {
7
  return $this;
8
+ }
9
 
10
  /* @var $block Mage_Page_Block_Html_Head */
11
  $block = $observer->getEvent()->getBlock();
12
 
13
  if ("head" == $block->getNameInLayout()) {
14
  foreach (Mage::helper('cookieconsent')->getFiles() as $file) {
15
+ //$block->addJs(Mage::helper('cookieconsent')->getJQueryPath($file));
16
+ $block->addItem('skin_js', Mage::helper('cookieconsent')->getJQueryPath($file));
17
  }
18
  }
19
 
app/code/community/MntsInfotech/CookieConsent/etc/adminhtml.xml CHANGED
@@ -1,12 +1,4 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- /**
4
- * @package Optimiseweb_CookieNotice
5
- * @author Kathir Vel (sid@optimiseweb.co.uk)
6
- * @copyright Copyright (c) 2014 Optimise Web
7
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
- */
9
- -->
10
  <config>
11
  <acl>
12
  <resources>
1
  <?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
 
2
  <config>
3
  <acl>
4
  <resources>
app/code/community/MntsInfotech/CookieConsent/etc/config.xml CHANGED
@@ -1,7 +1,7 @@
1
  <config>
2
  <modules>
3
  <MntsInfotech_CookieConsent>
4
- <version>0.1.5</version>
5
  </MntsInfotech_CookieConsent>
6
  </modules>
7
  <frontend>
@@ -42,11 +42,8 @@
42
  </cookieconsent>
43
  </models>
44
  </global>
45
-
46
  <default>
47
-
48
  <mntsinfotechcookieconsent>
49
-
50
  <message>
51
  <message>This site uses cookies to improve your browsing experience. By continuing to use this site, you accept these cookies.</message>
52
  </message>
@@ -59,6 +56,9 @@
59
  <linktext>View Cookie Policy</linktext>
60
  <link>http://www.mntsinfotech.com</link>
61
  </link>
 
 
 
62
  </mntsinfotechcookieconsent>
63
 
64
  </default>
1
  <config>
2
  <modules>
3
  <MntsInfotech_CookieConsent>
4
+ <version>0.1.6</version>
5
  </MntsInfotech_CookieConsent>
6
  </modules>
7
  <frontend>
42
  </cookieconsent>
43
  </models>
44
  </global>
 
45
  <default>
 
46
  <mntsinfotechcookieconsent>
 
47
  <message>
48
  <message>This site uses cookies to improve your browsing experience. By continuing to use this site, you accept these cookies.</message>
49
  </message>
56
  <linktext>View Cookie Policy</linktext>
57
  <link>http://www.mntsinfotech.com</link>
58
  </link>
59
+ <speed>
60
+ <enabled>0</enabled>
61
+ </speed>
62
  </mntsinfotechcookieconsent>
63
 
64
  </default>
app/code/community/MntsInfotech/CookieConsent/etc/system.xml CHANGED
@@ -6,7 +6,6 @@
6
  </mntsinfotechconfig>
7
  </tabs>
8
  <sections>
9
-
10
  <mntsinfotechcookieconsent translate="label comment" module="cookieconsent">
11
  <label>Cookie Consent</label>
12
  <tab>mntsinfotechconfig</tab>
@@ -15,7 +14,6 @@
15
  <show_in_default>1</show_in_default>
16
  <show_in_website>1</show_in_website>
17
  <show_in_store>1</show_in_store>
18
-
19
  <groups>
20
  <general translate="label comment" module="cookieconsent">
21
  <label>General</label>
@@ -102,14 +100,28 @@
102
  <show_in_store>1</show_in_store>
103
  <depends><enabled>1</enabled></depends>
104
  </linktext>
105
-
106
  </fields>
107
  </link>
108
-
109
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  </groups>
111
-
112
  </mntsinfotechcookieconsent>
113
-
114
  </sections>
115
  </config>
6
  </mntsinfotechconfig>
7
  </tabs>
8
  <sections>
 
9
  <mntsinfotechcookieconsent translate="label comment" module="cookieconsent">
10
  <label>Cookie Consent</label>
11
  <tab>mntsinfotechconfig</tab>
14
  <show_in_default>1</show_in_default>
15
  <show_in_website>1</show_in_website>
16
  <show_in_store>1</show_in_store>
 
17
  <groups>
18
  <general translate="label comment" module="cookieconsent">
19
  <label>General</label>
100
  <show_in_store>1</show_in_store>
101
  <depends><enabled>1</enabled></depends>
102
  </linktext>
 
103
  </fields>
104
  </link>
105
+ <speed translate="label comment" module="cookieconsent">
106
+ <label>Speed</label>
107
+ <sort_order>4</sort_order>
108
+ <show_in_default>1</show_in_default>
109
+ <show_in_website>1</show_in_website>
110
+ <show_in_store>1</show_in_store>
111
+ <fields>
112
+ <enabled translate="label comment" module="cookieconsent">
113
+ <label>Use existing jQuery?</label>
114
+ <frontend_type>select</frontend_type>
115
+ <source_model>adminhtml/system_config_source_yesno</source_model>
116
+ <sort_order>1</sort_order>
117
+ <show_in_default>1</show_in_default>
118
+ <show_in_website>1</show_in_website>
119
+ <show_in_store>1</show_in_store>
120
+ <comment>Please select "Yes" if you want to use current theme's jQuery instead of using plugin's external one. This way Mangento will have to include less js files and it will improve speed. Please test this functionality properly after enabling/disabling this.</comment>
121
+ </enabled>
122
+ </fields>
123
+ </speed>
124
  </groups>
 
125
  </mntsinfotechcookieconsent>
 
126
  </sections>
127
  </config>
package.xml CHANGED
@@ -1,22 +1,24 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MntsInfotech_CookieConsent</name>
4
- <version>0.1.5</version>
5
  <stability>stable</stability>
6
- <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Responsive Cookie Consent is simple and responsive extension to display the message for cookie usage by site.</summary>
10
- <description>Responsive Cookie Consent is simple and responsive extension to display the cookie consent message for cookie usage by site. Once user clicks on "Close" button it disappears.&#xD;
11
  &#xD;
12
- To edit text message go to System -&gt;Configuration -&gt; MNTS Infotech -&gt; Cookie Consent and change the message you want in right hand side panel.&#xD;
13
  &#xD;
14
- To change css go to file skin\frontend\base\default\css\mntsinfotech\cookieconsent.css of this extension and edit it.</description>
15
- <notes>Fixed some language related bugs.</notes>
16
- <authors><author><name>sukhvir kushwah</name><user>sukhvir13</user><email>kushwahsukhvir@gmail.com</email></author></authors>
17
- <date>2014-11-05</date>
18
- <time>04:08:42</time>
19
- <contents><target name="magecommunity"><dir name="MntsInfotech"><dir name="CookieConsent"><dir name="Helper"><file name="Data.php" hash="6262c6c74bb269c6d5d3dbea91881557"/></dir><dir name="Model"><file name="Observer.php" hash="f8fa0a4e4eea900a78f2d1fed7ef2a89"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2273ab42ba80054cac96412325d7ff4d"/><file name="config.xml" hash="9e382d29eb65b2b8a032ec3729846bc7"/><file name="system.xml" hash="ce623b266763a1ba9a1c29cad4e8394f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MntsInfotech_CookieConsent.xml" hash="94ad3ec1b91887ca2d3e80c3641ed71b"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mntsinfotech_cookieconsent.xml" hash="869383bbbd5ce980927edfd78ce0b029"/></dir><dir name="template"><dir name="mntsinfotech"><dir name="cookieconsent"><file name="box.phtml" hash="e9903bc072c606bf69b75d17cf446631"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="mntsinfotech"><file name="cookieconsent.js" hash="8bee787e71be6bd32f5a9b5a63e99753"/><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="jquery-1.10.2.min.map" hash="6c3ccfc221d36777d383b6e04d0b8af9"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="mntsinfotech"><file name="cookieconsent.css" hash="f68b72b39acad402a3ef914129a59553"/></dir></dir></dir></dir></dir></target></contents>
 
 
20
  <compatible/>
21
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MntsInfotech_CookieConsent</name>
4
+ <version>0.1.6</version>
5
  <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Responsive Cookie Consent is simple and responsive extension to display the message for cookie usage by site.</summary>
10
+ <description>Responsive Cookie Consent is simple and responsive extension to display the cookie consent message for cookie usage by site. Once user clicks on "Close" button it disappears. &#xD;
11
  &#xD;
12
+ To edit text message go to System -&gt;Configuration -&gt; MNTS Infotech -&gt; Cookie Consent and change the message you want in right hand side panel. &#xD;
13
  &#xD;
14
+ To change css go to file &#xD;
15
+ skin\frontend\base\default\css\mntsinfotech\cookieconsent.css&#xD;
16
+ of this extension and edit it. </description>
17
+ <notes>Added speed optimization options.</notes>
18
+ <authors><author><name>Sukhvir Kushwah</name><user>sukhvir13</user><email>kushwahsukhvir@gmail.com</email></author></authors>
19
+ <date>2017-05-20</date>
20
+ <time>13:11:35</time>
21
+ <contents><target name="magecommunity"><dir name="MntsInfotech"><dir name="CookieConsent"><dir name="Helper"><file name="Data.php" hash="a616d47a3b6ca0d4c44fefb828aa195b"/></dir><dir name="Model"><file name="Observer.php" hash="67e6f75e7ace998dd2fb2761a4bfc9eb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2435a51c2a1b7f41c1ad6a56aa4aafc4"/><file name="config.xml" hash="65e4f9f905f09a1fb27cb370a9dff2c9"/><file name="system.xml" hash="ff66d1dbb718dd427ddd4d7ce079aabe"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MntsInfotech_CookieConsent.xml" hash="94ad3ec1b91887ca2d3e80c3641ed71b"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mntsinfotech_cookieconsent.xml" hash="869383bbbd5ce980927edfd78ce0b029"/></dir><dir name="template"><dir name="mntsinfotech"><dir name="cookieconsent"><file name="box.phtml" hash="e9903bc072c606bf69b75d17cf446631"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="mntsinfotech"><file name="cookieconsent.css" hash="f68b72b39acad402a3ef914129a59553"/></dir></dir></dir></dir></dir><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><dir name="mntsinfotech"><file name="cookieconsent.js" hash="8bee787e71be6bd32f5a9b5a63e99753"/><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="jquery-1.10.2.min.map" hash="6c3ccfc221d36777d383b6e04d0b8af9"/></dir></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
+ <dependencies><required><php><min>5.2.0.</min><max>6.0.0.</max></php></required></dependencies>
24
  </package>
{js → skin/frontend/base/default/js}/mntsinfotech/cookieconsent.js RENAMED
File without changes
{js → skin/frontend/base/default/js}/mntsinfotech/jquery-1.10.2.min.js RENAMED
File without changes
{js → skin/frontend/base/default/js}/mntsinfotech/jquery-1.10.2.min.map RENAMED
File without changes