Contributions
Categories Accordion Box
This addon provides a Categories box styled with the jQuery UI Accordion controls. Top-level categories are Section headers and subcategories are links inside the Content panels. The box works the same way the stock osCommerce box does, the difference is only in styling.
Addon support thread: http://forums.oscommerce.com/topic/371134-addon-categories-accordion-box-for-231/
Expand All / Collapse All
Fixed a bug that affected Internet Explorer 7 and 8. I recommend that everyone using this module should replace the module file with the one in this directory.
This is the full package.
Fixed a typo in the module file. Replace only the module file if you are updating.
This is a full package.
This release fixes a few annoying bugs:
-- If you click on a top-level category when you are already looking at a subcategory of that category, the box now opens the category you clicked on.
-- Cache now works correctly and does not interfere with the old categories box cache.
-- The box now works properly on shared SSL pages.
This is a full release.
Categories Accordion box styled cache fixed
Full package for 2.3
Modification and updated and bug fix for:
http://addons.oscommerce.com/info/7847/v,23
Take Back Up!!! before installation
Whoops, Sorry!! I forgot to add the ability to reset the cache block too!!! (Within admin/tools/cache control)
First off, please make sure your cache works properly, IE* folder permissions are set correctly
and the path is set under configuration > cache:
It should like like this and be chmod to 755 etc:
/path-to-your-includes-work-directory-etc/includes/work
I have simply modified the includes/modules/boxes/bm_categories_accordion.php and includes/functions/cache.php.
The problem was if cache was enabled it would have a display issue and display the older categories menu due to missing code.
NEW INSTALL? = Follow instructions to install in the PDF document attached and then modify your cache related files as below:
ALREADY INSTALLED THE PREVIOUS CONTRIBUTION? = To upgrade and enable cached support, simply upload the
new includes/modules/boxes/bm_categories_accordion.php overwriting your previous one and then modify your cache files as below:
STEP 1: OPEN INCLUDES/FUNCTIONS/CACHE.PHP AND FIND:
////
//! Cache the categories box
// Cache the categories box
function tep_cache_categories_box($auto_expire = false, $refresh = false) {
global $cPath, $language;
$cache_output = '';
if (($refresh == true) || !read_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath, $auto_expire)) {
if (!class_exists('bm_categories')) {
include(DIR_WS_MODULES . 'boxes/bm_categories.php');
}
$bm_categories = new bm_categories();
$cache_output = $bm_categories->getData();
write_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath);
}
return $cache_output;
}
////
ADD AFTER:
//! Cache the categories accordion box
// Cache the categories accordion box
function tep_cache_categories_box2($auto_expire = false, $refresh = false) {
global $cPath, $language;
$cache_output = '';
if (($refresh == true) || !read_cache($cache_output, 'categories_box2-' . $language . '.cache' . $cPath, $auto_expire)) {
if (!class_exists('bm_categories_accordion')) {
include(DIR_WS_MODULES . 'boxes/bm_categories_accordion.php');
}
$bm_categories_accordion = new bm_categories_accordion();
$cache_output = $bm_categories_accordion->getData();
write_cache($cache_output, 'categories_box2-' . $language . '.cache' . $cPath);
}
return $cache_output;
}
STEP 2. Open admin/languages/english.php and Find:
define('TEXT_CACHE_CATEGORIES', 'Categories Box');
Add Below:
define('TEXT_CACHE_CATEGORIES_ACCORDION', 'Categories Accordion Box');
STEP 3. Open admin/includes/application_top.php and FIND:
$cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true),
ADD BELOW:
array('title' => TEXT_CACHE_CATEGORIES_ACCORDION, 'code' => 'categories_accordion', 'file' => 'categories_box2-language.cache', 'multiple' => true),
Full fixed Package Included.
I have simply modified the includes/modules/boxes/bm_categories_accordion.php and includes/functions/cache.php.
The problem was if cache was enabled it would have a display issue and display the older categories menu due to missing code.
This addon provides a Categories box styled with the jQuery UI Accordion controls. Top-level categories are Section headers and subcategories are links inside the Content panels. The box works the same way the stock osCommerce box does, the difference is only in styling.
Addon support thread: http://forums.oscommerce.com/topic/371134-addon-categories-accordion-box-for-231/
Note: Contributions are used at own risk.