Page 1 of 1
How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 1:16 am
by Blackbeard
Okay I know this is an old question but yet I haven't found a solution for the 1.5.1.3 version. So how do I delete the store's address field in Contact Us form?
Thanks!
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 1:41 am
by sander76
Find this file:
/catalog/view/theme/default/template/information/contact.tpl
Comment the following line:
Should be on line 14.
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 2:22 am
by Blackbeard
But what if I'm using a custom template? I'm using yoocolor.
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 2:40 am
by sander76
I suppose the same code will be in other template files as well. Otherwise the address wouldn't be shown. Have you searched the file for this text?
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 5:58 pm
by Blackbeard
Yes there is such line but nothing happens when I delete it

Or I don't quite understand what 'comment' means in this case. Sorry I'm very new at all the programming stuff.
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 6:06 pm
by fido-x
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 6:25 pm
by Blackbeard
Did that, same problem remains.

You can check that on my site.
http://playys.com/index.php?route=information/contact
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 6:44 pm
by fido-x
Aah, now that helps.
In your template file (catalog/view/theme/default/template/information/contact.tpl), find the following (lines 12-14):
Code: Select all
<div class="content"><div class="left"><b><?php echo $text_address; ?></b><br />
<?php echo $store; ?><br />
<?php echo $address; ?></div>
and replace with:
That will get rid of the whole "Address" section at the top of your contact form.
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 6:52 pm
by Blackbeard
Thanks fido, now the address is finally gone.

But how can I remove the "address" headline ("mūsų adresas" in my site) ?
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 7:03 pm
by fido-x
That would be line 10:
Code: Select all
<h2><?php echo $text_location; ?></h2>
Re: How to disable address field in "Contact us"?
Posted: Thu Jan 05, 2012 10:33 pm
by Blackbeard
Thanks so much! Finally got it :}
Re: How to disable address field in "Contact us"?
Posted: Tue Jul 31, 2012 11:10 pm
by TechPNC
In OC 1.5.3.1 that solution leaves a large blank space. To remove The entire Address / Tel No section:
/catalog/view/theme/default/template/information/contact.tpl
Remove / comment out rows 10 - 25:
<h2><?php echo $text_location; ?></h2>
<div class="contact-info">
<div class="content">
<div class="right">
<?php if ($telephone) { ?>
<b><?php echo $text_telephone; ?></b><br />
<?php echo $telephone; ?><br />
<br />
<?php } ?>
<?php if ($fax) { ?>
<b><?php echo $text_fax; ?></b><br />
<?php echo $fax; ?>
<?php } ?>
</div>
</div>
</div>