Venu_Menu - Version 1.3.0.0

Version Notes

Minor improvements

Download this release

Release Info

Developer Leandro Villagran
Extension Venu_Menu
Version 1.3.0.0
Comparing to
See all releases


Code changes from version 1.2.0.0 to 1.3.0.0

app/code/community/Vstudio/Venu/Block/Adminhtml/Form/Field/Renderer/Notice.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Villagran Studios
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Vtudio
22
+ * @package Vstudio_Venu
23
+ * @copyright Copyright (c) 2011-2017 Villagran Studios. and affiliates (http://www.villagranstudios.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Custom Link block
29
+ *
30
+ * @category Vstudio
31
+ * @package Vstudio_Venu
32
+ * @author VillagranStudios Team <support@villagranstudios.com>
33
+ */
34
+
35
+ class Vstudio_Venu_Block_Adminhtml_Form_Field_Renderer_Notice extends Varien_Data_Form_Element_Abstract
36
+ {
37
+ protected $_element;
38
+
39
+ public function getElementHtml()
40
+ {
41
+ $html = '<p id="'.$this->getHtmlId().'" '.$this->serialize($this->getHtmlAttributes()).'>'.$this->getText().'<p/>';
42
+ $html .= $this->getAfterElementHtml();
43
+ return $html;
44
+ }
45
+ }
app/code/community/Vstudio/Venu/Block/Adminhtml/Menumanager/Edit/Tab/Categories.php CHANGED
@@ -1,5 +1,36 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
3
  class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Categories
4
  extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories {
5
  protected $_categoryIds = null;
1
  <?php
2
+ /**
3
+ * Villagran Studios
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Vtudio
22
+ * @package Vstudio_Venu
23
+ * @copyright Copyright (c) 2011-2017 Villagran Studios. and affiliates (http://www.villagranstudios.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
 
27
+ /**
28
+ * Categories block
29
+ *
30
+ * @category Vstudio
31
+ * @package Vstudio_Venu
32
+ * @author VillagranStudios Team <support@villagranstudios.com>
33
+ */
34
  class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Categories
35
  extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories {
36
  protected $_categoryIds = null;
app/code/community/Vstudio/Venu/Block/Adminhtml/Menumanager/Edit/Tab/Custom.php CHANGED
@@ -1,5 +1,36 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
3
  class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Custom extends Mage_Adminhtml_Block_Widget_Form {
4
 
5
  protected function _prepareForm() {
@@ -7,6 +38,13 @@ class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Custom extends Mage_Admi
7
  $this->setForm($form);
8
  $fieldset = $form->addFieldset('menu_edit_custom_form', array('legend' => Mage::helper('vstudio_venu')->__('Create Custom Menu')));
9
 
 
 
 
 
 
 
 
10
  $fieldset->addField('custom_title', 'text', array(
11
  'label' => Mage::helper('vstudio_venu')->__('Link Title'),
12
  'name' => 'custom[0][title]',
@@ -15,6 +53,7 @@ class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Custom extends Mage_Admi
15
  'label' => Mage::helper('vstudio_venu')->__('Link Url'),
16
  'name' => 'custom[0][link]',
17
  ));
 
18
  /** set form data **/
19
  if (Mage::getSingleton('adminhtml/session') -> getVenuData()) {
20
  $form -> setValues(Mage::getSingleton('adminhtml/session') -> getVenuData());
1
  <?php
2
+ /**
3
+ * Villagran Studios
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Vtudio
22
+ * @package Vstudio_Venu
23
+ * @copyright Copyright (c) 2011-2017 Villagran Studios. and affiliates (http://www.villagranstudios.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
 
27
+ /**
28
+ * Custom Link block
29
+ *
30
+ * @category Vstudio
31
+ * @package Vstudio_Venu
32
+ * @author VillagranStudios Team <support@villagranstudios.com>
33
+ */
34
  class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Custom extends Mage_Adminhtml_Block_Widget_Form {
35
 
36
  protected function _prepareForm() {
38
  $this->setForm($form);
39
  $fieldset = $form->addFieldset('menu_edit_custom_form', array('legend' => Mage::helper('vstudio_venu')->__('Create Custom Menu')));
40
 
41
+ $fieldset->addType('notice', 'Vstudio_Venu_Block_Adminhtml_Form_Field_Renderer_Notice');
42
+
43
+ $fieldset->addField('instruction', 'notice', array(
44
+ 'name' => 'instructions',
45
+ 'text' => 'After you click save and continue you will be able to see your custom link on the Menu Information tab'
46
+ ));
47
+
48
  $fieldset->addField('custom_title', 'text', array(
49
  'label' => Mage::helper('vstudio_venu')->__('Link Title'),
50
  'name' => 'custom[0][title]',
53
  'label' => Mage::helper('vstudio_venu')->__('Link Url'),
54
  'name' => 'custom[0][link]',
55
  ));
56
+
57
  /** set form data **/
58
  if (Mage::getSingleton('adminhtml/session') -> getVenuData()) {
59
  $form -> setValues(Mage::getSingleton('adminhtml/session') -> getVenuData());
app/code/community/Vstudio/Venu/Block/Adminhtml/Menumanager/Edit/Tab/Form.php CHANGED
@@ -2,10 +2,10 @@
2
 
3
  class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
4
 
5
- public function __construct()
6
- {
7
- parent::__construct();
8
- $this->setTemplate('vstudio/venu/edit/tab/form.phtml');
9
  }
10
 
11
  protected function _prepareForm() {
@@ -14,6 +14,7 @@ class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Form extends Mage_Adminh
14
  $fieldset = $form->addFieldset('menu_edit_form', array('legend' => Mage::helper('vstudio_venu')->__('Menu information')));
15
  $options = Mage::getSingleton('vstudio_venu/options');
16
 
 
17
  $fieldset->addField('menu_title', 'text', array(
18
  'label' => Mage::helper('vstudio_venu')->__('Menu Title'),
19
  'class' => 'required-entry',
@@ -102,8 +103,8 @@ class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Form extends Mage_Adminh
102
  // decode menu options and add it to the right field
103
  if ( ! empty($data['menu_options'])) {
104
  $options = json_decode($data['menu_options']);
105
- foreach ($options as $option => $value) {
106
- $data[$option] = $value;
107
  }
108
  }
109
  $menuItems = Mage::registry('venu_data')->getData('menu_items');
@@ -196,8 +197,8 @@ class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Form extends Mage_Adminh
196
  // decode menu options and add it to the right field
197
  if ( ! empty($formData['menu_options'])) {
198
  $options = json_decode($formData['menu_options']);
199
- foreach ($options as $option => $value) {
200
- $formData[$option] = $value;
201
  }
202
  unset($formData['menu_options']);
203
  }
2
 
3
  class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
4
 
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('vstudio/venu/edit/tab/form.phtml');
9
  }
10
 
11
  protected function _prepareForm() {
14
  $fieldset = $form->addFieldset('menu_edit_form', array('legend' => Mage::helper('vstudio_venu')->__('Menu information')));
15
  $options = Mage::getSingleton('vstudio_venu/options');
16
 
17
+
18
  $fieldset->addField('menu_title', 'text', array(
19
  'label' => Mage::helper('vstudio_venu')->__('Menu Title'),
20
  'class' => 'required-entry',
103
  // decode menu options and add it to the right field
104
  if ( ! empty($data['menu_options'])) {
105
  $options = json_decode($data['menu_options']);
106
+ foreach ($options as $option => $value) {
107
+ $data[$option] = $value;
108
  }
109
  }
110
  $menuItems = Mage::registry('venu_data')->getData('menu_items');
197
  // decode menu options and add it to the right field
198
  if ( ! empty($formData['menu_options'])) {
199
  $options = json_decode($formData['menu_options']);
200
+ foreach ($options as $option => $value) {
201
+ $formData[$option] = $value;
202
  }
203
  unset($formData['menu_options']);
204
  }
app/code/community/Vstudio/Venu/Block/Adminhtml/Menumanager/Edit/Tab/Form.phpbak DELETED
@@ -1,195 +0,0 @@
1
- <?php
2
-
3
- class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
4
-
5
- protected function _prepareForm() {
6
- $form = new Varien_Data_Form();
7
- $this->setForm($form);
8
- $fieldset = $form->addFieldset('menu_edit_form', array('legend' => Mage::helper('vstudio_venu')->__('Menu information')));
9
- $options = Mage::getSingleton('vstudio_venu/options');
10
-
11
- $fieldset->addField('menu_title', 'text', array(
12
- 'label' => Mage::helper('vstudio_venu')->__('Menu Title'),
13
- 'class' => 'required-entry',
14
- 'required' => true,
15
- 'name' => 'menu_title',
16
- ));
17
-
18
- $fieldset->addField('menu_orientation', 'select', array(
19
- 'label' => Mage::helper('vstudio_venu')->__('Menu Orientation'),
20
- 'name' => "menu_options[menu_orientation]",
21
- 'values' => $options->getOptionOrientation(),
22
- ));
23
-
24
- $fieldset->addField('menu_status', 'select', array(
25
- 'label' => Mage::helper('vstudio_venu')->__('Status'),
26
- 'name' => 'menu_status',
27
- 'values' => $options->getOptionStatus(),
28
- ));
29
-
30
- $fieldset->addField('advance_options', 'hidden', array('after_element_html' => '<button class="scalable save" type="button" title="Edit Menu Item" id="hide_advance">
31
- <span><span><span>Show Advance Options</span></span></span></button>
32
- <script>
33
- document.observe("dom:loaded", function() {
34
- $$(\'.advance-options\').invoke(\'up\').invoke(\'up\').invoke(\'hide\');
35
- $(\'hide_advance\').observe(\'click\', function(event) {
36
- $$(\'.advance-options\').invoke(\'up\').invoke(\'up\').invoke(\'toggle\');
37
- });
38
- });
39
- </script>', ));
40
- $fieldset->addField('menu_css_id', 'text', array(
41
- 'label' => Mage::helper('vstudio_venu')->__('Menu CSS Id'),
42
- 'name' => "menu_options[menu_css_id]",
43
- 'class' => 'advance-options',
44
- 'after_element_html' => '<p class="note"><span>The ID that is applied to the ul element which encloses the menu items.</span></p>',
45
- ));
46
- $fieldset->addField('menu_css_class', 'text', array(
47
- 'label' => Mage::helper('vstudio_venu')->__('Menu CSS Class'),
48
- 'name' => "menu_options[menu_css_class]",
49
- 'class' => 'advance-options',
50
- 'after_element_html' => '<p class="note"><span>The class that is applied to the ul element which encloses the menu items.</span></p>',
51
- ));
52
-
53
- $fieldset->addField('container_id', 'text', array(
54
- 'label' => Mage::helper('vstudio_venu')->__('Menu container id'),
55
- 'name' => "menu_options[container_id]",
56
- 'class' => 'advance-options',
57
- 'after_element_html' => '<p class="note"><span>The css id that is applied to the container</span></p>',
58
- ));
59
- $fieldset->addField('container_class', 'text', array(
60
- 'label' => Mage::helper('vstudio_venu')->__('Menu container class'),
61
- 'name' => "menu_options[container_class]",
62
- 'class' => 'advance-options',
63
- 'after_element_html' => '<p class="note"><span>The css class that is applied to the container</span></p>',
64
- ));
65
- $fieldset->addField('menu_container', 'select', array(
66
- 'label' => Mage::helper('vstudio_venu')->__('Menu Container'),
67
- 'class' => 'advance-options',
68
- 'name' => "menu_options[menu_container]",
69
- 'onclick' => "",
70
- 'onchange' => "",
71
- 'value' => '4',
72
- 'values' => array(
73
- '1' => array(
74
- 'value' => 'nav',
75
- 'label' => 'Use a nav'
76
- ),
77
- '2' => array(
78
- 'value' => 'div',
79
- 'label' => 'Use a div'
80
- ),
81
- '3' => array(
82
- 'value' => 'none',
83
- 'label' => 'Use nothing'
84
- ),
85
- ),
86
- 'after_element_html' => '<p class="note"><span>Whether to wrap the ul, You can use div and nav tags</span></p>',
87
- ));
88
-
89
- /** set form data **/
90
- if (Mage::getSingleton('adminhtml/session')->getVenuData()) {
91
- $form->setValues(Mage::getSingleton('adminhtml/session')->getVenuData());
92
- Mage::getSingleton('adminhtml/session')->setVenuData(null);
93
- } elseif (Mage::registry('venu_data')) {
94
-
95
- $data = Mage::registry('venu_data')->getData();
96
- // decode menu options and add it to the right field
97
- if ( ! empty($data['menu_options'])) {
98
- $options = json_decode($data['menu_options']);
99
- foreach ($options as $option => $value) {
100
- $data[$option] = $value;
101
- }
102
- }
103
- $menuItems = Mage::registry('venu_data')->getData('menu_items');
104
- $form->setValues($data);
105
-
106
- $code = Mage::registry('venu_data')->getData('menu_code');
107
- if ( ! empty($code)) {
108
- $fieldset->addField('menu_code', 'textarea', array(
109
- 'label' => Mage::helper('vstudio_venu')->__('Menu Code'),
110
- 'name' => 'menu_code',
111
- 'value' => $code,
112
- 'onclick' => "this.select();",
113
- 'after_element_html' => '<p class="note">
114
- <span style="width:100%; color:red;">
115
- Use this to add this menu into pages,
116
- category pages or static blocks
117
- </span></p>',
118
- ));
119
- }
120
-
121
- if ($menuItems > 0 && ! empty($menuItems)) {
122
- $field = 0;
123
-
124
- $this->_sortFields($menuItems, SORT_ASC, 'sort_order');
125
- foreach ($menuItems as $item) {
126
- $fieldset = $form->addFieldset("menu_edit_form_$field", array('legend' => Mage::helper('vstudio_venu')->__("Menu Item {$item['item_label']} Menu Id : {$item['id']}")));
127
-
128
- $fieldset->addField('item_collapse_' . $field, 'hidden', array(
129
- 'label' => Mage::helper('vstudio_venu')->__('Navigation Label'),
130
- 'after_element_html' => '<button style="" onclick="$$(\'#menu_edit_form_' . $field . ' tr:gt(0) \').invoke(\'toggle\')" class="scalable save" type="button" title="Edit Menu Item" id=""><span><span><span>Edit Menu Link</span></span></span></button>',
131
- ));
132
- $fieldset->addField('item_label_' . $field, 'text', array(
133
- 'label' => Mage::helper('vstudio_venu')->__('Navigation Label'),
134
- 'name' => 'item[' . $item['id'] . '][item_label]',
135
- 'value' => $item['item_label'],
136
- ));
137
- $fieldset->addField('item_hidden_' . $field, 'hidden', array(
138
- 'label' => Mage::helper('vstudio_venu')->__('Navigation Label'),
139
- 'name' => 'item[' . $item['id'] . '][id]',
140
- 'value' => $item['id'],
141
- ));
142
- $fieldset->addField('item_link_' . $field, 'text', array(
143
- 'label' => Mage::helper('vstudio_venu')->__('Url Link'),
144
- 'name' => 'item[' . $item['id'] . '][item_link]',
145
- 'value' => urldecode($item['item_link']),
146
- ));
147
- $fieldset->addField('sort_order_' . $field, 'text', array(
148
- 'label' => Mage::helper('vstudio_venu')->__('Menu Item Position'),
149
- 'name' => 'item[' . $item['id'] . '][sort_order]',
150
- 'style' => 'width:30%;',
151
- 'value' => $item['sort_order'],
152
- ));
153
- $fieldset->addField('parent_id_' . $field, 'text', array(
154
- 'label' => Mage::helper('vstudio_venu')->__('Parent Id'),
155
- 'name' => 'item[' . $item['id'] . '][parent_id]',
156
- 'style' => 'width:30%;',
157
- 'value' => $item['parent_id'],
158
- ));
159
- $fieldset->addField('delete_' . $field, 'checkbox', array(
160
- 'label' => Mage::helper('vstudio_venu')->__('Delete Menu Item'),
161
- 'name' => 'item[' . $item['id'] . '][delete]',
162
- 'value' => $item['id'],
163
- ));
164
-
165
- $fieldset->addField('hide_elements_' . $field, 'hidden', array(
166
- 'label' => Mage::helper('vstudio_venu')->__('Navigation Label'),
167
- 'after_element_html' => '<script>document.observe("dom:loaded", function() { $$(\'#menu_edit_form_' . $field . ' tr:gt(0) \').invoke(\'hide\'); });</script>',
168
- ));
169
-
170
- $field++;
171
- }
172
- }
173
- }
174
- return parent::_prepareForm();
175
- }
176
-
177
- /**
178
- * Sort a multidimensional array by reference
179
- *
180
- * @param $data array
181
- * @param $order order to be sorted
182
- * @param $sortBy key to be sorted
183
- */
184
- protected function _sortFields(&$data, $order = SORT_ASC, $sortBy = 'sort_order') {
185
- // Obtain a list of columns
186
- foreach ($data as $key => $row) {
187
- $sortOrder[$key] = $row[$sortBy];
188
- }
189
-
190
- // Sort the data with $sortBy ascending, edition ascending
191
- // Add $data as the last parameter, to sort by the common key
192
- array_multisort($sortOrder, $order, $data);
193
- }
194
-
195
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Vstudio/Venu/Block/Adminhtml/Menumanager/Edit/Tab/Pages.php CHANGED
@@ -10,6 +10,14 @@ class Vstudio_Venu_Block_Adminhtml_MenuManager_Edit_Tab_Pages extends Mage_Admin
10
  $this->setForm($form);
11
 
12
  $fieldset = $form->addFieldset('banner_form', array('legend' => Mage::helper('vstudio_venu')->__('Menu Pages')));
 
 
 
 
 
 
 
 
13
  $fieldset->addField('pages', 'multiselect', array(
14
  'label' => Mage::helper('vstudio_venu')->__('Visible In'),
15
  'name' => 'pages[]',
10
  $this->setForm($form);
11
 
12
  $fieldset = $form->addFieldset('banner_form', array('legend' => Mage::helper('vstudio_venu')->__('Menu Pages')));
13
+ $fieldset->addType('notice', 'Vstudio_Venu_Block_Adminhtml_Form_Field_Renderer_Notice');
14
+
15
+ $fieldset->addField('instruction', 'notice', array(
16
+ 'name' => 'instructions',
17
+ 'text' => 'After you click save and continue you will be able to see each page as a menu item on the Menu Information tab'
18
+ ));
19
+
20
+
21
  $fieldset->addField('pages', 'multiselect', array(
22
  'label' => Mage::helper('vstudio_venu')->__('Visible In'),
23
  'name' => 'pages[]',
app/code/community/Vstudio/Venu/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Vstudio_Venu>
5
- <version>1.2.0.0</version>
6
  </Vstudio_Venu>
7
  </modules>
8
  <adminhtml>
2
  <config>
3
  <modules>
4
  <Vstudio_Venu>
5
+ <version>1.3.0.0</version>
6
  </Vstudio_Venu>
7
  </modules>
8
  <adminhtml>
app/code/community/Vstudio/Venu/sql/vstudio_venu_setup/upgrade-1.2.0.0-1.3.0.0.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Villagran Studios
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category Vtudio
22
+ * @package Vstudio_Venu
23
+ * @copyright Copyright (c) 2011-2017 Villagran Studios. and affiliates (http://www.villagranstudios.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Upgrade block
29
+ *
30
+ * @category Vstudio
31
+ * @package Vstudio_Venu
32
+ * @author VillagranStudios Team <support@villagranstudios.com>
33
+ */
34
+ /*
35
+ * Make sure the upgrade is not performed on installations without the tables
36
+ * (i.e. unpatched shops).
37
+ */
38
+ $adminVersion = Mage::getConfig()->getModuleConfig('Mage_Admin')->version;
39
+ if (version_compare($adminVersion, '1.6.1.2', '>=')) {
40
+
41
+ $blockNames = array(
42
+ 'vstudio_venu/menu',
43
+ );
44
+ foreach ($blockNames as $blockName) {
45
+ $whitelistBlock = Mage::getModel('admin/block')->load($blockName, 'block_name');
46
+ $whitelistBlock->setData('block_name', $blockName);
47
+ $whitelistBlock->setData('is_allowed', 1);
48
+ $whitelistBlock->save();
49
+ }
50
+ }
app/design/adminhtml/default/default/template/vstudio/venu/edit/tab/category.phtml CHANGED
@@ -6,6 +6,10 @@
6
  </h4>
7
  </div>
8
  <fieldset id="grop_fields">
 
 
 
 
9
  <input type="hidden" name="categories" id="venu_categories" value="<?php echo $this->getIdsString() ?>">
10
  <div id="venu-categories" class="tree"></div>
11
  </fieldset>
6
  </h4>
7
  </div>
8
  <fieldset id="grop_fields">
9
+
10
+
11
+ <p>After you click save and continue you will be able to see each category you choose as a menu item on the Menu Information tab</p>
12
+
13
  <input type="hidden" name="categories" id="venu_categories" value="<?php echo $this->getIdsString() ?>">
14
  <div id="venu-categories" class="tree"></div>
15
  </fieldset>
app/design/frontend/{default → base}/default/layout/venu.xml RENAMED
File without changes
app/design/frontend/{default → base}/default/template/vstudio/venu/menu.phtml RENAMED
File without changes
package.xml CHANGED
@@ -1,57 +1,58 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Venu_Menu</name>
4
- <version>1.2.0.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://opensource.org/licenses/academic.php">("AFL") v. 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Create simple but versatile menu navigation from CMS pages, Categories URLs, or external URLs. </summary>
10
  <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;/p&gt;&#xD;
11
- &lt;p&gt;Create simple but versatile menu navigation from CMS pages, Categories URLs, or external URLs. Each element has css class so you can address any element by standard css.&lt;/p&gt;&#xD;
 
12
  &lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;&#xD;
13
  &lt;ul&gt;&#xD;
14
- &lt;li&gt;Upgrade Proof Module.&lt;/li&gt;&#xD;
15
- &lt;li&gt;Tested for Magento version 1.7.0.0 - 1.8.1.0.&lt;/li&gt;&#xD;
16
- &lt;li&gt;&amp;nbsp;Easy to install nothing to configure.&lt;/li&gt;&#xD;
17
- &lt;li&gt;Valid HTML5 structure&lt;/li&gt;&#xD;
18
- &lt;li&gt;Valid CSS&lt;/li&gt;&#xD;
19
- &lt;li&gt;Support for vertical or horizontal menu orientation&lt;/li&gt;&#xD;
20
- &lt;li&gt;Drop-down menu when using the horizontal menu&lt;/li&gt;&#xD;
21
- &lt;li&gt;Fly-out menu when using the vertical menu&lt;/li&gt;&#xD;
22
- &lt;li&gt;You can easily add any menu to pages, static block, or categories pages by copying and pasting the block code that gets generated every time you create a new menu.&lt;/li&gt;&#xD;
 
23
  &lt;/ul&gt;&#xD;
24
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
25
  &lt;p&gt;&lt;strong&gt;Installation / Configuration:&lt;/strong&gt;&lt;/p&gt;&#xD;
26
  &lt;ol&gt;&#xD;
27
- &lt;li&gt;After installation, make sure to clear you cache then:&lt;/li&gt;&#xD;
28
  &lt;/ol&gt;&#xD;
29
  &lt;ul&gt;&#xD;
30
- &lt;li&gt;To create menus navigate to Menu &amp;gt;&amp;gt; Manage Menus&lt;/li&gt;&#xD;
31
  &lt;/ul&gt;&#xD;
32
  &lt;ol&gt;&#xD;
33
- &lt;li&gt;After installation a sample menu will be added to the footer of you website.&lt;/li&gt;&#xD;
34
  &lt;/ol&gt;&#xD;
35
  &lt;ul&gt;&#xD;
36
- &lt;li&gt;To disable the sample menu simply copy the venu.xml file located in MageDirectory\app\design\frontend\default\default\layout&amp;nbsp; to your theme directory and remove the block reference to the sample menu.&lt;/li&gt;&#xD;
 
37
  &lt;/ul&gt;&#xD;
38
  &lt;ol&gt;&#xD;
39
- &lt;li&gt;To use Menu in your CMS pages use:&lt;/li&gt;&#xD;
40
- &lt;/ol&gt;&#xD;
41
  &lt;ul&gt;&#xD;
42
- &lt;li&gt;{{block type="vstudio_venu/menu" block_id="sample_menu" template="vstudio/venu/menu.phtml" menu_title="Sample Menu"}}&lt;/li&gt;&#xD;
43
  &lt;/ul&gt;&#xD;
44
  &lt;ol&gt;&#xD;
45
- &lt;li&gt;&lt;strong&gt;&amp;nbsp;NOTE:&lt;/strong&gt; Here menu_title will be replaced with the menu name you created.&lt;/li&gt;&#xD;
46
  &lt;/ol&gt;&#xD;
47
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
48
- <notes>Fixes some incompatibility issues with linux servers&#xD;
49
- &#xD;
50
- Adds drag and drop functionality </notes>
51
  <authors><author><name>Leandro Villagran</name><user>veandro</user><email>veandro@outlook.com</email></author></authors>
52
- <date>2014-05-21</date>
53
- <time>03:56:26</time>
54
- <contents><target name="mageetc"><dir><dir name="modules"><file name="Vstudio_Venu.xml" hash="9da19de899ff6e71c212774e6c4218cd"/></dir></dir></target><target name="magecommunity"><dir><dir name="Vstudio"><dir name="Venu"><dir name="Block"><dir name="Adminhtml"><dir name="Menumanager"><dir name="Edit"><file name="Form.php" hash="19e215b8bb5ff97f28a1da9c4870ee19"/><dir name="Tab"><file name="Categories.php" hash="cef84d0151c6ed2cc697642e81c07d28"/><file name="Custom.php" hash="c99783ed1eda4209c1c3239596af2cdc"/><file name="Form.php" hash="540eef57fcf46aaa82d1d48947b959b2"/><file name="Form.phpbak" hash="53c84d188a1b988381296eeafd00eaa4"/><file name="Pages.php" hash="e8e49286b198781e18ee5efa3241096c"/></dir><file name="Tabs.php" hash="4896cfcc4d9b83b54709583b2398caec"/></dir><file name="Edit.php" hash="32b25d351269353432f5925a21d50985"/><file name="Grid.php" hash="68395bbad24c0456e37bd8a0f2fd3ddc"/></dir><file name="Menumanager.php" hash="1006a6046a9b19cd56c343ac82202274"/></dir><file name="Menu.php" hash="f823d21dff135a711eede4deda12f44d"/></dir><dir name="Helper"><file name="Data.php" hash="7cd8247fccf0ec896ed8308b0e517209"/></dir><dir name="Model"><file name="Menuitem.php" hash="14fcb790d4d3b4b57ae7212a4732863b"/><file name="Options.php" hash="ac77800626cab12b28354d8221546c31"/><dir name="Resource"><dir name="Menuitem"><file name="Collection.php" hash="1602973b83dea21b046f100bba8ff7f1"/></dir><file name="Menuitem.php" hash="894f5bba5fa8bb575f28664a5ff90864"/><dir name="Venu"><file name="Collection.php" hash="018e4a8a54ce460ab54d372a1467e49d"/></dir><file name="Venu.php" hash="add7f078ca2f0aad116bfe2d31970142"/></dir><file name="Venu.php" hash="83501fea2b353c8d7e52ef86fbbcfe32"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Venu"><file name="MenuController.php" hash="7fb07fd923a8619e889cfb439fc661c3"/></dir></dir><file name="VenuController.php" hash="7f46cea457534d053eebf4c01833def6"/></dir><dir name="data"><dir name="vstudio_venu_setup"><file name="data-install-1.0.0.0.php" hash="efbb9acc38e7dfe72b4ec27699703d76"/><file name="data-upgrade-1.0.0.0-1.2.0.0.php" hash="f84214fc43f665c79b92dc7a092b364f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f3c85fa038d8a776800f957cf8a595f1"/><file name="config.xml" hash="f12f5c7d58087d4daaea17d834b56130"/><file name="system.xml" hash="c79e105fc5b825bf85a2479ed881883a"/></dir><dir name="sql"><dir name="vstudio_venu_setup"><file name="install-1.0.0.0.php" hash="98a6e204778f474723e9bcbb11947bc9"/><file name="upgrade-1.0.0.0-1.2.0.0.php" hash="81051bcc2cf1bedf378224b0a93e2877"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="venu.xml" hash="8c649db85e0ee2172b94186da487feab"/></dir><dir name="template"><dir name="vstudio"><dir name="venu"><dir name="edit"><dir name="tab"><file name="category.phtml" hash="8b42a4f731790f088bd0cd4c0a7a87fe"/><file name="form.phtml" hash="ee11daa000e19d6054f501cbe8bbe6f1"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="venu.xml" hash="c6815463ef7c5ea20866c23b41f0225d"/></dir><dir name="template"><dir name="vstudio"><dir name="venu"><file name="menu.phtml" hash="b06077bcf9e9d1c9579e443fb83b613f"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="vstudio"><dir name="venu"><file name="master.css" hash="3f7658a34ee77526fa1967fb600d747c"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="vstudio"><dir name="venu"><file name="venu.css" hash="d0ce993dd723e8009bfd3db14ad4b4ef"/></dir></dir></dir></dir></dir></dir></target></contents>
55
  <compatible/>
56
- <dependencies><required><php><min>5.2.0</min><max>5.5.11</max></php></required></dependencies>
57
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Venu_Menu</name>
4
+ <version>1.3.0.0</version>
5
  <stability>stable</stability>
6
+ <license uri="https://opensource.org/licenses/OSL-3.0">OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Create simple but versatile menu navigation from CMS pages, Categories URLs, or external URLs.</summary>
10
  <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;/p&gt;&#xD;
11
+ &lt;p&gt;Create simple but versatile menu navigation from CMS pages, Categories URLs, or external URLs. Each element has css class&#xD;
12
+ so you can address any element by standard css.&lt;/p&gt;&#xD;
13
  &lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;&#xD;
14
  &lt;ul&gt;&#xD;
15
+ &lt;li&gt;Upgrade Proof Module.&lt;/li&gt;&#xD;
16
+ &lt;li&gt;Tested for Magento version 1.7.0.0 - 1.8.1.0.&lt;/li&gt;&#xD;
17
+ &lt;li&gt;&amp;nbsp;Easy to install nothing to configure.&lt;/li&gt;&#xD;
18
+ &lt;li&gt;Valid HTML5 structure&lt;/li&gt;&#xD;
19
+ &lt;li&gt;Valid CSS&lt;/li&gt;&#xD;
20
+ &lt;li&gt;Support for vertical or horizontal menu orientation&lt;/li&gt;&#xD;
21
+ &lt;li&gt;Drop-down menu when using the horizontal menu&lt;/li&gt;&#xD;
22
+ &lt;li&gt;Fly-out menu when using the vertical menu&lt;/li&gt;&#xD;
23
+ &lt;li&gt;You can easily add any menu to pages, static block, or categories pages by copying and pasting the block code that gets&#xD;
24
+ generated every time you create a new menu.&lt;/li&gt;&#xD;
25
  &lt;/ul&gt;&#xD;
26
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;&#xD;
27
  &lt;p&gt;&lt;strong&gt;Installation / Configuration:&lt;/strong&gt;&lt;/p&gt;&#xD;
28
  &lt;ol&gt;&#xD;
29
+ &lt;li&gt;After installation, make sure to clear you cache then:&lt;/li&gt;&#xD;
30
  &lt;/ol&gt;&#xD;
31
  &lt;ul&gt;&#xD;
32
+ &lt;li&gt;To create menus navigate to Menu Manage Menus&lt;/li&gt;&#xD;
33
  &lt;/ul&gt;&#xD;
34
  &lt;ol&gt;&#xD;
35
+ &lt;li&gt;After installation a sample menu will be added to the footer of you website.&lt;/li&gt;&#xD;
36
  &lt;/ol&gt;&#xD;
37
  &lt;ul&gt;&#xD;
38
+ &lt;li&gt;To disable the sample menu simply copy the venu.xml file located in MageDirectory\app\design\frontend\default\default\layout&amp;nbsp;&#xD;
39
+ to your theme directory and remove the block reference to the sample menu.&lt;/li&gt;&#xD;
40
  &lt;/ul&gt;&#xD;
41
  &lt;ol&gt;&#xD;
42
+ &lt;li&gt;To use Menu in your CMS pages use:&lt;/li&gt;&#xD;
43
+ &lt;/ol&gt;;&#xD;
44
  &lt;ul&gt;&#xD;
45
+ &lt;li&gt;{{block type="vstudio_venu/menu" block_id="sample_menu" template="vstudio/venu/menu.phtml" menu_title="Sample Menu"}}&lt;/li&gt;&#xD;
46
  &lt;/ul&gt;&#xD;
47
  &lt;ol&gt;&#xD;
48
+ &lt;li&gt;&lt;strong&gt;&amp;nbsp;NOTE:&lt;/strong&gt; Here menu_title will be replaced with the menu name you created.&lt;/li&gt;&#xD;
49
  &lt;/ol&gt;&#xD;
50
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
51
+ <notes>Minor improvements</notes>
 
 
52
  <authors><author><name>Leandro Villagran</name><user>veandro</user><email>veandro@outlook.com</email></author></authors>
53
+ <date>2017-05-27</date>
54
+ <time>04:15:03</time>
55
+ <contents><target name="magecommunity"><dir name="Vstudio"><dir name="Venu"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><dir name="Renderer"><file name="Notice.php" hash="929cbec076c517900fdf44c84f02eab9"/></dir></dir></dir><dir name="Menumanager"><dir name="Edit"><file name="Form.php" hash="19e215b8bb5ff97f28a1da9c4870ee19"/><dir name="Tab"><file name="Categories.php" hash="a6da39194583f0d65892823bf3ea4fd8"/><file name="Custom.php" hash="1bb8e2578e0151b2ff93d2d529c349b4"/><file name="Form.php" hash="ee31c747fb20a76ebbd4ce32acfff77e"/><file name="Pages.php" hash="3e56d1338302ac20d8179bb33194639b"/></dir><file name="Tabs.php" hash="4896cfcc4d9b83b54709583b2398caec"/></dir><file name="Edit.php" hash="32b25d351269353432f5925a21d50985"/><file name="Grid.php" hash="68395bbad24c0456e37bd8a0f2fd3ddc"/></dir><file name="Menumanager.php" hash="1006a6046a9b19cd56c343ac82202274"/></dir><file name="Menu.php" hash="f823d21dff135a711eede4deda12f44d"/></dir><dir name="Helper"><file name="Data.php" hash="7cd8247fccf0ec896ed8308b0e517209"/></dir><dir name="Model"><file name="Menuitem.php" hash="14fcb790d4d3b4b57ae7212a4732863b"/><file name="Options.php" hash="ac77800626cab12b28354d8221546c31"/><dir name="Resource"><dir name="Menuitem"><file name="Collection.php" hash="1602973b83dea21b046f100bba8ff7f1"/></dir><file name="Menuitem.php" hash="894f5bba5fa8bb575f28664a5ff90864"/><dir name="Venu"><file name="Collection.php" hash="018e4a8a54ce460ab54d372a1467e49d"/></dir><file name="Venu.php" hash="add7f078ca2f0aad116bfe2d31970142"/></dir><file name="Venu.php" hash="83501fea2b353c8d7e52ef86fbbcfe32"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Venu"><file name="MenuController.php" hash="7fb07fd923a8619e889cfb439fc661c3"/></dir></dir><file name="VenuController.php" hash="7f46cea457534d053eebf4c01833def6"/></dir><dir name="data"><dir name="vstudio_venu_setup"><file name="data-install-1.0.0.0.php" hash="efbb9acc38e7dfe72b4ec27699703d76"/><file name="data-upgrade-1.0.0.0-1.2.0.0.php" hash="f84214fc43f665c79b92dc7a092b364f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f3c85fa038d8a776800f957cf8a595f1"/><file name="config.xml" hash="9e02b394fc4d234b9cd41ff159f0cecb"/><file name="system.xml" hash="c79e105fc5b825bf85a2479ed881883a"/></dir><dir name="sql"><dir name="vstudio_venu_setup"><file name="install-1.0.0.0.php" hash="98a6e204778f474723e9bcbb11947bc9"/><file name="upgrade-1.0.0.0-1.2.0.0.php" hash="81051bcc2cf1bedf378224b0a93e2877"/><file name="upgrade-1.2.0.0-1.3.0.0.php" hash="6906c72b7886d16a02ff732c1f669afe"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="venu.xml" hash="8c649db85e0ee2172b94186da487feab"/></dir><dir name="template"><dir name="vstudio"><dir name="venu"><dir name="edit"><dir name="tab"><file name="category.phtml" hash="32b6125bb5960f7bda6d4ffbe4791e15"/><file name="form.phtml" hash="ee11daa000e19d6054f501cbe8bbe6f1"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="venu.xml" hash="c6815463ef7c5ea20866c23b41f0225d"/></dir><dir name="template"><dir name="vstudio"><dir name="venu"><file name="menu.phtml" hash="b06077bcf9e9d1c9579e443fb83b613f"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vstudio_Venu.xml" hash="9da19de899ff6e71c212774e6c4218cd"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="vstudio"><dir name="venu"><file name="venu.css" hash="d0ce993dd723e8009bfd3db14ad4b4ef"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="vstudio"><dir name="venu"><file name="master.css" hash="3f7658a34ee77526fa1967fb600d747c"/></dir></dir></dir></dir></dir></target></contents>
56
  <compatible/>
57
+ <dependencies><required><php><min>5.2.0</min><max>9.0.0</max></php></required></dependencies>
58
  </package>
skin/frontend/{default → base}/default/vstudio/venu/master.css RENAMED
File without changes