0

What is the best way to go about removing unnecessary fields during the billing process as Guest? How i can Removing mandatory validation of email field in Guest checkout Case

2 Answers 2

0

Find below mentioned file If they are not already exist within your theme copy the following files from the base/default theme to your theme:

template/customer/address/edit.phtml
template/checkout/onepage/shipping.phtml
template/checkout/onepage/billing.phtml

For example remove validation on city field :

In each of these files, look for the <input> that defines the city field and remove the required class from the label, remove the required-attribute class from the input and make sure to remove the *.

In the same way you can remove others field validation or comment <input> for completely disable this fields.

I hope you will get some idea from this.

1
  • i do this steps but if checkout as Guest in billing Information i got an alert message Email is a required value. any idea ? May 23, 2016 at 13:24
0

Find below mentioned file If they are not already exist within your theme copy the following files from the base/default theme to your theme:

--1--

from->

app/code/core/Mage/Customer/Model/Customer.php

to->

app/code/local/Mage/Customer/Model/Customer.php

and change the code below -->

if (!Zend_Validate::is($this->getEmail(), 'EmailAddress')) {
            $errors[] = Mage::helper('customer')->__('Invalid email address "%s".', $this->getEmail());
        }

to -->

if (!Zend_Validate::is($this->getEmail(), 'EmailAddress') && Zend_Validate::is( trim($this->getEmail()) , 'NotEmpty')) {
            $errors[] = Mage::helper('customer')->__('Invalid email address "%s".', $this->getEmail());
        }

--2--

If you're working with a Community Edition, you'll have to manually change this value with SQL. It's in eav_attribute table, the attribute_code is email and you just need to set is_required to 0.

or using Query SQL UPDATE eav_attribute SET is_required = 0 WHERE attribute_code = 'email';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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