Post by dreamhosting » Wed Aug 28, 2013 12:24 am

Hi All,

We are moving our OSCommerce website to OpenCart right now. But I found one issue with our current way of working.

Because we are getting orders also by phone we need to create customers in the backend. No problem, but most of these customers ordering by phone are older people without email address. Is it possible to disable the email check in the backend? Of is there an extension that can handle this?

We want to add the orders to OpenCart because the stock is managed by OpenCart.

I also tried to use a dummy mail address, but that is only possible for one customer, cannot create a second customer with the same mail address.

Hope someone can help us out.

Kind Regards,
Jerry

Newbie

Posts

Joined
Wed Aug 28, 2013 12:00 am

Post by OpenCart Addons » Wed Aug 28, 2013 3:07 am

You can remove the customer email requirement by doing the following modifications:

In admin/controller/sale/order.php

Find:

Code: Select all

if ((utf8_strlen($this->request->post['email']) > 96) || (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email']))) {
$this->error['email'] = $this->language->get('error_email');
}
Change To:

Code: Select all

//if ((utf8_strlen($this->request->post['email']) > 96) || (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email']))) {
//$this->error['email'] = $this->language->get('error_email');
//}
This will comment out the customer email requirement from the validateForm() function. I've suggested to comment this out in the event you wish to enable it again in the future.


Regards,
Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by octavianvarzaru » Thu Jul 30, 2020 12:03 am

OpenCart Addons wrote:
Wed Aug 28, 2013 3:07 am
You can remove the customer email requirement by doing the following modifications:

In admin/controller/sale/order.php

Find:

Code: Select all

if ((utf8_strlen($this->request->post['email']) > 96) || (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email']))) {
$this->error['email'] = $this->language->get('error_email');
}
Change To:

Code: Select all

//if ((utf8_strlen($this->request->post['email']) > 96) || (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email']))) {
//$this->error['email'] = $this->language->get('error_email');
//}
This will comment out the customer email requirement from the validateForm() function. I've suggested to comment this out in the event you wish to enable it again in the future.


Regards,
Joel.
Is there a code also for OC ver 3.0.3.2 ?

Thanks


Posts

Joined
Fri Aug 24, 2018 2:54 am
Who is online

Users browsing this forum: No registered users and 22 guests