Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Questions about Enhanced Categories Box


dsaltmer

Recommended Posts

Hi.

 

I've just installed this add on, and as it said in its description, it's a very easy install. However I have a couple of questions about it. In the install.txt the instructions say edit the file catalog/includes/general.php. This file doesn't exist in my install - there is however a general.php in catalog/includes/functions - is this the file I should edit, and if not should I create a general.php in catalog/includes? When I did install by editing the functions/general.php, the resulting categories box is very untidy, with every category and sub-category listed, the list not keeping inside the box. Thanks in advance.

Link to comment
Share on other sites

Just having a quick look at the code I found

 

$output = '<script type="text/javascript" language="javascript" src="' . DIR_WS_INCLUDES .'enhcat_hoverIntent.js"></script>';

$output .= '<script type="text/javascript" language="javascript" src="' . DIR_WS_INCLUDES .'enhcat_jquery_dropdown.js"></script>';

 

but these files are not included. maybe thats what the problems are.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

I found a script online called hoverintent.js but couldn't find the other - jquery_dropdown.js. Tried installing it having renamed it to enhcat_hoverintent.js (in admin/includes, admin/includes/javascript and catalog/includes) and it made no difference to the look of it. Seems this add on won't work at the moment.

Link to comment
Share on other sites

Well, since this does not work I thought I should try to make my own enhanced category. I took a copy of the catalog/includes/modules/boxes/bm_categorories.php file and converted that to bm_enhanced_Categories.php file. Something to build on. This is how it looks like:

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

class bm_enhanced_categories {

var $code = 'bm_enhanced_categories';

var $group = 'boxes';

var $title;

var $description;

var $sort_order;

var $enabled = false;

 

function bm_enhanced_categories() {

$this->title = MODULE_BOXES_ENHANCED_CATEGORIES_TITLE;

$this->description = MODULE_BOXES_ENHANCED_CATEGORIES_DESCRIPTION;

 

if ( defined('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS') ) {

$this->sort_order = MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER;

$this->enabled = (MODULE_BOXES_ENHANCED_CATEGORIES_STATUS == 'True');

 

$this->group = ((MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');

}

}

 

function execute() {

global $category_info_array, $cPath, $cPath_array, $current_category_id, $PHP_SELF, $oscTemplate;

 

if (!isset($category_info_array) || !is_array($category_info_array)) $category_info_array = tep_build_category_info_array();

$cat_pdown = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));

$count = '';

$categories_string = '<ul class="enhcat">';

if (tep_not_null($cPath)) {

$shown_path = $cPath_array;

$shown_path[] = 0;

} else {

$shown_path = array(0);

}

$previous_level = 0;

$first = true;

foreach ($category_info_array as $id => $cat) {

if (SHOW_COUNTS == 'true') {

$count = ' (' . $cat['prod_count'] . ')';

}

$cat_pdown[] = array('id' => $cat['path'], 'text' => $cat['indent'] . $cat['name'] . $count);

// if (in_array($cat['parent'], $shown_path)) {

if ($cat['level'] > $previous_level) {

$categories_string .= '<ul>';

} elseif (!$first && ($cat['level'] == $previous_level)) {

$categories_string .= '</li>';

} elseif ($cat['level'] < $previous_level) {

while ($previous_level > $cat['level']) {

$categories_string .= '</li></ul>';

$previous_level--;

}

}

$previous_level = $cat['level'];

$first = false;

$categories_string .= '<li><a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cat['path']) . '">';

if (isset($cPath_array) && in_array($id, $cPath_array)) {

$categories_string .= '<strong>';

}

if ($id == $current_category_id) {

$categories_string .= '<span class="errorText">';

}

$categories_string .= $cat['name']; // display category name

if ($id == $current_category_id) {

$categories_string .= '</span>';

}

if (isset($cPath_array) && in_array($id, $cPath_array)) {

$categories_string .= '</strong>';

}

$categories_string .= '</a>';

if ($cat['has_subcat']) {

$categories_string .= ' <img src="' . DIR_WS_IMAGES . 'pointer_blue.gif' . '" />';

}

$categories_string .= $count;

// }

}

while ($previous_level > -1) {

$categories_string .= '</li></ul>';

$previous_level--;

}

$numspecials = '';

if (SHOW_COUNTS == 'true') {

$hiddenlist = "";

/*if (!empty($hiddencats)) {

$hiddenlist = " and (not (p2c.categories_id in (" . implode(',', $hiddencats) . ")))";

}*/

$specials_query = tep_db_query('select count(distinct s.products_id) as total from ' . TABLE_SPECIALS . ' s join ' . TABLE_PRODUCTS . ' p, ' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c where p.products_status = 1 and s.products_id = p.products_id and s.status = 1 and p2c.products_id = p.products_id' . $hiddenlist);

$specials_count = tep_db_fetch_array($specials_query);

$numspecials = ' (' . $specials_count['total'] . ')';

}

if ( (basename($PHP_SELF) != FILENAME_SPECIALS)) {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . MODULE_BOXES_ENHANCED_CATEGORIES_SPECIALS . '</a></strong>' . $numspecials;

} else {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '"><span class="errorText">' . MODULE_BOXES_ENHANCED_CATEGORIES_SPECIALS . '</span></a></strong>' . $numspecials;

}

$categories_string .= "<br />\n";

if ( (basename($PHP_SELF) != FILENAME_PRODUCTS_NEW)) {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . MODULE_BOXES_ENHANCED_CATEGORIES_NEWEST . '</a></strong>';

} else {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '"><span class="errorText">' . MODULE_BOXES_ENHANCED_CATEGORIES_NEWEST . '</span></a></strong>';

}

$categories_string .= "<br />\n" . tep_draw_form('categories', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') . '<strong>' . MODULE_BOXES_ENHANCED_CATEGORIES_GOTO . '</strong><br>' . tep_draw_pull_down_menu('cPath', $cat_pdown, $cPath, 'onchange="this.form.submit();" style="width: 100%"') . tep_hide_session_id() . '</form>';

 

$output = '<script type="text/javascript" language="javascript" src="' . DIR_WS_INCLUDES .'enhcat_hoverIntent.js"></script>';

$output .= '<script type="text/javascript" language="javascript" src="' . DIR_WS_INCLUDES .'enhcat_jquery_dropdown.js"></script>';

$output .= '<div class="ui-widget infoBoxContainer">' .

' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_ENHANCED_CATEGORIES_BOX_TITLE . '</div>' .

' <div class="ui-widget-content infoBoxContents">' . $categories_string . '</div>' .

'</div>';

 

$oscTemplate->addBlock($output, $this->group);

}

 

function isEnabled() {

return $this->enabled;

}

 

function check() {

return defined('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS');

}

 

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Enhanced Categories Module', 'MODULE_BOXES_ENHANCED_CATEGORIES_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

}

 

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

 

function keys() {

return array('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS', 'MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT', 'MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER');

}

}

?>

 

I kept the language file as it is. Well it shows up when trying to install the module but after installation it dissapears again. I don't know why. Anyone that can see the fault in the file?

Link to comment
Share on other sites

Very sorry but that was the wrong file. This is how my catalog/includes/modules/boxes/bm_categories.php files looks like:

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

class bm_enhanced_categories {

var $code = 'bm_enhanced_categories';

var $group = 'boxes';

var $title;

var $description;

var $sort_order;

var $enabled = false;

 

function bm_enhanced_categories() {

$this->title = MODULE_BOXES_ENHANCED_CATEGORIES_TITLE;

$this->description = MODULE_BOXES_ENHANCED_CATEGORIES_DESCRIPTION;

 

if ( defined('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS') ) {

$this->sort_order = MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER;

$this->enabled = (MODULE_BOXES_ENHANCED_CATEGORIES_STATUS == 'True');

 

$this->group = ((MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');

}

}

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '"**>';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<strong>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</strong>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br />';

 

if ($tree[$counter]['next_id'] != false) {

$this->tep_show_category($tree[$counter]['next_id']);

}

}

 

function getData() {

global $categories_string, $tree, $languages_id, $cPath, $cPath_array;

 

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

if (tep_not_null($cPath)) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

 

$this->tep_show_category($first_element);

 

$data = '<div class="ui-widget infoBoxContainer">' .

' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_ENHANCED_CATEGORIES_BOX_TITLE . '</div>' .

' <div class="ui-widget-content infoBoxContents">' . $categories_string . '</div>' .

'</div>';

 

return $data;

}

 

function execute() {

global $SID, $oscTemplate;

 

if ((USE_CACHE == 'true') && empty($SID)) {

$output = tep_cache_categories_box();

} else {

$output = $this->getData();

}

 

$oscTemplate->addBlock($output, $this->group);

}

 

function isEnabled() {

return $this->enabled;

}

 

function check() {

return defined('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS');

}

 

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Categories Module', 'MODULE_BOXES_CATEGORIES_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_CATEGORIES_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_CATEGORIES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

}

 

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

 

function keys() {

return array('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS', 'MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT', 'MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER');

}

}

?>

Link to comment
Share on other sites

I've sorted it I think - there are two commented lines line 53:

 

// if (in_array($cat['parent'], $shown_path)) {

 

and line 85:

 

// }

 

I removed both these comments (the // part for the people that don't know) and the box is all neat now. Try that and see what you think of it - I like the red wording denoting what category you're in. Thanks to the original author for this.

Link to comment
Share on other sites

Still not sure about the javascript files though, I'm sure they'd make a difference to the way the box looks, but the hoverintent.js I placed in my includes directory either doesn't work or is in the wrong place. I did find a dropdown enhance script and renamed it and put that in my /catalog/includes/ directory as well, with no noticeable change I'm afraid. Any help from anyone on the java front?

Link to comment
Share on other sites

I don't know exactly how you want it. I have however managed to get rid of the -> at the end of a parent category and substituted that with a blue arrow at the front instead. I have also put a blue dot in front of the child categories. It starts to get nicer. However the old enhanced categories I have in my old 2.2 shop has a line between all main categories. I will see if I can manage that tomorrow.

 

Seems it's only us two interested in this dsaltmer. If you want I can send you the new bm_enhanced_categories.php file.

Link to comment
Share on other sites

If you want I can send you the new bm_enhanced_categories.php file.

 

That would be good, thank you Hakan - though all that needs sorting re the original enhanced categories now is the indentation - the main categories are quite far across the box, meaning that sub categories get pushed too far right, resulting in them doing some untidy wrapping to the next line and in a few cases on my list once again overlapping the box. The blue arrows are working and bullet points are present - solid circles for main categories and hollow circles for sub categories, after taking out those comment markers, and the whole thing is collapsed the way it should be. The javascript is unimportant I suppose, just bells and whistles! Sadly I have very little PHP knowledge so can't decipher where to edit the indentation, if that's even possible.

 

My name is Dave by the way!

Link to comment
Share on other sites

I get this at the top of my page

 

Warning: Invalid argument supplied for foreach() in /home/stoppubl/public_html/includes/modules/boxes/bm_enhanced_categories.php on line 48

 

 

 

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

class bm_enhanced_categories {

var $code = 'bm_enhanced_categories';

var $group = 'boxes';

var $title;

var $description;

var $sort_order;

var $enabled = false;

 

function bm_enhanced_categories() {

$this->title = MODULE_BOXES_ENHANCED_CATEGORIES_TITLE;

$this->description = MODULE_BOXES_ENHANCED_CATEGORIES_DESCRIPTION;

 

if ( defined('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS') ) {

$this->sort_order = MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER;

$this->enabled = (MODULE_BOXES_ENHANCED_CATEGORIES_STATUS == 'True');

 

$this->group = ((MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');

}

}

 

function execute() {

global $category_info_array, $cPath, $cPath_array, $current_category_id, $PHP_SELF, $oscTemplate;

 

if (!isset($category_info_array) || !is_array($category_info_array)) $category_info_array = tep_build_category_info_array;

$cat_pdown = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));

$count = '';

$categories_string = '<ul class="enhcat">';

if (tep_not_null($cPath)) {

$shown_path = $cPath_array;

$shown_path[] = 0;

} else {

$shown_path = array(0);

}

$previous_level = 0;

$first = true;

THIS LINE-> foreach ($category_info_array as $id => $cat) {

 

if (SHOW_COUNTS == 'true') {

$count = ' (' . $cat['prod_count'] . ')';

}

$cat_pdown[] = array('id' => $cat['path'], 'text' => $cat['indent'] . $cat['name'] . $count);

if (in_array($cat['parent'], $shown_path)) {

if ($cat['level'] > $previous_level) {

$categories_string .= '<ul>';

} elseif (!$first && ($cat['level'] == $previous_level)) {

$categories_string .= '</li>';

} elseif ($cat['level'] < $previous_level) {

while ($previous_level > $cat['level']) {

$categories_string .= '</li></ul>';

$previous_level--;

}

}

$previous_level = $cat['level'];

$first = false;

$categories_string .= '<li><a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cat['path']) . '">';

if (isset($cPath_array) && in_array($id, $cPath_array)) {

$categories_string .= '<strong>';

}

if ($id == $current_category_id) {

$categories_string .= '<span class="errorText">';

}

$categories_string .= $cat['name']; // display category name

if ($id == $current_category_id) {

$categories_string .= '</span>';

}

if (isset($cPath_array) && in_array($id, $cPath_array)) {

$categories_string .= '</strong>';

}

$categories_string .= '</a>';

if ($cat['has_subcat']) {

$categories_string .= ' <img src="' . DIR_WS_IMAGES . 'pointer_blue.gif' . '" />';

}

$categories_string .= $count;

}

}

while ($previous_level > -1) {

$categories_string .= '</li></ul>';

$previous_level--;

}

$numspecials = '';

if (SHOW_COUNTS == 'true') {

$hiddenlist = "";

/*if (!empty($hiddencats)) {

$hiddenlist = " and (not (p2c.categories_id in (" . implode(',', $hiddencats) . ")))";

}*/

$specials_query = tep_db_query('select count(distinct s.products_id) as total from ' . TABLE_SPECIALS . ' s join ' . TABLE_PRODUCTS . ' p, ' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c where p.products_status = 1 and s.products_id = p.products_id and s.status = 1 and p2c.products_id = p.products_id' . $hiddenlist);

$specials_count = tep_db_fetch_array($specials_query);

$numspecials = ' (' . $specials_count['total'] . ')';

}

if ( (basename($PHP_SELF) != FILENAME_SPECIALS)) {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . MODULE_BOXES_ENHANCED_CATEGORIES_SPECIALS . '</a></strong>' . $numspecials;

} else {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '"><span class="errorText">' . MODULE_BOXES_ENHANCED_CATEGORIES_SPECIALS . '</span></a></strong>' . $numspecials;

}

$categories_string .= "<br />\n";

if ( (basename($PHP_SELF) != FILENAME_PRODUCTS_NEW)) {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . MODULE_BOXES_ENHANCED_CATEGORIES_NEWEST . '</a></strong>';

} else {

$categories_string .= '<strong><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '"><span class="errorText">' . MODULE_BOXES_ENHANCED_CATEGORIES_NEWEST . '</span></a></strong>';

}

$categories_string .= "<br />\n" . tep_draw_form('categories', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') . '<strong>' . MODULE_BOXES_ENHANCED_CATEGORIES_GOTO . '</strong><br>' . tep_draw_pull_down_menu('cPath', $cat_pdown, $cPath, 'onchange="this.form.submit();" style="width: 100%"') . tep_hide_session_id() . '</form>';

 

$output = '<script type="text/javascript" language="javascript" src="' . DIR_WS_INCLUDES .'enhcat_hoverIntent.js"></script>';

$output .= '<script type="text/javascript" language="javascript" src="' . DIR_WS_INCLUDES .'enhcat_jquery_dropdown.js"></script>';

$output .= '<div class="ui-widget infoBoxContainer">' .

' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_ENHANCED_CATEGORIES_BOX_TITLE . '</div>' .

' <div class="ui-widget-content infoBoxContents">' . $categories_string . '</div>' .

'</div>';

 

$oscTemplate->addBlock($output, $this->group);

}

 

function isEnabled() {

return $this->enabled;

}

 

function check() {

return defined('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS');

}

 

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Enhanced Categories Module', 'MODULE_BOXES_ENHANCED_CATEGORIES_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

}

 

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

 

function keys() {

return array('MODULE_BOXES_ENHANCED_CATEGORIES_STATUS', 'MODULE_BOXES_ENHANCED_CATEGORIES_CONTENT_PLACEMENT', 'MODULE_BOXES_ENHANCED_CATEGORIES_SORT_ORDER');

}

}

?>

 

 

Now I obviously moved the line and question and that is not on the actual file. Any help would be greatly appreciated

Link to comment
Share on other sites

The menu comes up fine on my page, although the categories aren't listed. Just when the page loads that warning appears on the top of my web page.

www.1stoppublicsafety.com. I'd rather not have it there if possible.

Link to comment
Share on other sites

I tried your copy of enhanced_categories.php on my site with exactly the same result as you - which is very strange, considering it doesn't look any different. Have you installed another categories mod before - such as category CSS Menu? (which I confess I did after this one) Maybe try redownloading the original enhanced_categories.php from the contributions page and remember to take the comments off and try again!

Link to comment
Share on other sites

When I replace with the original file. My site does not load. I get this message

Fatal error: Call to undefined function tep_build_category_info_array() in /home/stoppubl/public_html/includes/modules/boxes/bm_enhanced_categories.php on line 36

Link to comment
Share on other sites

When I replace with the original file. My site does not load. I get this message

Fatal error: Call to undefined function tep_build_category_info_array() in /home/stoppubl/public_html/includes/modules/boxes/bm_enhanced_categories.php on line 36

 

You forget to read install.txt

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Nope read it and put it into the includes/gerneral file just like it says to.(although mine says its javascript and not php)

 

If I take parenthesis out of that line 36 my page will come up, but with the error from before about line 48

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...