Post by JNeuhoff » Fri Dec 12, 2008 11:14 pm

I have fixed some bugs to make sure that the Category Descriptions module works correctly with OpenCart 0.7.9RC5 and hopefully the upcoming 0.7.9Final.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by imstillatwork » Wed Dec 17, 2008 1:04 pm

I feel dumb... what changes need to be added to the front end template for this to be useful? I just installed my first opencart today... usually use drupal / ubercart or magento, but a have a simple needs client and openCart is so far. :)

Newbie

Posts

Joined
Wed Dec 17, 2008 8:36 am

Post by Qphoria » Wed Dec 17, 2008 1:17 pm

Yea I always wondered how that never seemed to make it into the readme. Perhaps the authors might be so kind to share that secret they've been holding lo' this many years

@imstillatwork: Welcome to OpenCart :) Be sure you download the latest 0.7.9 and not 0.7.8 as you will save yourself from suffering through over 100 bugs
Last edited by Qphoria on Wed Dec 17, 2008 1:19 pm, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by imstillatwork » Thu Dec 18, 2008 3:02 pm

Yep, and I'm making a list on .9 as well :)

Newbie

Posts

Joined
Wed Dec 17, 2008 8:36 am

Post by jty » Thu Dec 18, 2008 5:15 pm

imstillatwork wrote: Yep, and I'm making a list on .9 as well :)
You're gonna be at it for a few months. The list is long, very very long  :)

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by JNeuhoff » Thu Dec 18, 2008 8:02 pm

what changes need to be added to the front end template for this to be useful?
You would have to change the controller file /catalog/controller/category.php in function index() to retrieve the category description field and to set it in the view:

Code: Select all

....
		$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->gethtml('path')) ? '0' : (int)end(explode('_', $request->gethtml('path')))) . "' and cd.language_id = '" . (int)$language->getId() . "'");
		if ($category_info) {
			$template->set('description', $category_info['description']);
....
In the corresponding viewer template /catalog/template/my-template-set/content/category.tpl add the following line at the appropriate place:

Code: Select all

<?php echo $description; ?>

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by jty » Thu Dec 18, 2008 9:16 pm

imstillatwork wrote: I feel dumb... what changes need to be added to the front end template for this to be useful?
I used the Dummies Guide. I found it here
http://forum.opencart.com/index.php/topic,1095.0.html

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Tue Jan 06, 2009 2:57 pm

This has been added to the core for RC6. It just makes sense that there should be a categories description, just like the product description. It also needed to be updated to handle the removal of index.php in the url.

It comes complete with a description box "if" there is a description. If there is no description,then there is no description box. See attachment for example.

Attachments

???
catdesc.jpg

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 14 guests