Try the Demo

Magento Forum

   
Disable state/province option in the backend
 
bug00
Jr. Member
 
Total Posts:  7
Joined:  2009-12-09
 

Dull_addressfields works in local installation, but not on server installation for me :’(

 
Magento Community Magento Community
Magento Community
Magento Community
 
chefchops
Jr. Member
 
Total Posts:  1
Joined:  2010-03-26
 

Hi I live in UK and wanted rid of state province but want county

EASY

Just go to your app>locale>EN-GB>mage-checkout and change state province line (second column) in line 48 by default to just County

Hope it helps

Chefchops

 
Magento Community Magento Community
Magento Community
Magento Community
 
choussamaster
Sr. Member
 
Total Posts:  88
Joined:  2009-07-14
 

to remove all trace of region search and delete
{{var region}}
or {{/if}}{{if region}}{{var region}}, in same case

 Signature 

Création de boutique en ligne et de site e-commerce Magento en freelance

 
Magento Community Magento Community
Magento Community
Magento Community
 
e-thos
Jr. Member
 
Total Posts:  8
Joined:  2009-07-21
Cagnes sur mer - Alpes Maritimes - France
 

Hi All,

It works perfectly with Tobias Renger extension:
http://www.magentocommerce.com/magento-connect/Tobias+Renger/extension/1904/custom-address-requirements

But strangely, I can’t set up the telephone to “not mandatory” or “not visible” without beeing prompt by javascript when placing an order.
Do you have any suggestion on this issue?

Regards,

B.

 Signature 

E-THOS SSII - In Magento we trust
Magento - Nice - Cannnes - Monaco - Sophia Antipolis

 
Magento Community Magento Community
Magento Community
Magento Community
 
PSDtoMagento
Member
 
Avatar
Total Posts:  33
Joined:  2011-01-21
 

A really nice module, works for me perfectly. thanks!

 Signature 

PSD to Magento, PSD to Magento Template, PSD to Magento Theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1676
Joined:  2009-06-23
 

Hi All
In order to remove the State/Province field, you just need to replace the required field from:
checkout/onepage/shipping.phtml
checkout/onepage/billing.phtml

<div class="field">
                        <
label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province'?></label>
                        <
div class="input-box">
                            <
select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
                                <
option value=""><?php echo $this->__('Please select region, state or province'?></option>
                            </
select>
                            <
script type="text/javascript">
                            
//<![CDATA[
                                
$('billing:region_id').setAttribute('defaultValue',  "<?php echo $this->getAddress()->getRegionId() ?>");
                            
//]]>
                            
</script>
                            
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>"  title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
                        </
div>
                    </
div>
by this code:
<div class="field" style="display:none;">
                        <
input id="billing:region"/>
                        <
select id="billing:region_id"></select>
                    </
div>

Note: billing -> shipping in case of shipping.phtml

Thanks to this extension: http://www.magentocommerce.com/extension/specs/1904/custom-address-requirements

Cheers!!

 Signature 

MagePsycho - Magento Freelancer
Free Modules: jQuery LightBoxes | Frontend Links Manager & more…
Commercial Modules: jQuery Sliders Pro | Custom Login Redirect Pro | Store Restrction Pro & more...

Follow me on Twitter @ magepsycho

 
Magento Community Magento Community
Magento Community
Magento Community
 
Eduard Dumitrescu
Jr. Member
 
Total Posts:  3
Joined:  2009-10-15
 

If you want to remove validation of province/state, jus TRUNCATE this table: ‘directory_country_region’

 
Magento Community Magento Community
Magento Community
Magento Community
 
strohmeier
Jr. Member
 
Total Posts:  9
Joined:  2010-02-22
 
Eduard Dumitrescu - 29 June 2011 06:11 AM

If you want to remove validation of province/state, jus TRUNCATE this table: ‘directory_country_region’

this will kill province validation forever. if you just want to get rid of ‘mandatory’-validation and still want to use validation features elsewhere (e.g. with a customized newsletter tool) you can better use phpmyadmin, open table eav_attribute and set the column is_required to 0 where attribute_code is ‘region’.

after that, just remove the class ‘required-entry’ from the region input in the form’s tpl.file to get rid of javascript validation (or just delete the whole shebang) - there you go with optional/no regions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
haijerome
Member
 
Avatar
Total Posts:  40
Joined:  2010-07-19
 

Just install this little pretty and cool extension from Dull developed by Mr. Tobias Renger .

I don’t recommend any other better solution than this.

Cheers grin

Last but not least, after you have installed this extension and get rid of the unwanted customer address fields then kindly give them a good review !!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bibins
Jr. Member
 
Total Posts:  11
Joined:  2011-01-07
 

Hi, I’m under 1.5.1 CE and none of the extensions I’ve found (or read about) work for the State / Province field in the backend. Same thing for code modifications.

So I was looking for a solution for hours in the code and finaly came up with something (actually the difficult part was only to find the right file to modify). As I didn’t find anything for this field to be not required in the backend but still optionnal, I share what I found that worked for me :

Create a new file : app\code\local\Mage\Adminhtml\Block\Customer\Edit\Renderer\Region.php
which is a copy / paste of : app\code\core\Mage\Adminhtml\Block\Customer\Edit\Renderer\Region.php

Modify the first one (the one you created) on line 58, replace

class="select required-entry''
by
class="select"
.

Otherwise, if you want the combo-box to be always empty, and then to be in fact an input text (still not required) :

Create a new file : app\code\local\Mage\Adminhtml\Block\Sales\Order\Create\Form\Abstract.php
which is a copy / paste of : app\code\core\Mage\Adminhtml\Block\Sales\Order\Create\Form\Abstract.php

Comment the line 112 :

'region'    => $this->getLayout()->createBlock('adminhtml/customer_edit_renderer_region'),

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anybug
Jr. Member
 
Total Posts:  1
Joined:  2011-06-07
 

Hi,
If you want to remove state/province field from all address forms, try this.
Copy this file: app/code/core/Mage/Adminhtml/CustomerEdit/Renderer/Region.php
To: app/code/local/Mage/Adminhtml/CustomerEdit/Renderer/Region.php
And edit the new file.
works on 1.5.1 CE

public function render(Varien_Data_Form_Element_Abstract $element)
{
    
return $element->getDefaultHtml();
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
zebulo
Jr. Member
 
Total Posts:  21
Joined:  2011-04-06
 

The solution proposed by Bibins works like a charm. Simple, and clean, I think.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ullern
Jr. Member
 
Total Posts:  6
Joined:  2012-03-08
 

Does anyone have a nice way of doing this in 1.7? Alot of the files mentioned earlier in this post seem to have been altered…

Ane help would be apreciated!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
flyhamst
Jr. Member
 
Total Posts:  5
Joined:  2007-10-31
 

this function is implemented in v1.7 CE
go to ‘Configuration->General->States Options’ and choose options.

This new feature create a conflict with DULL extension :

When create a new account, if you select same addresse for shipping, the next step (3) is validated but stay on step 2 instead of going to step 4
(work if you select ‘different address for shipping’)

 
Magento Community Magento Community
Magento Community
Magento Community
 
quyennb
Jr. Member
 
Total Posts:  1
Joined:  2012-05-11
 

problem you say I did not understand anything

---------------------------

<br><a href="http://www.cubefieldflash.com/">cubefieldflash</a>

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