Altima_Payboard - Version 1.0.0

Version Notes

Minor changes and improvements

Download this release

Release Info

Developer Alexander
Extension Altima_Payboard
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Altima/Payboard/Block/Adminhtml/Payboard.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+
22
+ /**
23
+ * Payboard admin block
24
+ *
25
+ * @category Altima
26
+ * @package Altima_Payboard
27
+ */
28
+ class Altima_Payboard_Block_Adminhtml_Payboard extends Mage_Adminhtml_Block_Widget_Grid_Container {
29
+
30
+ }
app/code/local/Altima/Payboard/Block/Payboardjs.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ class Altima_Payboard_Block_Payboardjs extends Mage_Core_Block_Template {
22
+
23
+ public function _toHtml() {
24
+ $helper = Mage::helper('altima_payboard');
25
+ $message = false;
26
+ $key = $helper->getApikey();
27
+ $key_valid = $helper->checkKey($key);
28
+ if ($key_valid) {
29
+ $output = '
30
+ <!-- Begin Payboard Script -->
31
+ <script type="text/javascript">
32
+ var payboardCallback = function() {
33
+ Payboard.Events.trackPage();
34
+ };
35
+ var payboardScript = document.createElement("script");
36
+ payboardScript.src = "//d3px1qgagsf6ei.cloudfront.net/Scripts/' . $key . '";
37
+ if (payboardScript.addEventListener) {
38
+ payboardScript.addEventListener("load", payboardCallback, false);
39
+ } else if (payboardScript.readyState) {
40
+ payboardScript.onreadystatechange = payboardCallback;
41
+ }
42
+ document.body.appendChild(payboardScript);
43
+ </script>
44
+ <!-- End Payboard Script -->
45
+ ';
46
+ } else {
47
+ $output = '';
48
+ }
49
+ return $output;
50
+ }
51
+
52
+ }
app/code/local/Altima/Payboard/Helper/Data.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ class Altima_Payboard_Helper_Data extends Mage_Core_Helper_Abstract {
22
+
23
+ public function convertOptions($options) {
24
+ $converted = array();
25
+ foreach ($options as $option) {
26
+ if (isset($option['value']) && !is_array($option['value']) &&
27
+ isset($option['label']) && !is_array($option['label'])) {
28
+ $converted[$option['value']] = $option['label'];
29
+ }
30
+ }
31
+ return $converted;
32
+ }
33
+
34
+ public function getEnabled() {
35
+ $key = Mage::getStoreConfig('payboard/general/apikey');
36
+ if (!empty($key)) {
37
+ return TRUE;
38
+ } else {
39
+ return FALSE;
40
+ }
41
+ }
42
+
43
+ public function getApikey() {
44
+ return Mage::getStoreConfig('payboard/general/apikey');
45
+ }
46
+
47
+ public function checkKey($key) {
48
+ $url = 'http://d3px1qgagsf6ei.cloudfront.net/Scripts/' . $key;
49
+
50
+ $ch = curl_init($url);
51
+ curl_setopt($ch, CURLOPT_NOBODY, true);
52
+ curl_exec($ch);
53
+ $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
54
+ // $retcode > 400 -> not found, $retcode = 200, found.
55
+ curl_close($ch);
56
+ if ($retcode == 200) {
57
+ return TRUE;
58
+ } else {
59
+ return FALSE;
60
+ }
61
+ }
62
+
63
+ public function sendEmail($key, $event = 'activated') {
64
+ $storeId = Mage::app()->getStore()->getId();
65
+ $senderName = Mage::getStoreConfig('trans_email/ident_general/name', $storeId);
66
+ $senderEmail = Mage::getStoreConfig('trans_email/ident_general/email', $storeId);
67
+ $storeUrl = Mage::getBaseUrl('web');
68
+ if ($event == 'installed') {
69
+ $message = 'Altima Payboard Conversion Optimisation Extension ' . $event . '.<br/>'
70
+ . 'Store url: ' . $_SERVER[HTTP_HOST] . '<br/>';
71
+ $senderName = $_SERVER[HTTP_HOST];
72
+ } else {
73
+ $message = 'Altima Payboard Conversion Optimisation Extension ' . $event . '.<br/>'
74
+ . 'Store url: ' . $storeUrl . '<br/>'
75
+ . 'Store name: ' . $senderName . '<br/>'
76
+ . 'Store mail: ' . $senderEmail . '<br/>'
77
+ . 'Api key: ' . $key;
78
+ }
79
+ $mail = Mage::getModel('core/email');
80
+ $mail->setToName('Payboard Group');
81
+ $mail->setToEmail('payboard@altima.net.au');
82
+ //$mail->setToEmail('andrey.stepin@altima.com.ua');
83
+ $mail->setBody($message);
84
+ $mail->setSubject('Payboard');
85
+ $mail->setFromEmail($senderEmail);
86
+ $mail->setFromName($senderName);
87
+ $mail->setType('html'); // YOu can use Html or text as Mail format
88
+ $mail->send();
89
+ }
90
+
91
+ }
app/code/local/Altima/Payboard/Model/Layout/Generate/Observer.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ class Altima_Payboard_Model_Layout_Generate_Observer {
22
+
23
+ public function includeJavascripts($observer) {
24
+ $helper = Mage::helper('altima_payboard');
25
+ if ($helper->getEnabled()) {
26
+ $layout = Mage::app()->getLayout();
27
+ $content = $layout->getBlock('footer');
28
+ $block = $layout->createBlock('altima_payboard/payboardjs');
29
+ $content->insert($block);
30
+ }
31
+ }
32
+
33
+ }
app/code/local/Altima/Payboard/controllers/Adminhtml/PayboardController.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ class Altima_Payboard_Adminhtml_PayboardController extends Mage_Adminhtml_Controller_Action {
22
+
23
+ /**
24
+ * constructor - set the used module name
25
+ *
26
+ * @access protected
27
+ * @return void
28
+ * @see Mage_Core_Controller_Varien_Action::_construct()
29
+ */
30
+ protected function _construct() {
31
+ $this->setUsedModuleName('Altima_Payboard');
32
+ }
33
+
34
+ /**
35
+ * default action for payboard controller
36
+ *
37
+ * @access public
38
+ * @return bool
39
+ */
40
+ public function indexAction() {
41
+ $this->loadLayout()->renderLayout();
42
+ }
43
+
44
+ /**
45
+ * post payboard action
46
+ *
47
+ * @access public
48
+ * @return void
49
+ */
50
+ public function postAction() {
51
+ $post = $this->getRequest()->getPost();
52
+ try {
53
+ if (empty($post)) {
54
+ Mage::throwException($this->__('Invalid form data.'));
55
+ }
56
+ $payboardKey = $this->getRequest()->getParam('api_key');
57
+ $accept = $this->getRequest()->getParam('accept');
58
+ if ($accept !== 'accept'){
59
+ Mage::throwException($this->__('To use this extension you need to accept Terms of Service and Privacy Policy.'));
60
+ }
61
+ $valid_key = Mage::helper('altima_payboard')->checkKey($payboardKey);
62
+ if ($valid_key === false) {
63
+ Mage::throwException($this->__('Invalid key. Please insert valid Api Key!'));
64
+ }
65
+ Mage::getModel('core/config')->saveConfig('payboard/general/apikey', $payboardKey);
66
+ $apiUrl = 'd3px1qgagsf6ei.cloudfront.net/Scripts/' . $payboardKey;
67
+
68
+ $message = $this->__('Your key has been submitted successfully.');
69
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
70
+ Mage::helper('altima_payboard')->sendEmail($payboardKey);
71
+ } catch (Exception $e) {
72
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
73
+ }
74
+ $this->_redirect('*/*');
75
+ }
76
+
77
+ /**
78
+ * restrict access
79
+ *
80
+ * @access protected
81
+ * @return bool
82
+ * @see Mage_Adminhtml_Controller_Action::_isAllowed()
83
+ */
84
+ protected function _isAllowed() {
85
+ return Mage::getSingleton('admin/session')->isAllowed('altima_payboard/payboard');
86
+ }
87
+
88
+ }
app/code/local/Altima/Payboard/etc/adminhtml.xml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ -->
22
+ <config>
23
+ <acl>
24
+ <resources>
25
+ <admin>
26
+ <children>
27
+ <system>
28
+ <children>
29
+ <config>
30
+ <children>
31
+ <payboard translate="title" module="altima_payboard">
32
+ <title>Payboard Conversion Optimisation</title>
33
+ </payboard>
34
+ </children>
35
+ </config>
36
+ </children>
37
+ </system>
38
+ </children>
39
+ </admin>
40
+ </resources>
41
+ </acl>
42
+ <menu>
43
+ <system>
44
+ <children>
45
+ <payboard translate="title" module="altima_payboard">
46
+ <title>Payboard Conversion Optimisation</title>
47
+ <sort_order>10</sort_order>
48
+ <action>adminhtml/payboard</action>
49
+ </payboard>
50
+ </children>
51
+ </system>
52
+ </menu>
53
+ </config>
app/code/local/Altima/Payboard/etc/config.xml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Altima_Payboard>
25
+ <version>1.0.0</version>
26
+ </Altima_Payboard>
27
+ </modules>
28
+ <global>
29
+ <models>
30
+ <altima_payboard>
31
+ <class>Altima_Payboard_Model</class>
32
+ </altima_payboard>
33
+ </models>
34
+ <extraconfig />
35
+ <blocks>
36
+ <altima_payboard>
37
+ <class>Altima_Payboard_Block</class>
38
+ </altima_payboard>
39
+ </blocks>
40
+ <resources>
41
+ <altima_payboard_setup>
42
+ <setup>
43
+ <module>Altima_Payboard</module>
44
+ </setup>
45
+ <connection>
46
+ <use>core_setup</use>
47
+ </connection>
48
+ </altima_payboard_setup>
49
+ <altima_payboard_write>
50
+ <connection>
51
+ <use>core_write</use>
52
+ </connection>
53
+ </altima_payboard_write>
54
+ <altima_payboard_read>
55
+ <connection>
56
+ <use>core_read</use>
57
+ </connection>
58
+ </altima_payboard_read>
59
+ </resources>
60
+ <helpers>
61
+ <altima_payboard>
62
+ <class>Altima_Payboard_Helper</class>
63
+ </altima_payboard>
64
+ </helpers>
65
+ <events>
66
+ <controller_action_layout_render_before>
67
+ <observers>
68
+ <payboard_layout_generate_observer>
69
+ <type>singleton</type>
70
+ <class>altima_payboard/layout_generate_observer</class>
71
+ <method>includeJavascripts</method>
72
+ </payboard_layout_generate_observer>
73
+ </observers>
74
+ </controller_action_layout_render_before>
75
+ </events>
76
+ </global>
77
+ <adminhtml>
78
+ <layout>
79
+ <updates>
80
+ <altima_payboard>
81
+ <file>altima_payboard.xml</file>
82
+ </altima_payboard>
83
+ </updates>
84
+ </layout>
85
+ </adminhtml>
86
+ <admin>
87
+ <routers>
88
+ <adminhtml>
89
+ <args>
90
+ <modules>
91
+ <Altima_Payboard before="Mage_Adminhtml">Altima_Payboard_Adminhtml</Altima_Payboard>
92
+ </modules>
93
+ </args>
94
+ </adminhtml>
95
+ </routers>
96
+ </admin>
97
+ </config>
app/code/local/Altima/Payboard/etc/system.xml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ -->
22
+ <config>
23
+ <tabs>
24
+ <altima translate="label comment" module="altima_payboard">
25
+ <label>Altima</label>
26
+ <sort_order>500</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ </altima>
31
+ </tabs>
32
+ <sections>
33
+ <altima_payboard translate="label comment" module="altima_payboard">
34
+ <tab>altima</tab>
35
+ <label>Payboard Conversion Optimisation</label>
36
+ <frontend_type>text</frontend_type>
37
+ <sort_order>600</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
+ <groups>
42
+ <general translate="label comment" module="altima_payboard">
43
+ <label>General Settings</label>
44
+ <frontend_type>text</frontend_type>
45
+ <sort_order>10</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
+ <fields>
50
+ <enabled translate="label">
51
+ <label>Enabled</label>
52
+ <frontend_type>select</frontend_type>
53
+ <source_model>adminhtml/system_config_source_yesno</source_model>
54
+ <sort_order>10</sort_order>
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
+ <serial translate="label">
60
+ <label>Api key</label>
61
+ <frontend_type>text</frontend_type>
62
+ <sort_order>20</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>0</show_in_website>
65
+ <show_in_store>0</show_in_store>
66
+ </serial>
67
+
68
+
69
+ </fields>
70
+ </general>
71
+ </groups>
72
+ </altima_payboard>
73
+ </sections>
74
+ </config>
app/code/local/Altima/Payboard/sql/altima_payboard_setup/install-1.0.0.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ $this->startSetup();
22
+ Mage::helper('altima_payboard')->sendEmail(null, 'installed');
23
+ $this->endSetup();
app/design/adminhtml/default/default/layout/altima_payboard.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ -->
22
+ <layout>
23
+ <adminhtml_payboard_index>
24
+ <reference name="content">
25
+ <block type="adminhtml/template" name="payboard" template="payboard/payboardform.phtml" />
26
+ </reference>
27
+ </adminhtml_payboard_index>
28
+ </layout>
app/design/adminhtml/default/default/template/payboard/payboardform.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="content-header">
3
+ <table cellspacing="0" class="grid-header">
4
+ <tr>
5
+ <td><h3><?= $this->__('Payboard Settings') ?></h3></td>
6
+ <td class="a-right">
7
+ <button onclick="editForm.submit()" class="scalable save" type="button"><span>Save Changes</span></button>
8
+ </td>
9
+ </tr>
10
+ </table>
11
+ </div>
12
+ <div class="entry-edit">
13
+ <form id="edit_form" name="edit_form" method="post" action="<?= $this->getUrl('*/*/post') ?>">
14
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
15
+ <h4 class="icon-head head-edit-form fieldset-legend"><?= $this->__('Payboard API key') ?></h4>
16
+ <fieldset id="my-fieldset">
17
+ <table cellspacing="0" class="form-list">
18
+ <tr>
19
+ <td class="label"><?= $this->__('Insert your Public API key here') ?> <span class="required">*</span></td>
20
+ <td class="input-ele"><input class="input-text required-entry" name="api_key" size="50" value="<?= Mage::getStoreConfig('payboard/general/apikey'); ?>" /></td>
21
+ </tr>
22
+ <tr><td></td>
23
+ <?php $img_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'payboard/img.jpg'; ?>
24
+ <td><?= $this->__('You can find your <bold>unique</bold> Public API key in Account section of your Payboard account, click to the <a href="' . $img_url . '" target="_blank">image</a> for tip.') ?></td>
25
+ </tr>
26
+ </table>
27
+ <?php $tos_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'payboard/tos.txt'; ?>
28
+ <?php $privacy_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'payboard/PrivacyPolicy.txt'; ?>
29
+ <p><input type="checkbox" class="checkbox" name="accept" value="accept"><?= $this->__(' I accept Payboard Magento Extension <a href="' . $tos_url . '" target="_blank">Terms of Service</a> and <a href="' . $privacy_url . '" target="_blank">Privacy Policy</a></p>') ?>
30
+ </fieldset>
31
+ </form>
32
+ </div>
33
+ <script type="text/javascript">
34
+ var editForm = new varienForm('edit_form');
35
+ </script>
36
+ <div id="apikey_status_message"></div>
37
+ <div style="clear:both;"></div>
38
+ <h3>Need a Payboard account? </h3>
39
+ <p>Visit <a href="http://app.payboard.com/onboarding/index?utm_source=altima#/url">app.paybard.com to sign-up</a>. Free and paid accounts available.</p>
40
+ <div class="copyright">
41
+ <p>Official Payboard Magento Extension is developed by <a href="http://shop.altima.net.au/magento-extensions.html?utm_source=Payboard%20Extension%20admin&utm_medium=Link&utm_campaign=Payboard%20Extension">Altima Interactive</a></p>
42
+ </div>
43
+
app/etc/modules/Altima_Payboard.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Altima Payboard Conversion Optimisation Extension
5
+ *
6
+ * Altima web systems.
7
+ *
8
+ * NOTICE OF LICENSE
9
+ *
10
+ * This source file is subject to the EULA
11
+ * that is available through the world-wide-web at this URL:
12
+ * http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
13
+ *
14
+ * @category Altima
15
+ * @package Altima_Payboard
16
+ * @author Altima Web Systems http://altimawebsystems.com/
17
+ * @license http://blog.altima.net.au/lookbook-magento-extension/lookbook-professional-licence/
18
+ * @email support@altima.net.au
19
+ * @copyright Copyright (c) 2012 Altima Web Systems (http://altimawebsystems.com/)
20
+ */
21
+ -->
22
+ <config>
23
+ <modules>
24
+ <Altima_Payboard>
25
+ <active>true</active>
26
+ <codePool>local</codePool>
27
+ <depends>
28
+ <Mage_Catalog />
29
+ </depends>
30
+ </Altima_Payboard>
31
+ </modules>
32
+ </config>
media/payboard/PrivacyPolicy.txt ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Privacy Policy
2
+
3
+ What information do we collect?
4
+
5
+ Payboard Magento extension (thereafter "software") collects information through our Web site at several points.
6
+
7
+ We collect personal information from you (store URL, email and public API key) when you (1) install the extension; (2) Apply API key in the extension configuration. This information is sent to us via email.
8
+
9
+ What do we use your information for?
10
+
11
+ Any of the information we collect from you may be used in one of the following ways:
12
+
13
+ (1) To improve our software
14
+ (we continually strive to improve our software offerings based on the information and feedback we receive from you)
15
+ (2)To improve customer service, as a part of this we may contact you to get your feedback on software or announce important software updates
16
+ (your information helps us to more effectively respond to your customer service requests and support needs)
17
+
18
+
19
+
20
+ Your information, whether public or private, will not be sold, exchanged, transferred, or given to any other company for any reason whatsoever, without your consent, other than for the express purpose of delivering the purchased product or service requested. Information will be accessed only by Altima Interactive and Payboard.
21
+
22
+ How do we protect your information?
23
+
24
+ We implement a variety of security measures to maintain the safety of your personal information when you place an order
25
+
26
+ Do we use cookies?
27
+
28
+ No (Cookies are small files that a site or its service provider transfers to your computers hard drive through your Web browser (if you allow) that enables the sites or service providers systems to recognize your browser and capture and remember certain information
29
+
30
+ Do we disclose any information to outside parties?
31
+
32
+ We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety. However, non-personally identifiable visitor information may be provided to other parties for marketing, advertising, or other uses.
33
+
34
+ Third party links
35
+
36
+ There are links to third party products or services on our website. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities of these linked sites. Nonetheless, we seek to protect the integrity of our site and welcome any feedback about these sites.
37
+
38
+
39
+ Your Consent
40
+
41
+ By using our site, you consent to our web site privacy policy stated on this page.
42
+
43
+ Changes to our Privacy Policy
44
+
45
+ If we decide to change our privacy policy, we will post those changes on shop.altima.net.au
46
+
47
+ Contacting Us
48
+
49
+ If there are any questions regarding this privacy policy you may contact us using the Contact page on shop.altima.net.au
media/payboard/img.jpg ADDED
Binary file
media/payboard/tos.txt ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Terms of service, Payboard Magento Extension (or "software" thereafter)
2
+
3
+ Any person using, accessing, browsing using this software(“you” thereafter), is subject to the following terms and conditions of accessing this software, and all applicable legislation. By accessing, browsing or using this software and associated services, you accept the terms and conditions. If you do not agree to the terms and conditions, do not access further, browse or use this software.
4
+
5
+ At any time, software owner (Payboard Magento Extension or we thereafter) has the right to amend these Terms and Conditions. Revised terms of service will apply to the use of software from the date of the publication of the revised terms of use. Please check this page regularly to ensure you are familiar with the current version.
6
+
7
+ Under these terms and conditions you agree that under no circumstances will Payboard Magento Extension be held liable for any direct, indirect, incidental or other type loss or injury resulting from your use, or downloading of any content on our website.
8
+
9
+ Please also examine our privacy policy as well as these terms of service before using our website.
10
+
11
+ Age Limitation
12
+
13
+ Payboard Magento Extension is not intended for use by people under 18. No one under the age of 14 is allowed to use our website or subscribe for email updates from Payboard Magento Extension. Anyone aged between 14-18 must get consent from a parent or guardian before using the site.
14
+
15
+ Payboard Magento Extension provides ability to integrate Payboard tracking code to Magento eCommerce online stores. Payboard is solely responsible for further work of Payboard service, including the accuracy or legal compliance.
16
+
17
+ You accept and agree that you bear full responsibility for any action you take due to relying on information accessed using software.
18
+
19
+ You should also read the terms and conditions and privacy policy of Payboard (www.payboard.com). You should undertake your own independent research on any deal that is of interest to you on our website. Payboard Magento Extension has no responsibility and will not be held liable for any of these dealings.
20
+
21
+ We recommend you carefully examine all information and terms of each deal before making a purchase to make informed decision.
22
+
23
+ Affiliations
24
+
25
+ Some of the links included on our website are “affiliate links” from third parties, so we may receive a fee or commission from 3rd party web sites for directing you there.
26
+
27
+ Permitted use
28
+
29
+ You are welcome to use Payboard Magento Extension to install Payboard tracking code to online store based on Magento eCommerce platform that you manage, control or operate.
30
+
31
+ You must not use software in any form of illegal activity including but not limiting to copy, store, host, transmit, send, use, publish or distribute any material which consists of (or is linked to) any malicious computer software.
32
+
33
+
34
+ Limited liability
35
+
36
+ IN NO EVENT WILL Altima Interactive, ITS OFFICERS, DIRECTORS, EMPLOYEES OR AGENTS, BE LIABLE TO YOU FOR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION WITH YOUR USE OF THE SITE, SERVICES, CONTENT AND USER SUBMISSIONS WHETHER THE DAMAGES ARE FORESEEABLE AND WHETHER OR NOT Payboard Magento Extension HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE FOREGOING LIMITATION OF LIABILITY WILL APPLY TO THE FULLEST EXTENT PERMITTED BY LAW IN THE APPLICABLE JURISDICTION AND IN NO EVENT WILL Payboard Magento Extension CUMULATIVE LIABILITY TO YOU EXCEED $10.
37
+
38
+ Governing Law
39
+
40
+ This Agreement is governed by and construed in accordance with the laws of Victoria, Australia. Each party irrevocably and unconditionally submits to the non-exclusive jurisdiction of the courts of Victoria.
41
+
42
+ Last Updated: 26 January 2015
package.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Altima_Payboard</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This is official Payboard extension for Magento eCommerce that makes installation of Payboard to Magento store a breeze.</summary>
10
+ <description>Payboard is an innovative service that increases conversion of your online store via intelligent self-learning navigation elements (boosters). Boosters lead your website visitors to the most appropriate next page. Payboard decreases bounce rate and drives sales!&#xD;
11
+ This is the official Payboard extension for Magento eCommerce that makes installation of Payboard on Magento a breeze.&#xD;
12
+ </description>
13
+ <notes>Minor changes and improvements</notes>
14
+ <authors><author><name>Andrey</name><user>altimaweb</user><email>andrey.stepin@altima.com.ua</email></author></authors>
15
+ <date>2015-01-26</date>
16
+ <time>13:20:11</time>
17
+ <contents><target name="magelocal"><dir name="Altima"><dir name="Payboard"><dir name="Block"><dir name="Adminhtml"><file name="Payboard.php" hash="90733456e55ecb65d79550414824d426"/></dir><file name="Payboardjs.php" hash="3faefdac8d06836905141b964c08f2fb"/></dir><dir name="Helper"><file name="Data.php" hash="8f31451727f487a768e66bfe306016b5"/></dir><dir name="Model"><dir name="Layout"><dir name="Generate"><file name="Observer.php" hash="b0a80fa857b9a519df4187412bc6f78c"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PayboardController.php" hash="4fef67b350fa8d3c97a1859dac81de56"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="76013e366939e6c8590323e7ee5de1fe"/><file name="config.xml" hash="5cd291071ccb25703eae4179ed3cd739"/><file name="system.xml" hash="dd3101dc05c0f8da62c0f60c8f7b0825"/></dir><dir name="sql"><dir name="altima_payboard_setup"><file name="install-1.0.0.php" hash="0fe144f2df5377f38a502dd8254f82dd"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="altima_payboard.xml" hash="43868876c0abe9c04f7c5c224c757b0f"/></dir><dir name="template"><dir name="payboard"><file name="payboardform.phtml" hash="3900b7ac73206c51e06bd52ea562354d"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Altima_Payboard.xml" hash="2e244ed8dad699e4e4de8f1670841019"/></dir></target><target name="magemedia"><dir name="payboard"><file name="PrivacyPolicy.txt" hash="09897179412c130ec3097c0d745fbb24"/><file name="img.jpg" hash="aaf9ecc92137459b24c7dfdfbddd5b14"/><file name="tos.txt" hash="613ae2b51d48e4d8ec8322c546649c70"/></dir></target></contents>
18
+ <compatible/>
19
+ <dependencies><required><php><min>5.2.6</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.9.0.1</max></package></required></dependencies>
20
+ </package>