php - Opencart: admin category list display by user_id -


i have 3 users opencart admin, follows:

  • user_id=1
  • user_id=2
  • user_id=3

what question is, if user_id=1 user add categories admin category list (eg: computer, cellphone, tab, etc.) when user_id=2 or other users login time no need display... mean each users added categories lists, show when logged user account... dont allow show other users...

sql

public function getcategories($parent_id = 0) {     $category_data = $this->cache->get('category.' . (int)$this->config->get('config_language_id') . '.' . (int)$parent_id);      if (!$category_data) {         $category_data = array();          $query = $this->db->query("select * " . db_prefix . "category c left join " . db_prefix . "category_description cd on (c.category_id = cd.category_id) c.parent_id = '" . (int)$parent_id . "' , cd.language_id = '" . (int)$this->config->get('config_language_id') . "' order c.sort_order, cd.name asc");          foreach ($query->rows $result) {             $category_data[] = array(                 'category_id' => $result['category_id'],                 'name'        => $this->getpath($result['category_id'], $this->config->get('config_language_id')),                 'status'      => $result['status'],                 'sort_order'  => $result['sort_order']             );              $category_data = array_merge($category_data, $this->getcategories($result['category_id']));         }             $this->cache->set('category.' . (int)$this->config->get('config_language_id') . '.' . (int)$parent_id, $category_data);     }      return $category_data; } 

any idea.?? thanks...


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -