Index: branches/5.2.x/units/taxes/taxes_config.php =================================================================== diff -u -N -r14717 -r16385 --- branches/5.2.x/units/taxes/taxes_config.php (.../taxes_config.php) (revision 14717) +++ branches/5.2.x/units/taxes/taxes_config.php (.../taxes_config.php) (revision 16385) @@ -1,6 +1,6 @@ '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 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => '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'), - /*'Hooks' => Array ( - Array ( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'tax', - 'HookToSpecial' => '', - 'HookToEvent' => Array ( 'onEdit' ), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnLoadZoneForm', - ), - ),*/ - 'IDField' => 'TaxZoneId', - 'TitleField' => 'Name', + 'AutoLoad' => true, - 'TitlePresets' => Array ( - 'default' => Array ( - 'new_status_labels' => Array ('tax' => '!la_title_AddingTaxZone!'), - 'edit_status_labels' => Array ('tax' => '!la_title_EditingTaxZone!'), - ), - '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!", - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'PermSection' => Array ('main' => 'in-commerce:taxes'), + 'IDField' => 'TaxZoneId', + 'TitleField' => 'Name', - 'Sections' => Array ( - 'in-commerce:taxes' => Array ( - 'parent' => 'in-commerce:setting_folder', - 'icon' => 'conf_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, - ), - ), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('tax' => '!la_title_AddingTaxZone!'), + 'edit_status_labels' => Array ('tax' => '!la_title_EditingTaxZone!'), + ), + '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!", + ), + ), - 'TableName' => TABLE_PREFIX.'TaxZones', - 'AutoDelete' => true, - 'AutoClone' => true, + 'PermSection' => Array ('main' => 'in-commerce:taxes'), - 'SubItems' => Array ('taxdst'), + 'Sections' => Array ( + 'in-commerce:taxes' => Array ( + 'parent' => 'in-commerce:setting_folder', + 'icon' => 'conf_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, + ), + ), - 'ListSQLs' => Array ( '' => 'SELECT %1$s.* %2$s FROM %s'), - // key - special, value - list select sql + 'TableName' => TABLE_PREFIX.'TaxZones', + 'AutoDelete' => true, + 'AutoClone' => true, + 'SubItems' => Array ('taxdst'), - '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' => 1, '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' => 1, 'default' => 1), - 'TaxValue' => Array ('type' => 'double', 'not_null' => 1, 'default' => 0), - 'ApplyToShipping' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - 'ApplyToProcessing' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, - 'default' => 0, 'not_null' => 1, - ), - ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %s' + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - 'module' => 'core', - ), - 'Fields' => Array ( - 'TaxZoneId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'Name' => Array ( 'title' => 'column:la_fld_TaxZoneName', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'TaxValue' => Array ( 'title' => 'column:la_fld_TaxValue', 'filter_block' => 'grid_range_filter', 'width' => 110, ), - 'Type' => Array ( 'title' => 'column:la_fld_ZoneType', 'filter_block' => 'grid_options_filter', 'width' => 90, ), - 'ApplyToShipping' => Array ( 'title' => 'column:la_fld_TaxApplyToShipping', 'filter_block' => 'grid_options_filter', 'width' => 140, ), - 'ApplyToProcessing' => Array ( 'title' => 'column:la_fld_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter', 'width' => 150, ), - ), - ), - ), - ); \ No newline at end of file + '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' => 1, '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' => 1, 'default' => 1), + 'TaxValue' => Array ('type' => 'double', 'not_null' => 1, 'default' => 0), + 'ApplyToShipping' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'ApplyToProcessing' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + 'module' => 'core', + ), + 'Fields' => Array ( + 'TaxZoneId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ( 'title' => 'column:la_fld_TaxZoneName', 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'TaxValue' => Array ( 'title' => 'column:la_fld_TaxValue', 'filter_block' => 'grid_range_filter', 'width' => 110, ), + 'Type' => Array ( 'title' => 'column:la_fld_ZoneType', 'filter_block' => 'grid_options_filter', 'width' => 90, ), + 'ApplyToShipping' => Array ( 'title' => 'column:la_fld_TaxApplyToShipping', 'filter_block' => 'grid_options_filter', 'width' => 140, ), + 'ApplyToProcessing' => Array ( 'title' => 'column:la_fld_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter', 'width' => 150, ), + ), + ), + ), +); \ No newline at end of file