/** * get label */ function getLabel($taxonomy_tree_id) { require_once 'models/common/common_taxonomy_tree.php'; $TTree = new common_taxonomy_tree(); $detail = $TTree->detailFull($taxonomy_tree_id); return $detail; }
/** * main action */ public function mainAction() { $Store = new ecommerce_store(); $Taxonomy_Tree = new common_taxonomy_tree(); $node_id = (int) $this->GET['node_id']; $store = $Store->findStoreByNode($node_id); $taxonomy = $Taxonomy_Tree->getRelatedTaxonomy($store['id'], "ecommerce_store_taxonomy"); if ($store) { /** * get store taxonomy print out */ $_Onxshop_Request = new Onxshop_Request("component/ecommerce/store_taxonomy~store_id={$store['id']}~"); $this->tpl->assign("STORE_TAXONOMY", $_Onxshop_Request->getContent()); /** * text depending if my selected store */ if ($_SESSION['client']['customer']['store_id'] == $store['id']) { $this->tpl->assign('MY_SELECTED_STORE', 'My selected store'); } else { $this->tpl->assign('MY_SELECTED_STORE', 'Save as my own store'); } /** * assign and parse */ $this->tpl->assign("STORE", $store); $this->tpl->parse("content.store"); } else { $this->tpl->parse("content.no_store"); } return true; }
/** * main action */ public function mainAction() { require_once 'models/common/common_taxonomy_tree.php'; $Node = new common_taxonomy_tree(); if (!is_numeric($this->GET['id'])) { msg('component/breadcrumb_taxonomy: id must be numeric', 'error', 1); return false; } $path = $Node->getFullPathDetailForBreadcrumb($this->GET['id']); foreach ($path as $item) { $this->tpl->assign('ITEM', $item); $this->tpl->parse('content.item'); } return true; }
/** * main action */ public function mainAction() { $Store = new ecommerce_store(); $Taxonomy_Tree = new common_taxonomy_tree(); $store_id = $this->GET['store_id']; if (!is_numeric($store_id)) { return false; } $taxonomy = $Taxonomy_Tree->getRelatedTaxonomy($store_id, "ecommerce_store_taxonomy"); if (count($taxonomy) > 0) { foreach ($taxonomy as $category) { if ($category['publish'] == 1 && $category['parent'] == ONXSHOP_STORE_FACILITY_TAXONOMY_ID) { $this->tpl->assign("CATEGORY", $category); $this->tpl->parse("content.category"); } } } return true; }