Post by imadam » Sun Feb 07, 2010 8:52 pm

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?

my opencart carpet cleaning woking guildford and Office Cleaning Services in Guildford


Active Member

Posts

Joined
Sun Jan 10, 2010 10:47 pm
Location - Surrey

Post by Miguelito » Mon Feb 08, 2010 2:32 pm

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.

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by migz » Mon Feb 08, 2010 11:24 pm

I want to know also how to add manufacturer's description.

Active Member

Posts

Joined
Mon Feb 01, 2010 2:13 am

Post by Miguelito » Mon Feb 08, 2010 11:40 pm

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

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by Hollow » Tue Feb 09, 2010 12:59 am

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
Last edited by Hollow on Tue Feb 09, 2010 5:48 pm, edited 1 time in total.

I do not care about my bad English.


User avatar
New member

Posts

Joined
Mon Feb 08, 2010 10:34 pm
Location - P(r)oland

Post by vojtech25 » Tue Feb 09, 2010 1:08 am

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!!

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by imadam » Tue Feb 09, 2010 1:27 am

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

my opencart carpet cleaning woking guildford and Office Cleaning Services in Guildford


Active Member

Posts

Joined
Sun Jan 10, 2010 10:47 pm
Location - Surrey

Post by vojtech25 » Tue Feb 09, 2010 1:45 am

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...

______________________________________________________
http://www.vojtechzahorsky.com


New member

Posts

Joined
Tue Jan 19, 2010 7:18 pm

Post by kvasnak » Wed Feb 17, 2010 5:26 am

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.

Newbie

Posts

Joined
Wed Feb 17, 2010 4:40 am

Post by flightoffancy » Wed Feb 17, 2010 11:39 am

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.

New member

Posts

Joined
Fri Jan 22, 2010 9:34 pm

Post by Qoox » Sun Aug 15, 2010 12:48 am

I`ve done all as you wrote, but the description don`t save in db.
What I do wrong?

Newbie

Posts

Joined
Sun Aug 15, 2010 12:45 am
Who is online

Users browsing this forum: No registered users and 198 guests