Version Notes
Init note
Download this release
Release Info
| Developer | Oleksiy Pavlikovsky |
| Extension | mouseflow_snippet |
| Version | 1.1.0 |
| Comparing to | |
| See all releases | |
Version 1.1.0
- app/code/local/Mouseflow/Snippet/Helper/Data.php +37 -0
- app/code/local/Mouseflow/Snippet/etc/adminhtml.xml +22 -0
- app/code/local/Mouseflow/Snippet/etc/config.xml +32 -0
- app/code/local/Mouseflow/Snippet/etc/system.xml +50 -0
- app/design/frontend/base/default/layout/mouseflow/snippet.xml +8 -0
- app/design/frontend/base/default/template/mouseflow/snippet/snippet.phtml +3 -0
- app/etc/modules/Mouseflow_Snippet.xml +9 -0
- package.xml +18 -0
app/code/local/Mouseflow/Snippet/Helper/Data.php
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Mouseflow Snippet
|
| 5 |
+
*
|
| 6 |
+
* @category Mouseflow
|
| 7 |
+
* @package Mouseflow_Snippet
|
| 8 |
+
* @author Mouseflow (http://mouseflow.com)
|
| 9 |
+
*
|
| 10 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
class Mouseflow_Snippet_Helper_Data extends Mage_Core_Helper_Abstract
|
| 14 |
+
{
|
| 15 |
+
const XML_PATH_ENABLED = 'mouseflow_snippet/general/enabled';
|
| 16 |
+
const XML_PATH_CODE = 'mouseflow_snippet/general/tracking_code';
|
| 17 |
+
|
| 18 |
+
/**
|
| 19 |
+
* check is module enable in configuration page
|
| 20 |
+
*
|
| 21 |
+
* @return bool
|
| 22 |
+
*/
|
| 23 |
+
public function isEnable()
|
| 24 |
+
{
|
| 25 |
+
return (bool) Mage::getStoreConfig( self::XML_PATH_ENABLED );
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* tracking code
|
| 30 |
+
*
|
| 31 |
+
* @return string
|
| 32 |
+
*/
|
| 33 |
+
public function getTrackingCode()
|
| 34 |
+
{
|
| 35 |
+
return (string) Mage::getStoreConfig( self::XML_PATH_CODE );
|
| 36 |
+
}
|
| 37 |
+
}
|
app/code/local/Mouseflow/Snippet/etc/adminhtml.xml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<acl>
|
| 4 |
+
<resources>
|
| 5 |
+
<admin>
|
| 6 |
+
<children>
|
| 7 |
+
<system>
|
| 8 |
+
<children>
|
| 9 |
+
<config>
|
| 10 |
+
<children>
|
| 11 |
+
<mouseflow_snippet translate="title">
|
| 12 |
+
<title>Mouseflow Extensions</title>
|
| 13 |
+
</mouseflow_snippet>
|
| 14 |
+
</children>
|
| 15 |
+
</config>
|
| 16 |
+
</children>
|
| 17 |
+
</system>
|
| 18 |
+
</children>
|
| 19 |
+
</admin>
|
| 20 |
+
</resources>
|
| 21 |
+
</acl>
|
| 22 |
+
</config>
|
app/code/local/Mouseflow/Snippet/etc/config.xml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Mouseflow_Snippet>
|
| 5 |
+
<version>0.1.0</version>
|
| 6 |
+
</Mouseflow_Snippet>
|
| 7 |
+
</modules>
|
| 8 |
+
<global>
|
| 9 |
+
<helpers>
|
| 10 |
+
<mouseflow_snippet>
|
| 11 |
+
<class>Mouseflow_Snippet_Helper</class>
|
| 12 |
+
</mouseflow_snippet>
|
| 13 |
+
</helpers>
|
| 14 |
+
</global>
|
| 15 |
+
<frontend>
|
| 16 |
+
<layout>
|
| 17 |
+
<updates>
|
| 18 |
+
<mouseflow_snippet>
|
| 19 |
+
<file>mouseflow/snippet.xml</file>
|
| 20 |
+
</mouseflow_snippet>
|
| 21 |
+
</updates>
|
| 22 |
+
</layout>
|
| 23 |
+
</frontend>
|
| 24 |
+
<default>
|
| 25 |
+
<mouseflow_snippet>
|
| 26 |
+
<general>
|
| 27 |
+
<enabled>1</enabled>
|
| 28 |
+
<tracking_code>mouseflow_default_tracking_code</tracking_code>
|
| 29 |
+
</general>
|
| 30 |
+
</mouseflow_snippet>
|
| 31 |
+
</default>
|
| 32 |
+
</config>
|
app/code/local/Mouseflow/Snippet/etc/system.xml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<tabs>
|
| 4 |
+
<mouseflow>
|
| 5 |
+
<label>Mouseflow - Libraries</label>
|
| 6 |
+
<sort_order>54</sort_order>
|
| 7 |
+
</mouseflow>
|
| 8 |
+
</tabs>
|
| 9 |
+
|
| 10 |
+
<sections>
|
| 11 |
+
<mouseflow_snippet translate="label">
|
| 12 |
+
<label>Snippet Extension</label>
|
| 13 |
+
<tab>mouseflow</tab>
|
| 14 |
+
<frontend_type>text</frontend_type>
|
| 15 |
+
<sort_order>101</sort_order>
|
| 16 |
+
<show_in_default>1</show_in_default>
|
| 17 |
+
<show_in_website>1</show_in_website>
|
| 18 |
+
<show_in_store>1</show_in_store>
|
| 19 |
+
<groups>
|
| 20 |
+
<general translate="label">
|
| 21 |
+
<label>General</label>
|
| 22 |
+
<frontend_type>text</frontend_type>
|
| 23 |
+
<sort_order>10</sort_order>
|
| 24 |
+
<show_in_default>1</show_in_default>
|
| 25 |
+
<show_in_website>1</show_in_website>
|
| 26 |
+
<show_in_store>1</show_in_store>
|
| 27 |
+
<fields>
|
| 28 |
+
<enabled translate="label">
|
| 29 |
+
<label>Enable Extension</label>
|
| 30 |
+
<frontend_type>select</frontend_type>
|
| 31 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 32 |
+
<sort_order>0</sort_order>
|
| 33 |
+
<show_in_default>1</show_in_default>
|
| 34 |
+
<show_in_website>1</show_in_website>
|
| 35 |
+
<show_in_store>0</show_in_store>
|
| 36 |
+
</enabled>
|
| 37 |
+
<tracking_code translate="label">
|
| 38 |
+
<label>Tracking code</label>
|
| 39 |
+
<frontend_type>textarea</frontend_type>
|
| 40 |
+
<sort_order>1</sort_order>
|
| 41 |
+
<show_in_default>1</show_in_default>
|
| 42 |
+
<show_in_website>1</show_in_website>
|
| 43 |
+
<show_in_store>0</show_in_store>
|
| 44 |
+
</tracking_code>
|
| 45 |
+
</fields>
|
| 46 |
+
</general>
|
| 47 |
+
</groups>
|
| 48 |
+
</mouseflow_snippet>
|
| 49 |
+
</sections>
|
| 50 |
+
</config>
|
app/design/frontend/base/default/layout/mouseflow/snippet.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<layout version="0.1.0">
|
| 3 |
+
<default>
|
| 4 |
+
<reference name="before_body_end">
|
| 5 |
+
<block type="core/template" name="mouseflow_snippet" template="mouseflow/snippet/snippet.phtml"/>
|
| 6 |
+
</reference>
|
| 7 |
+
</default>
|
| 8 |
+
</layout>
|
app/design/frontend/base/default/template/mouseflow/snippet/snippet.phtml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php if (Mage::helper('mouseflow_snippet')->isEnable()) : ?>
|
| 2 |
+
<?php echo Mage::helper('mouseflow_snippet')->getTrackingCode() ?>
|
| 3 |
+
<?php endif ?>
|
app/etc/modules/Mouseflow_Snippet.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<config>
|
| 3 |
+
<modules>
|
| 4 |
+
<Mouseflow_Snippet>
|
| 5 |
+
<active>true</active>
|
| 6 |
+
<codePool>local</codePool>
|
| 7 |
+
</Mouseflow_Snippet>
|
| 8 |
+
</modules>
|
| 9 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>mouseflow_snippet</name>
|
| 4 |
+
<version>1.1.0</version>
|
| 5 |
+
<stability>beta</stability>
|
| 6 |
+
<license>OSL</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>Mouseflow extension for Magento</summary>
|
| 10 |
+
<description>Mouseflow extension for Magento</description>
|
| 11 |
+
<notes>Init note</notes>
|
| 12 |
+
<authors><author><name>Oleksiy Pavlikovsky</name><user>CipHuK</user><email>ciphuk@mail.ru</email></author></authors>
|
| 13 |
+
<date>2015-02-25</date>
|
| 14 |
+
<time>08:42:39</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Mouseflow"><dir name="Snippet"><dir name="Helper"><file name="Data.php" hash="8f3a1b11c346cbe39f51e6598b232dfc"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c646ce530cf7e158c5aa671b69b1209e"/><file name="config.xml" hash="b04c665655c67c3bb11d35a2da4d99cf"/><file name="system.xml" hash="63b3cdfbc9314b80709f20d7c4104225"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="mouseflow"><file name="snippet.xml" hash="6ebffc13cde94d6a27ac55a5e8bd76d1"/></dir></dir><dir name="template"><dir name="mouseflow"><dir name="snippet"><file name="snippet.phtml" hash="ad76b10232ada2c3e6bbb9beda753859"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mouseflow_Snippet.xml" hash="3da74334c13b8af013e001fe6680cfc1"/></dir></target></contents>
|
| 16 |
+
<compatible/>
|
| 17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
+
</package>
|
