MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

How to Use Magento Settings to Manage an Extension Settings?

Published on 12 May 15
420
0
1
How to Use Magento Settings to Manage an Extension Settings? - Image 1
Whenever you want to make small changes within a particular module or extension in Magento, you have to locate the module configuration tab, and make the necessary changes there. Locating, managing, and making the changes is a tedious process, which you can avoid if you transfer the necessary settings to the main Magento settings. So, you just need to make the modifications within the main settings file, and all the changes are registered.

Create System.xml File

Begin the whole process by creating system.xml file in the etc folder of Magento.


<config>
<sections>
<pos module="pos">
<label>Example Pos Settings</label>
<tab>service</tab>
<frontend_type>text</frontend_type>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<sort_order>10</sort_order>
<groups>
<settings translate="label">
<label>example Pos Settings</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<sanalpos_url translate="label">
<label>Service Url</label>
<frontend_type>text</frontend_type>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</sanalpos_url>
<user_id translate="label">
<label>User Id</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</user_id>
</fields>
</settings>
</groups>
</pos>
</sections>
</config>
Integrate to Config.xml File

This file contains all the field settings required to modify the extension you have created. While Magento is definitely open source, you donât want to make all the settings and code public. So, you will need to integrate the individual settings to the core settings page.

Paste the following code to the config.xml file
<config>
<!-- some more code here -->
<adminhtml>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children>
<pos>
<title>Kartaca Pos Settings</title>
<sort_order>10</sort_order>
</pos>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>
<!-- some more code here... -->
</config>
With this long xml code, you would enjoy not having to search through individual files and changing the codes there. Saves a lot of time!

Conclusion

Isnât having one code file an easier way out, especially when it comes to introducing changes, than having multiple files and searching for the particular file? With this integration code, you can easily integrate the codes for the different extensions into your core file. So, you just need to deal with the core file, whenever you want to initiate small changes. Saves a lot of time and effort!

Author Bio:

Deepa is a passionate blogger associated with Silver Touch Technologies., a leading Magento Development Company UK.



























































































How to Use Magento Settings to Manage an Extension Settings? - Image 1

Whenever you want to make small changes within a particular module or extension in Magento, you have to locate the module configuration tab, and make the necessary changes there. Locating, managing, and making the changes is a tedious process, which you can avoid if you transfer the necessary settings to the main Magento settings. So, you just need to make the modifications within the main settings file, and all the changes are registered.

Create System.xml File

Begin the whole process by creating system.xml file in the etc folder of Magento.

Example Pos Settings
service
text
1
1
1
10

example Pos Settings
text
10
1
1
1

Service Url
text
10
1
1
1

User Id
text
20
1
1
1

Integrate to Config.xml File

This file contains all the field settings required to modify the extension you have created. While Magento is definitely open source, you donât want to make all the settings and code public. So, you will need to integrate the individual settings to the core settings page.

Paste the following code to the config.xml file

Allow Everything

Kartaca Pos Settings
10

With this long xml code, you would enjoy not having to search through individual files and changing the codes there. Saves a lot of time!

Conclusion

Isnât having one code file an easier way out, especially when it comes to introducing changes, than having multiple files and searching for the particular file? With this integration code, you can easily integrate the codes for the different extensions into your core file. So, you just need to deal with the core file, whenever you want to initiate small changes. Saves a lot of time and effort!

Author Bio:

Deepa is a passionate blogger associated with Silver Touch Technologies., a leading Magento Development Company UK.

This blog is listed under Development & Implementations and E-Commerce Community

Related Posts:
Post a Comment

Please notify me the replies via email.

Important:
  • We hope the conversations that take place on MyTechLogy.com will be constructive and thought-provoking.
  • To ensure the quality of the discussion, our moderators may review/edit the comments for clarity and relevance.
  • Comments that are promotional, mean-spirited, or off-topic may be deleted per the moderators' judgment.
You may also be interested in
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top