Page 1 of 1

v1.4 have i gone crazy? manufacturer description

Posted: Sun Feb 07, 2010 8:52 pm
by imadam
was this once in a previous version and now removed in v1.4? i have description for one of my manufactueres and i have no gone to add description to the others and can't find how, and then thought i'd edit the one already with a description and can't find that either.

am i going crazy and can't see it or has it gone?

Re: v1.4 have i gone crazy? manufacturer description

Posted: Mon Feb 08, 2010 2:32 pm
by Miguelito
I've done a clean install of v1.4.0 and there is NOT a description field in manufacturers... this is a add-on/module.

Re: v1.4 have i gone crazy? manufacturer description

Posted: Mon Feb 08, 2010 11:24 pm
by migz
I want to know also how to add manufacturer's description.

Re: v1.4 have i gone crazy? manufacturer description

Posted: Mon Feb 08, 2010 11:40 pm
by Miguelito
There's category description mod available but I didn't find manufacturer description mod, sorry. There's some discussions in this thread http://forum.opencart.com/viewtopic.php ... ion#p26211

Re: v1.4 have i gone crazy? manufacturer description

Posted: Tue Feb 09, 2010 12:59 am
by Hollow
Here is a solution how i done it.
1. Adding sql table

Code: Select all

ALTER TABLE `manufacturer` ADD `description` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL 
2. edit catalog/controller/product/manufacturer.php
after line 36:

Code: Select all

			$this->data['heading_title'] = $manufacturer_info['name'];
add something like this:

Code: Select all

			$this->data['m_description'] = $manufacturer_info['description'];
3. edit TPL to show discription. Go to catalog/view/theme/(your theme)/template/product/manufacturer.tpl
after line 10:

Code: Select all

  <div class="middle">
add this:

Code: Select all

	<div class="div1">
		<?php echo $m_description; ?>
	</div>
And thats it. It will show above a sort order (if there is something in discription )

Oh. And we have to add option to dashboard as well.
(and is a little more troblesome)
4. go to admin/model/catalog/manufacturer.php
after line 8-10:

Code: Select all

		if (isset($data['image'])) {
			$this->db->query("UPDATE " . DB_PREFIX . "manufacturer SET image = '" . $this->db->escape($data['image']) . "' WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
		}
add this code :

Code: Select all

		if (isset($data['discription'])) {
			$this->db->query("UPDATE " . DB_PREFIX . "manufacturer SET discription = '" . $this->db->escape($data['discription']) . "' WHERE manufacturer_id = '" . (int)$manufacturer_id . "'");
		}
and that same code after line 24-26.(look the same way like above one)

5. edit admin/controller/catalog/manufacturer.php
after line 345, add this one

Code: Select all

		if (isset($this->request->post['description'])) {
			$this->data['description'] = $this->request->post['description'];
		} elseif (isset($manufacturer_info)) {
			$this->data['description'] = $manufacturer_info['description'];
		} else {
			$this->data['description'] = '';
		}
and in line 275:

Code: Select all

		$this->data['entry_discription'] = $this->language->get('entry_discription');
6.edit admin/view/template/catalog/manufacturer_form.tpl
after line 30, press enter and add this one:

Code: Select all

		<tr>
		<td><?php echo $entry_discription; ?></td>
		<td><textarea name="description" id="description"><?php echo $description; ?></textarea></td>
		</tr>
and under close box div (line 42) add that code :

Code: Select all

<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
CKEDITOR.replace('description');
</script>
And now you got CKeditor on your discription text area.

7.in /admin/language/english/catalog/manufacturer.php add one line under line 18(19?):

Code: Select all

$_['entry_discription']	 = 'discription';
And thats it.
hope its help

Edit:
I Add admin-language solution, and some one code in controller/catalog/man... .php

Re: v1.4 have i gone crazy? manufacturer description

Posted: Tue Feb 09, 2010 1:08 am
by vojtech25
Mhm,

very nice, thank you very much..

I would like to ask, what should I do, when I want to add a short description to the products.. BUT I dont mean the product detail, but product list... latest products, categories, search , and so on... I guess, i have to add a table to sql, probably like this

Code: Select all

ALTER TABLE `product` ADD `perex` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL 
but I dont know what to change in admin, controller, and so on...

Does anybody know..? Thank you!!

Re: v1.4 have i gone crazy? manufacturer description

Posted: Tue Feb 09, 2010 1:27 am
by imadam
vojtech25 wrote:Mhm,

very nice, thank you very much..

I would like to ask, what should I do, when I want to add a short description to the products.. BUT I dont mean the product detail, but product list... latest products, categories, search , and so on... I guess, i have to add a table to sql, probably like this

Code: Select all

ALTER TABLE `product` ADD `perex` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL 
but I dont know what to change in admin, controller, and so on...

Does anybody know..? Thank you!!
how small description? atm i've been using meta description and it works fairly well for now.

Hollow wrote:Here is a solution how i done it.
And thats it (dont forget exit your language )
hope its help
not very good for other languages surely? i'm going to give the suggestion above yours a try as i think thats better for more languages as it's the same as how the category one is done

Re: v1.4 have i gone crazy? manufacturer description

Posted: Tue Feb 09, 2010 1:45 am
by vojtech25
how small description? atm i've been using meta description and it works fairly well for now.
no no... I mean how to add a short description to the product list... for example here http://www.vojtechzahorsky.com/Open after Cena (bez DPH)... i would like to put for example tree lines of description, a few parametrs...

Re: v1.4 have i gone crazy? manufacturer description

Posted: Wed Feb 17, 2010 5:26 am
by kvasnak
vojtech25 wrote:
how small description? atm i've been using meta description and it works fairly well for now.
no no... I mean how to add a short description to the product list... for example here http://www.vojtechzahorsky.com/Open after Cena (bez DPH)... i would like to put for example tree lines of description, a few parametrs...
Did you mean small description of product in product list, for example like this one - http://ishop.nay.sk/sk/catalog/products-list?node=372 ?
Short description of product's parameters in the list of products...More detailed description is then in product detail...
I have the same problem. Still searching for the solution, but unsuccessfully. This is a very common feature of most of eshops, for me it is strange that opencart doesn't provide. If anybody could help and share his experience or advice, please, help...
Thank you a lot.

Re: v1.4 have i gone crazy? manufacturer description

Posted: Wed Feb 17, 2010 11:39 am
by flightoffancy
Hollow wrote:Here is a solution how i done it.
Was this for 1.4 or 1.3.x?

I gave it a shot on 1.3.4 and ran into 2 snags.

When adding or editing the manufacturer in the admin I'm seeing this error.

Code: Select all

Notice: Undefined variable: entry_description in C:\xampp\htdocs\oc134\admin\view\template\catalog\manufacturer_form.tpl on line 34
On that same page if I go back in to edit the description the editor is blank...it's not retaining the text that is entered once you save. It does remain visible on the frontend though.

Re: v1.4 have i gone crazy? manufacturer description

Posted: Sun Aug 15, 2010 12:48 am
by Qoox
I`ve done all as you wrote, but the description don`t save in db.
What I do wrong?