Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Edit Categories, Where


Recommended Posts

Posted

Hello

 

Please help

 

includes/modules/boxes/templates/categories.php

<div class="panel-heading"><?php echo MODULE_BOXES_CATEGORIES_BOX_TITLE; ?></div>
<div class="list-group"><?php echo $category_tree; ?></div>

includes/modules/boxes/bm_categories.php

 function execute() {
      global $oscTemplate, $cPath;

      $OSCOM_CategoryTree = new category_tree();
      $OSCOM_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>');
      $OSCOM_CategoryTree->setSpacerString('  ', 1);

      $OSCOM_CategoryTree->setParentGroupString('<ul class="nav nav-pills nav-stacked">', '</ul>', true);
      
      $category_tree = $OSCOM_CategoryTree->getTree();
      
      ob_start();
      include(DIR_WS_MODULES . 'boxes/templates/categories.php');
      $data = ob_get_clean();

      $oscTemplate->addBlock($data, $this->group);
    }

    function isEnabled() {
      return $this->enabled;
    }

    function check() {
      return defined('MODULE_BOXES_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_CATEGORIES_STATUS', 'MODULE_BOXES_CATEGORIES_CONTENT_PLACEMENT', 'MODULE_BOXES_CATEGORIES_SORT_ORDER');
    }

But I want to edit or modify the code here, where the text red?

<ul class="nav nav-pills nav-stacked">
<li><a href="http://localhost/multitec/index.php?cPath=1">Hardware</a></li>
<li><a href="http://localhost/multitec/index.php?cPath=2">Software</a></li>
<li><a href="http://localhost/multitec/index.php?cPath=3">DVD Movies</a></li>
<li><a href="http://localhost/multitec/index.php?cPath=21">Gadgets</a></li>
</ul>

Please help

Posted

@@kh1noo If you just want to change the name of the categories, go to the admin area.

 

catalog > categories/products > click on the category you want to change > edit

 

Dan

Posted

@@kh1noo what are you trying to do ? Please try to explain the best you can.

 

 
 
includes/modules/boxes/bm_categories.php

$OSCOM_CategoryTree->setParentGroupString('<ul class="nav nav-pills nav-stacked">', '</ul>', true);

 

foul see the code here element "<ul><li>

 

<li><a href="http://localhost/multitec/index.php?cPath=1">Hardware</a></li>

<li><a href="http://localhost/multitec/index.php?cPath=2">Software</a></li>

<li><a href="http://localhost/multitec/index.php?cPath=3">DVD Movies</a></li>

<li><a href="http://localhost/multitec/index.php?cPath=21">Gadgets</a></li>

 

I want to delete the code element <ul><li></li></ul> defines a list item.

 

Where modif tag <li>y??

Posted

Why would you want to do that ? You are changing core code that should not be changed.

If you need to do something different in your category structure, then you should create a new categories box for your site.
 

Posted

Why would you want to do that ? You are changing core code that should not be changed.

 

If you need to do something different in your category structure, then you should create a new categories box for your site.

 

 

@@burt

 

Ok i understand , I ask that as slider with admin??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...