3

From the following files :

/app/design/frontend/base/default/template/customer/form/reg‌​ister.phtml /app/design/frontend/base/default/template/customer/form/add‌​ress.phtml /app/design/frontend/base/default/template/checkout/onepage/‌​billing.phtml and /app/design/frontend/base/default/template/checkout/onepage/‌​shipping.phtml

i did this trick converting php line

<?php echo $this->getCountryHtmlSelect() ?>

to html line

<select name="country_id" id="country" title="<?php echo $this->__('Country') ?>" class="validate-select">
    <option value="IN" selected="selected">India</option>
</select>

but not worked. In site showing one blank line and other line India.

I need only one line India or remove dropdown.

6
  • In which file did you make changes?
    – John
    Apr 27, 2017 at 6:23
  • /app/design/frontend/base/default/template/customer/form/register.phtml /app/design/frontend/base/default/template/customer/form/address.phtml /app/design/frontend/base/default/template/checkout/onepage/billing.phtml and /app/design/frontend/base/default/template/checkout/onepage/shipping.phtml Apr 27, 2017 at 6:29
  • 1
    Which Magento version are you using? Apr 27, 2017 at 6:32
  • go to admin panel > system > configuration > general > countries option > allowed countries. Apr 27, 2017 at 6:39
  • i did by going admin panel process but not output changes. Apr 27, 2017 at 6:48

2 Answers 2

6

Its very simple
system > configuration > general > countries option > allowed countries. Just select the country you want. enter image description here

7
  • 1
    I did but still showing blank line and India in frontpage. Apr 27, 2017 at 8:13
  • @ Dipak Kumar: That is how it appears in default magento after the above configurations are set. You'll have to add some JS and CSS to set the selected country option as India and hide the dropdown.
    – Sukeshini
    Apr 27, 2017 at 9:25
  • Tell me what code needs to add so that under Country Section only visible India and no drop down. Apr 27, 2017 at 10:01
  • Then select Default country just above that. It'll work for you Apr 27, 2017 at 10:52
  • not worked !!!! Apr 27, 2017 at 11:01
1

I think you are making changes to wrong files. Magento 1.9 comes with default RWD theme. So you will need to put your selectbox code in below files.

app\design\frontend\rwd\default\template\persistent\checkout\onepage\billing.phtml

<select name="billing[country_id]" id="billing:country_id" title="<?php echo $this->__('Country') ?>" class="validate-select">
    <option value="IN" selected="selected">India</option>
</select>

app\design\frontend\rwd\default\template\checkout\onepage\shipping.phtml

<select name="shipping[country_id]" id="shipping:country_id" title="<?php echo $this->__('Country') ?>" class="validate-select">
    <option value="IN" selected="selected">India</option>
</select>

app\design\frontend\rwd\default\template\customer\address\edit.phtml app\design\frontend\rwd\default\template\persistent\customer\form\register.phtml

<select name="country_id" id="country" title="<?php echo $this->__('Country') ?>" class="validate-select">
    <option value="IN" selected="selected">India</option>
</select>
20
  • still showing blank line and other India under Country Section in magento? Apr 27, 2017 at 9:59
  • Are you using any custom theme or third party checkout extension? Which browser you are using? Apr 27, 2017 at 10:02
  • I am using chrome browser. Magento ver. 1.9.2.1 Apr 27, 2017 at 10:06
  • is there any theme you are using? or using Magento's default theme? Apr 27, 2017 at 10:07
  • Magento default theme Apr 27, 2017 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.