Exemple #1
0
 /**
  * get product page category (fot tracking purposes)
  * which is basically the root page title
  */
 public function getCategory($node_id)
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $pages = $Node->getFullPathDetailForBreadcrumb($node_id);
     if (!is_array($pages)) {
         return false;
     }
     $result = array();
     foreach ($pages as $page) {
         if ($page['id'] != 1 && $page['id'] != $node_id) {
             $result[] = $page['title'];
         }
     }
     return implode(" / ", $result);
 }