How to retrieve configuration values immediately after they're saved - magento

I'm using a system.xml file to add a new section to to my Magento installation in app/code/local/NameSpace/Module/etc/system.xml. I've read that you can create an IndexController and override postAction() however of all the examples I've seen a custom layout is used rather than system.xml, is there a reason for this or can controllers be made to work for both of them?
If they can't is there any other way to have a file run after the user clicks 'Save Config' so I can immediately start using the values with Mage::getStoreConfig()?

Related

Joomla - How to create overrides for component files not in view

I am making changes to the JbusinessDirectory in joomla.
I have added some extra fields to the contact form on the business listing using code changes in the companies view. But now I need to send these field inputs by email.
I am trying to add the values to the email template but I can't find a view that I can edit to do this. The files are located at htdocs/components/com_jbusinessdirectory/classes/services/EmailService.php
htdocs/components/com_jbusinessdirectory/assets/defines.php
How can I create an override for this?
I am not even sure these are the exact files I need to work with but they seem to contain the code that creates the email template.

Create admin front with a simple form via a module [Magento]

I am pretty new to Magento and am trying to understand how to create admin (backend) page. I have figured how to create/define the controller and action (along with editing the config.xml).
But now the next problem at hand is to display a simple form in that page. I understand that, I have an option to create blocks and mention the blocks in a layout.xml. But from what I figure is that layout.xml needs to be present in the theme folder. Which I can't do as my magento extension will be installed and I have no access to the user's system.
So the doubt is. How to display a simple from in a backend (admin) page
without having to make any changes to the theme's layout ?
For the admin panel module you don't need to mention the block in the layout.xml of your theme, you only need it to be defined in config.xml file in your "app/code/local///etc/" and a layout file is created in "app/design/adminhtml/default/default/".inside the Block create a folder named "Adminhtml" inside it your can create your form.
Refer this
http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/how_to_create_an_admin_form_module

Understanding the Joomla Component File Structure / from URL

I'm new to joomla and have got a problem with a website.
I need to modify a view and I've been told it is in
http://www.example.com/index.php?option=com_user&view=register&Itemid=68
It has a registration form and i need to modify its field. I've access to FTP only. I need to know where are these files to modify the registration form. If one can describe the meaning of this url structure then it would be very helpful.
You will find the template files in /components/com_user/views/register/tmpl.
However, you should create an html/com_user folder in your template directory with a copy of those files and use a template override ("never" edit core files).
Here are a couple resources that will point you in the right direction:
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Introduction
http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core
com_user means use the user component register view.
Itemid 68 refers to the id of the menu item it is linked from.
You don't want to directly modify any joomla files.
If you want to add a field to registration activate the user plugin or create your own user plugin along the same design but with the fields you want.
It is advisable not to modify the core files directly, they will get overridden whenever the Joomla is updated.
However what you are looking for is available at components\com_users\models\forms\registration.xml file. you can change the default fields of the registration form in this file.
If you would like to add additional fields to registration form, there is a better way:
http://docs.joomla.org/Creating_a_profile_plugin

File location of phtml file of backend admin page

I installed an extension to add custom fields to customer registration form.I want to add some option value in dropdown menu box of input validation in backend admin page..could you plz tell me the path of the folder where can I find the phtml file which is responsible for that part ?
-Thanks.
The files you are looking for are in:
app/design/adminhtml/default/default/template
But just changing the .phtml file won't do the job. The customer model itself should be extended to provide for your extra field. Therefore i highly recommend you to write a module for this instead of altering Magento core code. This to make sure that you can still use updates in the future.
Writing such an module requires more in depth knowledge of Magento. For more information on custom adminhtml see here.
For information on extending the core functionality look here.
If you don't feel like programming this all yourself take a look at customer attribute modules on Magento Connect.

I want to customize profile edit with some additional fields on database(users table) in Joomla 2.5

I tried to override profile.xml file along with edit.php (view file) by placing them within templates/template_name/html/com_users/profile folder, and also made sure the edit.php file know about new profile.xml ($this->form->loadFile( dirname(__FILE__) . DS . "profile.xml");) but i cant seem to make it work while updating custom fields from profile editing page at the front end. Also i can see that custom fields are not in order as it should be with respect to profile.xml. Please somebody help me...
You can't override an Joomla xml file. You need to create a user plugin to install separately for the form fields to appear. There is a profile plugin that comes with the default Joomla installation. Further details on this can be found here.

Resources