OC 1.3 Admin Add Manufacturer Fails in line 7
Posted: Wed Jul 29, 2009 9:13 pm
Failure occured in line 7 of
admin/model/catalog/manufacturer.php
Trying to set query= 'manufacturer_id=' . (int)manufacturer_id ..... when manufacturer_id has not been previously set.
FIX:
changed to:
This seemed to fix the issue.
Best Wishes
Alex
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']) . "'");
}
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']) . "'");
}
Best Wishes
Alex