Hi everybody.
I cant seem the remove the required field sign (*) for telephone.
Edited Billing.phtml and still no changes, edited this through :
app/design/frontend/base/default/template/checkout/onepage
Also emptied the cache, but it just doesnt change.
Im not using the default magento theme, so maybe i need to edit Billing.phtml in another folder. Not sure about this, hope somebody can confirm this.
Using mangento 1.9
Help would be appreciated.
thankyou in advance.
typically the file should be in the base/default/template/checkout/onpage as you stated.
but if not, check out default/YOURTHEME/template/checkout/onepage instead
the code should look simular to::
<div class="field">
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
<div class="input-box">
<input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
</div>
</div>
Removing -- class="required"><em>*</em -- should fix it.
If not, paste your phone billing code here;
And also, make sure your in the right Onepage folder, if your using a 3rd party one, it wont be in the checkout/onepage folder.
Thankyou for the advice.
But sadley the folder : default/MYTHEMENAME/template/checkout/onepage
was empty.
This is my code for the telephone field (file: base/default/template/checkout/onpage)
as you can see, i removed the <em>*</em> part. but still no luckk.
<div class="field">
<label for="billing:telephone" class="required"><?php echo $this->__('Telephone') ?></label>
<div class="input-box">
<input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
you also have to remove class = required.
try;
<div class="field"> <label for="billing:telephone"><?php echo $this->__('Telephone') ?></label> <div class="input-box"> <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
Basically, it should be 100% identical to Fax
except telephone instead of fax.
If it doesn't work, paste both your tele and fax code here so I can see
Didnt work
here you go, this is my telephone and fax code
<li class="fields">
<div class="field">
<label for="billing:telephone"><?php echo $this->__('Telephone') ?></label>
<div class="input-box">
<input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
</div>
</div>
<div class="field">
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
<div class="input-box">
<input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
</div>
</div>
</li>
it looks fine to me,
It matches my code I use for my site and it worked for me.
I'm thinking your in the wrong folder.
The easiest way to know would be to remove the whole field code for telephone and see what happens, if nothing changes. its the wrong file.
What onepage/checkout are you using?
Are you sure that app/design/frontend/base/default/template/checkout/onepage/billing.phtml is the file being used? There is also app/design/frontend/base/persistent/checkout/onepage/billing.phtml that I belive will be used if persistent shopping cart is configured to be true and possibly the default in latest versions of Magento.
I would turn on template hints to make sure the file you think you should be editing is the correct one:
To turn on template path hints in Magento:
And if that works you should copy that file to your theme and make the edits there.
this does not work (using CE 1.9.1) ...
the correct template (according to template hints) is: /app/design/frontend/custompackage/[THEME]/template/persistent/checkout/onepage/billing.phtml
but removing the
class="required">
in this template file does not solve the problem at all and when clicking next an error states that telephone is still a required field.
In German law it is now illegal to require a telephone number at checkout in online shops so this needs to be solved.
Had the same problem and found, that in Magento 1.9 the following file is used for the checkout-address:
/app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
Yep, this worked for me! I am using 1.7
Now next: try to make also the fields Address, Postal Code, City and Country optional. This is convenient for customers who only purchase a downloadable product.
It works in the same simple way in the same file:
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
replace by:
<label for="billing:street1"><?php echo $this->__('Address') ?></label>
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
replace by
<label for="billing:city"><?php echo $this->__('City') ?></label>
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
replace by
<label for="billing:region_id"><?php echo $this->__('State/Province') ?></label>
<label for="billingostcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
replace by
<label for="billingostcode"><?php echo $this->__('Zip/Postal Code') ?></label>
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
replace by
<label for="billing:country_id" class="required"><?php echo $this->__('Country') ?></label>
Well..... there is ONE DOWNSIDE of course:
Customers who buy a physical product that needs to be shipped may not provide the neccessary shipping info.
Bad luck for them or for me when I have to mail them after the order to get the right shipping info
Better would be to have this edited file renamed as billing_download_customers.phtml as the same place but referring to it should be an option somewhere else in the website code. Wonder if anybody has a tip on that?