Post by Tyndie » Sat Jul 25, 2009 5:55 pm

Hi,

I have tried a few times when entering a new manufacturer to add the seo title too, but each time I receive this error:

Code: Select all

Notice: Undefined variable: manufacturer_id in /homepages/41/xx/htdocs/zzzzz/store/admin/model/catalog/manufacturer.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /homepages/41/xx/htdocs/zzzzz/store/admin/model/catalog/manufacturer.php:7) in /homepages/41/xx/htdocs/zzzzz/store/system/engine/controller.php on line 23

Newbie

Posts

Joined
Sat Jul 25, 2009 5:52 pm
Location - Basingstoke UK

Post by Daniel » Sun Jul 26, 2009 2:19 am

thanks

I will fix this in the next release.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by abmcr » Sun Jul 26, 2009 4:41 pm

In the file
admin/model/catalog/manufacturer.php
change the function addManufacturer as

Code: Select all

	public function addManufacturer($data) {
  		$this->db->query("INSERT INTO " . DB_PREFIX . "manufacturer SET name = '" . $this->db->escape(@$data['name']) . "', image = '" . $this->db->escape(basename($data['image'])) . "', sort_order = '" . (int)$data['sort_order'] . "'");
		$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->cache->delete('manufacturer');
	}

New member

Posts

Joined
Wed Jun 03, 2009 11:38 pm
Who is online

Users browsing this forum: No registered users and 15 guests