Exemple #1
0
 function createTable()
 {
     $allCats = Module_EComm::getIndexes("ecomm_category", "id", "name", 0);
     $parentDropDown = array("0" => "- Top Level -");
     foreach ($allCats as $key => $val) {
         $parentDropDown[$key] = $val;
     }
     $cols = array('id?', DBColumn::make('!text', 'name', 'Name'), DBColumn::make('!select', 'parent_category', 'Parent Category', $parentDropDown), DBColumn::make('//integer', 'image', 'Image'), DBColumn::make('timestamp', 'date_added', 'Date Added'), DBColumn::make('//text', 'last_modified', 'Last Modified'), DBColumn::make('select', 'status', 'Status', array('1' => 'Active', '0' => 'Inactive')), DBColumn::make('tinymce', 'details', 'Details'));
     return new DBTable("ecomm_category", __CLASS__, $cols);
 }
Exemple #2
0
 function createTable()
 {
     $cols = array('id?', DBColumn::make('!text', 'name', 'Title'), DBColumn::make('!select', 'supplier', 'Supplier', Module_EComm::getIndexes("ecomm_supplier", "id", "name", 0)), DBColumn::make('!select', 'category', 'Category', Module_EComm::getIndexes("ecomm_category", "id", "name", 0)), DBColumn::make('!select', 'producttype', 'Product Type', Module_EComm::getIndexes("ecomm_product_type", "id", "name", 0)), DBColumn::make('!select', 'tax_class', 'Tax Class', Module_EComm::getIndexes("ecomm_tax_class", "id", "name", 0)), DBColumn::make('!integer', 'stock_quantity', 'Stock Quantity'), DBColumn::make('//integer', 'image', 'Image'), DBColumn::make('!float', 'price', 'Price (' . SiteConfig::get("EComm::CurrencySign") . ")"), DBColumn::make('timestamp', 'date_added', 'Date Added'), DBColumn::make('//text', 'last_modified', 'Last Modified'), DBColumn::make('select', 'status', 'Status', array('1' => 'Active', '0' => 'Inactive')), DBColumn::make('tinymce', 'details', 'Details'));
     return new DBTable("ecomm_product", __CLASS__, $cols);
 }