Post by wal_j » Wed Jul 29, 2009 9:13 pm

Failure occured in line 7 of
admin/model/catalog/manufacturer.php

Code: Select all

if ($data['keyword']) {
			$this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET query = 'manufacturer_id=" . (int)$manufacturer_id . "', keyword = '" . $this->db->escape($data['keyword']) . "'");
		}
Trying to set query= 'manufacturer_id=' . (int)manufacturer_id ..... when manufacturer_id has not been previously set.

FIX:
changed to:

Code: Select all

		$manufacturer_id = $this->db->getLastId();
		
		if ($data['keyword']) {
			$this->db->query("INSERT INTO " . DB_PREFIX . "url_alias SET query = 'manufacturer_id=" . (int)$manufacturer_id . "', keyword = '" . $this->db->escape($data['keyword']) . "'");
		}
This seemed to fix the issue.
Best Wishes
Alex

New member

Posts

Joined
Tue May 12, 2009 11:51 pm
Who is online

Users browsing this forum: No registered users and 13 guests