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

Page 2 of 2
State Dropdown not showing in create account
 
joejoe
Sr. Member
 
Total Posts:  102
Joined:  2011-01-21
 
j2t-design - 30 July 2009 12:15 AM

I think that the easiest way is to put

<?php $this->setShowAddressFields(true)?>
Right before your if

...THIS!

NFT!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sowmya M N
Jr. Member
 
Total Posts:  16
Joined:  2009-06-03
 

When i am disabling configuration xml files in cache management, state drop down will work in billing information in checkout.
But when i enable ‘ System(config.xml, local.xml) and modules configuration files(config.xml)’, state shows as text box.
Please anyone reply ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
imrank_pasha
Jr. Member
 
Total Posts:  5
Joined:  2011-06-30
 

Hi! Can any help in solving in this simple issue, I have created a custom module which overrides the base classes & adds the custom attributes on to the customer registration page (register.phtml & edit.phtml) but when i check my database the associated column for that particular custom attribute is not added into eav_attribute table.

can Some1 tell me how to resolve this issue..........

This is my Installer Code:

<?php
/***Customer Attribute Setup for Mydons Customer****/
$installer=$this;

$installer->startSetup();

$installer->addAttribute(\\\’customer\\\’, \\\’test\\\’,array(
\\\’label\\\’ =>\\\’Test\\\’,
\\\’visible\\\’ =>1,
\\\’required\\\’ =>1,
\\\’position\\\’ =>2,
));
$installer->endSetup();

This is my Setup.php Code:

<?php
/*Custom Model Setup */
class Mydons_Customer_Model_Entity_Setup extends Mage_Customer_Model_Entity_Setup
{
public function getDefaultEntities()
{

$defaultEntities = parent::getDefaultEntities();

$defaultEntities[\\\’customer\\\’][\\\’attributes\\\’][\\\’test\\\’] = array(
\\\’type\\\’ => \\\’static\\\’,
\\\’label\\\’ => \\\’test\\\’,
\\\’visible\\\’ => 1,
\\\’required\\\’ => true,
\\\’position\\\’ => 1,
//\\\’class\\\’ => \\\’validate-employee_id\\\’,
\\\’sort_order\\\’ => 8,
);



return $defaultEntities;
}

}

 
Magento Community Magento Community
Magento Community
Magento Community
 
m2shop
Jr. Member
 
Total Posts:  3
Joined:  2011-08-09
 

I try to add adress to register filds in magento 1.6.0.0.

i delete <?php if($this->getShowAddressFields()): ?>
in /app/design/frontend/base/default/template/customer/form/register.phtml

but not work

 
Magento Community Magento Community
Magento Community
Magento Community
 
BOC
Jr. Member
 
Total Posts:  1
Joined:  2011-02-12
 

this worked for me in Magento v 1.6.1

app\code\core\Mage\Customer\Block\Form\Register.php

lines 41-45 changed from

protected function _prepareLayout()
    
{
        $this
->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Create New Customer Account'));
        return 
parent::_prepareLayout();
    
}

to

protected function _prepareLayout()
    
{
        $this
->setShowAddressFields(true);
        
$this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Create New Customer Account'));
        return 
parent::_prepareLayout();
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
unfeasible
Sr. Member
 
Avatar
Total Posts:  94
Joined:  2008-03-03
New Zealand
 

Thanks BOC, that easy answer worked in 1.3.2.4 also. It fixed the update for the register page country dropdown.
Also, removing the style=none in the form.phtml page, and bazinga!

 
Magento Community Magento Community
Magento Community
Magento Community
 
nuganics
Jr. Member
 
Total Posts:  16
Joined:  2008-12-20
 

For me this problem was caused because of a old module that gave a newsletter signup option in checkout.

Remove
/app/design/frontend/default/default/layout/checkoutnewsletter.xml
/app/design/frontend/default/default/layout/template/checkoutnewsletter - remove this whole folder.

Kind regards
Tim

 
Magento Community Magento Community
Magento Community
Magento Community
 
prakash_vaniya
Jr. Member
 
Total Posts:  11
Joined:  2010-01-31
Ahmedabad
 

Hi All,

To enable the address fields account create, add the following to your app/design/frontend/default/template/layout/local.xml file:

<customer_account_create>
<reference name="customer_form_register">
<action method="setShowAddressFields"><param>true</param></action>
</reference>
</customer_account_create>

Enjoy for same.

Regards,
Prakash Vaniya.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nithincninan
Jr. Member
 
Total Posts:  26
Joined:  2009-10-05
 

Step 1: delete/comment out
<?php if($this->getShowAddressFields()): ?>
and
<?php endif; ?>
so theyll look like
<?php // if($this->getShowAddressFields()): ?>
and
<?php // endif; ?>

step 2: delete or comment out the “ style="display:none" ‘ from the code. It occurs both for the line that begins with
“select id="region_id" name="region_id"
and for the line that begins with
<input type="text" id="region"
There doesnt seem to be a noticable difference between deleting only the first or deleting both instances.

step 3: at the bottom of the script, replace the commented out CDATA, which looks like this
<script type="text/javascript\">
//the CDATA box was commented out earlier
<![CDATA[
var dataForm = new VarienForm(’form-validate’, true);
<?php if($this->getShowAddressFields()): ?>
new RegionUpdater(’country’, ‘region’, ‘region_id’, <?php echo $this->helper('directory')->getRegionJson() ?>);
<?php endif; ?>
]]>
</script>

with

<script type="text/javascript\">
var dataForm = new VarienForm(’form-validate’, true);
new RegionUpdater(’country’, ‘region’, ‘region_id’, <?php echo $this->helper('directory')->getRegionJson() ?>);
</script>

Works fine now.

thanks!
Nithin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Exploratus
Jr. Member
 
Total Posts:  3
Joined:  2011-12-22
 

Thanks prakash_vaniya

Your solution was by far the easiest and requires no modification to phtml files!

 
Magento Community Magento Community
Magento Community
Magento Community
 
benrye
Jr. Member
 
Total Posts:  1
Joined:  2014-02-06
 

Hello.

Has anyone had success getting this working in 1.8?

Many thanks,

Ben

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2