MD_AdvancedCategory - Version 1.0.0

Version Notes

please contact us : support@mage-designer.com

Download this release

Release Info

Developer OSWorld
Extension MD_AdvancedCategory
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/MD/Category/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class MD_Category_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+ }
app/code/local/MD/Category/controllers/IndexController.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MD_Category_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+
7
+ $this->loadLayout();
8
+ $this->renderLayout();
9
+ }
10
+ }
app/code/local/MD/Category/etc/config.xml ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MD_Category>
5
+ <version>0.1.2</version>
6
+ </MD_Category>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <category>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>MD_Category</module>
14
+ <frontName>category</frontName>
15
+ </args>
16
+ </category>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <category>
21
+ <file>md_category.xml</file>
22
+ </category>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <category>
29
+ <use>admin</use>
30
+ <args>
31
+ <module>MD_Category</module>
32
+ <frontName>category</frontName>
33
+ </args>
34
+ </category>
35
+ </routers>
36
+ </admin>
37
+ <adminhtml>
38
+ <acl>
39
+ <resources>
40
+ <all>
41
+ <title>Allow Everything</title>
42
+ </all>
43
+ <admin>
44
+ <children>
45
+ <system>
46
+ <children>
47
+ <config>
48
+ <children>
49
+ <category translate="title" module="category">
50
+ <title>Advanced Categories Support SEO</title>
51
+ </category>
52
+ </children>
53
+ </config>
54
+ </children>
55
+ </system>
56
+ </children>
57
+ </admin>
58
+ </resources>
59
+ </acl>
60
+ </adminhtml>
61
+ <global>
62
+ <resources>
63
+ <category_setup>
64
+ <setup>
65
+ <module>MD_Category</module>
66
+ <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
67
+ </setup>
68
+ <connection>
69
+ <use>core_setup</use>
70
+ </connection>
71
+ </category_setup>
72
+ <category_write>
73
+ <connection>
74
+ <use>core_write</use>
75
+ </connection>
76
+ </category_write>
77
+ <category_read>
78
+ <connection>
79
+ <use>core_read</use>
80
+ </connection>
81
+ </category_read>
82
+ </resources>
83
+ <blocks>
84
+ <category>
85
+ <class>MD_Category_Block</class>
86
+ </category>
87
+ </blocks>
88
+ <helpers>
89
+ <category>
90
+ <class>MD_Category_Helper</class>
91
+ </category>
92
+ </helpers>
93
+ </global>
94
+ <default>
95
+ <category>
96
+ <general>
97
+ <enable>1</enable>
98
+ </general>
99
+ </category>
100
+ </default>
101
+ </config>
app/code/local/MD/Category/etc/system.xml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <md module="category">
5
+ <label>Mage-Designer</label>
6
+ <sort_order>110</sort_order>
7
+ </md>
8
+ </tabs>
9
+ <sections>
10
+ <category translate="label" module="category">
11
+ <label>Advanced Categories Support SEO</label>
12
+ <tab>md</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>300</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <general translate="label" module="category">
20
+ <label>General Settings</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>50</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <enable translate="label">
28
+ <label>Enable</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>1</sort_order>
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
+ </enable>
36
+ </fields>
37
+ </general>
38
+ </groups>
39
+ </category>
40
+ </sections>
41
+ </config>
app/code/local/MD/Category/sql/category_setup/mysql4-install-0.1.2.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+
6
+ $entityTypeId = $installer->getEntityTypeId('catalog_category');
7
+ $attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
8
+ $attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
9
+
10
+ $installer->addAttribute('catalog_category', 'footer_description', array(
11
+ 'type' => 'text',
12
+ 'label' => 'Footer Description',
13
+ 'input' => 'textarea',
14
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
15
+ 'visible' => true,
16
+ 'required' => false,
17
+ 'wysiwyg_enabled' => true,
18
+ 'user_defined' => false,
19
+ 'default' => ''
20
+ ));
21
+
22
+ $installer->addAttributeToGroup(
23
+ $entityTypeId,
24
+ $attributeSetId,
25
+ $attributeGroupId,
26
+ 'footer_description',
27
+ '3' //last Magento's attribute position in General tab is 10
28
+ );
29
+
30
+ $attributeId = $installer->getAttributeId($entityTypeId, 'footer_description');
31
+
32
+ // $installer->run("
33
+ // INSERT INTO `{$installer->getTable('catalog_category_entity_int')}`
34
+ // (`entity_type_id`, `attribute_id`, `entity_id`, `value`)
35
+ // SELECT '{$entityTypeId}', '{$attributeId}', `entity_id`, ''
36
+ // FROM `{$installer->getTable('catalog_category_entity')}`;
37
+ // ");
38
+
39
+ // this will set data of your custom attribute for root category
40
+ Mage::getModel('catalog/category')
41
+ ->load(1)
42
+ ->setImportedCatId(0)
43
+ ->setInitialSetupFlag(true)
44
+ ->save();
45
+
46
+ // this will set data of your custom attribute for default category
47
+ Mage::getModel('catalog/category')
48
+ ->load(2)
49
+ ->setImportedCatId(0)
50
+ ->setInitialSetupFlag(true)
51
+ ->save();
52
+
53
+
54
+ $entityTypeId = $installer->getEntityTypeId('catalog_category');
55
+ $attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
56
+ $attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
57
+
58
+ $installer->addAttribute('catalog_category', 'footer_title', array(
59
+ 'type' => 'text',
60
+ 'label' => 'Footer Title',
61
+ 'input' => 'textarea',
62
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
63
+ 'visible' => true,
64
+ 'required' => false,
65
+ 'wysiwyg_enabled' => true,
66
+ 'user_defined' => false,
67
+ 'default' => ''
68
+ ));
69
+
70
+ $installer->addAttributeToGroup(
71
+ $entityTypeId,
72
+ $attributeSetId,
73
+ $attributeGroupId,
74
+ 'footer_title',
75
+ '4' //last Magento's attribute position in General tab is 10
76
+ );
77
+
78
+ $attributeId = $installer->getAttributeId($entityTypeId, 'footer_title');
79
+
80
+ // $installer->run("
81
+ // INSERT INTO `{$installer->getTable('catalog_category_entity_int')}`
82
+ // (`entity_type_id`, `attribute_id`, `entity_id`, `value`)
83
+ // SELECT '{$entityTypeId}', '{$attributeId}', `entity_id`, ''
84
+ // FROM `{$installer->getTable('catalog_category_entity')}`;
85
+ // ");
86
+
87
+ // this will set data of your custom attribute for root category
88
+ Mage::getModel('catalog/category')
89
+ ->load(1)
90
+ ->setImportedCatId(0)
91
+ ->setInitialSetupFlag(true)
92
+ ->save();
93
+
94
+ // this will set data of your custom attribute for default category
95
+ Mage::getModel('catalog/category')
96
+ ->load(2)
97
+ ->setImportedCatId(0)
98
+ ->setInitialSetupFlag(true)
99
+ ->save();
100
+
101
+ $entityTypeId = $installer->getEntityTypeId('catalog_category');
102
+ $attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
103
+ $attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
104
+
105
+ $installer->addAttribute('catalog_category', 'video_link', array(
106
+ 'type' => 'text',
107
+ 'label' => 'Video Link',
108
+ 'input' => 'textarea',
109
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
110
+ 'visible' => true,
111
+ 'required' => false,
112
+ 'wysiwyg_enabled' => true,
113
+ 'user_defined' => false,
114
+ 'default' => ''
115
+ ));
116
+
117
+ $installer->addAttributeToGroup(
118
+ $entityTypeId,
119
+ $attributeSetId,
120
+ $attributeGroupId,
121
+ 'video_link',
122
+ '5' //last Magento's attribute position in General tab is 10
123
+ );
124
+
125
+ $attributeId = $installer->getAttributeId($entityTypeId, 'video_link');
126
+
127
+ // $installer->run("
128
+ // INSERT INTO `{$installer->getTable('catalog_category_entity_int')}`
129
+ // (`entity_type_id`, `attribute_id`, `entity_id`, `value`)
130
+ // SELECT '{$entityTypeId}', '{$attributeId}', `entity_id`, ''
131
+ // FROM `{$installer->getTable('catalog_category_entity')}`;
132
+ // ");
133
+
134
+ // this will set data of your custom attribute for root category
135
+ Mage::getModel('catalog/category')
136
+ ->load(1)
137
+ ->setImportedCatId(0)
138
+ ->setInitialSetupFlag(true)
139
+ ->save();
140
+
141
+ // this will set data of your custom attribute for default category
142
+ Mage::getModel('catalog/category')
143
+ ->load(2)
144
+ ->setImportedCatId(0)
145
+ ->setInitialSetupFlag(true)
146
+ ->save();
147
+
148
+
149
+ $installer->endSetup();
150
+ ?>
app/design/frontend/default/default/layout/md_category.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <catalog_category_default>
6
+ <reference name="category.products">
7
+ <action method="setTemplate"><template>md/category/catalog/category/view.phtml</template></action>
8
+ </reference>
9
+ </catalog_category_default>
10
+ <catalog_category_layered>
11
+ <reference name="category.products">
12
+ <action method="setTemplate"><template>md/category/catalog/category/view.phtml</template></action>
13
+ </reference>
14
+ </catalog_category_layered>
15
+ </layout>
app/design/frontend/default/default/template/md/category/catalog/category/view.phtml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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@magentocommerce.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.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Category view template
30
+ *
31
+ * @see Mage_Catalog_Block_Category_View
32
+ */
33
+ ?>
34
+ <?php
35
+ $_helper = $this->helper('catalog/output');
36
+ $_category = $this->getCurrentCategory();
37
+ $_imgHtml = '';
38
+ if ($_imgUrl = $_category->getImageUrl()) {
39
+ $_imgHtml = '<p class="category-image"><img src="' . $_imgUrl . '" alt="' . $this->htmlEscape($_category->getName()) . '" title="' . $this->htmlEscape($_category->getName()) . '" /></p>';
40
+ $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
41
+ }
42
+
43
+ ?>
44
+
45
+ <div class="page-title category-title">
46
+ <?php if ($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
47
+ <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
48
+ <?php endif; ?>
49
+ <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
50
+ </div>
51
+
52
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
53
+
54
+ <?php if ($_imgUrl): ?>
55
+ <?php echo $_imgHtml ?>
56
+ <?php endif; ?>
57
+
58
+ <?php if ($_description = $this->getCurrentCategory()->getDescription()): ?>
59
+ <div class="category-description std">
60
+ <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
61
+ </div>
62
+ <?php endif; ?>
63
+
64
+ <?php if ($this->isContentMode()): ?>
65
+ <?php echo $this->getCmsBlockHtml() ?>
66
+
67
+ <?php elseif ($this->isMixedMode()): ?>
68
+ <?php echo $this->getCmsBlockHtml() ?>
69
+ <?php echo $this->getProductListHtml() ?>
70
+
71
+ <?php else: ?>
72
+ <?php echo $this->getProductListHtml() ?>
73
+ <?php endif; ?>
74
+ <?php if(Mage::getStoreConfig('category/general/enable')==1):?>
75
+ <div class="page-title category-title " style="margin-top:10px">
76
+ <h1><?php echo $_helper->categoryAttribute($_category, $_category->getFooterTitle(), 'footer_title') ?></h1>
77
+ </div>
78
+
79
+ <?php if ($_description1 = $this->getCurrentCategory()->getFooterDescription()): ?>
80
+ <div class="category-description std">
81
+ <?php echo $_helper->categoryAttribute($_category, $_description1, 'footer_description') ?>
82
+ </div>
83
+ <?php endif; ?>
84
+ <?php if ($_videolink = $this->getCurrentCategory()->getVideoLink()): ?>
85
+ <div class="category-description std">
86
+ <iframe width="475" height="315" src="http://www.youtube.com/embed/<?php echo $_videolink ?>" frameborder="0" allowfullscreen></iframe>
87
+
88
+ </div>
89
+ <?php endif; ?>
90
+ <?php endif;?>
91
+
app/etc/modules/MD_Category.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MD_Category>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </MD_Category>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MD_AdvancedCategory</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>With our extension: "Advanced Categories Support SEO" you get a powerful content which allows to manage and additional more title and video,images...</summary>
10
+ <description>With our extension: "Advanced Categories Support SEO" you get a powerful content which allows to manage and additional more title and video,images...&#xD;
11
+ &#xD;
12
+ Can you custom many text and additional many key words support your site SEO very good&#xD;
13
+ &#xD;
14
+ Advanced Categories Support SEO is a really good solution for big stores want SEO. If you are looking to add functionality and interaction to your magento store, let Mage Designer do it for you. Don't hesitate to put this useful magento extension to your cart, or you will miss the chance to increase your sale.</description>
15
+ <notes>please contact us : support@mage-designer.com</notes>
16
+ <authors><author><name>OSWorld</name><user>OSWorld</user><email>thinhct@mage-designer.com</email></author></authors>
17
+ <date>2013-01-25</date>
18
+ <time>10:19:02</time>
19
+ <contents><target name="magelocal"><dir name="MD"><dir name="Category"><dir name="Helper"><file name="Data.php" hash="d29775ddb4bbdfa2f98e5c2aeb06ac4d"/></dir><dir name="controllers"><file name="IndexController.php" hash="2ff9c1f5fa26a08537094f7369e5f480"/></dir><dir name="etc"><file name="config.xml" hash="ae078ba6d5cc4aea70b14f30ca6dc585"/><file name="system.xml" hash="ee0f9569c1869b72c33b68e142f06113"/></dir><dir name="sql"><dir name="category_setup"><file name="mysql4-install-0.1.2.php" hash="4df296e1214509fa552ca63acabe7304"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="md_category.xml" hash="577f970eac0728eb7d90636e59ad7e07"/></dir><dir name="template"><dir name="md"><dir name="category"><dir name="catalog"><dir name="category"><file name="view.phtml" hash="fea21779bb4fbc317a87367cd4394ede"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MD_Category.xml" hash="f79f0039934722808b02c01d3dbd57be"/></dir></target></contents>
20
+ <compatible/>
21
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
+ </package>