That is correct.
There is no place in the standard OpenCart that uses the values because Category Description does not exist in standard OpenCart.
You can see the values added from the admin, in the category_description table but if you want to use them, you will have to write your own code to get the data from the database and display it in the front end.
There is no place in the standard OpenCart that uses the values because Category Description does not exist in standard OpenCart.
You can see the values added from the admin, in the category_description table but if you want to use them, you will have to write your own code to get the data from the database and display it in the front end.
It would certainly be useful to have this, otherwise there is little value in only having the additional functionality in the back end. Has anyone implemented it in the front end and willing to share the mods? Must confess I'm struggling on this!
Chris @ SiteE@se Web Design
I have already solve this problem..
.
---------------------
#1 GOLDEN RULES: Backup your files first!!!!
On the catalog ->controller->category.php
Look for this code:
$category_info = $database->getRow("select distinct name from category c left join category_description cd on (c.category_id = cd.category_id) where c.category_id = '" . (int)((!$request->get('path')) ? '0' : (int)end(explode('_', $request->get('path')))) . "' and cd.language_id = '" . (int)$language->getId() . "'");
below that Add this code:
$category_info = $database->getRow("select distinct name, description from category c left join category_description cd on (c.category_id = cd.category_id) where c.category_id = '" . (int)((!$request->get('path')) ? '0' : (int)end(explode('_', $request->get('path')))) . "' and cd.language_id = '" . (int)$language->getId() . "'");
Look for this code:
$view->set('products', $product_data);
$view->set('heading_title', $category_info['name']);
below that Add this code:
$view->set('entry_description', $category_info['description']);
Look for this code:
$view->set('heading_title', $category_info['name']);
below that Add this code:
$view->set('entry_description', $category_info['description']);
and
Look for this code:
$view->set('heading_title', $language->get('text_error'));
below that Add this code:
$view->set('entry_description', $language->get('text_error'));
On the template->default->content->category.tpl
Add this code:
-----------------
put something on the description on the admin side and then check your frontend.
Thats IT!!!!

---------------------
#1 GOLDEN RULES: Backup your files first!!!!
On the catalog ->controller->category.php
Look for this code:
$category_info = $database->getRow("select distinct name from category c left join category_description cd on (c.category_id = cd.category_id) where c.category_id = '" . (int)((!$request->get('path')) ? '0' : (int)end(explode('_', $request->get('path')))) . "' and cd.language_id = '" . (int)$language->getId() . "'");
below that Add this code:
$category_info = $database->getRow("select distinct name, description from category c left join category_description cd on (c.category_id = cd.category_id) where c.category_id = '" . (int)((!$request->get('path')) ? '0' : (int)end(explode('_', $request->get('path')))) . "' and cd.language_id = '" . (int)$language->getId() . "'");
Look for this code:
$view->set('products', $product_data);
$view->set('heading_title', $category_info['name']);
below that Add this code:
$view->set('entry_description', $category_info['description']);
Look for this code:
$view->set('heading_title', $category_info['name']);
below that Add this code:
$view->set('entry_description', $category_info['description']);
and
Look for this code:
$view->set('heading_title', $language->get('text_error'));
below that Add this code:
$view->set('entry_description', $language->get('text_error'));
On the template->default->content->category.tpl
Add this code:
-----------------
put something on the description on the admin side and then check your frontend.
Thats IT!!!!
Last edited by osglass on Tue Apr 08, 2008 8:36 pm, edited 1 time in total.
Hallo osglass!!
i've tried your code and it works... great!!!!
but... if i'd like to insert an image (not the thumb, just an image)? .... for example the logo of a manufacturer... ?
i think i should add something like "left join image ecc" to "$category_info" ....
and then?
i'll try to give a look but i think i'll have no big results...
if you can help me with the solution....
i've tried your code and it works... great!!!!
but... if i'd like to insert an image (not the thumb, just an image)? .... for example the logo of a manufacturer... ?
i think i should add something like "left join image ecc" to "$category_info" ....
and then?

i'll try to give a look but i think i'll have no big results...
if you can help me with the solution....

Heres a quick solution to your problem.trippy wrote: Hallo osglass!!
i've tried your code and it works... great!!!!
but... if i'd like to insert an image (not the thumb, just an image)? .... for example the logo of a manufacturer... ?
i think i should add something like "left join image ecc" to "$category_info" ....
and then?
i'll try to give a look but i think i'll have no big results...
if you can help me with the solution....
IF you want to add an image. Register to photobucket.com
Yeah i always host my images externally.
Photobucket procedures:
After your done signing up-> upload the image-> get the link.
Opencart procedures:
open a browser-> login to admin-> go to Category Description-> then look for 'insert image' click that and type the url of your image in photobucket.com
Heres a screenshot:
http://i25.tinypic.com/28qqgs4.png[/img]
http://i31.tinypic.com/ilao38.png[/img]
Thats it.
Thanks for kindly sharing this, osglass. 
That's what I love about this community ..... you post a problem/query, take your wife away for a couple of days and return to find that it has been well answered! I can see where I was going wrong with my own attempts.
Perhaps category descriptions will be a standard feature of v8?

That's what I love about this community ..... you post a problem/query, take your wife away for a couple of days and return to find that it has been well answered! I can see where I was going wrong with my own attempts.
Perhaps category descriptions will be a standard feature of v8?
Chris @ SiteE@se Web Design
This is all excellent, just what I need... but I'm also trying to get the category description to appear on the template/module/category.tpl
On the site I'm building the category names appear on every page and I'd like the description to show there as well - I'm sure it's very easy but I can't quite figure it out! Any ideas?
On the site I'm building the category names appear on every page and I'd like the description to show there as well - I'm sure it's very easy but I can't quite figure it out! Any ideas?
Who is online
Users browsing this forum: No registered users and 2 guests