gshift_wpo - Version 0.1.0

Version Notes

gshift

Download this release

Release Info

Developer gshift
Extension gshift_wpo
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/Gs/Gshift/Block/Adminhtml/Gshiftbackend.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Gs_Gshift_Block_Adminhtml_Gshiftbackend extends Mage_Adminhtml_Block_Template {
4
+
5
+ }
app/code/community/Gs/Gshift/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Gs_Gshift_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
5
+
app/code/community/Gs/Gshift/controllers/Adminhtml/GshiftbackendController.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gs_Gshift_Adminhtml_GshiftbackendController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->_title($this->__("gshift"));
8
+ $this->renderLayout();
9
+ }
10
+ }
app/code/community/Gs/Gshift/etc/config.xml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Gs_Gshift>
5
+ <version>0.1.0</version>
6
+ </Gs_Gshift>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <gshift>
11
+ <class>Gs_Gshift_Helper</class>
12
+ </gshift>
13
+ </helpers>
14
+ <blocks>
15
+ <gshift>
16
+ <class>Gs_Gshift_Block</class>
17
+ </gshift>
18
+ </blocks>
19
+ </global>
20
+ <admin>
21
+ <routers>
22
+ <gshift>
23
+ <use>admin</use>
24
+ <args>
25
+ <module>Gs_Gshift</module>
26
+ <frontName>gshift</frontName>
27
+ </args>
28
+ </gshift>
29
+ </routers>
30
+ </admin>
31
+ <adminhtml>
32
+ <menu>
33
+ <gshift module="gshift">
34
+ <title>Gshift</title>
35
+ <sort_order>100</sort_order>
36
+ <children>
37
+ <gshiftbackend module="gshift">
38
+ <title>gshift</title>
39
+ <sort_order>0</sort_order>
40
+ <action>gshift/adminhtml_gshiftbackend</action>
41
+ </gshiftbackend>
42
+ </children>
43
+ </gshift>
44
+ </menu>
45
+ <acl>
46
+ <resources>
47
+ <all>
48
+ <title>Allow Everything</title>
49
+ </all>
50
+ <admin>
51
+ <children>
52
+ <gshift translate="title" module="gshift">
53
+ <title>Gshift</title>
54
+ <sort_order>1000</sort_order>
55
+ <children>
56
+ <gshiftbackend translate="title">
57
+ <title>gshift</title>
58
+ </gshiftbackend>
59
+ </children>
60
+ </gshift>
61
+ </children>
62
+ </admin>
63
+ </resources>
64
+ </acl>
65
+ <layout>
66
+ <updates>
67
+ <gshift>
68
+ <file>gshift.xml</file>
69
+ </gshift>
70
+ </updates>
71
+ </layout>
72
+ </adminhtml>
73
+ </config>
app/design/adminhtml/default/default/layout/gshift.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <gshift_adminhtml_gshiftbackend_index>
4
+ <reference name="content">
5
+ <block type="gshift/adminhtml_gshiftbackend" name="gshiftbackend" template="gshift/gshiftbackend.phtml"/>
6
+ </reference>
7
+ </gshift_adminhtml_gshiftbackend_index>
8
+ </layout>
app/design/adminhtml/default/default/template/gshift/gshiftbackend.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
2
+ <script>
3
+ var JQry = jQuery.noConflict();
4
+ JQry(function()
5
+ {
6
+ var windowHeight = window.innerHeight;
7
+ JQry('html').css('height', windowHeight + 'px');
8
+ JQry('.middle').css('min-height', '0px');
9
+ var bodyHeight = JQry('body').css('height');
10
+ var res = windowHeight - parseFloat(JQry('.footer').outerHeight()) - parseFloat(JQry('.header').outerHeight()) - 30;
11
+ JQry('#anchor-content').css('height', res + 'px');
12
+ JQry('#anchor-content').children().css('height', '100%');
13
+ JQry('#iframe').css('height', '100%');
14
+ JQry(window).resize(function()
15
+ {
16
+ var windowHeight = window.innerHeight;
17
+ JQry('html').css('height', windowHeight + 'px');
18
+ var res = windowHeight - parseFloat(JQry('.footer').outerHeight()) - parseFloat(JQry('.header').outerHeight()) - 30;
19
+ JQry('#anchor-content').css('height', res + 'px');
20
+ }).resize();
21
+ })
22
+ </script>
23
+ <?
24
+ function url_origin($s, $use_forwarded_host=false)
25
+ {
26
+ $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true:false;
27
+ $sp = strtolower($s['SERVER_PROTOCOL']);
28
+ $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');
29
+ $port = $s['SERVER_PORT'];
30
+ $port = ((!$ssl && $port=='80') || ($ssl && $port=='443')) ? '' : ':'.$port;
31
+ $host = ($use_forwarded_host && isset($s['HTTP_X_FORWARDED_HOST'])) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
32
+ $host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
33
+ return $protocol . '://' . $host;
34
+ }
35
+ function full_url($s, $use_forwarded_host=false)
36
+ {
37
+ return url_origin($s, $use_forwarded_host) . $s['REQUEST_URI'];
38
+ }
39
+ $absolute_url = full_url($_SERVER);
40
+
41
+ $charge = Mage::app()->getRequest()->getParam('charge');
42
+
43
+ if ($charge)
44
+ {
45
+ Mage::getModel('core/config')->saveConfig('gshift/payment/id', $charge);
46
+ header('Location: ' . Mage::helper('adminhtml')->getUrl('gshift/adminhtml_gshiftbackend/index'));
47
+ die();
48
+ }
49
+ else
50
+ {
51
+ $charge = Mage::getStoreConfig('gshift/payment/id');
52
+ }
53
+ ?>
54
+
55
+ <iframe id="iframe" style="width: 100%; height: 100%; border: none" src="https://shopify.webpresenceoptimizer.com/magento/index?site_url=<?=$absolute_url?>&charge=<?= $charge?>">
56
+ </iframe>
app/etc/modules/Gs_Gshift.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Gs_Gshift>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>0.1.0</version>
8
+ </Gs_Gshift>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>gshift_wpo</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license>GNU Lesser General Public License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>gShift seo app</summary>
10
+ <description>gShift seo app</description>
11
+ <notes>gshift</notes>
12
+ <authors><author><name>gshift</name><user>gshift</user><email>ilia.smyshlaev@gshiftlabs.com</email></author></authors>
13
+ <date>2014-07-09</date>
14
+ <time>09:22:48</time>
15
+ <contents><target name="magecommunity"><dir name="Gs"><dir name="Gshift"><dir name="Block"><dir name="Adminhtml"><file name="Gshiftbackend.php" hash="919199aa44136ee9ca81adb4f408faa1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a8e7d73995fa7b85b0fec6c616219c34"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="GshiftbackendController.php" hash="7016dabc36e43a6d191b93ff4bc4cdce"/></dir></dir><dir name="etc"><file name="config.xml" hash="afc189a14b37c44dc60f13fd18b1419a"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="gshift.xml" hash="f469bac7ea54535597634c1be548553f"/></dir><dir name="template"><dir name="gshift"><file name="gshiftbackend.phtml" hash="f528a865a1bb9622393acca25c6b6f57"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gs_Gshift.xml" hash="d178ce6435c3659bfc60555144372f20"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>