Jump to content

Search the Community

Showing results for tags 'frozen categories on index'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Developer Feedback
  • Club osC's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website

Found 1 result

  1. radhavallabh

    Category on Index

    Hi, I was trying to create the module for Categories on Index based on the Subcategory box module.. Being very new to creating the code for the new edge version modules please can someone help me recode the subcategory fetch to the category fetch on index page. I created below page but need to edit the subcategory code area to fetch main categories... <?php /* $Id$ generated by: https://oscompose.com (c)2018 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2018 osCommerce Released under the GNU General Public License */ class cm_catindex { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = MODULE_CONTENT_CATINDEX_TITLE; $this->description = MODULE_CONTENT_CATINDEX_DESCRIPTION; $this->description .= '<div class="secWarning">' . MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION . '</div>'; if ( defined('MODULE_CONTENT_CATINDEX_STATUS') ) { $this->sort_order = MODULE_CONTENT_CATINDEX_SORT_ORDER; $this->enabled = (MODULE_CONTENT_CATINDEX_STATUS == 'True'); } } function execute() { global $oscTemplate, $current_category_id, $OSCOM_category; $content_width = MODULE_CONTENT_CATINDEX_CONTENT_WIDTH; $category_width = MODULE_CONTENT_CATINDEX_CONTENT_WIDTH_EACH; $category_name = $OSCOM_category->getData($OSCOM_category, 'name'); $category_level = $OSCOM_category->setMaximumLevel(1); $category_array = $OSCOM_category->buildBranchArray($current_category_id, $category_level); ob_start(); include('includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__)); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_CONTENT_CATINDEX_STATUS'); } function install() { tep_db_query("insert into configuration(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable catindex Module', 'MODULE_CONTENT_CATINDEX_STATUS', 'True', 'Do you want to add catindex to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_CATINDEX_CONTENT_WIDTH', '6', 'What width container should the content be shown in?', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Category Width', 'MODULE_CONTENT_CATINDEX_CONTENT_WIDTH_EACH', '4', 'What width container should each Category be shown in?', '6', '3', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_CATINDEX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_CONTENT_CATINDEX_STATUS', 'MODULE_CONTENT_CATINDEX_CONTENT_WIDTH', 'MODULE_CONTENT_CATINDEX_SORT_ORDER'); } } ?> This area needs to be edited to fetch category I really request help on getting this done please... $category_name = $OSCOM_category->getData($OSCOM_category, 'name'); $category_level = $OSCOM_category->setMaximumLevel(1); $category_array = $OSCOM_category->buildBranchArray($current_category_id, $category_level);
×