Magento - How to rewrite /app/design/frontend/default/default/template/customer/form/register.phtml - magento

I want to add new field in registration form, should I rewrite /app/design/frontend/default/default/template/customer/form/register.phtml
If yes, how can I do this ??

Well if you want simple, then you can use this module from AITOC - http://www.aitoc.com/en/magentomods_checkoutfieldsmanager.html It allows you to add fields to the registration and store the information in the users profile.
If you're going to do it yourself, you'll have to do more than rewrite the phtml file, you'll have to create a whole extension that allows you to save the data somewhere and associate it with the users profile.

Related

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.

Magento new store view as subpath of URL

I was advised by an SEO specialist that I should add a /aus/ sub-folder to my Magento installation for geo-target specific purposes.
So what I am trying to achieve is to add the same version of my store in a /aus/ sub-folder.
So basically that it would look something like this:
www.mystore.com/ <- my current store
www.mystore.com/aus/ <- for geo-targeting specific purposes
I do not want to run the /aus/ version on a separate installation or separate language, basically it should just add /aus/ to my current store and replicate all links there.
What is the best way to have this handled? Some recommendations or advises would be greatly appreciated.
Why not just add the store into the URL via configuration? Magento already has configuration for this. See System > Configuration > General > Web > Add Store Code to Urls.
Instead of yourwebsite.com/customer/account, it will now generate URLs like yourwebsite.com/<your_store_code>/customer/account.
Do note that all of your custom templates and modules should properly use the getUrl() Magento methods to build URL, otherwise these URL will not contain the storecode and end up not working.
add a new website "aus"
and then create new folder with index.php that run "aus" store

Magento: adding product from frontend form

I have magento demo shop and for example i want registered user to be available to post a product from frontend? Can anyone hook me up with some code showing how to make it? Is it even possible in magento?
It's certainly possible. It actually shouldn't be all that difficult. You're going to create a module, programmatically create an order, and link this page from somewhere. You should be able to hack one together with the following resources:
Programmatically Creating Orders - Inchoo
Creating a Custom Module part 1-8
yes dear it is possible, you have to create a module for that and i think you give to link/tab in customer account page in front side.in account page you provide form of add new product.you have also provide all option like in magento back end. but some customization are required

Automatically generating Customer Attribute Form Fields

When you add customer attributes, Magento's admin dashboard for customer's automatically generates the relative form element for that new attribute.
Is there a way to do the same thing on the front end via a controller in a module?
nope, the frontend customer fields are hard coded, check out the phtml inside customer/form to see it.
What are you trying to achieve? Customer attributes are displayed on the form if "Show on frontend" is enabled. However those fields aren't saved from frontend by default. You need to extend fieldsets in your module for that, see config.xml in core Mage/Customer module
EDIT: actually that is true for enterprise edition, on CE you have to edit register.phtml (preferably by making a copy in your theme)

Resources