Guest Posted January 29, 2004 Share Posted January 29, 2004 Download contribution: Browse by Categories Version: 2.4 osCommerce: 2.2-MS1/MS2 Kudos: Spaceboy (Didier Debbaut) - Feature Request: Display products count for each Sub Category. azer - Feature Request: Use Bullet Setting from Configuration Table. azer - Bug Request: Browse to parent category link from 3rd level categories to 2nd level category. Show blank table cell when category has no sub-categories. This new release fixes the bugs pin-pointed by "azer" and adds new features requested and coded by "azer" and "Spaceboy": The bullet prefix for sub-category links is now defined through the configuration table, using the setting BULLET_BROWSE_SUB_CATEGORIES. This setting, by default is "?", can be set to any alfanumeric prefix by the administrators. The sub-category links can now, optionally, display a products count for each sub-category. It's set through the configuration table using the setting DISPLAY_SUB_CATEGORIES_COUNT, which by default is set to 'true'. This sufix has the format specified by "Spaceboy": sub-category-text-link (product_count). Categories with empty sub-categories list (categories without any sub-category) don't disrupt the table layout inside the content box anymore. The fix now checks if either the list is empty and the setting DISPLAY_BROWSE_SUB_CATEGORIES is enabled. If so, then a blank table cell is shown. The parent category of deeper sub-categories (3rd level or more) is now set in the correct manner, does allowing the parent category link to be fully functional. Another bug, related to this one, has been fixed, which would cut of from the breadcrum trail the top level categories besides current category and parent category. Other minor bugs were fixed: the variable named $cPath was changed to $cPath_cur and the list of sub-category links is now properly reset outside the building loop. To update previous installations, download the new release, overwrite the old file browse_categories.php in the location /catalog/includes/modules with the new one and execute the following SQL statement: /* DWD Contribution: Browse by Categories v2.4. */ INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added ) VALUES ('Sub Category Links Bullet', 'BULLET_BROWSE_SUB_CATEGORIES', '?', 'Select Bullet character to prefix each Sub Category Link', '101', '6', null, now()), ('Display Sub Category Products Count', 'DISPLAY_SUB_CATEGORIES_COUNT', 'true', 'Display how many products does a Sub Category have?', '101', '7', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now()); /* DWD Contribution End. */ Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.