Fumo_Eclick - Version 1.0.0.0

Version Notes

Initial Release

Download this release

Release Info

Developer Mage Fumo
Extension Fumo_Eclick
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

app/code/local/Fumo/Eclick/Block/Eclick.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Mage Fumo Eclick
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Mage Fumo EULA License which is bundled with
7
+ * this package in the files LICENSE.txt.
8
+ *
9
+ * DISCLAIMER
10
+ * It is strictly prohibited to copy, redistribute, republish or modify
11
+ * (in parts or whole) this file or any other file included in the same package.
12
+ *
13
+ * @category Service Integration Extension
14
+ * @package Fumo_Eclick
15
+ * @author Fumo 2014/12/15
16
+ * @copyright Copyright (c) 2008-2015 Mage Fumo. (http://http://mage.fu-mo.co.jp//)
17
+ * @license Mage Fumo EULA License
18
+ */
19
+
20
+ class Fumo_Eclick_Block_Eclick extends Mage_Core_Block_Abstract
21
+ {
22
+ public function __construct()
23
+ {
24
+ parent::__construct();
25
+ $this->setEclickAffiliateTag(Mage::getStoreConfig('fumo_eclick/general/eclick_affiliate_tag'));
26
+ }
27
+
28
+ protected function _toHtml()
29
+ {
30
+ $html = "";
31
+
32
+ if (Mage::helper('fumo_eclick')->isEclickEnabled()) {
33
+
34
+ $info = Mage::helper('fumo_eclick')->getEclickInfo();
35
+
36
+ $tag = $this->getEclickAffiliateTag();
37
+ if (Mage::app()->getStore()->isCurrentlySecure()) {
38
+ $tag = preg_replace("/(http:)/", "https:", $tag);
39
+ }
40
+ $tag = preg_replace("/(税抜売上金額)/", $info[0], $tag);
41
+ $tag = preg_replace("/(識別コード)/", $info[1], $tag);
42
+
43
+ $html .= $tag;
44
+ }
45
+
46
+ return $html;
47
+ }
48
+ }
app/code/local/Fumo/Eclick/Helper/Data.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Mage Fumo Eclick
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Mage Fumo EULA License which is bundled with
7
+ * this package in the files LICENSE.txt.
8
+ *
9
+ * DISCLAIMER
10
+ * It is strictly prohibited to copy, redistribute, republish or modify
11
+ * (in parts or whole) this file or any other file included in the same package.
12
+ *
13
+ * @category Service Integration Extension
14
+ * @package Fumo_Eclick
15
+ * @author Fumo 2014/12/15
16
+ * @copyright Copyright (c) 2008-2015 Mage Fumo. (http://http://mage.fu-mo.co.jp//)
17
+ * @license Mage Fumo EULA License
18
+ */
19
+
20
+ class Fumo_Eclick_Helper_Data extends Mage_Core_Helper_Abstract
21
+ {
22
+ public function getEclickInfo()
23
+ {
24
+ $orderId = (int) Mage::getSingleton('checkout/session')->getLastOrderId();
25
+
26
+ $order = Mage::getModel('sales/order')->load($orderId);
27
+ $total = $order->subtotal;
28
+ $ordernumber = $order->increment_id;
29
+
30
+ if ($total > 0) {
31
+ $total = floor($total);
32
+ } else {
33
+ $total = 1;
34
+ }
35
+
36
+ if (isset($ordernumber)) {
37
+ $ordernumber = $ordernumber;
38
+ } else {
39
+ $ordernumber = 1;
40
+ }
41
+
42
+ return array($total, $ordernumber);
43
+ }
44
+
45
+ public function isEclickEnabled()
46
+ {
47
+ return Mage::getStoreConfigFlag('fumo_eclick/general/enabled');
48
+ }
49
+
50
+ }
app/code/local/Fumo/Eclick/etc/adminhtml.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * Mage Fumo Eclick
5
+ *
6
+ * NOTICE OF LICENSE
7
+ * This source file is subject to the Mage Fumo EULA License which is bundled with
8
+ * this package in the files LICENSE.txt.
9
+ *
10
+ * DISCLAIMER
11
+ * It is strictly prohibited to copy, redistribute, republish or modify
12
+ * (in parts or whole) this file or any other file included in the same package.
13
+ *
14
+ * @category Service Integration Extension
15
+ * @package Fumo_Eclick
16
+ * @author Fumo 2014/12/15
17
+ * @copyright Copyright (c) 2008-2015 Mage Fumo. (http://http://mage.fu-mo.co.jp//)
18
+ * @license Mage Fumo EULA License
19
+ */
20
+ -->
21
+ <config>
22
+ <acl>
23
+ <resources>
24
+ <all>
25
+ <title>Allow Everything</title>
26
+ </all>
27
+ <admin>
28
+ <children>
29
+ <system>
30
+ <children>
31
+ <config>
32
+ <children>
33
+ <fumo_eclick translate="title" module="fumo_eclick">
34
+ <title>Fumo &gt; Eclick</title>
35
+ <sort_order>1000</sort_order>
36
+ </fumo_eclick>
37
+ </children>
38
+ </config>
39
+ </children>
40
+ </system>
41
+ </children>
42
+ </admin>
43
+ </resources>
44
+ </acl>
45
+ </config>
app/code/local/Fumo/Eclick/etc/config.xml ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * Mage Fumo Eclick
5
+ *
6
+ * NOTICE OF LICENSE
7
+ * This source file is subject to the Mage Fumo EULA License which is bundled with
8
+ * this package in the files LICENSE.txt.
9
+ *
10
+ * DISCLAIMER
11
+ * It is strictly prohibited to copy, redistribute, republish or modify
12
+ * (in parts or whole) this file or any other file included in the same package.
13
+ *
14
+ * @category Service Integration Extension
15
+ * @package Fumo_Eclick
16
+ * @author Fumo 2014/12/15
17
+ * @copyright Copyright (c) 2008-2015 Mage Fumo. (http://http://mage.fu-mo.co.jp//)
18
+ * @license Mage Fumo EULA License
19
+ */
20
+ -->
21
+ <config>
22
+
23
+ <!-- ********************* MODULE CONFIGURATION ******************* -->
24
+ <modules>
25
+ <Fumo_Eclick>
26
+ <version>0.0.1</version>
27
+ </Fumo_Eclick>
28
+ </modules>
29
+
30
+ <!-- *********************** GLOBAL SETTINGS ********************** -->
31
+ <global>
32
+ <!-- Extension blocks -->
33
+ <blocks>
34
+ <fumo_eclick>
35
+ <class>Fumo_Eclick_Block</class>
36
+ </fumo_eclick>
37
+ </blocks>
38
+ <!-- Extension helpers -->
39
+ <helpers>
40
+ <fumo_eclick>
41
+ <class>Fumo_Eclick_Helper</class>
42
+ </fumo_eclick>
43
+ </helpers>
44
+ </global>
45
+
46
+ <!-- ********************** FRONTEND SETTINGS ********************* -->
47
+ <frontend>
48
+ <!-- Translations -->
49
+ <translate>
50
+ <modules>
51
+ <Fumo_Eclick>
52
+ <files>
53
+ <default>Fumo_Eclick.csv</default>
54
+ </files>
55
+ </Fumo_Eclick>
56
+ </modules>
57
+ </translate>
58
+ <!-- Frontend layout updates -->
59
+ <layout>
60
+ <updates>
61
+ <fumo_eclick>
62
+ <file>fumo_eclick.xml</file>
63
+ </fumo_eclick>
64
+ </updates>
65
+ </layout>
66
+ </frontend>
67
+
68
+ <!-- ********************** BACKEND SETTINGS ********************** -->
69
+ <adminhtml>
70
+ <!-- Translations -->
71
+ <translate>
72
+ <modules>
73
+ <Fumo_Eclick>
74
+ <files>
75
+ <default>Fumo_Eclick.csv</default>
76
+ </files>
77
+ </Fumo_Eclick>
78
+ </modules>
79
+ </translate>
80
+ </adminhtml>
81
+
82
+ </config>
app/code/local/Fumo/Eclick/etc/system.xml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * Mage Fumo Eclick
5
+ *
6
+ * NOTICE OF LICENSE
7
+ * This source file is subject to the Mage Fumo EULA License which is bundled with
8
+ * this package in the files LICENSE.txt.
9
+ *
10
+ * DISCLAIMER
11
+ * It is strictly prohibited to copy, redistribute, republish or modify
12
+ * (in parts or whole) this file or any other file included in the same package.
13
+ *
14
+ * @category Service Integration Extension
15
+ * @package Fumo_Eclick
16
+ * @author Fumo 2014/12/15
17
+ * @copyright Copyright (c) 2008-2015 Mage Fumo. (http://http://mage.fu-mo.co.jp//)
18
+ * @license Mage Fumo EULA License
19
+ */
20
+ -->
21
+ <config>
22
+ <!-- ******************* FUMO TAB GROUP **************** -->
23
+ <tabs>
24
+ <fumo>
25
+ <label>Fumo Extensions</label>
26
+ <sort_order>101</sort_order>
27
+ </fumo>
28
+ </tabs>
29
+
30
+ <sections>
31
+ <!-- ********************* ECLICK SETTINGS ******************* -->
32
+ <fumo_eclick translate="label" module="fumo_eclick">
33
+ <label>Eclick Integration</label>
34
+ <tab>fumo</tab>
35
+ <sort_order>50</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ <groups>
40
+ <!-- Global Settings -->
41
+ <general translate="label">
42
+ <label>Global settings</label>
43
+ <frontend_type>text</frontend_type>
44
+ <sort_order>10</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ <fields>
49
+ <enabled translate="label">
50
+ <label>Enable Eclick Integration Code</label>
51
+ <comment><![CDATA[Enable or disable the eclick integration code on checkout success page.<br>Adds E-Click affiliate service's affiliate code to Magento Checkout Complete page with necessary parameters.<br>For details of E-Click affiliate service, please <a href="http://www.e-click.jp/" target="_blank">click here</a>.]]></comment>
52
+ <frontend_type>select</frontend_type>
53
+ <sort_order>10</sort_order>
54
+ <source_model>adminhtml/system_config_source_yesno</source_model>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ </enabled>
59
+ <eclick_affiliate_tag translate="label">
60
+ <label>Eclick Affiliate Tag</label>
61
+ <comment><![CDATA[Copy and paste affiliate tag from Eclick admin program page. You can specify multiple tags one per line.<br> (Ex. &lt;img src=&quot;http://www.e-click.jp/applications/applicate/XXXX/税抜売上金額/識別コード&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt; )]]></comment>
62
+ <frontend_type>textarea</frontend_type>
63
+ <sort_order>20</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ </eclick_affiliate_tag>
68
+ </fields>
69
+ </general>
70
+ </groups>
71
+ </fumo_eclick>
72
+ </sections>
73
+ </config>
app/design/frontend/base/default/layout/fumo_eclick.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * Mage Fumo Eclick
5
+ *
6
+ * NOTICE OF LICENSE
7
+ * This source file is subject to the Mage Fumo EULA License which is bundled with
8
+ * this package in the files LICENSE.txt.
9
+ *
10
+ * DISCLAIMER
11
+ * It is strictly prohibited to copy, redistribute, republish or modify
12
+ * (in parts or whole) this file or any other file included in the same package.
13
+ *
14
+ * @category Service Integration Extension
15
+ * @package Fumo_Eclick
16
+ * @author Fumo 2014/12/15
17
+ * @copyright Copyright (c) 2008-2015 Mage Fumo. (http://http://mage.fu-mo.co.jp//)
18
+ * @license Mage Fumo EULA License
19
+ */
20
+ -->
21
+
22
+ <layout version="0.1.0">
23
+ <checkout_onepage_success>
24
+ <reference name="content">
25
+ <block type="fumo_eclick/eclick" name="fumo.eclick" />
26
+ </reference>
27
+ </checkout_onepage_success>
28
+ </layout>
app/locale/en_US/Fumo_Eclick.csv ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ "Global settings","Global settings"
2
+ "Enable Eclick Integration Code","Enable Eclick Integration Code"
3
+ "Yes","Yes"
4
+ "No","No"
5
+ "Eclick Affiliate Tag","Eclick Affiliate Tag"
6
+ "Copy and paste affiliate tag from Eclick admin program page. You can specify multiple tags one per line.<br> (Ex. &lt;img src=&quot;http://www.e-click.jp/applications/applicate/XXXX/税抜売上金額/識別コード&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt; )","opy and paste affiliate tag from Eclick admin program page. You can specify multiple tags one per line.<br> (Ex. &lt;img src=&quot;http://www.e-click.jp/applications/applicate/XXXX/税抜売上金額/識別コード&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt; )"
7
+ "Eclick Integration","Eclick Integration"
8
+ "Enable or disable the eclick integration code on checkout success page.<br>Adds E-Click affiliate service's affiliate code to Magento Checkout Complete page with necessary parameters.<br>For details of E-Click affiliate service, please <a href=""http://www.e-click.jp/"" target=""_blank"">click here</a>.","Enable or disable the eclick integration code on checkout success page.<br>Adds E-Click affiliate service's affiliate code to Magento Checkout Complete page with necessary parameters.<br>For details of E-Click affiliate service, please <a href=""http://www.e-click.jp/"" target=""_blank"">click here</a>.
app/locale/ja_JP/Fumo_Eclick.csv ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ "Global settings","全般設定"
2
+ "Enable Eclick Integration Code","イークリックコードを使用する"
3
+ "Yes","はい"
4
+ "No","いいえ"
5
+ "Eclick Affiliate Tag","イークリックアフィリエイトタグ"
6
+ "Copy and paste affiliate tag from Eclick admin program page. You can specify multiple tags one per line.<br> (Ex. &lt;img src=&quot;http://www.e-click.jp/applications/applicate/XXXX/税抜売上金額/識別コード&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt; )","イークリック管理画面のプログラム確認ページよりアフィリエイトタグをコピー&ペーストして下さい。複数のプログラムのタグを指定する場合は1行毎に1タグを入力します。<br>(例: &lt;img src=&quot;http://www.e-click.jp/applications/applicate/XXXX/税抜売上金額/識別コード&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt; )"
7
+ "Eclick Integration","イークリック設定"
8
+ "Enable or disable the eclick integration code on checkout success page.<br>Adds E-Click affiliate service's affiliate code to Magento Checkout Complete page with necessary parameters.<br>For details of E-Click affiliate service, please <a href=""http://www.e-click.jp/"" target=""_blank"">click here</a>.","イークリックコードを購入完了ページに含めるかどうかを設定します。<br>イークリック広告主コードをMagentoの注文完了ページに必要なパラメータと共に挿入します。<br>イークリックアフィリエイトサービスについての詳細は、<a href=""http://www.e-click.jp/"" target=""_blank"">ココをクリック</a>して下さい。"
package.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Fumo_Eclick</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://mage.fu-mo.co.jp/license-agreement/">Mage Fumo EULA</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Fumo Yamato Transport is the first and original Magento Extension for the E-Click Affiliate Service (Japan).</summary>
10
+ <description>This extension will integrate E-Click Affiliate code to Magento Checkout Complete page with neccessary data like order ID and order total.&#xD;
11
+ &#xD;
12
+ The extension offer several unique features such as:&#xD;
13
+ - Add E-Click Affiliate code to Magento Checkout Complete page.&#xD;
14
+ - Automatically include Order Id and Order Total values into the code.&#xD;
15
+ - Only thing you need to do is to copy and paste your E-Click Affiliate code in the admin panel.&#xD;
16
+ - For Details of E-Click Affiliate Service : https://www.e-click.jp/advertisers.html (Japanese)</description>
17
+ <notes>Initial Release</notes>
18
+ <authors><author><name>Mage Fumo</name><user>MageFumo</user><email>mage@fu-mo.co.jp</email></author></authors>
19
+ <date>2015-10-23</date>
20
+ <time>14:29:31</time>
21
+ <contents><target name="mageetc"><dir name="."><file name="Fumo_Eclick.xml" hash=""/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Fumo_Eclick.csv" hash="355214e98bcc1e64c26f2bb695433b0b"/></dir><dir name="ja_JP"><file name="Fumo_Eclick.csv" hash="9e5699126d1202de6ffd2521dbda83a7"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fumo_eclick.xml" hash="92282095c312608341394bac2cc2ea5c"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="Fumo"><dir name="Eclick"><dir name="Block"><file name="Eclick.php" hash="53f902bd66adb48b0770dcaad2ef278b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6cb8c358dbb88e665a7b4cb4fb8344ee"/><file name="config.xml" hash="7ead237ae352df7a2ee2c303d5bbcc62"/><file name="system.xml" hash="9b4e7e2f24457e285da6c18b566434a4"/></dir><dir name="Helper"><file name="Data.php" hash="c536fa6346d8f2103b63bdf787a5ff56"/></dir></dir></dir></target></contents>
22
+ <compatible/>
23
+ <dependencies><required><php><min>5.3.0</min><max>5.5.0</max></php></required></dependencies>
24
+ </package>