Exit_Screen_Pop_Up - Version 1.0.2

Version Notes

- Some changes on js

Download this release

Release Info

Developer Vsourz Digital
Extension Exit_Screen_Pop_Up
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Vsourz/Exitscreen/Model/Source/Page.php CHANGED
@@ -6,7 +6,8 @@ class Vsourz_Exitscreen_Model_Source_Page
6
 
7
  public function toOptionArray()
8
  {
9
- if (!$this->_options) {
 
10
  $this->_options = Mage::getResourceModel('cms/page_collection')
11
  ->load()->toOptionIdArray();
12
  }
@@ -14,5 +15,4 @@ class Vsourz_Exitscreen_Model_Source_Page
14
  $this->_options[] = array('value' => 'checkout', 'label' => 'Checkout');
15
  return $this->_options;
16
  }
17
-
18
  }
6
 
7
  public function toOptionArray()
8
  {
9
+ if (!$this->_options)
10
+ {
11
  $this->_options = Mage::getResourceModel('cms/page_collection')
12
  ->load()->toOptionIdArray();
13
  }
15
  $this->_options[] = array('value' => 'checkout', 'label' => 'Checkout');
16
  return $this->_options;
17
  }
 
18
  }
app/code/community/Vsourz/Exitscreen/Model/Source/Staticblock.php CHANGED
@@ -4,7 +4,8 @@ class Vsourz_Exitscreen_Model_Source_Staticblock
4
  protected $_options;
5
  public function toOptionArray()
6
  {
7
- if (!$this->_options) {
 
8
  $this->_options = Mage::getResourceModel('cms/block_collection')
9
  ->load()
10
  ->toOptionArray();
4
  protected $_options;
5
  public function toOptionArray()
6
  {
7
+ if(!$this->_options)
8
+ {
9
  $this->_options = Mage::getResourceModel('cms/block_collection')
10
  ->load()
11
  ->toOptionArray();
app/design/frontend/base/default/template/vsourz/exitscreen.phtml CHANGED
@@ -7,7 +7,6 @@ $showPop = $helper->showPopUp();
7
  $height = $helper->getHeight();
8
  $width = $helper->getWidth();
9
  $blockTitle = $helper->getBlockTitle();
10
-
11
 
12
  if($showPop == "Y"):
13
  ?><div class="outer-bg">&nbsp;</div>
@@ -19,29 +18,25 @@ if($showPop == "Y"):
19
 
20
  <script type="text/javascript">
21
  jQuery(document).ready(function($){
 
 
 
 
 
 
 
 
 
 
 
 
22
  addEvent(window,"load",function(e){
23
  // checks if cookie is set for delay
24
  if(getCookie("delay")!="Y"){
25
  // sets delay for displaying pop-up
26
  setCookie("delay","Y",<?php echo $delay; ?>);
27
  }
28
- addEvent(document, "mouseout", function(e){
29
- e = e ? e : window.event;
30
- var from = e.relatedTarget || e.toElement;
31
- if (!from || from.nodeName == "HTML"){
32
- // stop your drag event here
33
- // for now we can just use an alert
34
- if(getCookie("delay")!="Y"){
35
- if(getCookie("exitscreen")!="Y"){
36
- $('.outer-bg').fadeIn();
37
- $('.pop-up').addClass('open');
38
- setCookie("exitscreen","Y",<?php echo $cookieExpire ?>);
39
- }
40
- }
41
- }
42
- });
43
- });
44
-
45
  // Close popup
46
  jQuery('.pop-up #close').click(function(){
47
  jQuery('.outer-bg').fadeOut();
7
  $height = $helper->getHeight();
8
  $width = $helper->getWidth();
9
  $blockTitle = $helper->getBlockTitle();
 
10
 
11
  if($showPop == "Y"):
12
  ?><div class="outer-bg">&nbsp;</div>
18
 
19
  <script type="text/javascript">
20
  jQuery(document).ready(function($){
21
+ jQuery(document).bind("mouseleave", function(e){
22
+ if (e.pageY - jQuery(window).scrollTop() <= 1 || e.pageY - jQuery(window).scrollTop() >= jQuery(window).height()){
23
+ //console.log(e.pageY);
24
+ if(getCookie("delay")!="Y"){
25
+ if(getCookie("exitscreen")!="Y"){
26
+ $('.outer-bg').fadeIn();
27
+ $('.pop-up').addClass('open');
28
+ setCookie("exitscreen","Y",<?php echo $cookieExpire ?>);
29
+ }
30
+ }
31
+ }
32
+ });
33
  addEvent(window,"load",function(e){
34
  // checks if cookie is set for delay
35
  if(getCookie("delay")!="Y"){
36
  // sets delay for displaying pop-up
37
  setCookie("delay","Y",<?php echo $delay; ?>);
38
  }
39
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  // Close popup
41
  jQuery('.pop-up #close').click(function(){
42
  jQuery('.outer-bg').fadeOut();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Exit_Screen_Pop_Up</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/MIT">Massachusetts Institute of Technology License (MITL)</license>
7
  <channel>community</channel>
@@ -41,11 +41,11 @@ How to use?&#xD;
41
  7. Cookie Interval : Total time (In Hours) until cookie expires. This will enable admin to control the time until which next Pop-up shouldn't appear.&#xD;
42
  8. Delay Pop-up : Total time (In Minutes) after which Pop-up should appear&#xD;
43
  9. Pop-up Width and Height : Enter width or height in pixel</description>
44
- <notes>Bug Fixes for layout reference and width of popup</notes>
45
  <authors><author><name>Vsourz Digital</name><user>MAG002979323</user><email>mehul@vsourz.com</email></author></authors>
46
- <date>2015-08-03</date>
47
- <time>05:52:15</time>
48
- <contents><target name="magecommunity"><dir name="Vsourz"><dir name="Exitscreen"><dir name="Block"><file name="Exitscreen.php" hash="ac6fac27feca2283e85a9cc617145e2e"/></dir><dir name="Helper"><file name="Data.php" hash="c715b899d4a3638742ed9da729d93c1c"/></dir><dir name="Model"><dir name="Source"><file name="Page.php" hash="73f8108405de6f8b9f8151a9e7612340"/><file name="Staticblock.php" hash="5a16c5041a793dd8c4fe6f9c0d2da437"/><file name="Truefalse.php" hash="e81f8d418ce09a31de8f97b779b56516"/></dir></dir><dir name="data"><dir name="exitscreen_setup"><file name="data-install-0.1.0.php" hash="c90adfc903da6cef3d229130909ea599"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0d34d694b85cfdd9404222fa19a1562c"/><file name="config.xml" hash="3135feaa79eccd12da23382b70da7403"/><file name="system.xml" hash="4dc71c4926a1747b38e0069fa1630c66"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vsourz_Exitscreen.xml" hash="c04d7aedee84d179226f7c69c1ff6d28"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="vsourz"><file name="exitscreen.xml" hash="7fc1a83481816e3b602d7e9aec1d6748"/></dir></dir><dir name="template"><dir name="vsourz"><file name="exitscreen.phtml" hash="3f410c1b21f609216687ec2a37052406"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="exitscreen"><file name="exitpopup.css" hash="fbb1a559c25dab0094bac16fbf863ea7"/></dir></dir><dir name="js"><dir name="exitscreen"><file name="exitpopup.js" hash="12fcd894301965a86fd825291969d32a"/><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/></dir></dir></dir></dir></dir></target></contents>
49
  <compatible/>
50
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
51
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Exit_Screen_Pop_Up</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/MIT">Massachusetts Institute of Technology License (MITL)</license>
7
  <channel>community</channel>
41
  7. Cookie Interval : Total time (In Hours) until cookie expires. This will enable admin to control the time until which next Pop-up shouldn't appear.&#xD;
42
  8. Delay Pop-up : Total time (In Minutes) after which Pop-up should appear&#xD;
43
  9. Pop-up Width and Height : Enter width or height in pixel</description>
44
+ <notes>- Some changes on js</notes>
45
  <authors><author><name>Vsourz Digital</name><user>MAG002979323</user><email>mehul@vsourz.com</email></author></authors>
46
+ <date>2015-09-08</date>
47
+ <time>10:50:55</time>
48
+ <contents><target name="magecommunity"><dir name="Vsourz"><dir name="Exitscreen"><dir name="Block"><file name="Exitscreen.php" hash="ac6fac27feca2283e85a9cc617145e2e"/></dir><dir name="Helper"><file name="Data.php" hash="c715b899d4a3638742ed9da729d93c1c"/></dir><dir name="Model"><dir name="Source"><file name="Page.php" hash="b6972b249ecb7df55529d726d91c03f0"/><file name="Staticblock.php" hash="635fc802b75932204903f9ed9c87fc22"/><file name="Truefalse.php" hash="e81f8d418ce09a31de8f97b779b56516"/></dir></dir><dir name="data"><dir name="exitscreen_setup"><file name="data-install-0.1.0.php" hash="c90adfc903da6cef3d229130909ea599"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0d34d694b85cfdd9404222fa19a1562c"/><file name="config.xml" hash="3135feaa79eccd12da23382b70da7403"/><file name="system.xml" hash="4dc71c4926a1747b38e0069fa1630c66"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vsourz_Exitscreen.xml" hash="c04d7aedee84d179226f7c69c1ff6d28"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="vsourz"><file name="exitscreen.xml" hash="7fc1a83481816e3b602d7e9aec1d6748"/></dir></dir><dir name="template"><dir name="vsourz"><file name="exitscreen.phtml" hash="a3b54903d40b0fab14594dc0d384fe30"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="exitscreen"><file name="exitpopup.css" hash="fbb1a559c25dab0094bac16fbf863ea7"/></dir></dir><dir name="js"><dir name="exitscreen"><file name="exitpopup.js" hash="12fcd894301965a86fd825291969d32a"/><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/></dir></dir></dir></dir></dir></target></contents>
49
  <compatible/>
50
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
51
  </package>