Пример #1
0
 /**
  * Function generates the list of products available for the selected category id
  * 
  * 
  *
  * @return array
  */
 function showProducts()
 {
     include "classes/Display/DCategorySelection.php";
     $sql = "SELECT \tproduct_id,category_id,title FROM products_table where category_id=" . $_GET['id'];
     $query = new Bin_Query();
     if ($query->executeQuery($sql)) {
         $this->data['showproduct'] = Display_DCategorySelection::productList($query->records);
     } else {
         echo $this->data['showproduct'] = "No products Found";
     }
     $this->makeConstant($this->data, $prefix = '');
 }
Пример #2
0
 /**
  * Function gets the all the sub categories from the database 
  * 
  * 
  * @return array
  */
 function displaySubCategory()
 {
     include "classes/Display/DCategorySelection.php";
     $sql = "SELECT category_id,category_name FROM category_table where category_parent_id=" . $_GET['id'];
     $query = new Bin_Query();
     if ($query->executeQuery($sql)) {
         echo $this->data['showsubcat'] = Display_DCategorySelection::listSubCategory($query->records);
     } else {
         echo $this->data['showsubcat'] = "No Subcategories Found";
     }
     $this->makeConstant($this->data);
 }