Zoniz - Version 0.1.1

Version Notes

Once the stores are connected you can see your shop products directly in Zoniz and you can choose products to promote to social networks automatically.

The current extensions install a website toolbar over your shop, where the content of the toolbar can be controlled from Zoniz Social Media Platform. You can push updates, run social media promotions directly to your website.

Download this release

Release Info

Developer paul
Extension Zoniz
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

app/code/local/Zoniz/Bar/Block/Footer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Zoniz_Bar_Block_Footer extends Mage_Core_Block_Template
3
+ {
4
+ function __construct() {
5
+ parent::__construct();
6
+ $barModel = Mage::getModel('bar/bar')->load(1);
7
+ $account_name = $barModel->getAccountName();
8
+ $stream_name = $barModel->getStreamName();
9
+
10
+ $this->setData('account_name',$account_name);
11
+ $this->setData('stream_name',$stream_name);
12
+ }
13
+ }
app/code/local/Zoniz/Bar/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Zoniz_Bar_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Zoniz/Bar/Model/Bar.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Zoniz_Bar_Model_Bar extends Mage_Core_Model_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('bar/bar');
8
+ }
9
+ }
app/code/local/Zoniz/Bar/Model/Mysql4/Bar.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Zoniz_Bar_Model_Mysql4_Bar extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('bar/bar', 'id');
8
+ }
9
+ }
app/code/local/Zoniz/Bar/Model/Mysql4/Bar/Collection.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Zoniz_Bar_Model_Mysql4_Bar_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('bar/bar');
7
+ }
8
+ }
app/code/local/Zoniz/Bar/Model/Resource/Setup.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Zoniz_Bar_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {
3
+
4
+ }
app/code/local/Zoniz/Bar/controllers/Adminhtml/WebController.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Zoniz_Bar_Adminhtml_WebController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+
8
+ $block = $this->getLayout()->getBlock('web');
9
+ $barModel = Mage::getModel('bar/bar')->load(1);
10
+ $account_name = $barModel->getAccountName();
11
+ $stream_name = $barModel->getStreamName();
12
+
13
+ $block->setData('account_name',$account_name);
14
+ $block->setData('stream_name',$stream_name);
15
+
16
+ $this->renderLayout();
17
+ }
18
+
19
+ public function postAction()
20
+ {
21
+ $post = $this->getRequest()->getPost();
22
+ try {
23
+ if (empty($post)) {
24
+ Mage::throwException($this->__('Invalid form data.'));
25
+ }
26
+ $barModel = Mage::getModel('bar/bar');
27
+ $item = $barModel->load(1);
28
+
29
+ if(!$item->getId()) {
30
+ $barModel->setAccountName($post['account_name'])
31
+ ->setStreamName($post['stream_name'])
32
+ ->save();
33
+ } else {
34
+ $barModel->setId(1)
35
+ ->setAccountName($post['account_name'])
36
+ ->setStreamName($post['stream_name'])
37
+ ->save();
38
+ }
39
+
40
+ $message = $this->__('Your form has been submitted successfully.');
41
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
42
+ } catch (Exception $e) {
43
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
44
+ }
45
+ $this->_redirect('*/*');
46
+ }
47
+ }
app/code/local/Zoniz/Bar/controllers/IndexController.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Zoniz_Bar_IndexController extends Mage_Core_Controller_Front_Action
4
+ {
5
+ public function indexAction()
6
+ {
7
+ $this->loadLayout();
8
+ $block = $this->getLayout()->createBlock(
9
+ 'Mage_Core_Block_Template',
10
+ 'bar',
11
+ array('template' => 'bar/webcode.phtml')
12
+ );
13
+ $barModel = Mage::getModel('bar/bar')->load(1);
14
+ $account_name = $barModel->getAccountName();
15
+ $stream_name = $barModel->getStreamName();
16
+
17
+ $block->setData('account_name',$account_name);
18
+ $block->setData('stream_name',$stream_name);
19
+
20
+ $this->getLayout()->getBlock('before_body_end')->append($block);
21
+ $this->renderLayout();
22
+ }
23
+ }
app/code/local/Zoniz/Bar/etc/config.xml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Zoniz_Bar>
5
+ <version>0.1.1</version>
6
+ </Zoniz_Bar>
7
+ </modules>
8
+
9
+ <global>
10
+ <models>
11
+ <bar>
12
+ <class>Zoniz_Bar_Model</class>
13
+ <resourceModel>bar_mysql4</resourceModel>
14
+ </bar>
15
+ <bar_mysql4>
16
+ <class>Zoniz_Bar_Model_Mysql4</class>
17
+ <entities>
18
+ <bar>
19
+ <table>zoniz_acc</table>
20
+ </bar>
21
+ </entities>
22
+ </bar_mysql4>
23
+ </models>
24
+ <blocks>
25
+ <zoniz_bar>
26
+ <class>Zoniz_Bar_Block</class>
27
+ </zoniz_bar>
28
+ </blocks>
29
+ <helpers>
30
+ <bar>
31
+ <class>Zoniz_Bar_Helper</class>
32
+ </bar>
33
+ </helpers>
34
+ <resources>
35
+ <bar_setup>
36
+ <setup>
37
+ <module>Zoniz_Bar</module>
38
+ <class>Zoniz_Bar_Model_Resource_Setup</class>
39
+ </setup>
40
+ <connection>
41
+ <use>core_setup</use>
42
+ </connection>
43
+ </bar_setup>
44
+ <bar_write>
45
+ <connection>
46
+ <use>core_write</use>
47
+ </connection>
48
+ </bar_write>
49
+ <bar_read>
50
+ <connection>
51
+ <use>core_read</use>
52
+ </connection>
53
+ </bar_read>
54
+ </resources>
55
+ </global>
56
+
57
+ <admin>
58
+ <routers>
59
+ <bar>
60
+ <use>admin</use>
61
+ <args>
62
+ <module>Zoniz_Bar</module>
63
+ <frontName>bar</frontName>
64
+ </args>
65
+ </bar>
66
+ </routers>
67
+ </admin>
68
+
69
+ <frontend>
70
+ <layout>
71
+ <updates>
72
+ <zoniz_bar module="Zoniz_Bar">
73
+ <file>bar_layout.xml</file>
74
+ </zoniz_bar>
75
+
76
+ </updates>
77
+ </layout>
78
+ </frontend>
79
+
80
+ <adminhtml>
81
+ <menu>
82
+ <system>
83
+ <children>
84
+ <bar_adminform translate="title" module="bar">
85
+ <title>Zoniz Account Details</title>
86
+ <sort_order>200</sort_order>
87
+ <action>bar/adminhtml_web</action>
88
+ </bar_adminform>
89
+ </children>
90
+ </system>
91
+ </menu>
92
+
93
+ <acl>
94
+ <resources>
95
+ <admin>
96
+ <children>
97
+ <system>
98
+ <children>
99
+ <bar_adminform>
100
+ <title>Zoniz Account Details</title>
101
+ </bar_adminform>
102
+ </children>
103
+ </system>
104
+ </children>
105
+ </admin>
106
+ </resources>
107
+ </acl>
108
+
109
+ <layout>
110
+ <updates>
111
+ <bar>
112
+ <file>bar.xml</file>
113
+ </bar>
114
+ </updates>
115
+ </layout>
116
+ </adminhtml>
117
+ </config>
app/code/local/Zoniz/Bar/etc/config.xml~ ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Zoniz_Bar>
5
+ <version>0.1.0</version>
6
+ </Zoniz_Bar>
7
+ </modules>
8
+
9
+ <global>
10
+ <models>
11
+ <bar>
12
+ <class>Zoniz_Bar_Model</class>
13
+ <resourceModel>bar_mysql4</resourceModel>
14
+ </bar>
15
+ <bar_mysql4>
16
+ <class>Zoniz_Bar_Model_Mysql4</class>
17
+ <entities>
18
+ <bar>
19
+ <table>zoniz_acc</table>
20
+ </bar>
21
+ </entities>
22
+ </bar_mysql4>
23
+ </models>
24
+ <blocks>
25
+ <zoniz_bar>
26
+ <class>Zoniz_Bar_Block</class>
27
+ </zoniz_bar>
28
+ </blocks>
29
+ <helpers>
30
+ <bar>
31
+ <class>Zoniz_Bar_Helper</class>
32
+ </bar>
33
+ </helpers>
34
+ <resources>
35
+ <bar_setup>
36
+ <setup>
37
+ <module>Zoniz_Bar</module>
38
+ <class>Zoniz_Bar_Model_Resource_Setup</class>
39
+ </setup>
40
+ <connection>
41
+ <use>core_setup</use>
42
+ </connection>
43
+ </bar_setup>
44
+ <bar_write>
45
+ <connection>
46
+ <use>core_write</use>
47
+ </connection>
48
+ </bar_write>
49
+ <bar_read>
50
+ <connection>
51
+ <use>core_read</use>
52
+ </connection>
53
+ </bar_read>
54
+ </resources>
55
+ </global>
56
+
57
+ <admin>
58
+ <routers>
59
+ <bar>
60
+ <use>admin</use>
61
+ <args>
62
+ <module>Zoniz_Bar</module>
63
+ <frontName>bar</frontName>
64
+ </args>
65
+ </bar>
66
+ </routers>
67
+ </admin>
68
+
69
+ <frontend>
70
+ <layout>
71
+ <updates>
72
+ <zoniz_bar module="Zoniz_Bar">
73
+ <file>bar_layout.xml</file>
74
+ </zoniz_bar>
75
+
76
+ </updates>
77
+ </layout>
78
+ </frontend>
79
+
80
+ <adminhtml>
81
+ <menu>
82
+ <system>
83
+ <children>
84
+ <bar_adminform translate="title" module="bar">
85
+ <title>Zoniz Account Details</title>
86
+ <sort_order>200</sort_order>
87
+ <action>bar/adminhtml_web</action>
88
+ </bar_adminform>
89
+ </children>
90
+ </system>
91
+ </menu>
92
+
93
+ <acl>
94
+ <resources>
95
+ <admin>
96
+ <children>
97
+ <system>
98
+ <children>
99
+ <bar_adminform>
100
+ <title>Zoniz Account Details</title>
101
+ </bar_adminform>
102
+ </children>
103
+ </system>
104
+ </children>
105
+ </admin>
106
+ </resources>
107
+ </acl>
108
+
109
+ <layout>
110
+ <updates>
111
+ <bar>
112
+ <file>bar.xml</file>
113
+ </bar>
114
+ </updates>
115
+ </layout>
116
+ </adminhtml>
117
+ </config>
app/code/local/Zoniz/Bar/sql/bar_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS zoniz_acc;
10
+ CREATE TABLE zoniz_acc (
11
+ `id` tinyint(2) unsigned NOT NULL default 1,
12
+ `account_name` varchar(512) NOT NULL default '',
13
+ `stream_name` varchar(512) NOT NULL default '',
14
+ PRIMARY KEY (`id`)
15
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16
+ ");
17
+
18
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/bar.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <bar_adminhtml_web_index>
4
+ <update handle="bar_web_index"/>
5
+ <reference name="content">
6
+ <block type="adminhtml/template" name="web" template="bar/web.phtml"/>
7
+ </reference>
8
+ </bar_adminhtml_web_index>
9
+ </layout>
app/design/adminhtml/default/default/template/bar/web.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0" class="grid-header">
3
+ <tr>
4
+ <td><h3><?=$this->__('Account Details')?></h3></td>
5
+ <td class="a-right">
6
+ <button onclick="editForm.submit()" class="scalable save" type="button"><span>Submit</span></button>
7
+ </td>
8
+ </tr>
9
+ </table>
10
+ </div>
11
+ <div class="entry-edit">
12
+ <form id="edit_form" name="edit_form" method="post" action="<?=$this->getUrl('*/*/post')?>">
13
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
14
+ <h4 class="icon-head head-edit-form fieldset-legend"><?=$this->__('Enter account name/id and stream name/id')?></h4>
15
+ <fieldset id="my-fieldset">
16
+ <table cellspacing="0" class="form-list">
17
+ <tr>
18
+ <td class="label"><?=$this->__('Account Name')?> <span class="required">*</span></td>
19
+ <td class="input-ele"><input style="/*width:180px;*/" class="input-text required-entry" name="account_name" value="<?=$this->getData('account_name')?>"/></td>
20
+ </tr>
21
+ <tr>
22
+ <td class="label"><?=$this->__('Stream Name')?> <span class="required">*</span></td>
23
+ <td class="input-ele"><input style="/*width:180px;*/" class="input-text required-entry" name="stream_name" value="<?=$this->getData('stream_name')?>"/></td>
24
+ </tr>
25
+ </table>
26
+ </fieldset>
27
+ </form>
28
+ </div>
29
+ <script type="text/javascript">
30
+ var editForm = new varienForm('edit_form');
31
+ </script>
app/design/frontend/default/default/layout/bar_layout.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout>
3
+ <default>
4
+ <reference name="before_body_end">
5
+ <block type="zoniz_bar/footer"
6
+ name="bar"
7
+ template="bar/webcode.phtml" />
8
+ </reference>
9
+ </default>
10
+ </layout>
app/design/frontend/default/default/template/bar/webcode.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <div class="zoniz-stream" account-name="<?=$this->getData('account_name')?>" stream-name="<?=$this->getData('stream_name')?>"></div>
2
+ <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://s3-eu-west-1.amazonaws.com/eu.zoniz.com/zoniz/public/js/common/zoniz.stream.min.js?1370861275123"; fjs.parentNode.insertBefore(js, fjs); } (document, 'script', 'zoniz-stream'));</script>
3
+
app/etc/modules/Zoniz_Bar.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Zoniz_Bar>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Zoniz_Bar>
8
+ </modules>
9
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Zoniz</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License</license>
7
  <channel>community</channel>
@@ -15,8 +15,8 @@ The current extensions install a website toolbar over your shop, where the conte
15
  The current extensions install a website toolbar over your shop, where the content of the toolbar can be controlled from Zoniz Social Media Platform. You can push updates, run social media promotions directly to your website. </notes>
16
  <authors><author><name>paul</name><user>paul</user><email>paul@zoniz.com</email></author></authors>
17
  <date>2013-07-09</date>
18
- <time>17:57:57</time>
19
- <contents><target name="magelocal"><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bar.xml" hash=""/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="bar_layout.xml" hash=""/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Zoniz_Bar.xml" hash=""/></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Zoniz</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License</license>
7
  <channel>community</channel>
15
  The current extensions install a website toolbar over your shop, where the content of the toolbar can be controlled from Zoniz Social Media Platform. You can push updates, run social media promotions directly to your website. </notes>
16
  <authors><author><name>paul</name><user>paul</user><email>paul@zoniz.com</email></author></authors>
17
  <date>2013-07-09</date>
18
+ <time>21:59:54</time>
19
+ <contents><target name="magelocal"><dir name="Zoniz"><dir name="Bar"><dir name="Block"><file name="Footer.php" hash="0b7767379201e5353e23b41fb870de60"/></dir><dir name="Helper"><file name="Data.php" hash="36c4731bb8621f8cbbcf8cb69cbc3a28"/></dir><dir name="Model"><file name="Bar.php" hash="08672ea64197fe2564c2243b24958515"/><dir name="Mysql4"><dir name="Bar"><file name="Collection.php" hash="bbaf376d4ab036cfd389daf5bac8ae61"/></dir><file name="Bar.php" hash="65d63b43e16abe706129c1036b5b6abe"/></dir><dir name="Resource"><file name="Setup.php" hash="75a76602b74fa88ea28fb894d9c445c4"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="WebController.php" hash="ee4056464b1b3ad23c7204b4feacc269"/></dir><file name="IndexController.php" hash="97f5c602c4b3c1b11e6ff4ce874ead5c"/></dir><dir name="etc"><file name="config.xml" hash="9d12cb34cf52a273ace39250bf2d456d"/><file name="config.xml~" hash="b2d9d296527bce363193acbb0e2c2783"/></dir><dir name="sql"><dir name="bar_setup"><file name="mysql4-install-0.1.0.php" hash="c89f8521794f64105c8cf5230d88578a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="bar.xml" hash="3dabf32085abfb8ca7744f81438d017f"/></dir><dir name="template"><dir name="bar"><file name="web.phtml" hash="682b0c70d856aca361448d719309ecae"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="bar_layout.xml" hash="11f0c662a70f1beb9461e00ecafe847b"/></dir><dir name="template"><dir name="bar"><file name="webcode.phtml" hash="224269235ae77b08e543c5436fdfbc0c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zoniz_Bar.xml" hash="2e71473c816601b3156f5bba240bc178"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>