Version Notes
Added below functionality:
1) Enable disable extension
2) Lifetime of cookie
3) Ability to add link for cookie policy page
Download this release
Release Info
Developer | Sukhvir Kushwah |
Extension | MntsInfotech_CookieConsent |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
app/code/community/MntsInfotech/CookieConsent/etc/config.xml
CHANGED
@@ -65,9 +65,16 @@
|
|
65 |
|
66 |
<message>
|
67 |
<message>This site uses cookies to improve your browsing experience. By continuing to use this site, you accept these cookies.</message>
|
68 |
-
|
69 |
</message>
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
</mntsinfotechcookieconsent>
|
72 |
|
73 |
</default>
|
65 |
|
66 |
<message>
|
67 |
<message>This site uses cookies to improve your browsing experience. By continuing to use this site, you accept these cookies.</message>
|
|
|
68 |
</message>
|
69 |
+
<general>
|
70 |
+
<enabled>1</enabled>
|
71 |
+
<lifetime>31</lifetime>
|
72 |
+
</general>
|
73 |
+
<link>
|
74 |
+
<enabled>0</enabled>
|
75 |
+
<linktext>View Cookie Policy</linktext>
|
76 |
+
<link>http://www.mntsinfotech.com</link>
|
77 |
+
</link>
|
78 |
</mntsinfotechcookieconsent>
|
79 |
|
80 |
</default>
|
app/code/community/MntsInfotech/CookieConsent/etc/system.xml
CHANGED
@@ -17,7 +17,34 @@
|
|
17 |
<show_in_store>1</show_in_store>
|
18 |
|
19 |
<groups>
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<message translate="label comment" module="cookieconsent">
|
22 |
<label>Message / Notice</label>
|
23 |
<frontend_type>text</frontend_type>
|
@@ -37,6 +64,48 @@
|
|
37 |
|
38 |
</fields>
|
39 |
</message>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
</groups>
|
42 |
|
17 |
<show_in_store>1</show_in_store>
|
18 |
|
19 |
<groups>
|
20 |
+
<general translate="label comment" module="cookieconsent">
|
21 |
+
<label>General</label>
|
22 |
+
<sort_order>1</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<enabled translate="label comment" module="cookieconsent">
|
28 |
+
<label>Enabled?</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<sort_order>1</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
</enabled>
|
36 |
+
<lifetime translate="label comment" module="cookieconsent">
|
37 |
+
<label>Cookie Lifetime (in days)</label>
|
38 |
+
<comment>Defaults to 31 (days).</comment>
|
39 |
+
<frontend_type>text</frontend_type>
|
40 |
+
<sort_order>2</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>1</show_in_website>
|
43 |
+
<show_in_store>1</show_in_store>
|
44 |
+
<validate>validate-number</validate>
|
45 |
+
</lifetime>
|
46 |
+
</fields>
|
47 |
+
</general>
|
48 |
<message translate="label comment" module="cookieconsent">
|
49 |
<label>Message / Notice</label>
|
50 |
<frontend_type>text</frontend_type>
|
64 |
|
65 |
</fields>
|
66 |
</message>
|
67 |
+
<link translate="label comment" module="cookieconsent">
|
68 |
+
<label>Cookie Policy Link</label>
|
69 |
+
<frontend_type>text</frontend_type>
|
70 |
+
<sort_order>3</sort_order>
|
71 |
+
<show_in_default>1</show_in_default>
|
72 |
+
<show_in_website>1</show_in_website>
|
73 |
+
<show_in_store>1</show_in_store>
|
74 |
+
<fields>
|
75 |
+
<enabled translate="label comment" module="cookieconsent">
|
76 |
+
<label>Enabled?</label>
|
77 |
+
<frontend_type>select</frontend_type>
|
78 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
79 |
+
<sort_order>1</sort_order>
|
80 |
+
<show_in_default>1</show_in_default>
|
81 |
+
<show_in_website>1</show_in_website>
|
82 |
+
<show_in_store>1</show_in_store>
|
83 |
+
<comment>Link will be displayed after message/notice.</comment>
|
84 |
+
</enabled>
|
85 |
+
<link translate="label comment" module="cookieconsent">
|
86 |
+
<label>Link</label>
|
87 |
+
<frontend_type>text</frontend_type>
|
88 |
+
<sort_order>3</sort_order>
|
89 |
+
<show_in_default>1</show_in_default>
|
90 |
+
<show_in_website>1</show_in_website>
|
91 |
+
<show_in_store>1</show_in_store>
|
92 |
+
<validate>validate-url</validate>
|
93 |
+
<comment>Please add link to your cookie policy related content.</comment>
|
94 |
+
<depends><enabled>1</enabled></depends>
|
95 |
+
</link>
|
96 |
+
<linktext translate="label comment" module="cookieconsent">
|
97 |
+
<label>Link Text</label>
|
98 |
+
<frontend_type>text</frontend_type>
|
99 |
+
<sort_order>2</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
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 |
|
app/design/frontend/base/default/template/mntsinfotech/cookieconsent/box.phtml
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<script type="text/javascript">
|
2 |
jQuery.noConflict();
|
3 |
jQuery(document).ready(function(){
|
@@ -16,4 +25,5 @@ jQuery( document ).ready(function( $ ) {
|
|
16 |
}
|
17 |
});
|
18 |
</script>
|
19 |
-
<div id="mntsinfotech-cookie-bar"><?php echo Mage::getStoreConfig('mntsinfotechcookieconsent/message/message'); ?> <button id="mntsinfotechCookie" tabindex=1 onclick="mntsinfotechAcceptCookies();" class="mnts_btn">Close</button></div>
|
|
1 |
+
<?php if(Mage::getStoreConfig('mntsinfotechcookieconsent/general/enabled')==1) { ?>
|
2 |
+
<?php
|
3 |
+
//cookie name
|
4 |
+
$ncookiedays = Mage::getStoreConfig('mntsinfotechcookieconsent/general/lifetime');
|
5 |
+
if($ncookiedays == 0 || $ncookiedays==''){
|
6 |
+
$ncookiedays=31;
|
7 |
+
}
|
8 |
+
|
9 |
+
?>
|
10 |
<script type="text/javascript">
|
11 |
jQuery.noConflict();
|
12 |
jQuery(document).ready(function(){
|
25 |
}
|
26 |
});
|
27 |
</script>
|
28 |
+
<div id="mntsinfotech-cookie-bar"><?php echo Mage::getStoreConfig('mntsinfotechcookieconsent/message/message'); ?><?php if(Mage::getStoreConfig('mntsinfotechcookieconsent/link/enabled')==1 ){ ?> <a href="<?php echo Mage::getStoreConfig('mntsinfotechcookieconsent/link/link'); ?>" target="_blank"><?php echo Mage::getStoreConfig('mntsinfotechcookieconsent/link/linktext'); ?></a><?php } ?> <button id="mntsinfotechCookie" tabindex=1 onclick="mntsinfotechAcceptCookies(<?php echo $ncookiedays; ?>);" class="mnts_btn">Close</button></div>
|
29 |
+
<?php } ?>
|
js/mntsinfotech/cookieconsent.js
CHANGED
@@ -21,8 +21,8 @@ function mntsinfotechDeleteCookie(cookieName) {
|
|
21 |
expire.setTime(today.getTime() - 3600000*24*90);
|
22 |
document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
|
23 |
}
|
24 |
-
function mntsinfotechAcceptCookies() {
|
25 |
-
mntsinfotechSetCookie('catAccCookies', true,
|
26 |
jQuery("#mntsinfotech-cookie-bar").hide();
|
27 |
jQuery("html").css("margin-top","0");
|
28 |
}
|
21 |
expire.setTime(today.getTime() - 3600000*24*90);
|
22 |
document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
|
23 |
}
|
24 |
+
function mntsinfotechAcceptCookies(ndays) {
|
25 |
+
mntsinfotechSetCookie('catAccCookies', true, ndays);
|
26 |
jQuery("#mntsinfotech-cookie-bar").hide();
|
27 |
jQuery("html").css("margin-top","0");
|
28 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MntsInfotech_CookieConsent</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
@@ -12,11 +12,15 @@
|
|
12 |
To edit text message go to System ->Configuration -> MNTS Infotech -> Cookie Consent and change the message you want in right hand side panel.
|
13 |

|
14 |
To change css go to file skin\frontend\base\default\css\mntsinfotech\cookieconsent.css of this extension and edit it.</description>
|
15 |
-
<notes>
|
|
|
|
|
|
|
|
|
16 |
<authors><author><name>sukhvir kushwah</name><user>sukhvir13</user><email>kushwahsukhvir@gmail.com</email></author></authors>
|
17 |
-
<date>2014-09-
|
18 |
-
<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="
|
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.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
12 |
To edit text message go to System ->Configuration -> MNTS Infotech -> Cookie Consent and change the message you want in right hand side panel.
|
13 |

|
14 |
To change css go to file skin\frontend\base\default\css\mntsinfotech\cookieconsent.css of this extension and edit it.</description>
|
15 |
+
<notes>Added below functionality:
|
16 |
+
1) Enable disable extension 
|
17 |
+
2) Lifetime of cookie
|
18 |
+
3) Ability to add link for cookie policy page
|
19 |
+
</notes>
|
20 |
<authors><author><name>sukhvir kushwah</name><user>sukhvir13</user><email>kushwahsukhvir@gmail.com</email></author></authors>
|
21 |
+
<date>2014-09-24</date>
|
22 |
+
<time>09:02:34</time>
|
23 |
+
<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="4c9697f197678a7e6b0dc2ddceebc91f"/><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="dabc63b7eb15d5fb9b1ff2463eeeddc6"/></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>
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
26 |
</package>
|