Rp_Customfield_on_CMS_page - Version 0.1.0

Version Notes

None

Download this release

Release Info

Developer Mage Rips
Extension Rp_Customfield_on_CMS_page
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/local/Rp/Cmsnewtab/Model/Observer.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Rp_Cmsnewtab_Model_Observer
3
+ {
4
+ public function cmsField($observer)
5
+ {
6
+ $model = Mage::registry('cms_page');
7
+
8
+ $form = $observer->getForm();
9
+
10
+ $fieldset = $form->addFieldset('rp_customvalue_fieldset', array('legend'=>Mage::helper('cms')->__('Custom Tab'),'class'=>'fieldset-wide'));
11
+ //add new field
12
+ $fieldset->addField('custom_newtab_value', 'text', array(
13
+ 'name' => 'custom_newtab_value',
14
+ 'label' => Mage::helper('cms')->__('Custom Title'),
15
+ 'title' => Mage::helper('cms')->__('Custom Title'),
16
+ 'disabled' => false,
17
+ //set field value
18
+ 'value' => $model->getCustomNewtabValue()
19
+ ));
20
+ }
21
+ }
app/code/local/Rp/Cmsnewtab/etc/config.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Rp_Cmsnewtab>
5
+ <version>0.1.0</version>
6
+ </Rp_Cmsnewtab>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <cmsnewtab>
11
+ <class>Rp_Cmsnewtab_Model</class>
12
+ </cmsnewtab>
13
+ </models>
14
+ <events>
15
+ <adminhtml_cms_page_edit_tab_main_prepare_form>
16
+ <observers>
17
+ <rp_page_edit_tab_main>
18
+ <type>singleton</type>
19
+ <class>Rp_Cmsnewtab_Model_Observer</class>
20
+ <method>cmsField</method>
21
+ </rp_page_edit_tab_main>
22
+ </observers>
23
+ </adminhtml_cms_page_edit_tab_main_prepare_form>
24
+ </events>
25
+ <resources>
26
+ <cmsnewtab_setup>
27
+ <setup>
28
+ <module>Rp_Cmsnewtab</module>
29
+ </setup>
30
+ <connection>
31
+ <use>core_setup</use>
32
+ </connection>
33
+ </cmsnewtab_setup>
34
+ <cmsnewtab_write>
35
+ <connection>
36
+ <use>core_write</use>
37
+ </connection>
38
+ </cmsnewtab_write>
39
+ <cmsnewtab_read>
40
+ <connection>
41
+ <use>core_read</use>
42
+ </connection>
43
+ </cmsnewtab_read>
44
+ </resources>
45
+ </global>
46
+ </config>
app/code/local/Rp/Cmsnewtab/sql/cmsnewtab_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+
4
+ $installer = $this;
5
+ $installer->startSetup();
6
+ $installer->run("ALTER TABLE {$this->getTable('cms_page')} ADD `custom_newtab_value` varchar( 250 ) NOT NULL DEFAULT '';");
7
+
8
+ $installer->endSetup();
9
+
10
+ ?>
app/etc/modules/Rp_Cmsnewtab.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Rp_Cmsnewtab>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <name>Rp_Cmsnewtab</name>
8
+ </Rp_Cmsnewtab>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Rp_Customfield_on_CMS_page</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This is a small extension for Magento that allows you to add the custom field in the core functionality.</summary>
10
+ <description>This is a small extension for Magento that allows you to add the custom field in the core functionality.&#xD;
11
+ &#xD;
12
+ Features:&#xD;
13
+ &#xD;
14
+ - This small extension will use to add the custom field on admin panel under the CMS &gt; Page. &#xD;
15
+ - After installing the extension, it will create the custom field with new fieldset(i.e. new section) under the Page Information tab.&#xD;
16
+ - Compatible with 1.9.x.&#xD;
17
+ &#xD;
18
+ Installation steps:&#xD;
19
+ &#xD;
20
+ - Its very easy to install, just copy app/ folder and paste on your magento root folder.&#xD;
21
+ - If you want to display on frontend at any place then you just have to add the following line where you want to display:&#xD;
22
+ echo $page = Mage::getModel('cms/page')-&gt;load('home','identifier')-&gt;getCustom_newtab_value();&#xD;
23
+ - You are done with installation.&#xD;
24
+ - After you upload the extension files to your magento installation folder, Refresh the cache from Admin &gt; System &gt; Cache Management.&#xD;
25
+ - Logout and login again from Backend to reload.</description>
26
+ <notes>None</notes>
27
+ <authors><author><name>Mage Rips</name><user>magerips</user><email>rpmagerips@gmail.com</email></author></authors>
28
+ <date>2014-12-22</date>
29
+ <time>17:32:58</time>
30
+ <contents><target name="mageetc"><dir name="modules"><file name="Rp_Cmsnewtab.xml" hash="af2cdbb65e7e916f0217861dacb2049f"/></dir></target><target name="magelocal"><dir name="Rp"><dir name="Cmsnewtab"><dir name="Model"><file name="Observer.php" hash="77159ede9a98a2c0de83f3ea2c0795d4"/></dir><dir name="etc"><file name="config.xml" hash="8b0db48abc0de72a32c520db5271351f"/></dir><dir name="sql"><dir name="cmsnewtab_setup"><file name="mysql4-install-0.1.0.php" hash="d597325e7f2363cf02bd59f77dfe005f"/></dir></dir></dir></dir></target></contents>
31
+ <compatible/>
32
+ <dependencies><required><php><min>5.0.1</min><max>6.0.0</max></php></required></dependencies>
33
+ </package>