A4on_Mybrand - Version 0.1.1

Version Notes

This is a stable release. But in future updates might be made.

Download this release

Release Info

Developer MohanaKrishnan
Extension A4on_Mybrand
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

app/code/local/A4on/Mybrand/controllers/Adminhtml/IndexController.php CHANGED
@@ -1,10 +1,110 @@
1
  <?php
2
  class A4on_Mybrand_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
3
  {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->renderLayout();
8
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
10
  ?>
1
  <?php
2
  class A4on_Mybrand_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
3
  {
4
+ protected function _initAction()
5
+ {
6
+ $this->loadLayout()->_setActiveMenu('mybrand/set_time')
7
+ ->_addBreadcrumb('mybrand Manager','mybrand Manager');
8
+ return $this;
9
+ }
10
+ public function indexAction()
11
+ {
12
+ $this->_initAction();
13
+ $this->renderLayout();
14
+ }
15
+ public function editAction()
16
+ {
17
+ $testId = $this->getRequest()->getParam('id');
18
+ $testModel = Mage::getModel('mybrand/mybrand')->load($testId);
19
+ if ($testModel->getId() || $testId == 0)
20
+ {
21
+ Mage::register('mybrand_data', $testModel);
22
+ $this->loadLayout();
23
+ $this->_setActiveMenu('mybrand/set_time');
24
+ $this->_addBreadcrumb('mybrand Manager', 'mybrand Manager');
25
+ $this->_addBreadcrumb('Mybrand Description', 'Mybrand Description');
26
+ $this->getLayout()->getBlock('head')
27
+ ->setCanLoadExtJs(true);
28
+ $this->_addContent($this->getLayout()
29
+ ->createBlock('mybrand/adminhtml_mybrand_edit'))
30
+ ->_addLeft($this->getLayout()
31
+ ->createBlock('mybrand/adminhtml_mybrand_edit_tabs')
32
+ );
33
+ $this->renderLayout();
34
+ }
35
+ else
36
+ {
37
+ Mage::getSingleton('adminhtml/session')
38
+ ->addError('mybrand does not exist');
39
+ $this->_redirect('*/*/');
40
+ }
41
+ }
42
+ public function newAction()
43
+ {
44
+ $this->_forward('edit');
45
+ }
46
+ public function saveAction()
47
+ {
48
+ if ($this->getRequest()->getPost())
49
+ {
50
+ try {
51
+ $postData = $this->getRequest()->getPost();
52
+ $testModel = Mage::getModel('mybrand/mybrand');
53
+ if( $this->getRequest()->getParam('id') <= 0 )
54
+ $testModel->setCreatedTime(
55
+ Mage::getSingleton('core/date')
56
+ ->gmtDate()
57
+ );
58
+ $testModel
59
+ ->addData($postData)
60
+ ->setUpdateTime(
61
+ Mage::getSingleton('core/date')
62
+ ->gmtDate())
63
+ ->setId($this->getRequest()->getParam('id'))
64
+ ->save();
65
+ Mage::getSingleton('adminhtml/session')
66
+ ->addSuccess('successfully saved');
67
+ Mage::getSingleton('adminhtml/session')
68
+ ->settestData(false);
69
+ $this->_redirect('*/*/');
70
+ return;
71
+ } catch (Exception $e){
72
+ Mage::getSingleton('adminhtml/session')
73
+ ->addError($e->getMessage());
74
+ Mage::getSingleton('adminhtml/session')
75
+ ->settestData($this->getRequest()
76
+ ->getPost()
77
+ );
78
+ $this->_redirect('*/*/edit',
79
+ array('id' => $this->getRequest()
80
+ ->getParam('id')));
81
+ return;
82
+ }
83
+ }
84
+ $this->_redirect('*/*/');
85
+ }
86
+ public function deleteAction()
87
+ {
88
+ if($this->getRequest()->getParam('id') > 0)
89
+ {
90
+ try
91
+ {
92
+ $testModel = Mage::getModel('mybrand/mybrand');
93
+ $testModel->setId($this->getRequest()
94
+ ->getParam('id'))
95
+ ->delete();
96
+ Mage::getSingleton('adminhtml/session')
97
+ ->addSuccess('successfully deleted');
98
+ $this->_redirect('*/*/');
99
+ }
100
+ catch (Exception $e)
101
+ {
102
+ Mage::getSingleton('adminhtml/session')
103
+ ->addError($e->getMessage());
104
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
105
+ }
106
+ }
107
+ $this->_redirect('*/*/');
108
+ }
109
  }
110
  ?>
app/code/local/A4on/Mybrand/controllers/IndexController.php CHANGED
@@ -1,20 +1,5 @@
1
- <link href="http://127.0.0.1/magento/skin/frontend/base/default/css/mybrand.css" rel="stylesheet" type="text/css">
2
- <script src="http://127.0.0.1/magento/skin/frontend/base/default/js/mybrand.js"></script>
3
- <script src = "http://127.0.0.1/magento/skin/frontend/base/default/js/vticker.js"></script>
4
- <script>
5
- $(function() {
6
- $('#example').vTicker({
7
- speed: 500,
8
- pause: 3000,
9
- animation: 'fade',
10
- mousePause: true,
11
- showItems: 1,
12
- height:120
13
- });
14
- });
15
- </script>
16
 
17
- <?php
18
  class A4on_Mybrand_IndexController extends Mage_Core_Controller_Front_Action
19
  {
20
  function indexAction()
@@ -123,12 +108,32 @@ class A4on_Mybrand_IndexController extends Mage_Core_Controller_Front_Action
123
 
124
  function brandslistAction()
125
  {
 
126
  $productNameArray = array();
127
  $host = $_SERVER[HTTP_HOST];
128
  $uri = $_SERVER[REQUEST_URI];
129
  $uriArray = explode('/',$uri);
130
  $url2 = '/'.$uriArray[1];
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  $collection = Mage::getModel('mybrand/mybrand')->getCollection()->setOrder('brand_id','asc');
133
  echo '<div>';
134
  echo '<h1>Brands</h1>';
@@ -148,5 +153,6 @@ class A4on_Mybrand_IndexController extends Mage_Core_Controller_Front_Action
148
  }
149
  echo '</ul>';
150
  echo '</div>';
 
151
  }
152
  }
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
3
  class A4on_Mybrand_IndexController extends Mage_Core_Controller_Front_Action
4
  {
5
  function indexAction()
108
 
109
  function brandslistAction()
110
  {
111
+
112
  $productNameArray = array();
113
  $host = $_SERVER[HTTP_HOST];
114
  $uri = $_SERVER[REQUEST_URI];
115
  $uriArray = explode('/',$uri);
116
  $url2 = '/'.$uriArray[1];
117
 
118
+ echo '<link href="http://'.$host.$url2.'/skin/frontend/base/default/css/mybrand.css" rel="stylesheet" type="text/css">';
119
+ echo '<script src="http://'.$host.$url2.'/skin/frontend/base/default/js/mybrand.js"></script>';
120
+ echo '<script src = "http://'.$host.$url2.'/skin/frontend/base/default/js/vticker.js"></script>';
121
+ echo '<script>';
122
+ echo '$.noConflict();';
123
+ echo '</script>';
124
+ echo "<script>";
125
+ echo " jQuery(function() {";
126
+ echo " jQuery('#example').vTicker({";
127
+ echo " speed: 500,";
128
+ echo " pause: 3000,";
129
+ echo " animation: 'fade',";
130
+ echo " mousePause: true,";
131
+ echo " showItems: 1,";
132
+ echo " height:120";
133
+ echo " });";
134
+ echo " });";
135
+ echo "</script>";
136
+
137
  $collection = Mage::getModel('mybrand/mybrand')->getCollection()->setOrder('brand_id','asc');
138
  echo '<div>';
139
  echo '<h1>Brands</h1>';
153
  }
154
  echo '</ul>';
155
  echo '</div>';
156
+
157
  }
158
  }
app/code/local/A4on/Mybrand/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <A4on_Mybrand>
5
- <version>0.1.0</version>
6
  </A4on_Mybrand>
7
  </modules>
8
  <frontend>
@@ -112,7 +112,7 @@
112
 
113
  </models>
114
  <resources>
115
- <a40n_mybrand_setup>
116
  <setup>
117
  <module>A4on_Mybrand</module>
118
  <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
@@ -120,7 +120,7 @@
120
  <connection>
121
  <use>core_setup</use>
122
  </connection>
123
- </a40n_mybrand_setup>
124
  <mybrand_write>
125
  <connection>
126
  <use>core_write</use>
2
  <config>
3
  <modules>
4
  <A4on_Mybrand>
5
+ <version>0.1.1</version>
6
  </A4on_Mybrand>
7
  </modules>
8
  <frontend>
112
 
113
  </models>
114
  <resources>
115
+ <mybrand_myproduct_setup>
116
  <setup>
117
  <module>A4on_Mybrand</module>
118
  <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
120
  <connection>
121
  <use>core_setup</use>
122
  </connection>
123
+ </mybrand_myproduct_setup>
124
  <mybrand_write>
125
  <connection>
126
  <use>core_write</use>
app/code/local/A4on/Mybrand/sql/{a40n_mybrand_setup/mysql4-install-0.1.0.php → mybrand_myproduct_setup/mysql4-install-0.1.1.php} RENAMED
File without changes
app/design/adminhtml/default/default/layout/mybrand.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version = "1.0" ?>
2
- <layout version="0.1.0">
3
  <mybrand_adminhtml_index_index>
4
  <reference name="content">
5
  <block type="mybrand/monblock" name="mybrand_monbloc" template="mybrand/mybrand.phtml" />
1
  <?xml version = "1.0" ?>
2
+ <layout version="0.1.1">
3
  <mybrand_adminhtml_index_index>
4
  <reference name="content">
5
  <block type="mybrand/monblock" name="mybrand_monbloc" template="mybrand/mybrand.phtml" />
app/design/adminhtml/default/default/layout/myproduct.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version = "1.0" ?>
2
- <layout version="0.1.0">
3
  <myproduct_adminhtml_index_index>
4
  <reference name="content">
5
  <block type="myproduct/monblock" name="myproduct_monbloc" template="myproduct/myproduct.phtml" />
1
  <?xml version = "1.0" ?>
2
+ <layout version="0.1.1">
3
  <myproduct_adminhtml_index_index>
4
  <reference name="content">
5
  <block type="myproduct/monblock" name="myproduct_monbloc" template="myproduct/myproduct.phtml" />
app/design/frontend/base/default/layout/mybrand.xml CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version = "1.0" ?>
2
- <layout version="0.1.0">
3
  <default>
4
  <reference name="content"></reference>
5
  </default>
1
  <?xml version = "1.0" ?>
2
+ <layout version="0.1.1">
3
  <default>
4
  <reference name="content"></reference>
5
  </default>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>A4on_Mybrand</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Using this plugin, brands can be created with an image to display in the front end and products can be assigned to their brands and can be viewed when the particular brand logo is clicked.</description>
11
  <notes>This is a stable release. But in future updates might be made.</notes>
12
  <authors><author><name>MohanaKrishnan</name><user>mohi797</user><email>krishnan3151990@gmail.com</email></author></authors>
13
- <date>2013-10-30</date>
14
- <time>13:04:39</time>
15
- <contents><target name="magelocal"><dir name="."><dir name="A4on"><dir name="Mybrand"><dir name="etc"><file name="config.xml" hash="6384819d9a17c05f88e4f1d8e46148ef"/></dir><dir name="controllers"><file name="IndexController.php" hash="23b53440c8a9d0850495377728d68b57"/><dir name="Adminhtml"><file name="IndexController.php" hash="0e7cd2233eb531966637e395fb055338"/></dir></dir><dir name="Block"><file name="Monblock.php" hash="6fb7f7113ec0a8d02dcd4e1c2c70dd61"/></dir><dir name="Model"><file name="Mybrand.php" hash="533a44517bc82fea68a11e0bf8bfc204"/><file name="Myproduct.php" hash="1552833394cac5f9497e3836573dce62"/><dir name="Mysql4"><file name="Mybrand.php" hash="d6337ff8f1976c86735d682d39e379d4"/><file name="Myproduct.php" hash="b351e8bf7fa5cc6e160a73c50e2cc738"/><dir name="Mybrand"><file name="Collection.php" hash="efce73de6c1fa9021e6037953515084b"/></dir><dir name="Myproduct"><file name="Collection.php" hash="5f4d17d0022823335cad1bc0c561276e"/></dir></dir></dir><dir name="sql"><dir name="a40n_mybrand_setup"><file name="mysql4-install-0.1.0.php" hash="43bebc7187c945e2992d51492f6d27d1"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="."><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mybrand.xml" hash="c6fd6db90f1ec57a97e90f0574a35f2f"/><file name="myproduct.xml" hash="0220a4dfca1b00acf08e0ffd1b2c27b7"/></dir><dir name="template"><dir name="mybrand"><file name="mybrand.phtml" hash="d28e76779759d10463503ea8312a58f5"/></dir><dir name="myproduct"><file name="myproduct.phtml" hash="8262a31469afe308aefad7d221b53864"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mybrand.xml" hash="31dd4df05942dc7de3a4d93d2872fb2c"/></dir><dir name="template"><dir name="mybrand"><file name="mybrand.phtml" hash="e076a2bbb6f5a971c90c03ab150679de"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="."><dir name="modules"><file name="A4on_Mybrand.xml" hash="7361fdbcc12551a81b82765a1e654c27"/></dir></dir></target><target name="mage"><dir name="."><dir name="upload"><dir name="mybrand"><dir name="brands"><file name="Lighthouse.jpg" hash="8969288f4245120e7c3870287cce0ff3"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="."><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><file name="mybrand.js" hash="383771ef1692bfcc3f2b6917ca985778"/><file name="vticker.js" hash="c578abb7e595389a2f3534b285138404"/></dir><dir name="css"><file name="mybrand.css" hash="6d6cd600ceda3eb578a61744ec9f6191"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>A4on_Mybrand</name>
4
+ <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL-3.0</license>
7
  <channel>community</channel>
10
  <description>Using this plugin, brands can be created with an image to display in the front end and products can be assigned to their brands and can be viewed when the particular brand logo is clicked.</description>
11
  <notes>This is a stable release. But in future updates might be made.</notes>
12
  <authors><author><name>MohanaKrishnan</name><user>mohi797</user><email>krishnan3151990@gmail.com</email></author></authors>
13
+ <date>2013-11-01</date>
14
+ <time>07:33:48</time>
15
+ <contents><target name="magelocal"><dir name="."><dir name="A4on"><dir name="Mybrand"><dir name="etc"><file name="config.xml" hash="4a95b5b175fec4d574d38bc95556d2ce"/></dir><dir name="controllers"><file name="IndexController.php" hash="d6c86b79658d7e26f8c476da7f1f9f46"/><dir name="Adminhtml"><file name="IndexController.php" hash="c200b8f184d0d5e5f26b6e034dec550e"/></dir></dir><dir name="Block"><file name="Monblock.php" hash="6fb7f7113ec0a8d02dcd4e1c2c70dd61"/></dir><dir name="Model"><file name="Mybrand.php" hash="533a44517bc82fea68a11e0bf8bfc204"/><file name="Myproduct.php" hash="1552833394cac5f9497e3836573dce62"/><dir name="Mysql4"><file name="Mybrand.php" hash="d6337ff8f1976c86735d682d39e379d4"/><file name="Myproduct.php" hash="b351e8bf7fa5cc6e160a73c50e2cc738"/><dir name="Mybrand"><file name="Collection.php" hash="efce73de6c1fa9021e6037953515084b"/></dir><dir name="Myproduct"><file name="Collection.php" hash="5f4d17d0022823335cad1bc0c561276e"/></dir></dir></dir><dir name="sql"><dir name="mybrand_myproduct_setup"><file name="mysql4-install-0.1.1.php" hash="43bebc7187c945e2992d51492f6d27d1"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="."><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mybrand.xml" hash="e79cdad48a432fcc49504e47b3a0cd58"/><file name="myproduct.xml" hash="24192d5a9338dd17c287838a2d06a412"/></dir><dir name="template"><dir name="mybrand"><file name="mybrand.phtml" hash="d28e76779759d10463503ea8312a58f5"/></dir><dir name="myproduct"><file name="myproduct.phtml" hash="8262a31469afe308aefad7d221b53864"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mybrand.xml" hash="f298a66b7490d81617e599fb30417e89"/></dir><dir name="template"><dir name="mybrand"><file name="mybrand.phtml" hash="e076a2bbb6f5a971c90c03ab150679de"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="."><dir name="modules"><file name="A4on_Mybrand.xml" hash="7361fdbcc12551a81b82765a1e654c27"/></dir></dir></target><target name="mage"><dir name="."><dir name="upload"><dir name="mybrand"><dir name="brands"><file name="Lighthouse.jpg" hash="8969288f4245120e7c3870287cce0ff3"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="."><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><file name="mybrand.js" hash="383771ef1692bfcc3f2b6917ca985778"/><file name="vticker.js" hash="c578abb7e595389a2f3534b285138404"/></dir><dir name="css"><file name="mybrand.css" hash="6d6cd600ceda3eb578a61744ec9f6191"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>