Notifyvisitors - Version 1.0.0

Version Notes

First release of site notification management tool

Download this release

Release Info

Developer Magento Core Team
Extension Notifyvisitors
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Notifyvisitors/.DS_Store ADDED
Binary file
app/code/local/Notifyvisitors/Nvnotify/.DS_Store ADDED
Binary file
app/code/local/Notifyvisitors/Nvnotify/Block/.DS_Store ADDED
Binary file
app/code/local/Notifyvisitors/Nvnotify/Block/Block.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Developed By Siddharth Gupta
4
+ * @copyright Copyright (c) 2011-2012 tagNpin
5
+ * @license http://www.tagNpin.com/LICENSE-M1.txt
6
+ */
7
+
8
+ class Notifyvisitors_Nvnotify_Block_Block extends Mage_Core_Block_Template
9
+ {
10
+ protected function _toHtml()
11
+ {
12
+ $enableWidget = Mage::getStoreConfig('general/nvnotify/active');
13
+ if(!empty($enableWidget)) {
14
+ $bid = Mage::getStoreConfig('general/nvnotify/brandid');
15
+ $secKey = Mage::getStoreConfig('general/nvnotify/secretkey');
16
+
17
+ echo "<div id='notifyvisitorstag'></div>
18
+ <script>
19
+ var notify_visitors = window.notify_visitors || {}; (function() {
20
+ notify_visitors.auth = { bid_e : '".$secKey."',
21
+ bid : '".$bid."', t : '420' };
22
+ var script = document.createElement('script');script.async = true;
23
+ script.src = (document.location.protocol == 'https:' ? '//d2933uxo1uhve4.cloudfront.net' : '//cdn.notifyvisitors.com') + '/js/notify-visitors-1.0.js';
24
+ var entry = document.getElementsByTagName('script')[0];entry.parentNode.insertBefore(script, entry); })();
25
+ </script>";
26
+
27
+ //print '==========='.$brandID.'==========='.$title.'==========='.$xposition.'==========='.$yposition.'==========='.$secretKey.'===========';
28
+ }
29
+ }
30
+ }
app/code/local/Notifyvisitors/Nvnotify/Block/Checkout.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Developed By Siddharth Gupta
4
+ * @copyright Copyright (c) 2011-2012 tagNpin
5
+ * @license http://www.notifyvisitors.com/LICENSE-M1.txt
6
+ */
7
+
8
+ class Notifyvisitors_Nvnotify_Block_Checkout extends Mage_Core_Block_Template
9
+ {
10
+ protected function _toHtml()
11
+ {
12
+ $enablePurchaseWidget = Mage::getStoreConfig('general/nvnotify/pointsonpurchase');
13
+ if(!empty($enablePurchaseWidget)) {
14
+ $brandID = Mage::getStoreConfig('general/nvnotify/brandid');
15
+ $secretKey = Mage::getStoreConfig('general/nvnotify/secretkey');
16
+
17
+ $order = new Mage_Sales_Model_Order();
18
+ $incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
19
+ $order->loadByIncrementId($incrementId);
20
+ $purchaseValue = $order->getGrandTotal(); // set purchase value
21
+
22
+ echo "<div id='notifyvisitorstag'></div>
23
+ <script>
24
+ var notify_visitors = window.notify_visitors || {}; (function() {
25
+ notify_visitors.auth = { bid_e : '".$secretKey."',
26
+ bid : '".$brandID."', t : '420' };
27
+ notify_visitors.ruleData = {'orderID' : '".$incrementId."', 'purchaseValue' : '".$purchaseValue."'};
28
+ var script = document.createElement('script');script.async = true;
29
+ script.src = (document.location.protocol == 'https:' ? '//d2933uxo1uhve4.cloudfront.net' : '//cdn.notifyvisitors.com') + '/js/notify-visitors-1.0.js';
30
+ var entry = document.getElementsByTagName('script')[0];entry.parentNode.insertBefore(script, entry); })();
31
+ </script>";
32
+
33
+ }
34
+ }
35
+
36
+ }
app/code/local/Notifyvisitors/Nvnotify/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Notifyvisitors_Nvnotify_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Notifyvisitors/Nvnotify/etc/config.xml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Notifyvisitors_Nvnotify>
5
+ <version>1.0.0</version>
6
+ </Notifyvisitors_Nvnotify>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <nvnotify>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Notifyvisitors_Nvnotify</module>
14
+ <frontName>nvnotify</frontName>
15
+ </args>
16
+ </nvnotify>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <nvnotify>
21
+ <file>nvnotify.xml</file>
22
+ </nvnotify>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <models>
28
+ <nvnotify>
29
+ <class>Notifyvisitors_Nvnotify_Model</class>
30
+ </nvnotify>
31
+ </models>
32
+ <resources>
33
+ </resources>
34
+ <blocks>
35
+ <nvnotify>
36
+ <class>Notifyvisitors_Nvnotify_Block</class>
37
+ </nvnotify>
38
+ </blocks>
39
+ <helpers>
40
+ <nvnotify>
41
+ <class>Notifyvisitors_Nvnotify_Helper</class>
42
+ </nvnotify>
43
+ </helpers>
44
+ </global>
45
+ <default>
46
+ <general>
47
+ <nvnotify>
48
+ <active>1</active>
49
+ <title>Nvnotify</title>
50
+ </nvnotify>
51
+ </general>
52
+ </default>
53
+
54
+ </config>
app/code/local/Notifyvisitors/Nvnotify/etc/system.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <general>
5
+ <groups>
6
+ <nvnotify translate="label" module="nvnotify">
7
+ <label>NotifyVisitors Site push notifications module</label>
8
+ <frontend_type>text</frontend_type>
9
+ <sort_order>0</sort_order>
10
+ <show_in_default>1</show_in_default>
11
+ <show_in_website>1</show_in_website>
12
+ <show_in_store>1</show_in_store>
13
+ <fields>
14
+ <active translate="label">
15
+ <label>Enable Widget</label>
16
+ <frontend_type>select</frontend_type>
17
+ <source_model>adminhtml/system_config_source_yesno</source_model>
18
+ <sort_order>1</sort_order>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>0</show_in_store>
22
+ </active>
23
+ <brandid translate="label">
24
+ <label>brandid</label>
25
+ <comment>You can find this in Notifyvisitors.com admin panel -> Integration</comment>
26
+ <frontend_type>text</frontend_type>
27
+ <sort_order>2</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>0</show_in_store>
31
+ </brandid>
32
+ <secretkey translate="label">
33
+ <label>Secret Key</label>
34
+ <comment>You can find this in Notifyvisitors.com admin panel -> Integration</comment>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>3</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>0</show_in_store>
40
+ </secretkey>
41
+ </fields>
42
+ </nvnotify>
43
+ </groups>
44
+ </general>
45
+ </sections>
46
+ </config>
app/design/frontend/default/default/layout/nvnotify.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0.0">
3
+ <default>
4
+ <reference name="before_body_end" >
5
+ <block type="nvnotify/block" name="page.bottom1" >
6
+ </block>
7
+ </reference>
8
+ </default>
9
+ <checkout_onepage_success>
10
+ <reference name="before_body_end" >
11
+ <block type="nvnotify/checkout" name="page.bottom" >
12
+ </block>
13
+ </reference>
14
+ </checkout_onepage_success>
15
+ </layout>
app/etc/modules/Notifyvisitors_Nvnotify.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Notifyvisitors_Nvnotify>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Notifyvisitors_Nvnotify>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Notifyvisitors</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Site puch notifications automation tool based on visitor behaviour.</summary>
10
+ <description>Simplest notification management and automation tool. It enables you to show notifications based on visitor behaviour. Select from multiple targeting rules including visitor duration or frequency, browser or device type, url source, time of the day and many more.&#xD;
11
+ For example, show feature announcement or site maintenance notification. Show notification to visitors coming through specific adword campaign. Schedule notification during specific time of the day and many more.</description>
12
+ <notes>First release of site notification management tool</notes>
13
+ <authors><author><name>Siddharth Gupta</name><user>auto-converted</user><email>siddharthguptansit@gmail.com</email></author></authors>
14
+ <date>2014-06-25</date>
15
+ <time>11:45:08</time>
16
+ <contents><target name="magelocal"><dir name="Notifyvisitors"><dir name="Nvnotify"><dir name="Block"><file name="Block.php" hash="97512da9a406b93d3fcc14541df1d2e3"/><file name="Checkout.php" hash="03df918933ca93ab574008b3af651b02"/><file name=".DS_Store" hash="196f93c9c02a0c0fc3323d9b1bc6e2d6"/></dir><dir name="Helper"><file name="Data.php" hash="8dbb3b96d50b11267e361c8fbe0ae316"/></dir><dir name="etc"><file name="config.xml" hash="405c093e87e723e70710bab7abd5fad2"/><file name="system.xml" hash="affbe5fbfaf2b18c5532bafc6e575095"/></dir><file name=".DS_Store" hash="8afd452db34d145d35cc1296dfe8de0b"/></dir><file name=".DS_Store" hash="7868ae8ed56d933359734c46f31d4ae9"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="nvnotify.xml" hash="b521cbc7add22a58b3e023d641da6512"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Notifyvisitors_Nvnotify.xml" hash="cda640d69b77255b67b459ebb10c84f2"/></dir></target></contents>
17
+ <compatible/>
18
+ <dependencies/>
19
+ </package>