's', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'ShippingEventHandler','file'=>'shipping_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'ShippingTagProcessor','file'=>'shipping_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'AggregateTags' => Array( Array( 'AggregateTo' => 'ord', 'AggregatedTagName' => 'PrintShippingTypes', 'LocalTagName' => 'Order_PrintShippingTypes', ), ), 'Hooks' => Array( Array( 'Mode' => hBEFORE, 'Conditional' => true, 'HookToPrefix' => 'sc', 'HookToSpecial' => '', 'HookToEvent' => Array( 'OnPropagate', 'OnClearAll' ), 'DoPrefix' => '', 'DoSpecial' => '', 'DoEvent' => 'OnPreSave', ), ), 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', 4 => 'mode', ), 'IDField' => 'ShippingID', 'StatusField' => Array('Status'), 'TitleField' => 'Name', 'TitlePresets' => Array( 'default' => Array( 'new_status_labels' => Array('s'=>'!la_title_AddingShippingType!'), 'edit_status_labels' => Array('s'=>'!la_title_EditingShippingType!'), 'new_titlefield' => Array('s'=>'!la_title_NewShippingType!'), ), 'shipping_list'=>Array( 'prefixes' => Array('s_List'), 'format' => "!la_title_ShippingTypes! (#s_recordcount#)", ), 'shipping_type_edit'=>Array( 'prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_General!", ), 'zones' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Zones!"), 'brackets' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Brackets!"), 'costs' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Costs!"), 'select_modifier' => Array('prefixes' => Array('s'), 'format' => "!la_title_ApplyModifier!"), ), 'PermSection' => Array('main' => 'in-commerce:shipping'), 'Sections' => Array( 'in-commerce:shipping_folder' => Array( 'parent' => 'in-commerce', 'icon' => 'shipping', 'label' => 'la_tab_Shipping', 'permissions' => Array(), 'priority' => 5, 'type' => stTREE, ), 'in-commerce:shipping' => Array( 'parent' => 'in-commerce:shipping_folder', 'icon' => 'shipping', 'label' => 'la_tab_CustomShippingTypes', 'url' => Array('t' => 'in-commerce/shipping/shipping_custom_list', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'), 'priority' => 5.1, 'type' => stTAB, ), ), 'TableName' => TABLE_PREFIX.'ShippingType', 'SubItems' => Array('z', 'br'), 'FilterMenu' => Array( 'Groups' => Array( Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER), ), 'Filters' => Array( 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), ) ), 'ListSQLs' => Array( ''=> 'SELECT * FROM %s'), // key - special, value - list select sql 'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'), 'ListSortings' => Array( '' => Array( 'Sorting' => Array('Name' => 'asc'), ) ), 'Fields' => Array( 'ShippingID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Code' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array('required' => 'Please fill in')), 'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in')), 'SpeedCode' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25), 'LocationFrom' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1), 'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1), 'BaseFee' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true), 'CODFlatSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true), 'CODPercentSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true), 'Status' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ), 'CostType' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ), 'ZeroIfEmpty' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ), 'PrecisionBeforeSep' => Array('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ), 'PrecisionAfterSep' => Array('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ), 'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => 0,), ), 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_shipping.gif', 0=>'icon16_shipping_disabled.gif', 1=>'icon16_shipping.gif'), 'Fields' => Array( 'ShippingID' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td' ), 'Name' => Array( 'title'=>'la_col_ShippingName' ), 'Type' => Array( 'title'=>'la_col_ShippingType' ), 'BaseFee' => Array( 'title'=>'la_col_BaseFee' ), /*'CODFlatSurcharge' => Array( 'title'=>'la_col_CODFlatSurcharge' ),*/ ), ), ), ); ?>