'pt', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'PaymentTypeEventHandler','file'=>'payment_type_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'PaymentTypeTagProcessor','file'=>'payment_type_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array( 1 => 'id', 2 => 'page', 3 => 'event', 4 => 'mode', ), 'IDField' => 'PaymentTypeId', 'StatusField' => Array('Status', 'IsPrimary'), 'TableName' => TABLE_PREFIX.'PaymentTypes', 'TitlePresets' => Array( 'default' => Array( 'new_status_labels' => Array('pt'=>'!la_title_AddingPaymentType!'), 'edit_status_labels' => Array('pt'=>'!la_title_EditingPaymentType!'), 'new_titlefield' => Array('pt'=>'!la_title_NewPaymentType!'), ), 'payment_type_list'=>Array( 'prefixes' => Array('pt_List'), 'format' => "!la_title_PaymentTypes! (#pt_recordcount#)", ), 'payment_type_edit'=>Array( 'prefixes' => Array('pt'), 'new_titlefield' => Array('pt'=>'!la_title_NewPaymentType!'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_General!", ), 'gateway' => Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"), 'payment_currencies_edit' => Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"), ), 'PermSection' => Array('main' => 'in-commerce:payment_types'), 'Sections' => Array( 'in-commerce:payment_types' => Array( 'parent' => 'in-commerce', 'icon' => 'payment_types', 'label' => 'la_tab_PaymentTypes', 'url' => Array('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 6, 'type' => stTREE, ), ), 'TitleField' => 'Name', // field, used in bluebar when editing existing item 'SubItems' => Array('gwfv','ptc'), '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' ), ) ), 'CalculatedFields' => Array( '' => Array( 'Gateway' => TABLE_PREFIX.'Gateways.Name', ), ), 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'Gateways ON %1$s.GatewayId = '.TABLE_PREFIX.'Gateways.GatewayId', ), // key - special, value - list select sql 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', ), 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array('Priority' => 'desc'), 'Sorting' => Array('Name' => 'asc'), ) ), 'Fields' => Array( 'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), 'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len' => 100), 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), 'Instructions' => Array ('type' => 'string', 'default' => NULL), 'AdminComments' => Array ('type' => 'string', 'default' => NULL), 'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null' => 1), 'Priority' => Array('type' => 'int', 'not_null' => true, 'default' => 0), 'IsPrimary' => Array('type' => 'int', 'not_null' => true, 'default' => 0), 'BuiltIn' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ), 'GatewayId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Gateways', 'option_key_field'=>'GatewayId', 'option_title_field'=>'Name', 'default' => 1, 'not_null' => 1), 'PlacedOrdersEdit' => Array('type' => 'int','not_null' => 1, 'default' => 0), 'ProcessingFee' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '1','default' => '0.00'), 'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => '',), ), /* 'VirtualFields' => Array( 'Qty' => 1, ),*/ 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_custom.gif','0_0'=>'icon16_payment_disabled.gif','1_0'=>'icon16_payment.gif','1_1'=>'icon16_payment_primary.gif','0_1'=>'icon16_payment_disabled.gif'), 'Fields' => Array( 'PaymentTypeId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td' ), 'Name' => Array( 'title'=>'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td' ), 'Description' => Array( 'title'=>'la_col_Description' ), 'BuiltIn' => Array( 'title'=>'la_col_BuiltIn' ), ), ), ), ); ?>