'tax', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'TaxesEventHandler','file'=>'taxes_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'TaxesTagProcessor','file'=>'taxes_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'hooks' => Array(), 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', 4 => 'mode', ), /*'Hooks' => Array( Array( 'Mode' => hBEFORE, 'Conditional' => true, 'HookToPrefix' => 'tax', 'HookToSpecial' => '', 'HookToEvent' => Array( 'onEdit' ), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'OnLoadZoneForm', ), ),*/ 'IDField' => 'TaxZoneId', 'TitleField' => 'Name', 'TitlePresets' => Array( 'default' => Array( 'new_status_labels' => Array('tax'=>'!la_title_AddingTaxZone!'), 'edit_status_labels' => Array('tax'=>'!la_title_EditingTaxZone!'), 'new_titlefield' => Array('tax'=>'!la_title_NewTaxZone!'), ), 'taxes_list'=>Array( 'prefixes' => Array('tax_List'), 'format' => "!la_title_Taxes!", ), 'taxes_edit'=>Array( 'prefixes' => Array('tax'), 'new_titlefield' => Array('tax'=>'!la_title_NewTax!'), 'format' => "#tax_status# '#tax_titlefield#' - !la_title_General!", ), ), 'PermSection' => Array('main' =>'in-commerce:taxes'), 'Sections' => Array( 'in-commerce:taxes' => Array( 'parent' => 'in-commerce:setting_folder', 'icon' => 'taxes', 'label' => 'la_tab_Taxes', 'url' => Array('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 6, 'type' => stTREE, ), ), 'TableName' => TABLE_PREFIX.'TaxZones', 'AutoDelete' => true, 'AutoClone' => true, 'SubItems' => Array('taxdst'), 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s FROM %s'), // key - special, value - list select sql 'ListSortings' => Array( '' => Array( 'Sorting' => Array('Name' => 'asc', 'TaxValue' => 'asc'), ) ), 'Fields' => Array( 'TaxZoneId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), 'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in')), 'Type' => Array('type'=>'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'not_null' => true, 'default' => 1), 'TaxValue' => Array('type'=>'double', 'not_null' => true, 'default' => 0), 'ApplyToShipping' => Array('type' => 'int', 'not_null' => true, 'default' => 0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')), 'ApplyToProcessing' => Array('type' => 'int', 'not_null' => true, 'default' => 0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_tax.gif'), 'Fields' => Array( 'TaxZoneId' => Array('title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), 'Name' => Array( 'width'=>150, 'title'=>'la_col_ZoneName', 'filter_block' => 'grid_like_filter'), 'Type' => Array( 'width'=>100, 'title'=>'la_col_ZoneType', 'filter_block' => 'grid_options_filter'), 'TaxValue' => Array( 'width'=>100, 'title'=>'la_col_TaxValue', 'filter_block' => 'grid_float_range_filter'), 'ApplyToShipping' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToShipping', 'filter_block' => 'grid_options_filter'), 'ApplyToProcessing' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter'), ), ), ), ); ?>