Question

I want to remove zip/postal code and country from checkout page.

I removed them from billing.phtml file successfully. But when submit checkout data it shows alert that "country" and "zip/postal" code required.

I want to remove them from shipping.phtml file also.

Was it helpful?

Solution

  1. Go to Configuration -> General -> Country Options
  2. Select only a single country (your default country)
  3. Select all country for the field Postal Code is Optional for the following countries.
  4. Update eav_attribute table and set is_required = 0 if attribute_code = 'postcode'
  5. You can remove the Zip/Postal Code fields on templates.
  6. Replace Country fields with this:

    <input type="hidden" name="country_id" value="<?php echo Mage::getStoreConfig('general/country/default'); ?>"/>
    
    <!-- Original Country Field
    <div class="field">
        <label for="billing:country_id" class="required"><em>*</em><?php /*echo $this->__('Country') */?></label>
        <div class="input-box">
            <?php /*echo $this->getCountryHtmlSelect('billing') */?>
         </div>
    </div>
    -->
    

OTHER TIPS

For country option just put a style on it as display:none;

E.g. Note: This option is valid if you have selected by default country option from admin.

<div class="field" style="display:none;">
   <label for="billing:country_id" class="required"><em>*</em>
  <?php echo $this->__('Country') ?></label>
    <div class="input-box">
  <?php echo $this->getCountryHtmlSelect('billing') ?>
    </div>
</div>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top