Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Sun, Apr 20, 6:07 AM

in-commerce

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/5.0.x/units/affiliate_plans/affiliate_plans_config.php
===================================================================
--- branches/5.0.x/units/affiliate_plans/affiliate_plans_config.php (revision 13266)
+++ branches/5.0.x/units/affiliate_plans/affiliate_plans_config.php (revision 13267)
@@ -1,114 +1,124 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'ap',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'AffiliatePlansEventHandler','file'=>'affiliate_plans_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'AffiliatePlansEventHandler', 'file' => 'affiliate_plans_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'AggregateTags' => Array(
+ 'AggregateTags' => Array (
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'AffiliatePlanId',
- 'StatusField' => Array('Enabled', 'IsPrimary'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Enabled', 'IsPrimary'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('ap'=>'!la_title_Adding_Affiliate_Plan!'),
- 'edit_status_labels' => Array('ap'=>'!la_title_Editing_Affiliate_Plan!'),
- 'new_titlefield' => Array('ap'=>'!la_title_New_Affiliate_Plan!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('ap' => '!la_title_Adding_Affiliate_Plan!'),
+ 'edit_status_labels' => Array ('ap' => '!la_title_Editing_Affiliate_Plan!'),
+ 'new_titlefield' => Array ('ap' => '!la_title_New_Affiliate_Plan!'),
),
- 'affiliate_plans_list' => Array('prefixes' => Array('ap_List'), 'format' => "!la_title_AffiliatePlans!"),
- 'affiliate_plans_edit' => Array('prefixes' => Array('ap'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_General!"),
- 'affiliate_plans_brackets' => Array('prefixes' => Array('ap','apbrackets_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
- 'affiliate_plans_items' => Array('prefixes' => Array('ap','api_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
+ 'affiliate_plans_list' => Array ('prefixes' => Array ('ap_List'), 'format' => "!la_title_AffiliatePlans!"),
+ 'affiliate_plans_edit' => Array ('prefixes' => Array ('ap'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_General!"),
+ 'affiliate_plans_brackets' => Array ('prefixes' => Array ('ap', 'apbrackets_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
+ 'affiliate_plans_items' => Array ('prefixes' => Array ('ap', 'api_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliate_plans_edit', 'priority' => 1),
'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/affiliate_plans/affiliate_plans_brackets', 'priority' => 2),
// 'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/affiliate_plans/affiliate_plans_items', 'priority' => 3),
),
),
- 'PermSection' => Array('main' => 'in-commerce:affiliate_plans'),
+ 'PermSection' => Array ('main' => 'in-commerce:affiliate_plans'),
- 'Sections' => Array(
- 'in-commerce:affiliate_plans' => Array(
+ 'Sections' => Array (
+ 'in-commerce:affiliate_plans' => Array (
'parent' => 'in-commerce:affiliates_folder',
'icon' => 'affiliates',
'label' => 'la_tab_AffiliatePlans',
- 'url' => Array('t' => 'in-commerce/affiliate_plans/affiliate_plans_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary'),
+ 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_plans_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary'),
'priority' => 5.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'TableName' => TABLE_PREFIX.'AffiliatePlans',
- 'ListSQLs' => Array('' => 'SELECT * FROM %s'),
- 'ItemSQLs' => Array('' => 'SELECT * FROM %s'),
+ 'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
- 'SubItems' => Array('apbrackets', /*'api'*/),
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('IsPrimary' => 'desc'),
- 'Sorting' => Array('Name' => 'desc'),
+ 'SubItems' => Array ('apbrackets', /*'api'*/),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('IsPrimary' => 'desc'),
+ 'Sorting' => Array ('Name' => 'desc'),
)
),
- 'Fields' => Array(
- 'AffiliatePlanId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string', 'unique' => Array(), 'not_null' => '1', 'required' => 1, 'default' => ''),
- 'PlanType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(/*0 => 'la_by_amount',*/ 1 => 'la_by_amount', 2 => 'la_by_items_sold'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1),
- 'ResetInterval' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'PaymentType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_regular', 1 => 'la_by_request'), 'use_phrases' => 1, 'not_null' => 1,'default' => 0),
- 'MinPaymentAmount' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'Enabled' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'IsPrimary' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
+ 'Fields' => Array (
+ 'AffiliatePlanId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'unique' => Array (), 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'PlanType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (/*0 => 'la_by_amount',*/ 1 => 'la_by_amount', 2 => 'la_by_items_sold'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1),
+ 'ResetInterval' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'PaymentType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_regular', 1 => 'la_by_request'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'MinPaymentAmount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'Enabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ ),
- 'Grids' => Array(
- 'Default' => Array(
+ 'Grids' => Array (
+ 'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'AffiliatePlanId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'PlanType' => Array( 'title' => 'la_col_PlanType', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
- 'Enabled' => Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Fields' => Array (
+ 'AffiliatePlanId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ( 'title' => 'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'PlanType' => Array ( 'title' => 'la_col_PlanType', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
+ 'Enabled' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/product_options/product_options_config.php
===================================================================
--- branches/5.0.x/units/product_options/product_options_config.php (revision 13266)
+++ branches/5.0.x/units/product_options/product_options_config.php (revision 13267)
@@ -1,95 +1,105 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'po',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ProductOptionsEventHandler','file'=>'product_options_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ProductOptionsTagProcessor','file'=>'product_options_tag_processor.php','build_event'=>'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo'=>'kProductOptionsHelper','class'=>'kProductOptionsHelper','file'=>'product_options_helper.php','build_event'=>''),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ProductOptionsEventHandler', 'file' => 'product_options_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ProductOptionsTagProcessor', 'file' => 'product_options_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'kProductOptionsHelper', 'class' => 'kProductOptionsHelper', 'file' => 'product_options_helper.php', 'build_event' => ''),
),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array (
),
- 'AggregateTags' => Array(
- Array(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListOptions',
'LocalTagName' => 'ListOptions',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
'TitleField' => 'Name',
'IDField' => 'ProductOptionId',
'TableName' => TABLE_PREFIX.'ProductOptions',
'ForeignKey' => 'ProductId',
'ParentTableKey' => 'ProductId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
- 'SubItems' => array('poc'),
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'SubItems' => Array ('poc'),
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
- 'ForcedSorting' => Array('Priority' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
)
),
'Fields' => Array (
- 'ProductOptionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Name' => Array('type' => 'string', 'required' => 1, 'max_len' => 255, 'not_null' => 1, 'default' => '',),
- 'OptionType' => Array('type' => 'int', 'required' => 1, 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => '!la_EmptyValue!', 1 => '!la_type_select!', 5 => '!la_type_text!', 4 => '!la_type_textarea!', 3 => '!la_type_radio!', 6 => '!la_type_checkbox!' /*, 2 => '!la_type_password!' */), 'not_null' => 1, 'default' => 0),
- 'Required' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
- 'Listable' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
- 'Priority' => Array('type' => 'int', 'not_null'=>1, 'default'=>0),
+ 'ProductOptionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'required' => 1, 'max_len' => 255, 'not_null' => 1, 'default' => '',),
+ 'OptionType' => Array ('type' => 'int', 'required' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => '!la_EmptyValue!', 1 => '!la_type_select!', 5 => '!la_type_text!', 4 => '!la_type_textarea!', 3 => '!la_type_radio!', 6 => '!la_type_checkbox!' /*, 2 => '!la_type_password!' */), 'not_null' => 1, 'default' => 0),
+ 'Required' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Listable' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' =>1, 'default' =>0),
'Values' => Array ('type' => 'string', 'default' => NULL),
'Prices' => Array ('type' => 'string', 'default' => NULL),
'PriceTypes' => Array ('type' => 'string', 'default' => NULL),
),
'VirtualFields' => Array (
),
- 'Grids' => Array(
+ 'Grids' => Array (
- 'Default' => Array(
- 'Icons' => Array(
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
- 'Fields' => Array(
- 'ProductOptionId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'),
- 'OptionType' => Array( 'title'=>'la_col_OptionType', 'filter_block' => 'grid_options_filter'),
- 'Required' => Array( 'title'=>'la_col_Required', 'filter_block' => 'grid_options_filter'),
- /*'Listable' => Array( 'title'=>'la_col_Listable', 'filter_block' => 'grid_options_filter'),*/
+ 'Fields' => Array (
+ 'ProductOptionId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array ( 'title' => 'la_col_Name', 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'),
+ 'OptionType' => Array ( 'title' => 'la_col_OptionType', 'filter_block' => 'grid_options_filter'),
+ 'Required' => Array ( 'title' => 'la_col_Required', 'filter_block' => 'grid_options_filter'),
+ /*'Listable' => Array ( 'title' => 'la_col_Listable', 'filter_block' => 'grid_options_filter'),*/
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/pricing/pricing_config.php
===================================================================
--- branches/5.0.x/units/pricing/pricing_config.php (revision 13266)
+++ branches/5.0.x/units/pricing/pricing_config.php (revision 13267)
@@ -1,134 +1,144 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'pr',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'PricingEventHandler','file'=>'pricing_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'PricingTagProcessor','file'=>'pricing_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class'=> 'kDBItem', 'file'=> '', 'build_event'=> 'OnItemBuild'),
+ 'ListClass' => Array ('class'=> 'kDBList', 'file'=> '', 'build_event'=> 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class'=> 'PricingEventHandler', 'file'=> 'pricing_event_handler.php', 'build_event'=> 'OnBuild'),
+ 'TagProcessorClass' => Array ('class'=> 'PricingTagProcessor', 'file'=> 'pricing_tag_processor.php', 'build_event'=> 'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array (
// for tangible products: pricings are always aranged before saveing product
- Array(
+ Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '',
- 'HookToEvent' => Array('OnPreSave'),
+ 'HookToEvent' => Array ('OnPreSave'),
'DoPrefix' => '',
'DoSpecial' => 'tang',
'DoEvent' => 'OnArrange',
),
),
- 'AggregateTags' => Array(
- Array(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'Price',
'LocalTagName' => 'ProductPrice',
),
- Array(
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListPriceBrackets',
'LocalTagName' => 'Product_ListPriceBrackets',
),
- Array(
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'HasQuantityPricing',
'LocalTagName' => 'Product_HasQuantityPricing',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
- 'StatusField' => Array('IsPrimary'),
+ 'StatusField' => Array ('IsPrimary'),
'IDField' => 'PriceId',
'TableName' => TABLE_PREFIX.'ProductsPricing',
'ForeignKey' => 'ProductId',
'ParentTableKey' => 'ProductId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('MinQty' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('MinQty' => 'asc'),
)
),
- 'Fields' => Array(
- 'PriceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MinQty' => Array('type' => 'int', 'default' => 0),
- 'MaxQty' => Array('type' => 'int', 'default' => 0),
- 'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
- 'Price' => Array('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
- 'Negotiated' => Array('type' => 'int', 'default' => 0),
- 'Points' => Array('type' => 'int', 'default' => 0),
- 'AccessDuration'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'AccessUnit' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
- 'Description' => Array('type' => 'string', 'max_len' => 255, 'default' => NULL),
- 'IsPrimary' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
- 'GroupId' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
- // 'AccessRebillDate' => Array('type'=>'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=>'1', 'default'=>0),
- // Customization healtheconomics.org
-// 'DurationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
-// 'AccessExpiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter'),
- // Customization healtheconomics.org --
-
- ),
- 'VirtualFields' => Array(
+ 'Fields' => Array (
+ 'PriceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MinQty' => Array ('type' => 'int', 'default' => 0),
+ 'MaxQty' => Array ('type' => 'int', 'default' => 0),
+ 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
+ 'Price' => Array ('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
+ 'Negotiated' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Points' => Array ('type' => 'int', 'default' => 0),
+ 'AccessDuration'=> Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'AccessUnit' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
+ 'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'GroupId' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
+ // 'AccessRebillDate' => Array ('type'=> 'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default'=>0),
+ // Customization healtheconomics.org
+ // 'DurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
+ // 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'),
+ // Customization healtheconomics.org --
+ ),
+
+ 'VirtualFields' => Array (
),
- 'Grids' => Array(
+ 'Grids' => Array (
/*
- 'Default' => Array(
- 'Icons' => Array(
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'MinQty' => Array( 'title'=>'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'MaxQty' => Array( 'title'=>'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
- 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_range_filter'),
- 'Points' => Array( 'title'=>'la_col_Points', 'filter_block' => 'grid_range_filter'),
- 'Cost' => Array( 'title'=>'la_col_Cost', 'filter_block' => 'grid_range_filter'),
- 'Negotiated' => Array( 'title'=>'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
+ 'Fields' => Array (
+ 'MinQty' => Array ( 'title'=> 'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'MaxQty' => Array ( 'title'=> 'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
+ 'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_range_filter'),
+ 'Points' => Array ( 'title'=> 'la_col_Points', 'filter_block' => 'grid_range_filter'),
+ 'Cost' => Array ( 'title'=> 'la_col_Cost', 'filter_block' => 'grid_range_filter'),
+ 'Negotiated' => Array ( 'title'=> 'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
),
),
*/
- 'Access' => Array(
- 'Icons' => Array('default'=>'icon16_pricing.gif','0'=>'icon16_pricing.gif','1'=>'icon16_pricing_primary.gif'),
- 'Fields' => Array(
- 'AccessDuration' => Array( 'title'=>'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'AccessUnit' => Array( 'title'=>'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
- 'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'),
- 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
+ 'Access' => Array (
+ 'Icons' => Array ('default'=> 'icon16_pricing.gif', '0'=> 'icon16_pricing.gif', '1'=> 'icon16_pricing_primary.gif'),
+ 'Fields' => Array (
+ 'AccessDuration' => Array ( 'title'=> 'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'AccessUnit' => Array ( 'title'=> 'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
+ 'Description' => Array ( 'title'=> 'la_col_Description', 'filter_block' => 'grid_like_filter'),
+ 'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/reports/reports_config.php
===================================================================
--- branches/5.0.x/units/reports/reports_config.php (revision 13266)
+++ branches/5.0.x/units/reports/reports_config.php (revision 13267)
@@ -1,138 +1,149 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'rep',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ReportsEventHandler','file'=>'reports_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ReportsTagProcessor','file'=>'reports_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array('class' => 'ReportsEventHandler', 'file' => 'reports_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array('class' => 'ReportsTagProcessor', 'file' => 'reports_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode', // 't' for temp '' for normal
),
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'rep',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUpdateConfig',
),
),
'IDField' => 'CategoryId',
'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('d'=>'!la_title_Adding_Discount!'),
- 'edit_status_labels' => Array('d'=>'!la_title_Editing_Discount!'),
- 'new_titlefield' => Array('d'=>'!la_title_New_Discount!'),
+ 'default' => Array( 'new_status_labels' => Array('d' => '!la_title_Adding_Discount!'),
+ 'edit_status_labels' => Array('d' => '!la_title_Editing_Discount!'),
+ 'new_titlefield' => Array('d' => '!la_title_New_Discount!'),
),
- 'report_options'=>Array('format' => "!la_title_ReportOptions!"),
- 'report_results'=>Array('format' => "!la_title_ReportResults!"),
- 'report_chart'=>Array('format' => "!la_title_SalesReportChart!"),
+ 'report_options' =>Array('format' => "!la_title_ReportOptions!"),
+ 'report_results' =>Array('format' => "!la_title_ReportResults!"),
+ 'report_chart' =>Array('format' => "!la_title_SalesReportChart!"),
),
'PermSection' => Array('main' => 'in-commerce:reports'),
'Sections' => Array(
'in-commerce:reports' => Array(
'parent' => 'in-commerce',
'icon' => 'in-commerce:sales_report',
'label' => 'la_tab_SaleReports',
- 'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event'=>'OnNew'),
+ 'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event' => 'OnNew'),
'permissions' => Array('view', 'add'),
'priority' => 2,
'type' => stTREE,
),
),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
Array('mode' => 'AND', 'filters' => Array(4,5,6), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
1 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2' ),
2 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0' ),
3 => Array(),
4 => Array('label' => 'la_Flat', 'on_sql' => '', 'off_sql' => 'Type != 1' ),
5 => Array('label' => 'la_Percent', 'on_sql' => '', 'off_sql' => 'Type != 2' ),
6 => Array('label' => 'la_FreeShipping', 'on_sql' => '', 'off_sql' => 'Type != 3' ),
)
),
- 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s',
+ 'ListSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s',
+ 'ItemSQLs' => Array( '' => 'SELECT * FROM %1$s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'CategoryId' => '0',
),
),
'Fields' => Array(
),
'VirtualFields' => Array(
- 'ReportType' => array('formatter'=>'kOptionsFormatter','options'=>array(
+ 'ReportType' => array('formatter' => 'kOptionsFormatter', 'options' =>array(
12 => 'la_Overall',
1 => 'la_ByCategory',
2 => 'la_ByUser',
5 => 'la_byProduct'
- ),'use_phrases'=>1,'default'=>12
+ ),
+ 'use_phrases' => 1, 'default' => 12,
+ ),
+ 'FromDateTime' => Array('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ),
+ 'ToDateTime' => Array('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
+ 'Recursive' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'SkipEmpty' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
),
- 'FromDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ),
- 'ToDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
- 'Recursive' => array('default'=>1),
- 'SkipEmpty' => array('default'=>1),
'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array(
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
- 'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter'),
- 'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter'),
- 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
- 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+ 'Name' => Array( 'title' => 'la_col_Name', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Start' => Array( 'title' => 'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
+ 'End' => Array( 'title' => 'la_col_End', 'filter_block' => 'grid_date_range_filter'),
+ 'GroupId' => Array( 'title' => 'la_col_Group', 'filter_block' => 'grid_options_filter'),
+ 'Type' => Array( 'title' => 'la_col_Type', 'filter_block' => 'grid_options_filter'),
+ 'Amount' => Array( 'title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/files/files_config.php
===================================================================
--- branches/5.0.x/units/files/files_config.php (revision 13266)
+++ branches/5.0.x/units/files/files_config.php (revision 13267)
@@ -1,122 +1,146 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'file',
- 'ItemClass' => Array('class'=>'FilesItem','file'=>'files.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'FilesEventHandler','file'=>'files_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'FilesItem', 'file' => 'files.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FilesEventHandler', 'file' => 'files_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'AggregateTags' => Array(
- Array(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListFiles',
'LocalTagName' => 'PrintList',
'LocalSpecial' => 'downl',
),
),
- 'Hooks' => Array(
- /*Array(
+ 'Hooks' => Array (
+ /*Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'p',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'onPreSave' ),
+ 'HookToEvent' => Array ( 'onPreSave' ),
'DoPrefix' => 'pr',
'DoSpecial' => 'tang',
'DoEvent' => 'OnArrange',
),*/
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
- 'StatusField' => Array('Status', 'IsPrimary'),
+ 'StatusField' => Array ('Status', 'IsPrimary'),
'IDField' => 'FileId',
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductFiles',
'ForeignKey' => 'ProductId',
'ParentTableKey' => 'ProductId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',
),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+ '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' ),
+ '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' ),
)
),
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('IsPrimary' => 'desc','Priority' => 'desc'),
- 'Sorting' => Array('AddedOn' => 'desc','Version' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'),
+ 'Sorting' => Array ('AddedOn' => 'desc', 'Version' => 'desc'),
)
),
- 'Fields' => Array(
- 'FileId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'Version' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'FilePath' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'RealPath' => Array('type' => 'string', 'not_null' => 1, 'formatter'=>'kUploadFormatter', 'skip_empty'=>1, 'default' => '', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0, 'size_field' => 'Size', 'orig_name_field' => 'FilePath', 'content_type_field' => 'MIMEType', 'max_size' => 50000000,
- 'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
- 'bad_file_size' => '!la_error_FileTooLarge!',
- 'cant_save_file' => '!la_error_cant_save_file!'
- )
- ),
- 'Size' => Array('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
- 'Status' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'IsPrimary' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'AddedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'AddedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MIMEType' => Array('type' => 'string','not_null' => '1','default' => ''),
- ),
- 'VirtualFields' => Array(
- ),
+ 'Fields' => Array (
+ 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'Version' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'FilePath' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'RealPath' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kUploadFormatter',
+ 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0,
+ 'size_field' => 'Size', 'max_size' => 50000000,
+ 'orig_name_field' => 'FilePath',
+ 'content_type_field' => 'MIMEType',
+ 'not_null' => 1, 'skip_empty' =>1, 'default' => '',
+ 'error_msgs' => Array (
+ 'bad_file_format' => '!la_error_InvalidFileFormat!',
+ 'bad_file_size' => '!la_error_FileTooLarge!',
+ 'cant_save_file' => '!la_error_cant_save_file!',
+ ),
+ ),
+ 'Size' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kFilesizeFormatter',
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'AddedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ ),
+
+ 'VirtualFields' => Array (
+
+ ),
- 'Grids' => Array(
+ 'Grids' => Array (
- 'Default' => Array(
+ 'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'FileId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'title'=>'la_col_FileName', 'data_block' => 'file_caption_td', 'filter_block' => 'grid_like_filter'),
- 'FilePath' => Array( 'title'=>'la_col_FilePath', 'filter_block' => 'grid_like_filter'),
- 'Version' => Array( 'title'=>'la_col_Version', 'filter_block' => 'grid_like_filter'),
- 'Size' => Array( 'title'=>'la_col_Size', 'filter_block' => 'grid_float_range_filter'),
- 'AddedOn' => Array( 'title'=>'la_col_AddedOn', 'format'=>'_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
+ 'Fields' => Array (
+ 'FileId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array ( 'title' => 'la_col_FileName', 'data_block' => 'file_caption_td', 'filter_block' => 'grid_like_filter'),
+ 'FilePath' => Array ( 'title' => 'la_col_FilePath', 'filter_block' => 'grid_like_filter'),
+ 'Version' => Array ( 'title' => 'la_col_Version', 'filter_block' => 'grid_like_filter'),
+ 'Size' => Array ( 'title' => 'la_col_Size', 'filter_block' => 'grid_float_range_filter'),
+ 'AddedOn' => Array ( 'title' => 'la_col_AddedOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/affiliate_payment_types/affiliate_payment_types_config.php
===================================================================
--- branches/5.0.x/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 13266)
+++ branches/5.0.x/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 13267)
@@ -1,109 +1,119 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'apt',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'AffiliatePaymentTypesEventHandler','file'=>'affiliate_payment_types_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'AffiliatePaymentTypesEventHandler', 'file' => 'affiliate_payment_types_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'AggregateTags' => Array(
- Array(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => 'u',
'AggregatedTagName' => 'ListAffiliatesPaymentTypes',
'LocalTagName' => 'PrintList',
'LocalSpecial' => 'active',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'PaymentTypeId',
- 'StatusField' => Array('Status', 'IsPrimary'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status', 'IsPrimary'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('apt'=>'!la_title_Adding_Affiliate_Payment_Type!'),
- 'edit_status_labels' => Array('apt'=>'!la_title_Editing_Affiliate_Payment_Type!'),
- 'new_titlefield' => Array('apt'=>'!la_title_New_Affiliate_Payment_Type!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('apt' => '!la_title_Adding_Affiliate_Payment_Type!'),
+ 'edit_status_labels' => Array ('apt' => '!la_title_Editing_Affiliate_Payment_Type!'),
+ 'new_titlefield' => Array ('apt' => '!la_title_New_Affiliate_Payment_Type!'),
),
- 'affiliate_payment_types_list' => Array('prefixes' => Array('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"),
- 'affiliate_payment_types_edit' => Array('prefixes' => Array('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"),
+ 'affiliate_payment_types_list' => Array ('prefixes' => Array ('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"),
+ 'affiliate_payment_types_edit' => Array ('prefixes' => Array ('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"),
),
- 'PermSection' => Array('main' => 'in-commerce:affiliate_payment_types'),
+ 'PermSection' => Array ('main' => 'in-commerce:affiliate_payment_types'),
- 'Sections' => Array(
- 'in-commerce:affiliate_payment_types' => Array(
+ 'Sections' => Array (
+ 'in-commerce:affiliate_payment_types' => Array (
'parent' => 'in-commerce:affiliates_folder',
'icon' => 'affiliates',
'label' => 'la_tab_AffiliatePaymentTypes',
- 'url' => Array('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'),
- 'permissions' => Array(
+ 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'),
+ 'permissions' => Array (
'view', 'add', 'edit', 'delete', 'advanced:approve',
'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down'
),
'priority' => 5.3, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'TableName' => TABLE_PREFIX.'AffiliatePaymentTypes',
- 'ListSQLs' => Array('' => 'SELECT * FROM %s'),
- 'ItemSQLs' => Array('' => 'SELECT * FROM %s'),
+ 'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('IsPrimary' => 'desc', 'Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc'),
)
),
- 'Fields' => Array(
- 'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Name' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'IsPrimary' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'Status' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- ),
+ 'Fields' => Array (
+ 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
- 'Grids' => Array(
- 'Default' => Array(
+ 'Grids' => Array (
+ 'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'PaymentTypeId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'Name' => Array( 'title' => 'la_col_Name', 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'Description' => Array( 'title' => 'la_col_Description', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Fields' => Array (
+ 'PaymentTypeId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array ( 'title' => 'la_col_Name', 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
+ 'Description' => Array ( 'title' => 'la_col_Description', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- branches/5.0.x/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 13266)
+++ branches/5.0.x/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 13267)
@@ -1,139 +1,207 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'sqe',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ShippingQuoteEngineEventHandler', 'file' => 'shipping_quote_engine_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'ShippingQuoteEngine', 'class' => 'ShippingQuoteEngine', 'file' => 'shipping_quote_engine.php', 'build_event' => ''),
Array ('pseudo' => 'CustomShippingQuoteEngine', 'class' => 'CustomShippingQuoteEngine', 'file' => 'custom_shipping_quote_engine.php', 'build_event' => ''),
Array ('pseudo' => 'Intershipper', 'class' => 'Intershipper', 'file' => 'intershipper.php', 'build_event' => ''),
Array ('pseudo' => 'USPS', 'class' => 'USPS', 'file' => 'usps.php', 'build_event' => ''),
Array ('pseudo' => 'ShippingQuoteCollector', 'class' => 'ShippingQuoteCollector', 'file' => 'shipping_quote_collector.php', 'build_event' => '', 'require_classes' => 'ShippingQuoteEngine'),
),
'AutoLoad' => true,
'Hooks' => Array (
),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'EngineId',
'StatusField' => Array ('Status'),
'TitleField' => 'Name',
'TitlePresets' => Array (
'default' => Array ( 'edit_status_labels' => Array ('sqe' => '!la_title_EditingShippingQuoteEngine!'),
),
- 'engine_list'=>Array ( 'prefixes' => Array ('sqe_List'),
+ 'engine_list' =>Array ( 'prefixes' => Array ('sqe_List'),
'format' => "!la_title_ShippingQuoteEngines!",
),
- 'engine_edit'=>Array ( 'prefixes' => Array ('sqe'),
+ 'engine_edit' =>Array ( 'prefixes' => Array ('sqe'),
'format' => "#sqe_status# '#sqe_titlefield#' - !la_title_General!",
),
),
'PermSection' => Array ('main' => 'in-commerce:shipping_quote_engines'),
'Sections' => Array (
'in-commerce:shipping_quote_engines' => Array (
'parent' => 'in-commerce:shipping_folder',
'icon' => 'conf_shipping',
'label' => 'la_tab_ShippingQuoteEngines',
'url' => Array ('t' => 'in-commerce/shipping/shipping_list', 'pass' => 'm'),
'permissions' => Array ('view', 'edit', 'advanced:approve', 'advanced:decline'),
'priority' => 4.2,
'type' => stTAB,
),
),
'TableName' => TABLE_PREFIX.'ShippingQuoteEngines',
'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_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'),
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'),
// key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Name' => 'asc'),
)
),
'Fields' => Array (
- 'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'FlatSurcharge' => Array ('type' => 'double', 'not_null' => '1', 'default' => '0'),
- 'PercentSurcharge' => Array ('type' => 'double', 'not_null' => '1', 'default' => '0'),
- 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null' => 1),
- 'Properties' => Array ('type' => 'string', 'default' => NULL),
- 'ClassName' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- ),
+ 'EngineId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'FlatSurcharge' => Array ('type' => 'double', 'not_null' => 1, 'default' => '0'),
+ 'PercentSurcharge' => Array ('type' => 'double', 'not_null' => 1, 'default' => '0'),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'use_phrases' => 1,
+ 'default' => 0, 'not_null' => 1,
+ ),
+ 'Properties' => Array ('type' => 'string', 'default' => NULL),
+ 'ClassName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ ),
'VirtualFields' => Array (
- 'AccountLogin' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'AccountPassword' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'UPSEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'UPSAccount' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'UPSInvoiced' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced')),
- 'FDXEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'FDXAccount' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'FDXInvoiced' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced')),
- 'DHLEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'DHLAccount' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'DHLInvoiced' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced')),
- 'USPEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'USPAccount' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'USPInvoiced' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced')),
- 'ARBEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'ARBAccount' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'ARBInvoiced' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced')),
- '1DYEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- '2DYEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- '3DYEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'GNDEnabled' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Enabled', 0 => 'Disabled')),
- 'ShipMethod' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('DRP' => 'Drop-Off At Carrier Location', 'PCK' => 'Schedule A Special Pickup', 'SCD' => 'Regularly Scheduled Pickup')),
- ),
+ 'AccountLogin' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'AccountPassword' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'UPSEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'UPSAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'UPSInvoiced' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ ),
+ 'FDXEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'FDXAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'FDXInvoiced' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ ),
+ 'DHLEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'DHLAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'DHLInvoiced' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ ),
+ 'USPEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'USPAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'USPInvoiced' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ ),
+ 'ARBEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'ARBAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ARBInvoiced' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Invoiced', 0 => 'NotInvoiced'),
+ ),
+ '1DYEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ '2DYEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ '3DYEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'GNDEnabled' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'Enabled', 0 => 'Disabled'),
+ ),
+ 'ShipMethod' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 'DRP' => 'Drop-Off At Carrier Location',
+ 'PCK' => 'Schedule A Special Pickup',
+ 'SCD' => 'Regularly Scheduled Pickup'),
+ ),
+ ),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'EngineId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array ( 'title' => 'la_col_ShippingQuoteEngineName', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'FlatSurcharge' => Array ( 'title' => 'la_col_FlatSurcharge', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
'PercentSurcharge' => Array ( 'title' => 'la_col_PercentSurcharge', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- branches/5.0.x/units/product_option_combinations/product_option_combinations_config.php (revision 13266)
+++ branches/5.0.x/units/product_option_combinations/product_option_combinations_config.php (revision 13267)
@@ -1,135 +1,140 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'poc',
- 'ItemClass' => Array('class'=>'kPOCItem','file'=>'products_option_combination_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ProductOptionCombinationsEventHandler','file'=>'product_option_combinations_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ProductOptionCombinationsTagProcessor','file'=>'product_option_combinations_tag_processor.php','build_event'=>'OnBuild'),
- 'RegisterClasses' => Array(
- Array('pseudo'=>'kCombinationFormatter','class'=>'kCombinationFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
- Array('pseudo'=>'kCombPriceFormatter','class'=>'kCombPriceFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
+ 'ItemClass' => Array ('class' => 'kPOCItem', 'file' => 'products_option_combination_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ProductOptionCombinationsEventHandler', 'file' => 'product_option_combinations_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ProductOptionCombinationsTagProcessor', 'file' => 'product_option_combinations_tag_processor.php', 'build_event' => 'OnBuild'),
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'kCombinationFormatter', 'class' => 'kCombinationFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
+ Array ('pseudo' => 'kCombPriceFormatter', 'class' => 'kCombPriceFormatter', 'file' => 'product_option_formatters.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array (
),
- 'AggregateTags' => Array(
+ 'AggregateTags' => Array (
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
'TitleField' => 'CombinationId',
'IDField' => 'CombinationId',
'TableName' => TABLE_PREFIX.'ProductOptionCombinations',
- 'ForeignKey' => array('p' => 'ProductId'),
- 'ParentTableKey' => array('p' => 'ProductId'),
+ 'ForeignKey' => Array ('p' => 'ProductId'),
+ 'ParentTableKey' => Array ('p' => 'ProductId'),
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
- 'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s
+ 'ListSQLs' => Array ( '' => 'SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = %1$s.ProductId
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing ON '.TABLE_PREFIX.'ProductsPricing.ProductId = %1$s.ProductId AND '.TABLE_PREFIX.'ProductsPricing.IsPrimary = 1
',
), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Combination' => 'asc'),
- 'ForcedSorting' => Array('Priority' => 'desc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Combination' => 'asc'),
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
)
),
'Fields' => Array (
- 'CombinationId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'Combination' => Array('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format'=>"%s: %s<br>", 'default' => NULL),
- 'CombinationCRC' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'PriceType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
- 'Price' => Array('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ),
- 'WeightType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
- 'Weight' => Array('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
- 'Availability' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>array(0=>'la_No', 1=>'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
- 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'QtyInStock' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'QtyReserved' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'QtyBackOrdered' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'QtyOnOrder' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
- 'SKU' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'CombinationId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'Combination' => Array ('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format' =>"%s: %s<br>", 'default' => NULL),
+ 'CombinationCRC' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'PriceType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
+ 'Price' => Array ('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ),
+ 'WeightType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
+ 'Weight' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
+ 'Availability' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
+ 'QtyInStock' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'QtyReserved' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'QtyBackOrdered' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'QtyOnOrder' => Array ('type' => 'int', 'not_null' => '1', 'default' => 0),
+ 'SKU' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
),
- 'CalculatedFields' => Array(
- '' => Array(
+ 'CalculatedFields' => Array (
+ '' => Array (
'FinalPrice' => 'IF(%1$s.PriceType = 1, %1$s.Price,
IF(%1$s.PriceType = 2, '.TABLE_PREFIX.'ProductsPricing.Price + %1$s.Price,
'.TABLE_PREFIX.'ProductsPricing.Price * (1 + %1$s.Price/100)
)
)',
'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price',
),
),
- 'VirtualFields' => Array(
- 'FinalPrice' => Array('formatter'=>'kCombPriceFormatter', 'format' => '%.2f'),
+ 'VirtualFields' => Array (
+ 'FinalPrice' => Array ('formatter' => 'kCombPriceFormatter', 'format' => '%.2f'),
),
'Grids' => Array (
'Default' => Array (
- 'Icons' => Array(
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
- 'SKU' => Array( 'title'=>'la_col_SKU', 'filter_block' => 'grid_like_filter'),
- 'Availability' => Array( 'title'=>'la_col_Availability', 'filter_block' => 'grid_options_filter'),
- 'Price' => Array( 'title'=>'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'),
- /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
+ 'Fields' => Array (
+ 'Combination' => Array ( 'title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'SKU' => Array ( 'title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+ 'Availability' => Array ( 'title' => 'la_col_Availability', 'filter_block' => 'grid_options_filter'),
+ 'Price' => Array ( 'title' => 'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'),
+ /*'Weight' => Array ( 'title' => 'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
),
),
'Inventory' => Array (
- 'Icons' => Array(
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
'Selector' => 'radio',
'Fields' => Array (
- 'Combination' => Array('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
- 'SKU' => Array('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
- 'QtyInStock' => Array('title'=>'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'),
- 'QtyReserved' => Array('title'=>'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'),
- 'QtyBackOrdered'=> Array('title'=>'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
- 'QtyOnOrder' => Array('title'=>'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'),
+ 'Combination' => Array ('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'SKU' => Array ('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+ 'QtyInStock' => Array ('title' => 'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'),
+ 'QtyReserved' => Array ('title' => 'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'),
+ 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
+ 'QtyOnOrder' => Array ('title' => 'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'),
),
),
'Radio' => Array (
'Selector' => 'radio',
- 'Icons' => Array(
+ 'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
- 'FinalPrice' => Array( 'title'=>'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'),
- /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
+ 'Fields' => Array (
+ 'Combination' => Array ( 'title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'FinalPrice' => Array ( 'title' => 'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'),
+ /*'Weight' => Array ( 'title' => 'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/payment_type/payment_type_config.php
===================================================================
--- branches/5.0.x/units/payment_type/payment_type_config.php (revision 13266)
+++ branches/5.0.x/units/payment_type/payment_type_config.php (revision 13267)
@@ -1,147 +1,170 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => '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'),
+ 'payment_type_list' =>Array ( 'prefixes' => Array ('pt_List'),
'format' => "!la_title_PaymentTypes!",
),
- 'payment_type_edit'=>Array ( 'prefixes' => Array ('pt'),
+ '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!"),
'group_list' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"),
'payment_currencies_edit' => Array ('prefixes' => Array ('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1),
'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2),
'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3),
'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4),
),
),
'PermSection' => Array ('main' => 'in-commerce:payment_types'),
'Sections' => Array (
'in-commerce:payment_types' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_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' => 5,
'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_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', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, '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', 'default' => NULL),
- ),
-/* 'VirtualFields' => Array (
- 'Qty' => 1,
- ),*/
-
+ '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', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'AdminComments' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, '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',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.00'),
+ 'PortalGroups' => Array ('type' => 'string', 'default' => null),
+ ),
+ /*
+ 'VirtualFields' => Array (
+ 'Qty' => 1,
+ ),
+ */
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
'module' => 'core',
),
'Fields' => Array (
'PaymentTypeId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50),
'Name' => Array ( 'title' => 'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200),
'Description' => Array ( 'title' => 'la_col_Description', 'filter_block' => 'grid_like_filter', 'width' => 200),
'BuiltIn' => Array ( 'title' => 'la_col_BuiltIn', 'filter_block' => 'grid_options_filter', 'width' => 100),
'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/5.0.x/units/manufacturers/manufacturers_config.php (revision 13266)
+++ branches/5.0.x/units/manufacturers/manufacturers_config.php (revision 13267)
@@ -1,144 +1,149 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'manuf',
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ManufacturersEventHandler', 'file' => 'manufacturers_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ManufacturersTagProcessor', 'file' => 'manufacturers_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
+ 'Hooks' => Array (
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'manuf',
'HookToSpecial' => '',
- 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
+ 'HookToEvent' => Array ('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPrepareStates',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ManufacturerId',
- 'StatusField' => Array(),
+ 'StatusField' => Array (),
'TableName' => TABLE_PREFIX.'Manufacturers',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('manuf'=>'!la_title_AddingManufacturer!'),
- 'edit_status_labels' => Array('manuf'=>'!la_title_EditingManufacturer!'),
- 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturers!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'),
+ 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'),
+ 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturers!'),
),
- 'manuf_list'=>Array( 'prefixes' => Array('manuf_List'),
+ 'manuf_list' =>Array ( 'prefixes' => Array ('manuf_List'),
'format' => "!la_title_Manufacturers!",
),
- 'manuf_edit'=>Array( 'prefixes' => Array('manuf'),
- 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturer!'),
+ 'manuf_edit' =>Array ( 'prefixes' => Array ('manuf'),
+ 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'),
'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
),
),
- 'PermSection' => Array('main' => 'in-commerce:manufacturers'),
+ 'PermSection' => Array ('main' => 'in-commerce:manufacturers'),
- 'Sections' => Array(
- 'in-commerce:manufacturers' => Array(
+ 'Sections' => Array (
+ 'in-commerce:manufacturers' => Array (
'parent' => 'in-commerce',
'icon' => 'manufacturers',
'label' => 'la_tab_Manufacturers',
- 'url' => Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 4,
'type' => stTREE,
),
),
'TitleField' => 'Name', // field, used in bluebar when editing existing item
- 'ListSQLs' => Array( ''=>'SELECT * FROM %s',
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s',
), // key - special, value - list select sql
- 'ItemSQLs' => Array(''=>'SELECT * FROM %s',
+ 'ItemSQLs' => Array ('' => 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('Name' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('Name' => 'asc'),
)
),
'Fields' => Array (
- 'ManufacturerId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string','not_null' => '1','default' => '', 'required'=>true,'max_len'=>255),
- 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'URL' => Array('type' => 'string','not_null' => '1','default' => '','max_len'=>255),
+ 'ManufacturerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' =>true, 'max_len' =>255),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'URL' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'max_len' =>255),
'Logo' => Array (
'type' => 'string',
'formatter' => 'kPictureFormatter',
'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH.'manufacturers/',
'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
'multiple' => false,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
- 'IsPopular' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
- 'Phone' => Array('type' => 'string','default' => null),
- 'Fax' => Array('type' => 'string', 'default' => null),
- 'Address1' => Array('type' => 'string','default' => null),
- 'Address2' => Array('type' => 'string', 'default' => null),
- 'City' => Array('type' => 'string','default' => null),
- 'State' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array(), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null),
- 'Zip' => Array('type' => 'string', 'default' => null),
- 'Country' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
+ 'IsPopular' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Email' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') ),
+ 'Phone' => Array ('type' => 'string', 'default' => null),
+ 'Fax' => Array ('type' => 'string', 'default' => null),
+ 'Address1' => Array ('type' => 'string', 'default' => null),
+ 'Address2' => Array ('type' => 'string', 'default' => null),
+ 'City' => Array ('type' => 'string', 'default' => null),
+ 'State' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null),
+ 'Zip' => Array ('type' => 'string', 'default' => null),
+ 'Country' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT %1$s
FROM '.TABLE_PREFIX.'StdDestinations
LEFT JOIN '.TABLE_PREFIX.'Phrase
ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
WHERE
DestType=1
AND
LanguageId = %2$s
ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', 'default' => null),
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'URL' => Array ('title' => 'la_col_URL', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Manufacturers',
'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short',
),
);
\ No newline at end of file
Index: branches/5.0.x/units/shipping/shipping_config.php
===================================================================
--- branches/5.0.x/units/shipping/shipping_config.php (revision 13266)
+++ branches/5.0.x/units/shipping/shipping_config.php (revision 13267)
@@ -1,175 +1,200 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => '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'),
+ 'shipping_list' =>Array ( 'prefixes' => Array ('s_List'),
'format' => "!la_title_ShippingTypes!",
),
- 'shipping_type_edit'=>Array ( 'prefixes' => Array ('s'),
+ '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!"),
'groups' => Array ('prefixes' => Array ('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Groups!"),
'select_modifier' => Array ('prefixes' => Array ('s'), 'format' => "!la_title_ApplyModifier!"),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/shipping/shipping_edit', 'priority' => 1),
'zones' => Array ('title' => 'la_tab_ShippingZones', 't' => 'in-commerce/shipping/shipping_zones', 'priority' => 2),
'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/shipping/shipping_brackets', 'priority' => 3),
'costs' => Array ('title' => 'la_tab_Costs', 't' => 'in-commerce/shipping/shipping_costs', 'priority' => 4),
'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5),
),
),
'PermSection' => Array ('main' => 'in-commerce:shipping'),
'Sections' => Array (
'in-commerce:shipping_folder' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_shipping',
'use_parent_header' => 1,
'label' => 'la_tab_Shipping',
'permissions' => Array (),
'priority' => 4,
'type' => stTREE,
),
'in-commerce:shipping' => Array (
'parent' => 'in-commerce:shipping_folder',
'icon' => 'conf_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' => 4.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_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'),
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'),
// key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ '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', 'formatter' => 'kOptionsFormatter', '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', 'default' => NULL),
- 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
- 'IsFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'use_phrases' => 1, 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'formatter' => 'kOptionsFormatter'),
- 'InsuranceFee' => Array ('type' => 'float', 'default' => null),
- 'InsuranceType' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',),
- 'not_null' => 1, 'default' => 2
- ),
- ),
+ 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>25, 'error_msgs' => Array ('required' => 'Please fill in')),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')),
+ 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' => 25),
+ 'LocationFrom' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 1 => 'Riga',
+ 2 => 'Salaspils',
+ 3 => 'Chicago',
+ 4 => 'Dublin'
+ ),
+ 'not_null' => 1, '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' => 1, 'default' => 1),
+ 'BaseFee' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1),
+ 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1),
+ 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc' =>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => 1),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1,
+ 'default' => 1, 'not_null' => 1,
+ ),
+ 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ),
+ 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => 1 ),
+ 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => 1 ),
+ 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => 1 ),
+ 'PortalGroups' => Array ('type' => 'string', 'default' => null),
+ 'FreeShippingMinAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
+ 'IsFreePromoShipping' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'default' => 0, 'not_null' => 1,
+ ),
+ 'InsuranceFee' => Array ('type' => 'float', 'default' => null),
+ 'InsuranceType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (2 => 'la_Percent', 1 => 'la_Flat',), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 2
+ ),
+ ),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'ShippingID' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array ( 'title' => 'la_col_ShippingName', 'filter_block' => 'grid_range_filter', 'width' => 250, ),
'Type' => Array ( 'title' => 'la_col_ShippingType', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'SpeedCode' => Array ( 'title' => 'la_col_SpeedCode', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
'BaseFee' => Array ( 'title' => 'la_col_BaseFee', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
'IsFreePromoShipping' => Array ( 'title' => 'la_col_IsFreePromoShipping', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 170, ),
/*'CODFlatSurcharge' => Array ( 'title' => 'la_col_CODFlatSurcharge', 'filter_block' => 'grid_float_range_filter'),*/
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/taxes/taxes_config.php
===================================================================
--- branches/5.0.x/units/taxes/taxes_config.php (revision 13266)
+++ branches/5.0.x/units/taxes/taxes_config.php (revision 13267)
@@ -1,117 +1,127 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$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'),
+ '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'),
+ 'taxes_list' =>Array ( 'prefixes' => Array ('tax_List'),
'format' => "!la_title_Taxes!",
),
- 'taxes_edit'=>Array ( 'prefixes' => Array ('tax'),
+ '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'),
+ 'PermSection' => Array ('main' => 'in-commerce:taxes'),
'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,
),
),
'TableName' => TABLE_PREFIX.'TaxZones',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array ('taxdst'),
- 'ListSQLs' => Array ( ''=> 'SELECT %1$s.* %2$s FROM %s'),
+ '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')),
- ),
+ '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' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array ( 'title' => 'la_col_TaxZoneName', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'TaxValue' => Array ( 'title' => 'la_col_TaxValue', 'filter_block' => 'grid_float_range_filter', 'width' => 110, ),
'Type' => Array ( 'title' => 'la_col_ZoneType', 'filter_block' => 'grid_options_filter', 'width' => 90, ),
'ApplyToShipping' => Array ( 'title' => 'la_col_TaxApplyToShipping', 'filter_block' => 'grid_options_filter', 'width' => 140, ),
'ApplyToProcessing' => Array ( 'title' => 'la_col_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/zones/zones_config.php
===================================================================
--- branches/5.0.x/units/zones/zones_config.php (revision 13266)
+++ branches/5.0.x/units/zones/zones_config.php (revision 13267)
@@ -1,80 +1,98 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'z',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ZonesEventHandler', 'file' => 'zones_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ZonesTagProcessor', 'file' => 'zones_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'hooks' => Array (),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'ZoneID',
'TitleField' => 'Name',
'TitlePresets' => Array (
'default' => Array ( 'new_status_labels' => Array ('z' => '!la_title_AddingShippingZone!'),
'edit_status_labels' => Array ('z' => '!la_title_EditingShippingZone!'),
'new_titlefield' => Array ('z' => '!la_title_NewShippingZone!'),
),
'zones_edit' => Array ( 'prefixes' => Array ('z'), 'format' => "#z_status# - '#z_titlefield#'"),
),
'TableName' => TABLE_PREFIX.'ShippingZones',
'ForeignKey' => 'ShippingTypeID', //Name of the field in this table used as ForeignKey
'ParentTableKey' => 'ShippingID', //Name of the field in parent table linked with ForeignKey
'ParentPrefix' => 's', //Prefix of parent item
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array ('dst', 'sc'),
- 'ListSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ListSQLs' => Array ( '' => 'SELECT * FROM %s'),
// key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Name' => 'asc'),
)
),
'Fields' => Array (
'ZoneID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'ShippingTypeID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, ),
- 'Name' => Array ('type' => 'string', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array ('required' => 'Please fill in'), 'not_null' => 1, 'default' => '', ),
- 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
- 'CODallowed' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Allowed', 0 => 'la_NotAllowed'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
+ 'Name' => Array (
+ 'type' => 'string', 'max_len' => 100,
+ 'required' => 1, 'default' => '', 'not_null' => 1,
+ '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,
+ ),
+ 'CODallowed' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_NotAllowed', 1 => 'la_Allowed',), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'ZoneID' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array ( 'title' => 'la_col_ShipZoneName', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'Type' => Array ( 'title' => 'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'CODallowed' => Array ( 'title' => 'la_col_CODallowed', 'filter_block' => 'grid_options_filter', 'width' => 120, )
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/orders/orders_config.php
===================================================================
--- branches/5.0.x/units/orders/orders_config.php (revision 13266)
+++ branches/5.0.x/units/orders/orders_config.php (revision 13267)
@@ -1,500 +1,550 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'ord',
- 'ItemClass' => Array('class'=>'OrdersItem','file'=>'orders_item.php','build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'OrdersEventHandler','file'=>'orders_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'OrdersTagProcessor','file'=>'orders_tag_processor.php','build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'OrdersItem', 'file' => 'orders_item.php', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'OrdersEventHandler', 'file' => 'orders_event_handler.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'OrdersTagProcessor', 'file' => 'orders_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
- Array(
+ 'Hooks' => Array (
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'ord',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnPreSave' ),
+ 'HookToEvent' => Array ( 'OnPreSave' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRecalculateItems',
),
/* OnApplyCoupon is called as hook for OnUpdateCart/OnCheckout, which calls OnRecalcualate themself
- Array(
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'coup',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnApplyCoupon' ),
+ 'HookToEvent' => Array ( 'OnApplyCoupon' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRecalculateItems',
),*/
- Array(
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnCreate' ),
+ 'HookToEvent' => Array ( 'OnCreate' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserCreate',
),
- Array(
+ Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
- 'HookToEvent' => Array('OnCheckExpiredMembership'),
+ 'HookToEvent' => Array ('OnCheckExpiredMembership'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCheckRecurringOrders',
),
- Array(
+ Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnLogin' ),
+ 'HookToEvent' => Array ( 'OnLogin' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
- Array(
+ Array (
'Mode' => hBEFORE, // before because OnInpLogin is called after real in-portal login and uses data from hooks
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnInpLogin' ),
+ 'HookToEvent' => Array ( 'OnInpLogin' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
),
- 'AggregateTags' => Array(
- Array(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'LinkRemoveFromCart',
'LocalTagName' => 'Orditems_LinkRemoveFromCart',
),
- Array(
+ Array (
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'ProductLink',
'LocalTagName' => 'Orderitems_ProductLink',
),
- Array(
+ Array (
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'ProductExists',
'LocalTagName' => 'Orderitems_ProductExists',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'OrderId',
- 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'ViewMenuPhrase' => 'la_title_Orders',
'CatalogTabIcon' => 'icon16_item.png',
'TitleField' => 'OrderNumber',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('ord'=>'!la_title_Adding_Order!'),
- 'edit_status_labels' => Array('ord'=>'!la_title_Editing_Order!'),
- 'new_titlefield' => Array('ord'=>'!la_title_New_Order!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('ord' => '!la_title_Adding_Order!'),
+ 'edit_status_labels' => Array ('ord' => '!la_title_Editing_Order!'),
+ 'new_titlefield' => Array ('ord' => '!la_title_New_Order!'),
),
- 'orders_incomplete' => Array( 'prefixes' => Array('ord.incomplete_List'),
+ 'orders_incomplete' => Array ( 'prefixes' => Array ('ord.incomplete_List'),
'format' => "!la_title_IncompleteOrders!",
),
- 'orders_pending' => Array( 'prefixes' => Array('ord.pending_List'),
+ 'orders_pending' => Array ( 'prefixes' => Array ('ord.pending_List'),
'format' => "!la_title_PendingOrders!",
),
- 'orders_backorders' => Array( 'prefixes' => Array('ord.backorders_List'),
+ 'orders_backorders' => Array ( 'prefixes' => Array ('ord.backorders_List'),
'format' => "!la_title_BackOrders!",
),
- 'orders_toship' => Array( 'prefixes' => Array('ord.toship_List'),
+ 'orders_toship' => Array ( 'prefixes' => Array ('ord.toship_List'),
'format' => "!la_title_OrdersToShip!",
),
- 'orders_processed' => Array( 'prefixes' => Array('ord.processed_List'),
+ 'orders_processed' => Array ( 'prefixes' => Array ('ord.processed_List'),
'format' => "!la_title_OrdersProcessed!",
),
- 'orders_returns' => Array( 'prefixes' => Array('ord.returns_List'),
+ 'orders_returns' => Array ( 'prefixes' => Array ('ord.returns_List'),
'format' => "!la_title_OrdersReturns!",
),
- 'orders_denied' => Array( 'prefixes' => Array('ord.denied_List'),
+ 'orders_denied' => Array ( 'prefixes' => Array ('ord.denied_List'),
'format' => "!la_title_OrdersDenied!",
),
- 'orders_archived' => Array( 'prefixes' => Array('ord.archived_List'),
+ 'orders_archived' => Array ( 'prefixes' => Array ('ord.archived_List'),
'format' => "!la_title_OrdersArchived!",
),
- 'orders_search' => Array( 'prefixes' => Array('ord.search_List'),
+ 'orders_search' => Array ( 'prefixes' => Array ('ord.search_List'),
'format' => "!la_title_OrdersSearch!",
),
- 'orders_edit_general' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"),
- 'orders_edit_billing' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"),
- 'orders_edit_shipping' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"),
- 'orders_edit_items' => Array('prefixes' => Array('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"),
- 'orders_edit_preview' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"),
-
- 'orders_gw_result' => Array('prefixes' => Array('ord'), 'format' => "!la_title_OrderGWResult!"),
-
- 'order_items_edit' => Array( 'prefixes' => Array('ord', 'orditems'),
- 'new_status_labels' => Array('orditems'=>'!la_title_Adding_Order_Item!'),
- 'edit_status_labels' => Array('orditems'=>'!la_title_Editing_Order_Item!'),
- 'new_titlefield' => Array('orditems'=>'!la_title_New_Order_Item!'),
+ 'orders_edit_general' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"),
+ 'orders_edit_billing' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"),
+ 'orders_edit_shipping' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"),
+ 'orders_edit_items' => Array ('prefixes' => Array ('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"),
+ 'orders_edit_preview' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"),
+
+ 'orders_gw_result' => Array ('prefixes' => Array ('ord'), 'format' => "!la_title_OrderGWResult!"),
+
+ 'order_items_edit' => Array ( 'prefixes' => Array ('ord', 'orditems'),
+ 'new_status_labels' => Array ('orditems' => '!la_title_Adding_Order_Item!'),
+ 'edit_status_labels' => Array ('orditems' => '!la_title_Editing_Order_Item!'),
+ 'new_titlefield' => Array ('orditems' => '!la_title_New_Order_Item!'),
'format' => "#ord_status# '#ord_titlefield#' - #orditems_status# '#orditems_titlefield#'",
),
- 'orders_export' => Array('format' => '!la_title_OrdersExport!'),
+ 'orders_export' => Array ('format' => '!la_title_OrdersExport!'),
- 'orders_product_edit' => Array('format' => '!la_title_Editing_Order_Item!'),
+ 'orders_product_edit' => Array ('format' => '!la_title_Editing_Order_Item!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/orders/orders_edit', 'priority' => 1),
'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/orders/orders_edit_items', 'priority' => 2),
'shipping' => Array ('title' => 'la_tab_Shipping', 't' => 'in-commerce/orders/orders_edit_shipping', 'priority' => 3),
'billing' => Array ('title' => 'la_tab_Billing', 't' => 'in-commerce/orders/orders_edit_billing', 'priority' => 4),
'preview' => Array ('title' => 'la_tab_Preview', 't' => 'in-commerce/orders/orders_edit_preview', 'priority' => 5),
),
),
- 'PermSection' => Array('main' => 'in-commerce:orders'),
+ 'PermSection' => Array ('main' => 'in-commerce:orders'),
- 'Sections' => Array(
- 'in-commerce:orders' => Array(
+ 'Sections' => Array (
+ 'in-commerce:orders' => Array (
'parent' => 'in-commerce',
'icon' => 'in-commerce:orders',
'label' => 'la_tab_Orders',
- 'url' => Array('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:deny', 'advanced:archive', 'advanced:place', 'advanced:process', 'advanced:ship', 'advanced:reset_to_pending'),
+ 'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:deny', 'advanced:archive', 'advanced:place', 'advanced:process', 'advanced:ship', 'advanced:reset_to_pending'),
'priority' => 1,
'type' => stTREE,
),
),
'SectionAdjustments' => Array (
'in-portal:visits' => Array (
'url' => Array ('t' => 'in-commerce/visits/visits_list_incommerce', 'pass' => 'm'),
),
),
- 'StatisticsInfo' => Array(
- 'pending' => Array(
+ 'StatisticsInfo' => Array (
+ 'pending' => Array (
'icon' => 'core:icon16_item.png',
'label' => 'la_title_Orders',
'js_url' => "#url#",
- 'url' => Array('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
+ 'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
'status' => ORDER_STATUS_PENDING,
),
),
'TableName' => TABLE_PREFIX.'Orders',
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array(0,1,2,3,4,5,6), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array (0,1,2,3,4,5,6), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 0 => Array('label' => 'la_Incomplete', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 1 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 2 => Array('label' => 'la_BackOrders', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 3 => Array('label' => 'la_ToShip', 'on_sql' => '', 'off_sql' => '%1$s.Status != 3' ),
- 4 => Array('label' => 'la_Processed', 'on_sql' => '', 'off_sql' => '%1$s.Status != 4' ),
- 5 => Array('label' => 'la_Denied', 'on_sql' => '', 'off_sql' => '%1$s.Status != 5' ),
- 6 => Array('label' => 'la_Archived', 'on_sql' => '', 'off_sql' => '%1$s.Status != 6' ),
+ 'Filters' => Array (
+ 0 => Array ('label' => 'la_Incomplete', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 1 => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 2 => Array ('label' => 'la_BackOrders', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 3 => Array ('label' => 'la_ToShip', 'on_sql' => '', 'off_sql' => '%1$s.Status != 3' ),
+ 4 => Array ('label' => 'la_Processed', 'on_sql' => '', 'off_sql' => '%1$s.Status != 4' ),
+ 5 => Array ('label' => 'la_Denied', 'on_sql' => '', 'off_sql' => '%1$s.Status != 5' ),
+ 6 => Array ('label' => 'la_Archived', 'on_sql' => '', 'off_sql' => '%1$s.Status != 6' ),
)
),
- 'CalculatedFields' => Array(
+ 'CalculatedFields' => Array (
'' => Array (
'CustomerName' => 'IF( ISNULL(u.Login), IF (%1$s.PortalUserId = -1, \'root\', IF (%1$s.PortalUserId = -2, \'Guest\', \'n/a\')), CONCAT(u.FirstName,\' \',u.LastName) )',
'Username' => 'IF( ISNULL(u.Login),\'root\',u.Login)',
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
'SubtotalWithDiscount' => '(SubTotal)',
'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
'TotalAmount' => 'SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount',
'CouponCode' => 'pc.Code',
'CouponName' => 'pc.Name',
'AffiliateUser' => 'IF( LENGTH(au.Login),au.Login,\'!la_None!\')',
'AffiliatePortalUserId' => 'af.PortalUserId',
'GiftCertificateCode' => 'gc.Code',
'GiftCertificateRecipient' => 'gc.Recipient',
),
'myorders' => Array (
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
'SubtotalWithDiscount' => '(SubTotal)',
'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
'TotalAmount' => 'SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount',
/*'ItemsCount' => 'COUNT(%1$s.OrderId)',*/
),
),
// %1$s - table name of object
// %2$s - calculated fields
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
'myorders' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId',
// LEFT JOIN '.TABLE_PREFIX.'OrderItems ON %1$s.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId',
),
'ItemSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
),
- 'SubItems' => Array('orditems'),
- 'ListSortings' => Array(
- '' => Array(
- 'Sorting' => Array('OrderDate' => 'desc'),
+ 'SubItems' => Array ('orditems'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('OrderDate' => 'desc'),
)
),
- 'Fields' => Array(
- 'OrderId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
- 'Number' => Array('type' => 'int','required'=>1,'formatter'=>'kFormatter', 'unique'=>Array('SubNumber'),'format'=>'%06d', 'max_value_inc'>999999, 'not_null' => '1','default' => 0),
- 'SubNumber' => Array('type' => 'int','required'=>1,'formatter'=>'kFormatter','unique'=>Array('Number'), 'format'=>'%03d', 'max_value_inc'>999, 'not_null' => '1','default' => 0),
- 'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_Incomplete',1=>'la_Pending',2=>'la_BackOrders',3=>'la_ToShip',4=>'la_Processed',5=>'la_Denied',6=>'la_Archived'), 'use_phrases'=>1, 'not_null' => '1','default' => 0, 'filter_type' => 'equals'),
- 'OnHold' => Array (
- 'type' => 'int',
- 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
- 'not_null' => 1, 'default' => 0
- ),
- 'OrderDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
- 'PortalUserId'=>Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options'=>Array(-1=>'root',-2=>'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId','left_title_field'=>'Login','required'=>1,'not_null'=>1,'default'=>-1),
- 'OrderIP' => Array('type' => 'string','not_null' => '1','default' => '', 'filter_type' => 'like'),
- 'UserComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'AdminComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
- 'BillingTo' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingCompany' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingPhone' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingFax' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingEmail' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
- 'BillingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingCity' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options' => Array(),
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => ''),
- 'BillingZip' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType=1
- AND
- LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => 'USA'),
- 'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'),
- 'VATPercent' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.3f'),
- 'PaymentType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PaymentTypes WHERE Status = 1', 'option_key_field'=>'PaymentTypeId','option_title_field'=>'Description', 'not_null' => 1, 'default' => 0),
- 'PaymentAccount' => Array('type' => 'string','not_null' => '1', 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'),
- 'PaymentNameOnCard' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'PaymentCCExpDate' => Array('type' => 'string', 'formatter'=>'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field'=>'PaymentCCExpYear', 'not_null' => '1','default' => ''),
- 'PaymentCardType' => Array('type' => 'string', 'not_null' => 1, 'formatter'=>'kOptionsFormatter', 'options' => Array('' => '','1' => 'Visa','2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''),
- 'PaymentExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ShippingTo' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingCompany' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingPhone' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingFax' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingEmail' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
- 'ShippingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingCity' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options' => Array(),
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => ''),
- 'ShippingZip' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType=1
- AND
- LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => 'USA'),
- 'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
- 'ShippingCost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'ShippingCustomerAccount' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingTracking' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'SubTotal' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
- 'CostTotal' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'OriginalAmount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'ShippingOption' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default'=>0),
- 'ShippingGroupOption' => Array('type' => 'int', 'not_null' => 1, 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default'=>0),
- 'GiftCertificateId' => Array('type' => 'int','default' => null),
- 'GiftCertificateDiscount' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',),
- 'ShippingInfo' => Array('type' => 'string', 'default' => NULL),
- 'CouponId' => Array('type' => 'int','default' => null),
- 'CouponDiscount' => Array('type' => 'float','not_null' => '1','default' => '0.00','formatter'=>'kFormatter','format'=>'%01.2f'),
- 'DiscountTotal' => Array('type' => 'float','not_null' => '1','default' => '0.00','formatter'=>'kFormatter','format'=>'%01.2f'),
- 'TransactionStatus' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(0=>'la_Invalid', 1 => 'la_Verified', 2 => 'la_Penging'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
- 'GWResult1' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'default' => NULL),
- 'GWResult2' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'default' => NULL),
- 'AffiliateId' => Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(0 => 'lu_None'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field'=>'AffiliateId','left_title_field'=>'Login','not_null'=>1,'default'=>0),
- 'VisitId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'AffiliateCommission' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '1','default' => '0.0000'),
- 'ProcessingFee' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '0','default' => '0.0000'),
- 'InsuranceFee' => Array ('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'ShippingTaxable' => Array('type' => 'int', 'not_null' => 0, 'default' => 0),
- 'ProcessingTaxable' => Array('type' => 'int', 'not_null' => 0, 'default' => 0),
- 'IsRecurringBilling' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'ChargeOnNextApprove' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'NextCharge' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
- 'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string
- ),
-
- 'VirtualFields' => Array(
- 'CustomerName' => Array('type'=>'string','default'=>'','filter_type'=>'like'),
- 'TotalAmount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'AmountWithoutVAT' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'SubtotalWithDiscount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'SubtotalWithoutDiscount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
- 'OrderNumber' => Array('type'=>'string','default'=>'', 'filter_type' => 'like'),
-
- // for ResetToUser
- 'UserTo' => Array('type'=>'string','default'=>''),
- 'UserCompany' => Array('type'=>'string','default'=>''),
- 'UserPhone' => Array('type'=>'string','default'=>''),
- 'UserFax' => Array('type'=>'string','default'=>''),
- 'UserEmail' => Array('type'=>'string','default'=>''),
- 'UserAddress1' => Array('type'=>'string','default'=>''),
- 'UserAddress2' => Array('type'=>'string','default'=>''),
- 'UserCity' => Array('type'=>'string','default'=>''),
- 'UserState' => Array('type'=>'string','default'=>''),
- 'UserZip' => Array('type'=>'string','default'=>''),
- 'UserCountry' => Array('type'=>'string','default'=>''),
-
- // for Search
- 'Username' => Array('type'=>'string','filter_type'=>'like'),
- 'OrderSearchId' => Array('type'=>'int','filter_type'=>'equals','filter_field'=>'OrderId'),
- 'FromDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ),
- 'ToDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
- 'FromAmount' => Array('type'=>'double', 'formatter'=>'kFormatter', 'format'=>'%01.2f','filter_type'=>'range_from','filter_field'=>'TotalAmount'),
- 'ToAmount' => Array('type'=>'double', 'formatter'=>'kFormatter', 'format'=>'%01.2f','filter_type'=>'range_to','filter_field'=>'TotalAmount'),
- 'HasBackOrders' => Array('default'=>false),
- 'PaymentCVV2' => Array('type'=>'string', 'default'=>false),
- 'AffiliateUser' => Array('type'=>'string', 'filter_type' => 'like'),
- 'AffiliatePortalUserId' => Array('type'=>'int'),
-
- // export related fields: begin
- 'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
- 'ExportFilename' => Array('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
- 'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
- 'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
- 'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
- 'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
- 'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'ExportPresets' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'ExportSavePreset' => Array('type'=>'int'),
- 'ExportPresetName' => Array('type'=>'string'),
- // export related fields: end
- ),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
+ 'Fields' => Array (
+ 'OrderId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
+ 'Number' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('SubNumber'), 'format' => '%06d', 'max_value_inc'>999999, 'not_null' => 1, 'default' => 0),
+ 'SubNumber' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('Number'), 'format' => '%03d', 'max_value_inc'>999, 'not_null' => 1, 'default' => 0),
+ 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0=> 'la_Incomplete',1=> 'la_Pending',2=> 'la_BackOrders',3=> 'la_ToShip',4=> 'la_Processed',5=> 'la_Denied',6=> 'la_Archived'), 'use_phrases' =>1, 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
+ 'OnHold' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'OrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
+ 'PortalUserId' =>Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' =>Array (-1=> 'root',-2=> 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' =>1, 'not_null' =>1, 'default' =>-1),
+ 'OrderIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'filter_type' => 'like'),
+ 'UserComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'AdminComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
+ 'BillingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingEmail' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kFormatter',
+ 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
+ 'not_null' => 1, 'default' => '',
+ ),
+ 'BillingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingState' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (),
+ 'option_key_field' => 'DestAbbr',
+ 'option_title_field' => 'Translation',
+ 'not_null' => 1, 'default' => '',
+ ),
+ 'BillingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'BillingCountry' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase
+ ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE
+ DestType = 1 AND LanguageId = %2$s
+ ORDER BY Translation',
+ 'option_key_field' => 'DestAbbr',
+ 'option_title_field' => 'Translation',
+ 'not_null' => 1, 'default' => 'USA',
+ ),
+ 'VAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' =>1, 'default' => '0', 'format' => '%01.2f'),
+ 'VATPercent' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'not_null' =>1, 'default' => '0', 'format' => '%01.3f'),
+ 'PaymentType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PaymentTypes WHERE Status = 1', 'option_key_field' => 'PaymentTypeId', 'option_title_field' => 'Description', 'not_null' => 1, 'default' => 0),
+ 'PaymentAccount' => Array ('type' => 'string', 'not_null' => 1, 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'),
+ 'PaymentNameOnCard' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'PaymentCCExpDate' => Array ('type' => 'string', 'formatter' => 'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field' => 'PaymentCCExpYear', 'not_null' => 1, 'default' => ''),
+ 'PaymentCardType' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => '', '1' => 'Visa', '2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''),
+ 'PaymentExpires' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ShippingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingEmail' => Array (
+ 'type' => 'string', 'not_null' => 1, 'default' => '',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (),
+ 'option_key_field' => 'DestAbbr',
+ 'option_title_field' => 'Translation',
+ ),
+ 'ShippingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingState' => Array (
+ 'type' => 'string', 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (),
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation',
+ 'not_null' => 1, 'default' => ''),
+ 'ShippingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingCountry' => Array (
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase
+ ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE
+ DestType = 1 AND LanguageId = %2$s
+ ORDER BY Translation',
+ 'option_key_field' => 'DestAbbr',
+ 'option_title_field' => 'Translation',
+ 'not_null' => 1, 'default' => 'USA',
+ ),
+ 'ShippingType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => 'SELECT %s
+ FROM ' . TABLE_PREFIX . 'ShippingType
+ WHERE Status = 1',
+ 'option_key_field' => 'ShippingID',
+ 'option_title_field' => 'Name',
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'ShippingCost' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'ShippingCustomerAccount' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingTracking' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
+ 'ShippingDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+ 'SubTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'CostTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'OriginalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'ShippingOption' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default' =>0),
+ 'ShippingGroupOption' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default' =>0),
+ 'GiftCertificateId' => Array ('type' => 'int', 'default' => null),
+ 'GiftCertificateDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',),
+ 'ShippingInfo' => Array ('type' => 'string', 'default' => NULL),
+ 'CouponId' => Array ('type' => 'int', 'default' => null),
+ 'CouponDiscount' => Array ('type' => 'float', 'not_null' => 1, 'default' => '0.00', 'formatter' => 'kFormatter', 'format' => '%01.2f'),
+ 'DiscountTotal' => Array ('type' => 'float', 'not_null' => 1, 'default' => '0.00', 'formatter' => 'kFormatter', 'format' => '%01.2f'),
+ 'TransactionStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0=> 'la_Invalid', 1 => 'la_Verified', 2 => 'la_Penging'), 'use_phrases' =>1, 'not_null' => 1, 'default' => 2),
+ 'GWResult1' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL),
+ 'GWResult2' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL),
+ 'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'Login', 'not_null' =>1, 'default' =>0),
+ 'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'AffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.0000'),
+ 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '0', 'default' => '0.0000'),
+ 'InsuranceFee' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'ShippingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0),
+ 'ProcessingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0),
+ 'IsRecurringBilling' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
+ 'default' => 0, 'not_null' => 1,
+ ),
+ 'ChargeOnNextApprove' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
+ 'default' => 0, 'not_null' => 1,
+ ),
+ 'NextCharge' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
+ 'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string
+ ),
+
+ 'VirtualFields' => Array (
+ 'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
+ 'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
+ 'OrderNumber' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
+
+ // for ResetToUser
+ 'UserTo' => Array ('type' => 'string', 'default' => ''),
+ 'UserCompany' => Array ('type' => 'string', 'default' => ''),
+ 'UserPhone' => Array ('type' => 'string', 'default' => ''),
+ 'UserFax' => Array ('type' => 'string', 'default' => ''),
+ 'UserEmail' => Array ('type' => 'string', 'default' => ''),
+ 'UserAddress1' => Array ('type' => 'string', 'default' => ''),
+ 'UserAddress2' => Array ('type' => 'string', 'default' => ''),
+ 'UserCity' => Array ('type' => 'string', 'default' => ''),
+ 'UserState' => Array ('type' => 'string', 'default' => ''),
+ 'UserZip' => Array ('type' => 'string', 'default' => ''),
+ 'UserCountry' => Array ('type' => 'string', 'default' => ''),
+
+ // for Search
+ 'Username' => Array ('type' => 'string', 'filter_type' => 'like'),
+ 'OrderSearchId' => Array ('type' => 'int', 'filter_type' => 'equals', 'filter_field' => 'OrderId'),
+ 'FromDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ),
+ 'ToDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
+ 'FromAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_from', 'filter_field' => 'TotalAmount'),
+ 'ToAmount' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'filter_type' => 'range_to', 'filter_field' => 'TotalAmount'),
+ 'HasBackOrders' => Array ('default' =>false),
+ 'PaymentCVV2' => Array ('type' => 'string', 'default' =>false),
+ 'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like'),
+ 'AffiliatePortalUserId' => Array ('type' => 'int'),
+
+ // export related fields: begin
+ 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
+ 'ExportFilename' => Array ('type' => 'string', 'default' => ''),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
+ 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
+ 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
+ 'IncludeFieldTitles' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'ExportSavePreset' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ 'ExportPresetName' => Array ('type' => 'string'),
+ // export related fields: end
+ ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
1 => 'icon16_pending.png',
5 => 'icon16_disabled.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'OrderId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), 'OrderNumber' => Array( 'title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'OrderDate' => Array( 'title'=>'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
- 'CustomerName' => Array( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
- 'PaymentType' => Array( 'title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter', 'width' => 140, ),
- 'TotalAmount' => Array( 'title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter', 'width' => 140, ),
- 'AffiliateUser' => Array( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
+ 'Fields' => Array (
+ 'OrderId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), 'OrderNumber' => Array ( 'title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'OrderDate' => Array ( 'title' => 'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'CustomerName' => Array ( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
+ 'PaymentType' => Array ( 'title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter', 'width' => 140, ),
+ 'TotalAmount' => Array ( 'title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter', 'width' => 140, ),
+ 'AffiliateUser' => Array ( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
'OnHold' => Array ('title' => 'la_col_OnHold', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
- 'Search' => Array(
- 'Icons' => Array(
+ 'Search' => Array (
+ 'Icons' => Array (
'default' => 'icon16_item.png',
1 => 'icon16_pending.png',
5 => 'icon16_disabled.png',
'module' => 'core',
),
- 'Fields' => Array(
- 'OrderId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'OrderNumber' => Array('title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'OrderDate' => Array('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
- 'CustomerName' => Array('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'),
- 'PaymentType' => Array('title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'),
- 'TotalAmount' => Array('title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_float_range_filter'),
- 'AffiliateUser' => Array( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_user_like_filter'),
- 'OrderIP' => Array('title' => 'la_col_OrderIP', 'filter_block' => 'grid_like_filter'),
- 'Username' => Array('title' => 'la_col_Username', 'filter_block' => 'grid_user_like_filter'),
- 'PaymentAccount' => Array('title' => 'la_col_CreditCardNumber', 'filter_block' => 'grid_like_filter'),
+ 'Fields' => Array (
+ 'OrderId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'OrderNumber' => Array ('title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'OrderDate' => Array ('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'CustomerName' => Array ('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'),
+ 'PaymentType' => Array ('title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'),
+ 'TotalAmount' => Array ('title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_float_range_filter'),
+ 'AffiliateUser' => Array ( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_user_like_filter'),
+ 'OrderIP' => Array ('title' => 'la_col_OrderIP', 'filter_block' => 'grid_like_filter'),
+ 'Username' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_user_like_filter'),
+ 'PaymentAccount' => Array ('title' => 'la_col_CreditCardNumber', 'filter_block' => 'grid_like_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/currencies/currencies_config.php
===================================================================
--- branches/5.0.x/units/currencies/currencies_config.php (revision 13266)
+++ branches/5.0.x/units/currencies/currencies_config.php (revision 13267)
@@ -1,143 +1,153 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'curr',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'CurrenciesEventHandler', 'file' => 'currencies_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'CurrenciesTagProcessor', 'file' => 'currencies_tag_processor.php', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'kBankLVCurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'kECBCurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'kFRNYCurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
),
'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' => 'CurrencyId',
'StatusField' => Array ('Status', 'IsPrimary'),
'TitleField' => 'ISO',
'TitlePresets' => Array (
'default' => Array ( 'new_status_labels' => Array ('curr' => '!la_title_AddingCurrency!'),
'edit_status_labels' => Array ('curr' => '!la_title_EditingCurrency!'),
'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'),
),
- 'currencies_list'=>Array ( 'prefixes' => Array ('curr_List'),
+ 'currencies_list' =>Array ( 'prefixes' => Array ('curr_List'),
'format' => "!la_title_Currencies!",
),
- 'currencies_edit'=>Array ( 'prefixes' => Array ('curr'),
+ 'currencies_edit' =>Array ( 'prefixes' => Array ('curr'),
'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'),
'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!",
),
),
'PermSection' => Array ('main' => 'in-commerce:currencies'),
'Sections' => Array (
'in-commerce:currencies' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_currencies',
'label' => 'la_tab_Currencies',
'url' => Array ('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'),
'priority' => 3,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'Currencies',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array (),
- 'ListSQLs' => Array ( ''=> 'SELECT %1$s.*,
+ 'ListSQLs' => Array ( '' => 'SELECT %1$s.*,
phr.Translation
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Phrase phr ON
%1$s.Name = phr.Phrase'),
// key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s'),
'CalculatedFields' => Array (
'' => Array (
'Translation' => 'phr.Translation',
),
),
'ListSortings' => Array (
'' => Array (
'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'),
'Sorting' => Array ('ISO' => 'asc'),
)
),
- 'Fields' => Array
- (
- 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'Symbol' => Array ('type' => 'string', 'default' => null),
- 'SymbolPosition' => Array ('type' => 'int', 'default' => null,'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'),'use_phrases' => '1'),
- 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
- 'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1),
- 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'Status' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1, 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'formatter' => 'kOptionsFormatter'),
- 'IsPrimary' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
- ),
+ 'Fields' => Array (
+ 'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'Symbol' => Array ('type' => 'string', 'default' => null),
+ 'SymbolPosition' => Array ('type' => 'int', 'default' => null, 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'), 'use_phrases' => '1'),
+ 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 1,
+ ),
+ 'IsPrimary' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ ),
'VirtualFields' => Array (
- 'Translation' => Array ('type' => 'string'),
- ),
+ 'Translation' => Array ('type' => 'string'),
+ ),
+
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
'module' => 'core',
),
'Fields' => Array (
'CurrencyId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'ISO' => Array ( 'title' => 'la_col_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 90, ),
'Translation' => Array ( 'title' => 'la_col_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'RateToPrimary' => Array ( 'title' => 'la_col_RateToPrimary', 'filter_block' => 'grid_float_range_filter', 'width' => 130, ),
'Modified' => Array ( 'title' => 'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/units/products/products_config.php
===================================================================
--- branches/5.0.x/units/products/products_config.php (revision 13266)
+++ branches/5.0.x/units/products/products_config.php (revision 13267)
@@ -1,612 +1,654 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $config = Array (
'Prefix' => 'p',
- 'ItemClass' => Array('class'=>'ProductsItem','file'=>'products_item.php', 'require_classes' => Array('kCatDBItem'), 'build_event'=>'OnItemBuild'),
- 'ListClass' => Array('class'=>'kCatDBList','file'=>'','build_event'=>'OnListBuild'),
- 'EventHandlerClass' => Array('class'=>'ProductsEventHandler','file'=>'products_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'ProductsTagProcessor','file'=>'products_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event'=>'OnBuild'),
+ 'ItemClass' => Array ('class' => 'ProductsItem', 'file' => 'products_item.php', 'require_classes' => Array ('kCatDBItem'), 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'ProductsEventHandler', 'file' => 'products_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'ProductsTagProcessor', 'file' => 'products_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'),
'AutoLoad' => true,
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'CatalogItem' => true,
'AdminTemplatePath' => 'products',
'AdminTemplatePrefix' => 'products_',
'SearchConfigPostfix' => 'products',
'ConfigPriority' => 0,
'RewritePriority' => 104,
'RewriteListener' => 'ModRewriteHelper:CategoryItemRewriteListener',
'Hooks' => Array (
// for subscription products: access group is saved before changing pricings
Array (
'Mode' => hAFTER,
'Conditional' => true,
'HookToPrefix' => 'pr',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnNew', 'OnAfterItemLoad'),
+ 'HookToEvent' => Array ('OnNew', 'OnAfterItemLoad'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPreSave',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnBeforeCopyToLive' ),
+ 'HookToEvent' => Array ( 'OnBeforeCopyToLive' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnSaveVirtualProduct',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterItemDelete'),
+ 'HookToEvent' => Array ('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteListingType',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnModifyPaidListingConfig',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'file',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnNew', 'OnEdit' ),
+ 'HookToEvent' => Array ( 'OnNew', 'OnEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPreSave',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
- 'HookToEvent' => Array('OnAfterConfigRead'),
+ 'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
),
'IDField' => 'ProductId',
- 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
+ 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'ItemType' => 11, // this is used when relation to product is added from in-portal and via-versa
'ViewMenuPhrase' => 'la_text_Products',
'CatalogTabIcon' => 'in-commerce:icon16_products.png',
- 'ItemPropertyMappings' => Array(
+ 'ItemPropertyMappings' => Array (
'NewDays' => 'Product_NewDays', // number of days item to be NEW
'MinPopVotes' => 'Product_MinPopVotes', // minimum number of votes for an item to be POP
'MinPopRating' => 'Product_MinPopRating', // minimum rating for an item to be POP
'MaxHotNumber' => 'Product_MaxHotNumber', // maximum number of HOT (top seller) items
'HotLimit' => 'Product_HotLimit', // variable name in inp_Cache table
'ClickField' => 'Hits', // item click count is stored here (in item table)
),
'TitlePhrase' => 'la_text_Product',
- 'TitlePresets' => Array(
- 'default' => Array( 'new_status_labels' => Array('p'=>'!la_title_Adding_Product!'),
- 'edit_status_labels' => Array('p'=>'!la_title_Editing_Product!'),
- 'new_titlefield' => Array('p'=>'!la_title_NewProduct!'),
+ 'TitlePresets' => Array (
+ 'default' => Array ( 'new_status_labels' => Array ('p' => '!la_title_Adding_Product!'),
+ 'edit_status_labels' => Array ('p' => '!la_title_Editing_Product!'),
+ 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'),
),
- 'product_list'=>Array( 'prefixes' => Array('c_List','p_List'),
- 'tag_params' => Array('c'=> Array('per_page'=>-1)),
+ 'product_list' =>Array ( 'prefixes' => Array ('c_List', 'p_List'),
+ 'tag_params' => Array ('c' => Array ('per_page' =>-1)),
'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Products! (#p_recordcount#)",
),
- 'products_edit'=>Array( 'prefixes' => Array('p'),
- 'new_titlefield' => Array('p'=>'!la_title_NewProduct!'),
+ 'products_edit' =>Array ( 'prefixes' => Array ('p'),
+ 'new_titlefield' => Array ('p' => '!la_title_NewProduct!'),
'format' => "#p_status# '#p_titlefield#' - !la_title_General!",
),
- 'inventory' => Array('prefixes' => Array('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"),
- 'pricing' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"),
- 'access_pricing' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"),
- 'access' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"),
- 'files' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"),
- 'options'=> Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"),
- 'categories'=> Array('prefixes' => Array('p','p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"),
- 'relations' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"),
- 'content' => Array('prefixes' => Array('p','p.content_List'), 'tag_params' => Array('p.content' => Array('types'=>'content', 'live_table'=>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"),
- 'images' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"),
- 'reviews' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"),
- 'products_custom' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"),
- 'images_edit' => Array( 'prefixes' => Array('p', 'img'),
- 'new_status_labels' => Array('img'=>'!la_title_Adding_Image!'),
- 'edit_status_labels' => Array('img'=>'!la_title_Editing_Image!'),
- 'new_titlefield' => Array('img'=>'!la_title_New_Image!'),
+ 'inventory' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"),
+ 'pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"),
+ 'access_pricing' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"),
+ 'access' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"),
+ 'files' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"),
+ 'options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"),
+ 'categories' => Array ('prefixes' => Array ('p', 'p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"),
+ 'relations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"),
+ 'content' => Array ('prefixes' => Array ('p', 'p.content_List'), 'tag_params' => Array ('p.content' => Array ('types' => 'content', 'live_table' =>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"),
+ 'images' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"),
+ 'reviews' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"),
+ 'products_custom' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"),
+ 'images_edit' => Array ( 'prefixes' => Array ('p', 'img'),
+ 'new_status_labels' => Array ('img' => '!la_title_Adding_Image!'),
+ 'edit_status_labels' => Array ('img' => '!la_title_Editing_Image!'),
+ 'new_titlefield' => Array ('img' => '!la_title_New_Image!'),
'format' => "#p_status# '#p_titlefield#' - #img_status# '#img_titlefield#'",
),
- 'pricing_edit' => Array( 'prefixes' => Array('p', 'pr'),
- 'new_status_labels' => Array('pr'=>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"),
- 'edit_status_labels' => Array('pr'=>'!la_title_Editing_PriceBracket!'),
+ 'pricing_edit' => Array ( 'prefixes' => Array ('p', 'pr'),
+ 'new_status_labels' => Array ('pr' =>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"),
+ 'edit_status_labels' => Array ('pr' => '!la_title_Editing_PriceBracket!'),
'format' => "#p_status# '#p_titlefield#' - #pr_status#",
),
- 'options_edit' => Array( 'prefixes' => Array('p', 'po'),
- 'new_status_labels' => Array('po'=>"!la_title_Adding_Option!"),
- 'edit_status_labels' => Array('po'=>'!la_title_Editing_Option!'),
- 'new_titlefield' => Array('po'=>'!la_title_New_Option!'),
+ 'options_edit' => Array ( 'prefixes' => Array ('p', 'po'),
+ 'new_status_labels' => Array ('po' =>"!la_title_Adding_Option!"),
+ 'edit_status_labels' => Array ('po' => '!la_title_Editing_Option!'),
+ 'new_titlefield' => Array ('po' => '!la_title_New_Option!'),
'format' => "#p_status# '#p_titlefield#' - #po_status# '#po_titlefield#'",
),
- 'options_combinations' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"),
- 'shipping_options' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"),
+ 'options_combinations' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"),
+ 'shipping_options' => Array ('prefixes' => Array ('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"),
- 'file_edit' => Array( 'prefixes' => Array('p', 'file'),
- 'new_status_labels' => Array('file'=>"!la_title_Adding_File!"),
- 'edit_status_labels' => Array('file'=>'!la_title_Editing_File!'),
- 'new_titlefield' => Array('file'=>'!la_title_New_File!'),
+ 'file_edit' => Array ( 'prefixes' => Array ('p', 'file'),
+ 'new_status_labels' => Array ('file' =>"!la_title_Adding_File!"),
+ 'edit_status_labels' => Array ('file' => '!la_title_Editing_File!'),
+ 'new_titlefield' => Array ('file' => '!la_title_New_File!'),
'format' => "#p_status# '#p_titlefield#' - #file_status# '#file_titlefield#'",
),
- 'relations_edit' => Array( 'prefixes' => Array('p', 'rel'),
- 'new_status_labels' => Array('rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
- 'edit_status_labels' => Array('rel'=>'!la_title_Editing_Relationship!'),
+ 'relations_edit' => Array ( 'prefixes' => Array ('p', 'rel'),
+ 'new_status_labels' => Array ('rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
+ 'edit_status_labels' => Array ('rel' => '!la_title_Editing_Relationship!'),
'format' => "#p_status# '#p_titlefield#' - #rel_status#",
),
- 'reviews_edit' => Array( 'prefixes' => Array('p', 'rev'),
- 'new_status_labels' => Array('rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"),
- 'edit_status_labels' => Array('rev'=>'!la_title_Editing_Review!'),
+ 'reviews_edit' => Array ( 'prefixes' => Array ('p', 'rev'),
+ 'new_status_labels' => Array ('rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"),
+ 'edit_status_labels' => Array ('rev' => '!la_title_Editing_Review!'),
'format' => "#p_status# '#p_titlefield#' - #rev_status#",
),
- 'products_export' => Array('format' => '!la_title_ProductsExport!'),
+ 'products_export' => Array ('format' => '!la_title_ProductsExport!'),
- 'products_import' => Array('format' => '!la_title_ImportProducts!'),
+ 'products_import' => Array ('format' => '!la_title_ImportProducts!'),
- 'tree_in-commerce' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')),
+ 'tree_in-commerce' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/products/products_edit', 'priority' => 1),
'inventory' => Array ('title' => 'la_tab_Inventory', 't' => 'in-commerce/products/products_inventory', 'priority' => 2),
'access_and_pricing' => Array ('title' => 'la_tab_AccessAndPricing', 't' => 'in-commerce/products/products_access', 'priority' => 3),
'pricing' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_pricing', 'priority' => 4),
// 'pricing2' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_access_pricing', 'priority' => 5),
'files_and_pricing' => Array ('title' => 'la_tab_FilesAndPricing', 't' => 'in-commerce/products/products_files', 'priority' => 6),
'options' => Array ('title' => 'la_tab_Options', 't' => 'in-commerce/products/products_options', 'priority' => 7),
'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-commerce/products/products_categories', 'priority' => 8),
'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-commerce/products/products_relations', 'priority' => 9),
'package_content' => Array ('title' => 'la_tab_PackageContent', 't' => 'in-commerce/products/products_packagecontent', 'priority' => 10),
'images' => Array ('title' => 'la_tab_Images', 't' => 'in-commerce/products/products_images', 'priority' => 11),
'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-commerce/products/products_reviews', 'priority' => 12),
'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-commerce/products/products_custom', 'priority' => 13),
),
),
'PermItemPrefix' => 'PRODUCT',
'PermTabText' => 'In-Commerce',
- 'PermSection' => Array('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'email' => 'in-commerce:incommerce_configemail', 'custom' => 'in-commerce:configuration_custom'),
+ 'PermSection' => Array ('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'email' => 'in-commerce:incommerce_configemail', 'custom' => 'in-commerce:configuration_custom'),
- 'Sections' => Array(
- 'in-commerce' => Array(
+ 'Sections' => Array (
+ 'in-commerce' => Array (
'parent' => 'in-portal:root',
'icon' => 'ecommerce',
'label' => 'la_title_In-Commerce',
- 'url' => Array('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view'),
+ 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view'),
'priority' => 2.1,
'container' => true,
'type' => stTREE,
),
- 'in-commerce:products' => Array(
+ 'in-commerce:products' => Array (
'parent' => 'in-portal:site',
'icon' => 'products',
'label' => 'la_tab_Products',
- 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
+ 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'p.showall\')',
- 'permissions' => Array('view'),
+ 'permissions' => Array ('view'),
'priority' => 3.2,
'type' => stTREE,
),
// product settings
'in-commerce:setting_folder' => Array (
'parent' => 'in-portal:system',
'icon' => 'conf_ecommerce',
'label' => 'la_title_In-Commerce',
'use_parent_header' => 1,
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 3.1,
'container' => true,
'type' => stTREE,
),
- 'in-commerce:general' => Array(
+ 'in-commerce:general' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_ecommerce_general',
'label' => 'la_tab_GeneralSettings',
- 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
- 'in-commerce:output' => Array(
+ 'in-commerce:output' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
- 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 2,
'type' => stTREE,
),
- 'in-commerce:search' => Array(
+ 'in-commerce:search' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_search',
'label' => 'la_tab_ConfigSearch',
- 'url' => Array('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 7,
'type' => stTREE,
),
- 'in-commerce:incommerce_configemail' => Array(
+ 'in-commerce:incommerce_configemail' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_email',
'label' => 'la_tab_ConfigE-mail',
- 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 8,
'type' => stTREE,
),
- 'in-commerce:configuration_custom' => Array(
+ 'in-commerce:configuration_custom' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
- 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
+ 'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 9,
'type' => stTREE,
),
- 'in-commerce:contacts' => Array(
+ 'in-commerce:contacts' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_contact_info',
'label' => 'la_tab_ConfigContacts',
- 'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
- 'permissions' => Array('view', 'edit'),
+ 'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
+ 'permissions' => Array ('view', 'edit'),
'priority' => 10,
'type' => stTREE,
),
),
- 'FilterMenu' => Array(
- 'Groups' => Array(
- Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_tang','show_sub','show_serv','show_download','show_package'), 'type' => WHERE_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER),
- Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER),
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_tang', 'show_sub', 'show_serv', 'show_download', 'show_package'), 'type' => WHERE_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => HAVING_FILTER),
+ Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER),
),
- 'Filters' => Array(
- 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
- 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
- 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
- 's1' => Array(),
- 'show_tang' => Array('label' => 'la_product_tangible', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
- 'show_sub' => Array('label' => 'la_product_subscription', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
- 'show_serv' => Array('label' => 'la_product_service', 'on_sql' => '', 'off_sql' => '%1$s.Type != 3' ),
- 'show_download' => Array('label' => 'la_product_downloadable', 'on_sql' => '', 'off_sql' => '%1$s.Type != 4' ),
- 'show_package' => Array('label' => 'la_product_package', 'on_sql' => '', 'off_sql' => '%1$s.Type != 5' ),
- 's2' => Array(),
- 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
- 'show_hot' => Array('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
- 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
- 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
+ 'Filters' => Array (
+ 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
+ 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ 's1' => Array (),
+ 'show_tang' => Array ('label' => 'la_product_tangible', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
+ 'show_sub' => Array ('label' => 'la_product_subscription', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
+ 'show_serv' => Array ('label' => 'la_product_service', 'on_sql' => '', 'off_sql' => '%1$s.Type != 3' ),
+ 'show_download' => Array ('label' => 'la_product_downloadable', 'on_sql' => '', 'off_sql' => '%1$s.Type != 4' ),
+ 'show_package' => Array ('label' => 'la_product_package', 'on_sql' => '', 'off_sql' => '%1$s.Type != 5' ),
+ 's2' => Array (),
+ 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
+ 'show_hot' => Array ('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
+ 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
+ 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
)
),
'TableName' => TABLE_PREFIX.'Products',
'CalculatedFields' => Array (
'' => Array (
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
'Price' => 'COALESCE(pricing.Price, 0)',
'Cost' => 'COALESCE(pricing.Cost, 0)',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'ParentPath' => TABLE_PREFIX.'Category.ParentPath',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
),
'showall' => Array (
'Price' => 'COALESCE(pricing.Price, 0)',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
),
),
- 'ListSQLs' => Array(
+ 'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup ON '.TABLE_PREFIX.'PortalGroup.GroupId = %1$s.AccessGroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
- 'showall'=> 'SELECT %1$s.* %2$s FROM %1$s
+ 'showall' => 'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
), // key - special, value - list select sql
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc'),
+ 'ListSortings' => Array (
+ '' => Array (
+ 'ForcedSorting' => Array ('Priority' => 'desc'),
+ 'Sorting' => Array ('Name' => 'asc'),
)
),
- 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup pg ON pg.GroupId = %1$s.AccessGroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
),
- 'SubItems' => Array('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'),
- 'Fields' => Array(
- 'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
- 'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'required'=>true, 'max_len'=>255, 'default' => ''),
- 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
- 'SKU' => Array('type' => 'string', 'required'=>true, 'max_len'=>255, 'error_msgs' => Array('required' => 'Please fill in'), 'default' => NULL),
- 'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
- 'DescriptionExcerpt' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
- 'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL),
- 'MSRP' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
- 'ManufacturerId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => ''), 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field'=>'ManufacturerId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
- 'Status' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
- 'BackOrder' => Array('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ),
- 'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL),
- 'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
- 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
- 'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
- 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Featured' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'OnSale' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'Priority' => Array('type'=>'int', 'not_null' => 1, 'default' => 0),
- 'CachedRating' => Array('not_null' => 1, 'default' => 0, 'type' => 'float', 'formatter' => 'kFormatter', 'format' => '%0.2f'),
- 'CachedVotesQty' => Array('type'=>'int', 'not_null' => 1, 'default' => 0),
- 'Hits' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
- 'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#'),
- 'Expire' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>null),
- 'Type' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_product_tangible', 2=>'la_product_subscription', 4=>'la_product_downloadable', 3=>'la_product_service'/*, 6=>'la_gift_certificate', 5=>'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
- 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#'),
- 'ModifiedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'CreatedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ResourceId' => Array('type' => 'int', 'default' => 0),
- 'CachedReviewsQty' => Array('type' => 'int', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
- 'InventoryStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
- 'QtyInStock' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyInStockMin' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyReserved' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyBackOrdered' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'QtyOnOrder' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'InventoryComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- 'Qty' => Array('type'=>'int', 'formatter'=>'kFormatter', 'regexp'=>'/^[\d]+$/', 'error_msgs' => Array('invalid_format'=>'!la_invalid_integer!')),
- 'AccessGroupId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field'=>'GroupId', 'option_title_field'=>'Name', 'default' => NULL),
- 'AccessDuration' => Array('type' => 'int', 'default' => NULL),
- 'AccessDurationType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year' ), 'default' => NULL,),
- 'AccessStart' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
- 'AccessEnd' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,),
- 'OptionsSelectionMode' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0),
- 'HasRequiredOptions' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
- 'Virtual' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'ProcessingData' => Array('type' => 'string', 'default' => ''),
- 'PackageContent' => Array('type' => 'string', 'default' => NULL),
- 'IsRecurringBilling' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
-// 'PayPalRecurring' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
- 'ShippingMode' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default'=>0),
-
- 'ProcessingData' => Array('type' => 'string', 'default' => null),
-
- 'ShippingLimitation' => Array('type' => 'string', 'default' => NULL),
- 'AssignedCoupon' =>
- Array('type' => 'int', 'not_null' => 1, 'default' => 0,
- 'formatter'=>'kLEFTFormatter',
- 'options' => array(0 => 'None'),
- 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'ProductsCoupons WHERE `%s` = \'%s\'',
- 'left_key_field'=>'CouponId',
- 'left_title_field'=>'Name'),
- 'MinQtyFreePromoShipping' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'MetaKeywords' => Array('type' => 'string', 'default' => null),
- 'MetaDescription' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
- ),
- 'VirtualFields' => Array(
- 'Qty' => 1,
- 'Price' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
- 'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
- 'IsHot' => Array('type'=>'int'),
- 'IsNew' => Array('type'=>'int'),
- 'IsPop' => Array('type'=>'int'),
- 'Manufacturer' => Array(),
-
- // export related fields: begin
- 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
- 'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
- 'ExportFilename' => Array('type' => 'string', 'default' => ''),
- 'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
- 'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
- 'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
- 'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
- 'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
- 'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
- 'CategoryFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
- 'CategorySeparator' => Array('type' => 'string', 'default' => ':'),
- 'IsBaseCategory' => Array('type' => 'int', 'default' => 0),
- // export related fields: end
-
- // import related fields: begin
- 'FieldTitles' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
- 'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
- 'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'),
- 'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
- 'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
- 'ReplaceDuplicates' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
- 'DuplicateCheckFields' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('Name' => 'NAME'), 'default' => '|Name|'),
- 'SkipFirstRow' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
- // import related fields: end
-
- 'ThumbnailImage' => Array('type' => 'string', 'default' => ''),
- 'FullImage' => Array('type' => 'string', 'default' => ''),
- 'ImageAlt' => Array('type' => 'string', 'default' => ''),
-
- 'Filename' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'CachedNavbar' => Array('type' => 'string', 'default' => ''),
- 'ParentPath' => Array('type' => 'string', 'default' => ''),
-
- 'FileSize' => Array('type' => 'int','formatter' => 'kFilesizeFormatter','not_null' => 1, 'default' => 0),
- 'FilePath' => Array(),
- 'FileVersion' => Array(),
-
- // for primary image
- 'SameImages' => Array('type' => 'string', 'default' => ''),
- 'LocalThumb' => Array('type' => 'string', 'default' => ''),
- 'ThumbPath' => Array('type' => 'string', 'default' => ''),
- 'ThumbUrl' => Array('type' => 'string', 'default' => ''),
- 'LocalImage' => Array('type' => 'string', 'default' => ''),
- 'LocalPath' => Array('type' => 'string', 'default' => ''),
- 'FullUrl' => Array('type' => 'string', 'default' => ''),
- ),
- 'Grids' => Array(
+ 'SubItems' => Array ('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'),
+ 'Fields' => Array (
+ 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
+ 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'required' => 1, 'max_len' =>255, 'default' => ''),
+ 'AutomaticFilename' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'SKU' => Array ('type' => 'string', 'required' => 1, 'max_len' =>255, 'error_msgs' => Array ('required' => 'Please fill in'), 'default' => NULL),
+ 'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
+ 'DescriptionExcerpt' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
+ 'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL),
+ 'MSRP' => Array ('type' => 'float', 'min_value_inc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
+ 'ManufacturerId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0 => ''), 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field' => 'ManufacturerId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
+ 'default' => 2, 'not_null' => 1,
+ ),
+ 'BackOrder' => Array ('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ),
+ 'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array ('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL),
+ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
+ 'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
+ 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
+ 'EditorsPick' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Featured' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'OnSale' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0,
+ ),
+ 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CachedRating' => Array ('not_null' => 1, 'default' => 0, 'type' => 'float', 'formatter' => 'kFormatter', 'format' => '%0.2f'),
+ 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null),
+ 'Type' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
+ 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
+ 'ModifiedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'default' => 0),
+ 'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
+ 'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
+ 'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyInStockMin' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyReserved' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyBackOrdered' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'QtyOnOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'InventoryComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ 'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'error_msgs' => Array ('invalid_format' => '!la_invalid_integer!')),
+ 'AccessGroupId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL),
+ 'AccessDuration' => Array ('type' => 'int', 'default' => NULL),
+ 'AccessDurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year' ), 'default' => NULL,),
+ 'AccessStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ 'AccessEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,),
+ 'OptionsSelectionMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0),
+ 'HasRequiredOptions' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
+ 'Virtual' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ProcessingData' => Array ('type' => 'string', 'default' => ''),
+ 'PackageContent' => Array ('type' => 'string', 'default' => NULL),
+ 'IsRecurringBilling' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ //'PayPalRecurring' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
+ 'ShippingMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default' =>0),
+
+ 'ProcessingData' => Array ('type' => 'string', 'default' => null),
+
+ 'ShippingLimitation' => Array ('type' => 'string', 'default' => NULL),
+ 'AssignedCoupon' =>
+ Array ('type' => 'int', 'not_null' => 1, 'default' => 0,
+ 'formatter' => 'kLEFTFormatter',
+ 'options' => Array (0 => 'None'),
+ 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'ProductsCoupons WHERE `%s` = \'%s\'',
+ 'left_key_field' => 'CouponId',
+ 'left_title_field' => 'Name'),
+ 'MinQtyFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'MetaKeywords' => Array ('type' => 'string', 'default' => null),
+ 'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
+ ),
+
+ 'VirtualFields' => Array (
+ 'Qty' => 1,
+ 'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
+ 'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
+ 'IsHot' => Array ('type' => 'int'),
+ 'IsNew' => Array ('type' => 'int'),
+ 'IsPop' => Array ('type' => 'int'),
+ 'Manufacturer' => Array (),
+
+ // export related fields: begin
+ 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
+ 'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
+ 'ExportFilename' => Array ('type' => 'string', 'default' => ''),
+ 'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
+ 'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
+ 'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
+ 'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
+ 'IncludeFieldTitles' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ()),
+ 'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
+ 'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
+ 'IsBaseCategory' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ // export related fields: end
+
+ // import related fields: begin
+ 'FieldTitles' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
+ 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
+ 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'),
+ 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
+ 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
+ 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
+ 'DuplicateCheckFields' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array ('Name' => 'NAME'), 'default' => '|Name|'),
+ 'SkipFirstRow' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
+ // import related fields: end
+
+ 'ThumbnailImage' => Array ('type' => 'string', 'default' => ''),
+ 'FullImage' => Array ('type' => 'string', 'default' => ''),
+ 'ImageAlt' => Array ('type' => 'string', 'default' => ''),
+
+ 'Filename' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
+ 'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
+ 'ParentPath' => Array ('type' => 'string', 'default' => ''),
+
+ 'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
+ 'FilePath' => Array (),
+ 'FileVersion' => Array (),
+
+ // for primary image
+ 'SameImages' => Array ('type' => 'string', 'default' => ''),
+ 'LocalThumb' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbPath' => Array ('type' => 'string', 'default' => ''),
+ 'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
+ 'LocalImage' => Array ('type' => 'string', 'default' => ''),
+ 'LocalPath' => Array ('type' => 'string', 'default' => ''),
+ 'FullUrl' => Array ('type' => 'string', 'default' => ''),
+ ),
+
+ 'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
'NEW' => 'icon16_product_new.png',
),
- 'Fields' => Array(
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'SKU' => Array( 'title'=>'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Manufacturer' => Array('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
- 'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'OnSale' => Array('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), /*
- 'Weight' => Array( 'title'=>'la_col_ProductWeight', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
- 'CreatedOn' => Array( 'title'=>'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
- 'BackOrderDate' => Array( 'title'=>'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'Fields' => Array (
+ 'ProductId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Type' => Array ('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Manufacturer' => Array ('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'QtyInStock' => Array ('title' => 'la_col_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'OnSale' => Array ('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), /*
+ 'Weight' => Array ( 'title' => 'la_col_ProductWeight', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
+ 'CreatedOn' => Array ( 'title' => 'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
+ 'BackOrderDate' => Array ( 'title' => 'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
*/
),
),
'Radio' => Array (
'Icons' => Array (
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
'NEW' => 'icon16_product_new.png',
),
'Selector' => 'radio',
'Fields' => Array (
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
- 'SKU' => Array( 'title'=>'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
- 'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
- 'Manufacturer' => Array('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
- 'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
- 'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'ProductId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Type' => Array ('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
+ 'Manufacturer' => Array ('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
+ 'QtyInStock' => Array ('title' => 'la_col_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
),
),
),
- 'ConfigMapping' => Array(
+ 'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Products',
'ShortListPerPage' => 'Comm_Perpage_Products_Short',
'ForceEditorPick' => 'products_EditorPicksAboveRegular',
'DefaultSorting1Field' => 'product_OrderProductsBy',
'DefaultSorting2Field' => 'product_OrderProductsThenBy',
'DefaultSorting1Dir' => 'product_OrderProductsByDir',
'DefaultSorting2Dir' => 'product_OrderProductsThenByDir',
'RatingDelayValue' => 'product_RatingDelay_Value',
'RatingDelayInterval' => 'product_RatingDelay_Interval',
),
);
Index: branches/5.0.x/admin_templates/orders/export/export.tpl
===================================================================
--- branches/5.0.x/admin_templates/orders/export/export.tpl (revision 13266)
+++ branches/5.0.x/admin_templates/orders/export/export.tpl (revision 13267)
@@ -1,173 +1,174 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
document.getElementById('hidden_export_columns').value = select_to_string('<inp2:ord.export_InputName field="ExportColumns"/>');
submit_event('ord.export', 'OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord.export', 'OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:ord.export_SaveWarning name="grid_save_warning"/>
<inp2:ord.export_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportPresets" title="la_fld_ExportPresets"/>
<td class="control-cell">
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:ord.export_InputName field="ExportPresets"/>" id="<inp2:ord.export_InputName field="ExportPresets"/>" onchange="update_fields(this.value)">
<inp2:ord.export_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected"/>
</select>
&nbsp;&nbsp;
<input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()">
</td>
</tr>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportColumns" title="la_fld_ExportColumns"/>
<td class="control-cell">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button">
<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
<img src="img/s.gif" width="1" height="5" alt=""><br />
</td>
<td><img src="img/s.gif" width="45" height="1" alt=""><br></td>
<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
<tr>
<td>
<select multiple id="<inp2:ord.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
<inp2:ord.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
</select>
<input type="hidden" id="hidden_export_columns" name="<inp2:ord.export_InputName field="ExportColumns"/>" value="<inp2:ord.export_Field field="ExportColumns"/>" />
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>')" class="button"><br>
<img src="img/s.gif" width="1" height="4" alt=""><br>
<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:ord.export_InputName field="AvailableColumns"/>');" class="button">
</td>
<td>
<select multiple id="<inp2:ord.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
<inp2:ord.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
<inp2:m_RenderElement name="inp_edit_error" prefix="ord.export" field="ExportColumns"/>
</tr>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript" src="incs/ajax.js"></script>
<script type="text/javascript">
var delete_busy = false;
function delete_preset()
{
if (!confirm('<inp2:m_Phrase label="la_ConfirmDeleteExportPreset" js_escape="1"/>')) return;
var $kf = document.getElementById('kernel_form');
tmp = $kf.elements['events[ord.export]'].value;
$kf.elements['events[ord.export]'].value = 'OnDeleteExportPreset';
Request.method = 'POST';
Request.params = Request.serializeForm($kf);
$kf.elements['events[ord.export]'].value = tmp;
Request.makeRequest('<inp2:m_t ajax="1" ord.export_event="OnDeleteExportPreset" js_escape="1" no_amp="1"/>', delete_busy, '', function() {
presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
+
for (i=0; i< presets.options.length; i++) {
- if (presets.options(i).selected) {
- presets.options.remove(i);
+ if (presets.options[i].selected) {
+ presets.options.remove[i];
}
}
presets.options[0].selected = true;
}, function() {alert('error')} );
}
function update_preset_field(status)
{
if (status) {
presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
if ( presets.value != '' ) {
for (i=0; i< presets.options.length; i++) {
- if (presets.options(i).selected) {
- preset_name = presets.options(i).text
+ if (presets.options[i].selected) {
+ preset_name = presets.options[i].text
}
}
document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').value = preset_name;
}
}
document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').disabled = !status;
}
function update_fields(preset)
{
$export = select_to_string(document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
if ($export != '') {
string_to_selected($export, document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>');
}
av = document.getElementById('<inp2:ord.export_InputName field="AvailableColumns"/>');
fields = preset.split('|');
for (var i=0; i<fields.length; i++) {
fld = fields[i];
var $cur = null;
for (var $i = 0; $i < av.length; $i++)
{
cur = av.options[$i];
if (cur.value == fld) {
av.options[$i].selected = true;
move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>');
}
else {
av.options[$i].selected = false;
}
}
}
}
update_preset_field(document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').checked)
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Event Timeline