Post by sketchi » Mon Aug 08, 2016 4:01 pm

For some reason my customers don't show up in my OpenCart admin. I do see them in the database table oc_customer though. I have the following errors in the log:
2016-08-04 21:01:00 - PHP Notice: Undefined index: approval in /var/www/vhosts/xxxxx/catalog/model/account/customer.php on line 14
2016-08-04 21:01:00 - PHP Notice: Undefined index: approval in /var/www/vhosts/xxxxx/catalog/model/account/customer.php on line 30
2016-08-04 21:01:02 - PHP Notice: Undefined index: name in /var/www/vhosts/xxxxx/catalog/model/account/customer.php on line 63
I'm using OC 2.2.0.0 with Swedish language. I've tried switching to English but they still don't show.

I also had a problem with the customer group not showing in admin but I solved that by changing the language_id in oc_customer_group_description. Can't see anything similar I could do for the customers though...?

From the database:

Code: Select all

# Tabelldump oc_customer
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer`;

CREATE TABLE `oc_customer` (
  `customer_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_group_id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL DEFAULT '0',
  `firstname` varchar(32) NOT NULL,
  `lastname` varchar(32) NOT NULL,
  `email` varchar(96) NOT NULL,
  `telephone` varchar(32) NOT NULL,
  `fax` varchar(32) NOT NULL,
  `password` varchar(40) NOT NULL,
  `salt` varchar(9) NOT NULL,
  `cart` text,
  `wishlist` text,
  `newsletter` tinyint(1) NOT NULL DEFAULT '0',
  `address_id` int(11) NOT NULL DEFAULT '0',
  `custom_field` text NOT NULL,
  `ip` varchar(40) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `approved` tinyint(1) NOT NULL,
  `safe` tinyint(1) NOT NULL,
  `token` text NOT NULL,
  `code` varchar(40) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `oc_customer` WRITE;
/*!40000 ALTER TABLE `oc_customer` DISABLE KEYS */;

INSERT INTO `oc_customer` (`customer_id`, `customer_group_id`, `store_id`, `firstname`, `lastname`, `email`, `telephone`, `fax`, `password`, `salt`, `cart`, `wishlist`, `newsletter`, `address_id`, `custom_field`, `ip`, `status`, `approved`, `safe`, `token`, `code`, `date_added`)
VALUES
	(1,0,0,'XXX','XXX','XXX@XXX.XX.XX','XXX-XXX','','XXX','XXX',NULL,NULL,1,1,'','XX.XX.XX.XX',1,1,0,'','','2016-06-05 15:22:54'),
	(2,0,0,'XXX','XXX','XXX@XXX.XX.XX','XXX','','XXX','XXX',NULL,NULL,1,2,'','XX.XX.XX.XX',1,1,0,'','','2016-06-19 11:02:52'),
	(3,0,0,'XXX','XXX','XXXXXXh@XXX.XXX','XXX','','XXX','XXX',NULL,NULL,0,3,'','XX.XX.XX.XX',1,1,0,'','','2016-08-02 11:43:31'),
	(4,0,0,'XXX','XXX','XXX@XXX.XX','XXX','','XXX','XXX',NULL,NULL,1,5,'','XX.XX.XX.XX',1,1,0,'','','2016-08-04 09:38:00'),
	(5,0,0,'XXX','XXX','XXX@XXX.com','XXX','-','XXX','XXX',NULL,NULL,1,6,'','XX.XX.XX.XX',1,1,0,'','','2016-08-04 21:01:01');

/*!40000 ALTER TABLE `oc_customer` ENABLE KEYS */;
UNLOCK TABLES;


# Tabelldump oc_customer_activity
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_activity`;

CREATE TABLE `oc_customer_activity` (
  `customer_activity_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `key` varchar(64) NOT NULL,
  `data` text NOT NULL,
  `ip` varchar(40) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_activity_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `oc_customer_activity` WRITE;
/*!40000 ALTER TABLE `oc_customer_activity` DISABLE KEYS */;

INSERT INTO `oc_customer_activity` (`customer_activity_id`, `customer_id`, `key`, `data`, `ip`, `date_added`)
VALUES
	(1,1,'register','{\"customer_id\":1,\"name\":\"XXX"}','XX.XX.XX.XX','2016-06-05 15:22:54'),
	(2,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":1}','XX.XX.XX.XX','2016-06-05 15:27:40'),
	(3,1,'login','{\"customer_id\":\"1\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-06-18 16:19:46'),
	(4,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":2}','XX.XX.XX.XX','2016-06-18 16:23:04'),
	(5,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":7}','XX.XX.XX.XX','2016-06-18 16:58:09'),
	(6,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":12}','XX.XX.XX.XX','2016-06-18 17:27:14'),
	(7,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":14}','XX.XX.XX.XX','2016-06-18 17:34:06'),
	(8,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":16}','XX.XX.XX.XX','2016-06-18 18:36:10'),
	(9,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":17}','XX.XX.XX.XX','2016-06-18 18:41:26'),
	(10,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":18}','XX.XX.XX.XX','2016-06-18 18:43:37'),
	(11,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":19}','XX.XX.XX.XX','2016-06-18 18:52:47'),
	(12,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":20}','XX.XX.XX.XX','2016-06-18 18:56:56'),
	(13,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":21}','XX.XX.XX.XX','2016-06-18 18:59:57'),
	(14,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":22}','XX.XX.XX.XX','2016-06-18 19:02:32'),
	(15,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":23}','XX.XX.XX.XX','2016-06-18 19:03:39'),
	(16,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":24}','XX.XX.XX.XX','2016-06-18 19:04:15'),
	(17,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":25}','XX.XX.XX.XX','2016-06-18 19:05:03'),
	(18,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":26}','XX.XX.XX.XX','2016-06-18 19:05:38'),
	(19,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":27}','XX.XX.XX.XX','2016-06-18 19:06:20'),
	(20,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":28}','XX.XX.XX.XX','2016-06-18 19:07:06'),
	(21,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":29}','XX.XX.XX.XX','2016-06-18 19:08:15'),
	(22,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":30}','XX.XX.XX.XX','2016-06-18 19:10:06'),
	(23,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":31}','XX.XX.XX.XX','2016-06-18 19:10:51'),
	(24,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":32}','XX.XX.XX.XX','2016-06-18 19:13:50'),
	(25,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":33}','XX.XX.XX.XX','2016-06-18 19:14:34'),
	(26,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":34}','XX.XX.XX.XX','2016-06-18 19:15:38'),
	(27,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":35}','XX.XX.XX.XX','2016-06-18 19:16:28'),
	(28,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":36}','XX.XX.XX.XX','2016-06-18 19:17:14'),
	(29,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":37}','XX.XX.XX.XX','2016-06-18 19:18:29'),
	(30,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":38}','XX.XX.XX.XX','2016-06-18 19:19:55'),
	(31,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":39}','XX.XX.XX.XX','2016-06-18 19:26:11'),
	(32,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":40}','XX.XX.XX.XX','2016-06-18 19:27:24'),
	(33,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":41}','XX.XX.XX.XX','2016-06-18 19:29:15'),
	(34,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":42}','XX.XX.XX.XX','2016-06-18 19:31:21'),
	(35,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":43}','XX.XX.XX.XX','2016-06-18 19:34:55'),
	(36,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":44}','XX.XX.XX.XX','2016-06-18 19:37:41'),
	(37,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":45}','XX.XX.XX.XX','2016-06-18 19:38:30'),
	(38,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":46}','XX.XX.XX.XX','2016-06-18 19:39:19'),
	(39,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":47}','XX.XX.XX.XX','2016-06-18 19:41:58'),
	(40,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":48}','XX.XX.XX.XX','2016-06-18 19:45:06'),
	(41,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":49}','XX.XX.XX.XX','2016-06-18 19:46:23'),
	(42,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":50}','XX.XX.XX.XX','2016-06-18 19:54:49'),
	(43,1,'order_account','{\"customer_id\":\"1\",\"name\":\"XXX",\"order_id\":53}','XX.XX.XX.XX','2016-06-18 20:04:53'),
	(44,1,'login','{\"customer_id\":\"1\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-06-19 09:55:49'),
	(45,2,'register','{\"customer_id\":2,\"name\":\"XXX"}','XX.XX.XX.XX','2016-06-19 11:02:54'),
	(46,3,'register','{\"customer_id\":3,\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-02 11:43:33'),
	(47,3,'login','{\"customer_id\":\"3\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-02 11:45:47'),
	(48,3,'address_add','{\"customer_id\":\"3\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-02 11:46:56'),
	(49,3,'order_account','{\"customer_id\":\"3\",\"name\":\"XXX",\"order_id\":10}','XX.XX.XX.XX','2016-08-02 12:02:33'),
	(50,3,'login','{\"customer_id\":\"3\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-03 22:13:44'),
	(51,3,'login','{\"customer_id\":\"3\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-04 08:09:37'),
	(52,3,'login','{\"customer_id\":\"3\",\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-04 08:17:55'),
	(53,4,'register','{\"customer_id\":4,\"name\":\"XXX"}','XX.XX.XX.XX','2016-08-04 09:38:02'),
	(54,4,'order_account','{\"customer_id\":\"4\",\"name\":\"XXX",\"order_id\":12}','XX.XX.XX.XX','2016-08-04 09:55:50'),
	(55,4,'order_account','{\"customer_id\":\"4\",\"name\":\"XXX",\"order_id\":14}','XX.XX.XX.XX','2016-08-04 11:02:23'),
	(56,5,'register','{\"customer_id\":5,\"name\":\"XXX\"}','XX.XX.XX.XX','2016-08-04 21:01:03'),
	(57,5,'login','{\"customer_id\":\"5\",\"name\":\"XXX\"}','XX.XX.XX.XX','2016-08-04 22:13:02'),
	(58,5,'order_account','{\"customer_id\":\"5\",\"name\":\"XXX\",\"order_id\":20}','XX.XX.XX.XX','2016-08-04 22:16:25');

/*!40000 ALTER TABLE `oc_customer_activity` ENABLE KEYS */;
UNLOCK TABLES;


# Tabelldump oc_customer_group
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_group`;

CREATE TABLE `oc_customer_group` (
  `customer_group_id` int(11) NOT NULL AUTO_INCREMENT,
  `approval` int(1) NOT NULL,
  `sort_order` int(3) NOT NULL,
  PRIMARY KEY (`customer_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `oc_customer_group` WRITE;
/*!40000 ALTER TABLE `oc_customer_group` DISABLE KEYS */;

INSERT INTO `oc_customer_group` (`customer_group_id`, `approval`, `sort_order`)
VALUES
	(1,0,1);

/*!40000 ALTER TABLE `oc_customer_group` ENABLE KEYS */;
UNLOCK TABLES;


# Tabelldump oc_customer_group_description
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_group_description`;

CREATE TABLE `oc_customer_group_description` (
  `customer_group_id` int(11) NOT NULL,
  `language_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `description` text NOT NULL,
  PRIMARY KEY (`customer_group_id`,`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `oc_customer_group_description` WRITE;
/*!40000 ALTER TABLE `oc_customer_group_description` DISABLE KEYS */;

INSERT INTO `oc_customer_group_description` (`customer_group_id`, `language_id`, `name`, `description`)
VALUES
	(1,1,'Default','test');

/*!40000 ALTER TABLE `oc_customer_group_description` ENABLE KEYS */;
UNLOCK TABLES;


# Tabelldump oc_customer_history
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_history`;

CREATE TABLE `oc_customer_history` (
  `customer_history_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_history_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabelldump oc_customer_ip
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_ip`;

CREATE TABLE `oc_customer_ip` (
  `customer_ip_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_ip_id`),
  KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `oc_customer_ip` WRITE;
/*!40000 ALTER TABLE `oc_customer_ip` DISABLE KEYS */;

INSERT INTO `oc_customer_ip` (`customer_ip_id`, `customer_id`, `ip`, `date_added`)
VALUES
	(1,1,'XX.XX.XX.XX','2016-06-05 15:22:54'),
	(2,2,'XX.XX.XX.XX','2016-06-19 11:02:54'),
	(3,3,'XX.XX.XX.XX','2016-08-02 11:45:47'),
	(4,3,'XX.XX.XX.XX','2016-08-02 16:21:50'),
	(5,3,'XX.XX.XX.XX','2016-08-03 22:13:44'),
	(6,3,'XX.XX.XX.XX','2016-08-04 08:09:38'),
	(7,4,'XX.XX.XX.XX','2016-08-04 09:38:02'),
	(8,5,'XX.XX.XX.XX','2016-08-04 22:13:02');

/*!40000 ALTER TABLE `oc_customer_ip` ENABLE KEYS */;
UNLOCK TABLES;


# Tabelldump oc_customer_login
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_login`;

CREATE TABLE `oc_customer_login` (
  `customer_login_id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(96) NOT NULL,
  `ip` varchar(40) NOT NULL,
  `total` int(4) NOT NULL,
  `date_added` datetime NOT NULL,
  `date_modified` datetime NOT NULL,
  PRIMARY KEY (`customer_login_id`),
  KEY `email` (`email`),
  KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabelldump oc_customer_online
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_online`;

CREATE TABLE `oc_customer_online` (
  `ip` varchar(40) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `url` text NOT NULL,
  `referer` text NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabelldump oc_customer_reward
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_reward`;

CREATE TABLE `oc_customer_reward` (
  `customer_reward_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL DEFAULT '0',
  `order_id` int(11) NOT NULL DEFAULT '0',
  `description` text NOT NULL,
  `points` int(8) NOT NULL DEFAULT '0',
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_reward_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabelldump oc_customer_transaction
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_transaction`;

CREATE TABLE `oc_customer_transaction` (
  `customer_transaction_id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `amount` decimal(15,4) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_transaction_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



# Tabelldump oc_customer_wishlist
# ------------------------------------------------------------

DROP TABLE IF EXISTS `oc_customer_wishlist`;

CREATE TABLE `oc_customer_wishlist` (
  `customer_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`customer_id`,`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `oc_customer_wishlist` WRITE;
/*!40000 ALTER TABLE `oc_customer_wishlist` DISABLE KEYS */;

INSERT INTO `oc_customer_wishlist` (`customer_id`, `product_id`, `date_added`)
VALUES
	(1,136,'2016-06-05 15:24:12');

/*!40000 ALTER TABLE `oc_customer_wishlist` ENABLE KEYS */;
UNLOCK TABLES;
Last edited by straightlight on Mon Aug 08, 2016 6:03 pm, edited 1 time in total.
Reason: Added quote tags.

User avatar
New member

Posts

Joined
Wed Sep 22, 2010 5:04 pm

Post by paulfeakins » Mon Aug 08, 2016 5:51 pm

It could be worth moving to 2.3.0.2 if possible?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by straightlight » Mon Aug 08, 2016 6:10 pm

Correct. This issue has been encountered in the past regarding manual changes of the languages over the database. Even when switching back to the default language, the selected language pack would not be showed accordingly.

Also take note that these effects can also be caused by installed extensions which can also affect other subjects in the core. I would, first, suggest to restore backups and database and see if the issue is resolved on that end. If so; still to upgrade to the latest release as per paulfeakins recommends above afterwards. Followed is the official topic for v2.3.0.2 release to fix most of the passed issues: http://forum.opencart.com/viewtopic.php?f=2&t=166011 .

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com contractor officials representative


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 8 guests