Post by sabine1 » Thu Mar 31, 2011 10:51 pm

Since I've seen similar posts listed as bugs, this is probably one, too. Certainly, mods, feel free to move or kill if posted in the wrong area.

OpenCart 1.4.9.3

I'm to the point where I'm testing my cart through the new customer registration mode, and then try some test orders to make sure all is working properly.

However, when I try to create a dummy new customer registration account, I receive this error:

Notice: Undefined index: telephone in /home/sabine1/public_html/catalog/model/account/customer.php on line 13Notice: Undefined index: fax in /home/sabine1/public_html/catalog/model/account/customer.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/sabine1/public_html/index.php:94) in /home/sabine1/public_html/system/engine/controller.php on line 27

When I follow (through CPanel), the code stream, I do see where line 13 does ask for telephone and fax info, but I'm at a loss as to what to do. Although most of the dummy account is created and seems ok, I'm afraid once a potential customer sees this error message, he/she may simply quit trying to shop.

Any ideas as to how to remedy this is appreciated.

If it helps, here's copy from /home/mysite/public_html/catalog/model/account/customer/.php:


<?php
class ModelAccountCustomer extends Model {
public function addCustomer($data) {

$data['firstname'] = ucwords(strtolower(trim($data['firstname'])));
$data['lastname'] = ucwords(strtolower(trim($data['lastname'])));
$data['company'] = ucwords(strtolower(trim($data['company'])));
$data['address_1'] = ucwords(strtolower(trim($data['address_1'])));
$data['address_2'] = ucwords(strtolower(trim($data['address_2'])));
$data['city'] = ucwords(strtolower(trim($data['city'])));
$data['postcode'] = strtoupper(trim($data['postcode']));
BEGIN LINE 13
$this->db->query("INSERT INTO " . DB_PREFIX . "customer SET store_id = '" . (int)$this->config->get('config_store_id') . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', email = '" . $this->db->escape($data['email']) . "', telephone = '" . $this->db->escape($data['telephone']) . "', fax = '" . $this->db->escape($data['fax']) . "', password = '" . $this->db->escape(md5($data['password'])) . "', newsletter = '" . (int)$data['newsletter'] . "', customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "', status = '1', date_added = NOW()");
END LINE 13
$customer_id = $this->db->getLastId();

$this->db->query("INSERT INTO " . DB_PREFIX . "address SET customer_id = '" . (int)$customer_id . "', firstname = '" . $this->db->escape($data['firstname']) . "', lastname = '" . $this->db->escape($data['lastname']) . "', company = '" . $this->db->escape($data['company']) . "', address_1 = '" . $this->db->escape($data['address_1']) . "', address_2 = '" . $this->db->escape($data['address_2']) . "', city = '" . $this->db->escape($data['city']) . "', postcode = '" . $this->db->escape($data['postcode']) . "', country_id = '" . (int)$data['country_id'] . "', zone_id = '" . (int)$data['zone_id'] . "'");

$address_id = $this->db->getLastId();

$this->db->query("UPDATE " . DB_PREFIX . "customer SET address_id = '" . (int)$address_id . "' WHERE customer_id = '" . (int)$customer_id . "'");

if (!$this->config->get('config_customer_approval')) {
$this->db->query("UPDATE " . DB_PREFIX . "customer SET approved = '1' WHERE customer_id = '" . (int)$customer_id . "'");
}
}

public function editCustomer($data) {
$data['firstname'] = ucwords(strtolower(trim($data['firstname'])));
$data['lastname'] = ucwords(strtolower(trim($data['lastname'])));

************************************************
Thanks, sabine1

New member

Posts

Joined
Thu Feb 10, 2011 3:19 am

Post by sabine1 » Thu Apr 07, 2011 10:43 pm

I finally found this mod that completely overwrites the original new customer registration mod.

Log_In Plus: http://www.opencart.com/index.php?route ... &order=ASC

After installing the bug was gone, the new customer registration was actually easier than the original, and now things are working flawlessly!

Thanks to the creator @ openmycart!

sabine1

New member

Posts

Joined
Thu Feb 10, 2011 3:19 am

Post by Daniel » Fri Apr 08, 2011 1:23 am

nobody ever complained about this before. I think this bug i caused by you altering something.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by sabine1 » Fri Apr 08, 2011 5:18 am

Actually, I haven't altered anything. I received the error message the first time I tried the cart. I've seen many posts with error messages like this (some virtually identical) simply by googling the message.

New member

Posts

Joined
Thu Feb 10, 2011 3:19 am

Post by Qphoria » Fri Apr 08, 2011 8:58 am

This has never been reported before. The only way to get that error is if you altered your registration form and weren't passing back those fields that it is trying to load. Like if you edited the form and removed the telephone field

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by atul007 » Wed May 31, 2017 4:17 pm

Facing same issue.

Newbie

Posts

Joined
Fri May 26, 2017 9:50 pm

Post by atul007 » Wed May 31, 2017 4:42 pm

Log_In Plus: http://www.opencart.com/index.php?route ... &order=ASC

above link gives an error. 404 page not found

[/quote]

Newbie

Posts

Joined
Fri May 26, 2017 9:50 pm

Post by atul007 » Wed May 31, 2017 5:10 pm

Solved using following extension
{TS} Quick Registration Free
https://www.opencart.com/index.php?rout ... load_id=47

Newbie

Posts

Joined
Fri May 26, 2017 9:50 pm
Who is online

Users browsing this forum: No registered users and 95 guests