Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

double account registration form [SOLVED - WORKING ON 1.1.3]
 
i2p0
Sr. Member
 
Total Posts:  179
Joined:  2008-03-28
 

hi
i have seen on the blog the myriadfineart site
i have seen that the have made a double form for retailers or for normal user

can someone help me on making a similar form??

thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
 
i2p0
Sr. Member
 
Total Posts:  179
Joined:  2008-03-28
 

thanks to emily for help…

so..

here there is the mod for app/design/frontend/YOURTHEME/YOURDESIGN/template/customer/form/register.phtml
with this mod you can build a bouble form:
add this to the top:

<? $where explode("/",trim($_SERVER['REQUEST_URI'],"/"));
if( 
end($where) == 'design-trade' $custom_form 1;  // change 'design-trade' to whatever you're using in the URL
else $custom_form 0?>
Now, anywhere on your form that you want to have different text/fields for your custom form and regular form, use something like this:

<? if ($custom_form) : ?>
<h2 id="page-header"><?=$this->__('Create a Design Trade Account')?></h2>
<
div id="dt">Not Design Trade? <a href="/customer/account/create">click here</a></div>
<? else : ?>
<h2 id="page-header"><?=$this->__('Create an Account')?></h2>
<
div id="dt">Design Trade, <a href="/customer/account/create/design-trade/">click here</a></div>
<? endif; ?>

now the problem is to redirect from each form to the right group id: general or retailer…

somebody know how to made it on 1.1.3??

thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
 
i2p0
Sr. Member
 
Total Posts:  179
Joined:  2008-03-28
 

in order to write the right group_id you need to insert this code

<? if ($custom_form) : ?>
     
  
<input type="hidden" name="group_id" id="group_id" value="4"/>
<? endif; ?>
into register.phtml

after <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>” />

where into value="?" you must insert the id number of your costumer_group

thanks to Alex Szasz for his help on the last part of code..

 
Magento Community Magento Community
Magento Community
Magento Community
 
pollence
Member
 
Avatar
Total Posts:  55
Joined:  2009-05-19
Australia
 

hello i2p0,

i have put condition for url as u tell..and i am getting two different form as i want...but in design-trade values for custom fields are not stored in database..so i have to change in code ??? for form action ???? please reply…

thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
Snowcore
Jr. Member
 
Total Posts:  25
Joined:  2009-07-14
 

PLease, explain in more details

 
Magento Community Magento Community
Magento Community
Magento Community
 
ownsecurity
Member
 
Avatar
Total Posts:  36
Joined:  2008-08-04
South of France
 

Hi!

I’ve done everything correct, got a link at the top where I can select the two forms, but I can’t figure out how to add field to specific form : I got exatcly the same fields in both forms…

The website : http://www.beeper.fr/customer/account/create

I hope someone can help me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ownsecurity
Member
 
Avatar
Total Posts:  36
Joined:  2008-08-04
South of France
 

Hi,

I finally managed to add custom field, but can’t figure out how to use this piece of code :

<? if ($custom_form) : ?>
  
<input type="hidden" name="group_id" id="group_id" value="6"/>
<? endif; ?>

I’m using the value I need… But it does not appear in backend…

Any idea ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
QB new media
Jr. Member
 
Total Posts:  24
Joined:  2010-05-03
 

Hi!

This thread is an older one, though it was very helpful for me. The group_id will be updated from the frontend if you modify the file magento/app/code/core/Mage/Customer/etc/config.xml by adding

<group_id><create>1</create><update>1</update></group_id>

in the

<global>
        <
fieldsets>
            <
customer_account>

section.

Hope that can help someone.

Best regards,

mrtyu

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top