Eke_Avant - Version 0.1.0

Version Notes

Initial release.

Download this release

Release Info

Developer Eke Digital
Extension Eke_Avant
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/Eke/Avant/Block/Adminhtml/About.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Eke_Avant_Block_Adminhtml_About
4
+ extends Mage_Adminhtml_Block_Abstract
5
+ implements Varien_Data_Form_Element_Renderer_Interface
6
+ {
7
+
8
+
9
+ public function render(Varien_Data_Form_Element_Abstract $element)
10
+ {
11
+ $logo = "//www.ekedigital.com/assets/eke_logo_modules.png";
12
+ $html = <<<HTML
13
+
14
+ <div style="background:url('$logo') no-repeat scroll 15px 15px #e7efef; border:1px solid #ccc; min-height:60px; margin:5px 0; padding:15px 15px 15px 140px;">
15
+ <p><strong>AvantLink Integration v0.1.0</strong> by <a href="https://www.ekedigital.com/?utm_source=Magento_Extension&utm_medium=Extension_Settings&utm_campaign=AvantLInk" target="_blank">Eke Digital</a>
16
+ <br /> Quickly integrate AvantLink affiliate tracking.
17
+ </p>For questions or support requests please email us at <a href="mailto:support@ekedigital.com">support@ekedigital.com</a>.</p>
18
+ </div>
19
+
20
+ HTML;
21
+ return $html;
22
+ }
23
+ }
app/code/community/Eke/Avant/Helper/Data.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Eke_Avant_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ public function isAvantMetaEnabled()
5
+ {
6
+ return Mage::getStoreConfig("eke_avant/avant/enabled");
7
+ }
8
+
9
+
10
+ public function getAvantSiteid()
11
+ {
12
+ return Mage::getStoreConfig("eke_avant/avant/siteid");
13
+ }
14
+
15
+ }
app/code/community/Eke/Avant/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <eke_avant>
12
+ <title>Eke Digital AvantLink Integration</title>
13
+ <sort_order>990</sort_order>
14
+ </eke_avant>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/community/Eke/Avant/etc/config.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Eke_Avant>
5
+ <version>0.1.0</version>
6
+ </Eke_Avant>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <eke_avant>
11
+ <class>Eke_Avant_Model</class>
12
+ <resourceModel>eke_avant_resource</resourceModel>
13
+ </eke_avant>
14
+ <eke_avant_resource>
15
+ <class>Eke_Avant_Model_Resource</class>
16
+ </eke_avant_resource>
17
+ </models>
18
+ <blocks>
19
+ <eke_avant>
20
+ <class>Eke_Avant_Block</class>
21
+ </eke_avant>
22
+ </blocks>
23
+ <helpers>
24
+ <eke_avant>
25
+ <class>Eke_Avant_Helper</class>
26
+ </eke_avant>
27
+ </helpers>
28
+ </global>
29
+ <frontend>
30
+ <layout>
31
+ <updates>
32
+ <eke_avant>
33
+ <file>eke_avant.xml</file>
34
+ </eke_avant>
35
+ </updates>
36
+ </layout>
37
+ </frontend>
38
+ <default>
39
+ <eke_avant>
40
+ <avant>
41
+ <enabled>0</enabled>
42
+ </avant>
43
+ </eke_avant>
44
+ </default>
45
+ </config>
app/code/community/Eke/Avant/etc/system.xml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <eke>
5
+ <label>EKE DIGITAL</label>
6
+ <sort_order>100</sort_order>
7
+ </eke>
8
+ </tabs>
9
+ <sections>
10
+ <eke_avant translate="label">
11
+ <label>AvantLink Integration</label>
12
+ <tab>eke</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>100</sort_order>
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
+ <groups>
19
+ <about>
20
+ <frontend_model>eke_avant/adminhtml_about</frontend_model>
21
+ <sort_order>0</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ </about>
26
+ <avant translate="label">
27
+ <label>Configuration</label>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
+ <sort_order>1</sort_order>
32
+ <fields>
33
+ <enabled translate="label" module="eke_avant">
34
+ <label>Enable</label>
35
+ <frontend_type>select</frontend_type>
36
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
37
+ <sort_order>10</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ </enabled>
42
+ <siteid translate="label" module="eke_avant">
43
+ <label>AvantLink Site ID</label>
44
+ <frontend_type>text</frontend_type>
45
+ <sort_order>20</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ </siteid>
50
+ </fields>
51
+ </avant>
52
+ </groups>
53
+ </eke_avant>
54
+ </sections>
55
+ </config>
app/design/frontend/base/default/layout/eke_avant.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+
4
+ <default>
5
+ <reference name="before_body_end">
6
+ <block type="core/template" template="eke/avant/default.phtml" />
7
+ </reference>
8
+ </default>
9
+
10
+ <checkout_onepage_success translate="label">
11
+ <reference name="head">
12
+ <block type="core/template" template="eke/avant/checkout.phtml" />
13
+ </reference>
14
+ </checkout_onepage_success>
15
+ </layout>
app/design/frontend/base/default/template/eke/avant/checkout.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_avant");
3
+ if (!$helper->isAvantMetaEnabled()) {
4
+ return;
5
+ }
6
+
7
+ $siteid = $helper->getAvantSiteid();
8
+
9
+ $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
10
+ $_order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
11
+
12
+ ?>
13
+
14
+ <!-- AvantLink Checkout Tracking -->
15
+ <script type="text/javascript">
16
+ var _AvantMetrics = _AvantMetrics || [];
17
+ _AvantMetrics.push(['order',{ order_id:'<?php echo $_order->getIncrementId(); ?>', amount:'<?php echo round($_order->getGrandTotal(), 2); ?>', state:'<?php echo $_order->getShippingAddress()->getRegionCode(); ?>', country:'<?php echo $_order->getShippingAddress()->getCountry(); ?>' }]);
18
+ <?php foreach($_order->getAllVisibleItems() as $item): ?>
19
+ _AvantMetrics.push(['item',{ order_id:'<?php echo $_order->getIncrementId(); ?>', parent_sku:'<?php echo $item->getSku(); ?>', price:'<?php echo round($item->getPrice(), 2); ?>', qty:'<?php echo round($item->getQtyOrdered(), 0); ?>' }]);
20
+ <?php endforeach ?>
21
+ </script>
app/design/frontend/base/default/template/eke/avant/default.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_avant");
3
+ if (!$helper->isAvantMetaEnabled()) {
4
+ return;
5
+ }
6
+
7
+ $siteid = $helper->getAvantSiteid();
8
+ ?>
9
+
10
+ <!-- AvantLink Standard Tracking -->
11
+ <script type="text/javascript">
12
+ (function() {
13
+ var avm = document.createElement('script'); avm.type = 'text/javascript'; avm.async = true;
14
+ avm.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.avmws.com/<?php echo $siteid; ?>/';
15
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(avm, s);
16
+ })();
17
+ </script>
18
+
app/etc/modules/Eke_Avant.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Eke_Avant>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Eke_Avant>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Eke_Avant</name>
4
+ <version>0.1.0</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>Quickly integrate AvantLink affiliate tracking.</summary>
10
+ <description>This module adds the AvantLink affiliate tracking JavaScript and Checkout tracking script. </description>
11
+ <notes>Initial release.</notes>
12
+ <authors><author><name>Eke Digital</name><user>ekedigital</user><email>dane@ekedigital.com</email></author></authors>
13
+ <date>2016-10-10</date>
14
+ <time>17:10:31</time>
15
+ <contents><target name="magecommunity"><dir name="Eke"><dir name="Avant"><dir name="Block"><dir name="Adminhtml"><file name="About.php" hash="de03bfa6259b5847ffc06da0b3363a74"/></dir></dir><dir name="Helper"><file name="Data.php" hash="690430edf2ccbb12e178f55fb8d17fee"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9c9d2aa7c0bac2d502b746c74746a085"/><file name="config.xml" hash="e0bd399b2a51fb7beb86d8e45072282b"/><file name="system.xml" hash="6b60208dab947e0499e3e10ac4d0cb36"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="eke"><dir name="avant"><file name="checkout.phtml" hash="4d37b17e3678707e8aece8dc5be8b030"/><file name="default.phtml" hash="82a8fb850b9af7b5667a062468129fb5"/></dir></dir></dir><dir name="layout"><file name="eke_avant.xml" hash="3fea8ac375c512e040d500a9a30a3082"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eke_Avant.xml" hash="b7ea456befb56da311a5321ff4b13776"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Helper_Abstract</name><channel>community</channel><min>1.6</min><max>1.9</max></package></required></dependencies>
18
+ </package>