DwD_CmsMenu - Version 0.1.2

Version Notes

- Fixed setup scripts.
- Fixed case issues in configuration.
- Added automatic cache flush feature.

Download this release

Release Info

Developer Damian A. Pastorini
Extension DwD_CmsMenu
Version 0.1.2
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.2

app/code/community/DwD/CmsMenu/Model/Observer.php CHANGED
@@ -34,6 +34,10 @@ class DwD_CmsMenu_Model_Observer
34
  }
35
  $cmsMenu->setMenuItemTitle($itemTitle);
36
  $cmsMenu->save();
 
 
 
 
37
  }
38
  }
39
 
34
  }
35
  $cmsMenu->setMenuItemTitle($itemTitle);
36
  $cmsMenu->save();
37
+ $flushCache = Mage::getStoreConfig('dwd_cmsmenu/general/cache');
38
+ if($flushCache) {
39
+ Mage::app()->getCacheInstance()->flush();
40
+ }
41
  }
42
  }
43
 
app/code/community/DwD/CmsMenu/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <DwD_CmsMenu>
15
- <version>0.1.1</version>
16
  </DwD_CmsMenu>
17
  </modules>
18
  <global>
@@ -33,6 +33,26 @@
33
  <class>DwD_CmsMenu_Model_Resource</class>
34
  </dwd_cmsmenu_resource>
35
  </models>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  <blocks>
37
  <dwd_cmsmenu>
38
  <class>DwD_CmsMenu_Block</class>
@@ -40,7 +60,7 @@
40
  </blocks>
41
  <helpers>
42
  <dwd_cmsmenu>
43
- <class>DwD_Cmsmenu_Helper</class>
44
  </dwd_cmsmenu>
45
  </helpers>
46
  <events>
@@ -58,6 +78,7 @@
58
  <dwd_cmsmenu>
59
  <general>
60
  <enabled>1</enabled>
 
61
  </general>
62
  </dwd_cmsmenu>
63
  </default>
@@ -66,7 +87,7 @@
66
  <page_block_html_topmenu_gethtml_before>
67
  <observers>
68
  <dwd_cmsmenu_front>
69
- <class>DwD_Cmsmenu_Block_Page_Html_Topmenu_Observer</class>
70
  <method>addMenuItems</method>
71
  </dwd_cmsmenu_front>
72
  </observers>
@@ -79,7 +100,7 @@
79
  <observers>
80
  <flexishore_cms_prepare_form>
81
  <type>singleton</type>
82
- <class>DwD_Cmsmenu_Block_Adminhtml_Cms_Page_Edit_Tab_Content</class>
83
  <method>prepareForm</method>
84
  </flexishore_cms_prepare_form>
85
  </observers>
12
  <config>
13
  <modules>
14
  <DwD_CmsMenu>
15
+ <version>0.1.2</version>
16
  </DwD_CmsMenu>
17
  </modules>
18
  <global>
33
  <class>DwD_CmsMenu_Model_Resource</class>
34
  </dwd_cmsmenu_resource>
35
  </models>
36
+ <resources>
37
+ <cmsmenu_setup>
38
+ <setup>
39
+ <module>DwD_CmsMenu</module>
40
+ </setup>
41
+ <connection>
42
+ <use>core_setup</use>
43
+ </connection>
44
+ </cmsmenu_setup>
45
+ <cmsmenu_write>
46
+ <connection>
47
+ <use>core_write</use>
48
+ </connection>
49
+ </cmsmenu_write>
50
+ <cmsmenu_read>
51
+ <connection>
52
+ <use>core_read</use>
53
+ </connection>
54
+ </cmsmenu_read>
55
+ </resources>
56
  <blocks>
57
  <dwd_cmsmenu>
58
  <class>DwD_CmsMenu_Block</class>
60
  </blocks>
61
  <helpers>
62
  <dwd_cmsmenu>
63
+ <class>DwD_CmsMenu_Helper</class>
64
  </dwd_cmsmenu>
65
  </helpers>
66
  <events>
78
  <dwd_cmsmenu>
79
  <general>
80
  <enabled>1</enabled>
81
+ <cache>1</cache>
82
  </general>
83
  </dwd_cmsmenu>
84
  </default>
87
  <page_block_html_topmenu_gethtml_before>
88
  <observers>
89
  <dwd_cmsmenu_front>
90
+ <class>DwD_CmsMenu_Block_Page_Html_Topmenu_Observer</class>
91
  <method>addMenuItems</method>
92
  </dwd_cmsmenu_front>
93
  </observers>
100
  <observers>
101
  <flexishore_cms_prepare_form>
102
  <type>singleton</type>
103
+ <class>DwD_CmsMenu_Block_Adminhtml_Cms_Page_Edit_Tab_Content</class>
104
  <method>prepareForm</method>
105
  </flexishore_cms_prepare_form>
106
  </observers>
app/code/community/DwD/CmsMenu/etc/system.xml CHANGED
@@ -32,6 +32,7 @@
32
  <show_in_default>1</show_in_default>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
 
35
  <fields>
36
  <enabled translate="label">
37
  <label>Enabled</label>
@@ -42,6 +43,16 @@
42
  <show_in_website>1</show_in_website>
43
  <show_in_store>1</show_in_store>
44
  </enabled>
 
 
 
 
 
 
 
 
 
 
45
  </fields>
46
  </general>
47
  </groups>
32
  <show_in_default>1</show_in_default>
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
+ <expanded>1</expanded>
36
  <fields>
37
  <enabled translate="label">
38
  <label>Enabled</label>
43
  <show_in_website>1</show_in_website>
44
  <show_in_store>1</show_in_store>
45
  </enabled>
46
+ <cache translate="label">
47
+ <label>Flush cache automatically</label>
48
+ <frontend_type>select</frontend_type>
49
+ <source_model>adminhtml/system_config_source_yesno</source_model>
50
+ <sort_order>2</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ <comment>This will flush the Magento Cache every time a CMS Page was saved to reflect the menu modifications automatically.</comment>
55
+ </cache>
56
  </fields>
57
  </general>
58
  </groups>
app/code/community/DwD/CmsMenu/sql/cmsmenu_setup/mysql4-install-0.1.0.php CHANGED
@@ -10,12 +10,14 @@
10
  */
11
 
12
  $installer = $this;
 
13
  $installer->startSetup();
14
 
15
  // cmsmenu table:
 
16
 
17
- $sql=<<<SQLTEXT
18
- CREATE TABLE `cmsmenu` (
19
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
20
  `cms_page_id` SMALLINT(6) NOT NULL,
21
  `show_in_menu` SMALLINT(6) NOT NULL,
@@ -26,9 +28,6 @@ CREATE TABLE `cmsmenu` (
26
  UNIQUE INDEX `cms_page_id` (`cms_page_id`),
27
  CONSTRAINT `FK_cmsmenu_cms_page` FOREIGN KEY (`cms_page_id`) REFERENCES `cms_page` (`page_id`)
28
  )
29
- ENGINE=InnoDB;
30
- SQLTEXT;
31
-
32
- $installer->run($sql);
33
 
34
  $installer->endSetup();
10
  */
11
 
12
  $installer = $this;
13
+
14
  $installer->startSetup();
15
 
16
  // cmsmenu table:
17
+ $table = $this->getTable('dwd_cmsmenu/cmsmenu');
18
 
19
+ // run query:
20
+ $installer->run("CREATE TABLE IF NOT EXISTS {$table} (
21
  `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
22
  `cms_page_id` SMALLINT(6) NOT NULL,
23
  `show_in_menu` SMALLINT(6) NOT NULL,
28
  UNIQUE INDEX `cms_page_id` (`cms_page_id`),
29
  CONSTRAINT `FK_cmsmenu_cms_page` FOREIGN KEY (`cms_page_id`) REFERENCES `cms_page` (`page_id`)
30
  )
31
+ ENGINE=InnoDB;");
 
 
 
32
 
33
  $installer->endSetup();
app/code/community/DwD/CmsMenu/sql/cmsmenu_setup/mysql4-upgrade-0.1.0-0.1.1.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * DwD-CmsMenu - Magento Extension
6
+ *
7
+ * @copyright Copyright (c) 2015 DwDesigner Inc. (http://www.dwdeveloper.com/)
8
+ * @author Damian A. Pastorini - damian.pastorini@dwdeveloper.com
9
+ *
10
+ */
11
+
12
+ $installer = $this;
13
+
14
+ $installer->startSetup();
15
+
16
+ // cmsmenu table:
17
+ $table = $this->getTable('dwd_cmsmenu/cmsmenu');
18
+
19
+ // run query:
20
+ $installer->run("CREATE TABLE IF NOT EXISTS {$table} (
21
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
22
+ `cms_page_id` SMALLINT(6) NOT NULL,
23
+ `show_in_menu` SMALLINT(6) NOT NULL,
24
+ `child_of` VARCHAR(255) NULL DEFAULT NULL,
25
+ `add_before` VARCHAR(255) NULL DEFAULT NULL,
26
+ `menu_item_title` VARCHAR(255) NULL DEFAULT NULL,
27
+ PRIMARY KEY (`id`),
28
+ UNIQUE INDEX `cms_page_id` (`cms_page_id`),
29
+ CONSTRAINT `FK_cmsmenu_cms_page` FOREIGN KEY (`cms_page_id`) REFERENCES `cms_page` (`page_id`)
30
+ )
31
+ ENGINE=InnoDB;");
32
+
33
+ $installer->endSetup();
app/code/community/DwD/CmsMenu/sql/cmsmenu_setup/mysql4-upgrade-0.1.1-0.1.2.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * DwD-CmsMenu - Magento Extension
6
+ *
7
+ * @copyright Copyright (c) 2015 DwDesigner Inc. (http://www.dwdeveloper.com/)
8
+ * @author Damian A. Pastorini - damian.pastorini@dwdeveloper.com
9
+ *
10
+ */
11
+
12
+ $installer = $this;
13
+
14
+ $installer->startSetup();
15
+
16
+ // cmsmenu table:
17
+ $table = $this->getTable('dwd_cmsmenu/cmsmenu');
18
+
19
+ // run query:
20
+ $installer->run("CREATE TABLE IF NOT EXISTS {$table} (
21
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
22
+ `cms_page_id` SMALLINT(6) NOT NULL,
23
+ `show_in_menu` SMALLINT(6) NOT NULL,
24
+ `child_of` VARCHAR(255) NULL DEFAULT NULL,
25
+ `add_before` VARCHAR(255) NULL DEFAULT NULL,
26
+ `menu_item_title` VARCHAR(255) NULL DEFAULT NULL,
27
+ PRIMARY KEY (`id`),
28
+ UNIQUE INDEX `cms_page_id` (`cms_page_id`),
29
+ CONSTRAINT `FK_cmsmenu_cms_page` FOREIGN KEY (`cms_page_id`) REFERENCES `cms_page` (`page_id`)
30
+ )
31
+ ENGINE=InnoDB;");
32
+
33
+ $installer->endSetup();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DwD_CmsMenu</name>
4
- <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
7
  <channel>community</channel>
@@ -38,13 +38,22 @@ With this extension everything will be much easier and you will get everything w
38
  &lt;/ul&gt;&#xD;
39
  &lt;h2&gt;Supported versions&lt;/h2&gt;&#xD;
40
  &lt;p&gt;Magento 1.8 to 1.9.x.&lt;/p&gt;&#xD;
 
 
 
 
 
41
  &lt;h2&gt;Support&lt;/h2&gt;&#xD;
42
- &lt;p&gt;For support, contact us at &lt;a href="mailto:info@dwdeveloper.com"&gt;info@dwdeveloper.com&lt;/a&gt;&lt;/p&gt;</description>
43
- <notes>First release.</notes>
 
 
 
 
44
  <authors><author><name>Damian A. Pastorini</name><user>MAG002087848</user><email>damian.pastorini@dwdeveloper.com</email></author></authors>
45
- <date>2015-09-14</date>
46
- <time>15:21:15</time>
47
- <contents><target name="mageetc"><dir name="modules"><file name="DwD_CmsMenu.xml" hash="9b1288160fc81a13f811056ca9f49123"/></dir></target><target name="magecommunity"><dir name="DwD"><dir name="CmsMenu"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><dir name="Edit"><dir name="Tab"><file name="Content.php" hash="3694e6d33bae1c5db9ca91163523f357"/></dir></dir></dir></dir></dir><dir name="Page"><dir name="Html"><dir name="Topmenu"><file name="Observer.php" hash="fd1a67f069d30dd2e72a89fd2468c95f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="531295ed2a3e9dba53f54f828f9604d4"/></dir><dir name="Model"><file name="Cmsmenu.php" hash="27a1044475f1a225142baa025051b5fb"/><dir name="Mysql4"><dir name="Cmsmenu"><file name="Collection.php" hash="d53ae01bcbec3719de7c5f2653b2790c"/></dir><file name="Cmsmenu.php" hash="f317ca72b5de8d0cf7a018b4deb8cdb8"/></dir><file name="Observer.php" hash="d54cb67ddbb1f7edc653ab21f094898d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a47c8fe2ed9bdcc5a91595d9f633397e"/><file name="config.xml" hash="b8bfd259f87e07cef9f3a665b0342871"/><file name="system.xml" hash="451a0ce59858b7d11d2606ae69580262"/></dir><dir name="sql"><dir name="cmsmenu_setup"><file name="mysql4-install-0.1.0.php" hash="73444ae647df8d06aed1530be2d85621"/></dir></dir></dir></dir></target></contents>
48
  <compatible/>
49
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
50
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DwD_CmsMenu</name>
4
+ <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
7
  <channel>community</channel>
38
  &lt;/ul&gt;&#xD;
39
  &lt;h2&gt;Supported versions&lt;/h2&gt;&#xD;
40
  &lt;p&gt;Magento 1.8 to 1.9.x.&lt;/p&gt;&#xD;
41
+ &lt;h2&gt;Extension Demo&lt;/h2&gt;&#xD;
42
+ &lt;p&gt;URL: &lt;a href="http://cms-menu.dwdeveloper.com/"&gt;http://cms-menu.dwdeveloper.com/&lt;/a&gt;&lt;/p&gt;&#xD;
43
+ &lt;p&gt;Admin URL: &lt;a href="http://cms-menu.dwdeveloper.com/admin"&gt;http://cms-menu.dwdeveloper.com/admin&lt;/a&gt;&lt;/p&gt;&#xD;
44
+ &lt;p&gt;Administrator User: demo.admin&lt;/p&gt;&#xD;
45
+ &lt;p&gt;Administrator Password: demo123&lt;/p&gt;&#xD;
46
  &lt;h2&gt;Support&lt;/h2&gt;&#xD;
47
+ &lt;p&gt;For support, contact us at &lt;a href="mailto:info@dwdeveloper.com"&gt;info@dwdeveloper.com&lt;/a&gt;&lt;/p&gt;&#xD;
48
+ &lt;p&gt;You can also get the extension from our GitHub repository: &lt;a href="https://github.com/damian-pastorini/DwD-Mage-Extension-CMS-Menu" target="_blank"&gt;https://github.com/damian-pastorini/DwD-Mage-Extension-CMS-Menu&lt;/a&gt;.&lt;/p&gt;&#xD;
49
+ &lt;p&gt;Please feel free to report any issues there.&lt;/p&gt;</description>
50
+ <notes>- Fixed setup scripts.&#xD;
51
+ - Fixed case issues in configuration.&#xD;
52
+ - Added automatic cache flush feature.</notes>
53
  <authors><author><name>Damian A. Pastorini</name><user>MAG002087848</user><email>damian.pastorini@dwdeveloper.com</email></author></authors>
54
+ <date>2015-10-06</date>
55
+ <time>22:17:52</time>
56
+ <contents><target name="mageetc"><dir name="modules"><file name="DwD_CmsMenu.xml" hash="9b1288160fc81a13f811056ca9f49123"/></dir></target><target name="magecommunity"><dir name="DwD"><dir name="CmsMenu"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><dir name="Edit"><dir name="Tab"><file name="Content.php" hash="3694e6d33bae1c5db9ca91163523f357"/></dir></dir></dir></dir></dir><dir name="Page"><dir name="Html"><dir name="Topmenu"><file name="Observer.php" hash="fd1a67f069d30dd2e72a89fd2468c95f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="531295ed2a3e9dba53f54f828f9604d4"/></dir><dir name="Model"><file name="Cmsmenu.php" hash="27a1044475f1a225142baa025051b5fb"/><dir name="Mysql4"><dir name="Cmsmenu"><file name="Collection.php" hash="d53ae01bcbec3719de7c5f2653b2790c"/></dir><file name="Cmsmenu.php" hash="f317ca72b5de8d0cf7a018b4deb8cdb8"/></dir><file name="Observer.php" hash="4de3cf8763ecbbedec952f4c7ec881a6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a47c8fe2ed9bdcc5a91595d9f633397e"/><file name="config.xml" hash="c81ccac4aaeaa90e3242a01b9100c442"/><file name="system.xml" hash="6d644417492685a439629dfb59ef6051"/></dir><dir name="sql"><dir name="cmsmenu_setup"><file name="mysql4-install-0.1.0.php" hash="f7917d067ce6b37abca95c3d9a15afbe"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="f7917d067ce6b37abca95c3d9a15afbe"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="f7917d067ce6b37abca95c3d9a15afbe"/></dir></dir></dir></dir></target></contents>
57
  <compatible/>
58
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
59
  </package>