Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F775927
in-commerce
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Feb 6, 2:01 PM
Size
67 KB
Mime Type
text/x-diff
Expires
Sat, Feb 8, 2:01 PM (1 d, 36 m)
Engine
blob
Format
Raw Data
Handle
558430
Attached To
rMINC Modules.In-Commerce
in-commerce
View Options
Index: branches/5.0.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php (revision 12379)
@@ -1,107 +1,107 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$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'),
'AutoLoad' => true,
'AggregateTags' => 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
'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!'),
),
'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'),
'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'),
- 'priority' => 8.2,
+ 'priority' => 6.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'),
'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),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif', '0_0' => 'icon16_affiliate_plan_disabled.gif', '1_0' => 'icon16_affiliate_plan.gif', '1_1' => 'icon16_affiliate_plan_primary.gif'),
'Fields' => Array(
'AffiliatePlanId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
'PlanType' => Array( 'title' => 'la_col_PlanType', 'filter_block' => 'grid_options_filter'),
'Enabled' => Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/gateways/gw_tag_processor.php
===================================================================
--- branches/5.0.x/in-commerce/units/gateways/gw_tag_processor.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/gateways/gw_tag_processor.php (revision 12379)
@@ -1,114 +1,120 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class GatewayTagProcessor extends kDBTagProcessor {
/**
* Payment gateway config values for current payment type
*
* @var Array
* @access private
*/
var $ConfigValues=Array();
/**
* Payment type id for current gateway values
*
* @var int
* @access private
*/
var $PaymentTypeID=0;
function initGWConfigValues()
{
$payment_type_id = $this->Application->GetVar('pt_id');
$GWConfigValue =& $this->Application->recallObject('gwfv');
$sql = 'SELECT Value, GWConfigFieldId FROM '.$GWConfigValue->TableName.' WHERE PaymentTypeId = '.$payment_type_id;
$this->ConfigValues = $this->Conn->GetCol($sql,'GWConfigFieldId');
}
function gwConfigValue($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
$id = $object->GetID();
$value = isset($this->ConfigValues[$id]) ? $this->ConfigValues[$id] : '';
- if( !$this->HasParam($params, 'no_special') ) $value = htmlspecialchars($value);
- if( getArrayValue($params,'checked' ) ) $value = ($value == 1) ? 'checked' : '';
+ if (!array_key_exists('no_special', $params) || !$params['no_special']) {
+ $value = htmlspecialchars($value);
+ }
+
+ if ( getArrayValue($params,'checked') ) {
+ $value = ($value == 1) ? 'checked' : '';
+ }
+
return $value;
}
function PrintList($params)
{
$list =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List', $params);
$id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
$list->Query();
$list->GoFirst();
$block_params=$this->prepareTagParams($params);
$block_params['name']=$params['block'];
$block_params['pass_params']='true';
$payment_type_object =& $this->Application->recallObject('pt');
$o = '';
while (!$list->EOL())
{
$this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) );
$display_style = $payment_type_object->GetDBField('GatewayId') == $list->GetDBField('GatewayId') ? 'table-row' : 'none';
$block_params['input_block'] = $params['input_block_prefix'].$list->GetDBField('ElementType');
$block_params['gateway_id'] = $list->GetDBField('GatewayId');
$block_params['display'] = $display_style;
$o .= $this->Application->ParseBlock($block_params, 1);
$list->GoNext();
}
return $o;
}
function PredefinedOptions($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
$value = $this->gwConfigValue($params);
$options = explode(',', $object->GetDBField('ValueList') );
$block_params = $this->prepareTagParams($params);
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['pass_params'] = 'true';
$o = '';
foreach ($options as $key_val)
{
list($key,$val) = explode('=', $key_val);
$block_params['key'] = $key;
$block_params['option'] = $val;
$block_params['selected'] = ( $key == $value ? ' '.$params['selected'] : '');
$block_params['PrefixSpecial'] = $this->getPrefixSpecial();
$o .= $this->Application->ParseBlock($block_params, 1);
}
return $o;
}
}
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 12379)
@@ -1,150 +1,150 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'apayments',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'AffiliatePaymentsEventHandler','file'=>'affiliate_payments_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'AffiliatePaymentsTagProcessor','file'=>'affiliate_payments_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array(
Array(
'AggregateTo' => 'ord',
'AggregatedTagName' => 'InitPaymentsList',
'LocalTagName' => 'InitList',
),
Array(
'AggregateTo' => 'ord',
'AggregatedTagName' => 'ListPayments',
'LocalTagName' => 'ListPayments',
),
Array(
'AggregateTo' => 'ord',
'AggregatedTagName' => 'PaymentsPaginationBar',
'LocalTagName' => 'PaginationBar',
),
Array(
'AggregateTo' => 'ord',
'AggregatedTagName' => 'PaymentsCount',
'LocalTagName' => 'TotalRecords',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
),
'IDField' => 'AffiliatePaymentId',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('apayments'=>'!la_title_Adding_Affiliate_Payment!'),
'edit_status_labels' => Array('apayments'=>'!la_title_Editing_Affiliate_Payment!'),
'new_titlefield' => Array('apayments'=>'!la_title_New_Affiliate_Payment!'),
),
'payments_log' => Array('prefixes' => Array('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!"),
),
'Sections' => Array(
'in-commerce:paymentlog' => Array(
'parent' => 'in-commerce',
'icon' => 'payment_log',
'label' => 'la_tab_PaymentLog',
'url' => Array('t' => 'in-commerce/payments/payments_list', 'pass' => 'm'),
'permissions' => Array('view'),
- 'priority' => 9,
+ 'priority' => 7,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'AffiliatePayments',
'ListSQLs' => Array(''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId'),
'ItemSQLs' => Array(''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId'),
'CalculatedFields' => Array(
'' => Array(
'PortalUserId' => 'af.PortalUserId',
),
'log' => Array(
'Username' => 'au.Login',
'PortalUserId' => 'af.PortalUserId',
),
),
'ForeignKey' => 'AffiliateId',
'ParentTableKey' => 'AffiliateId',
'ParentPrefix' => 'affil',
'AutoDelete' => true,
'AutoClone' => true,
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('PaymentDate' => 'desc'),
)
),
'Fields' => Array(
'AffiliatePaymentId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'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),
'PaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1','default' => '#NOW#'),
'Amount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1', 'required'=>1, 'default' => '0.00'),
'Comment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'PaymentReference' => Array('type' => 'string','not_null' => '1','default' => ''),
'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array(
'Username' => Array('type' => 'string'),
'PortalUserId' => Array('type' => 'int'),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_affiliate_payment.gif'),
'Fields' => Array(
'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter'),
'Amount' => Array( 'title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
'Comment' => Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
),
),
'Log' => Array(
'Icons' => Array('default'=>'icon16_affiliate_payment.gif'),
'Fields' => Array(
'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Username' => Array( 'title' => 'la_col_Username', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter'),
'Amount' => Array( 'title' => 'la_col_Amount', 'data_block' => 'grid_currency_td', 'filter_block' => 'grid_float_range_filter'),
'Comment' => Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 12379)
@@ -1,99 +1,99 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$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'),
'AutoLoad' => true,
'AggregateTags' => Array(
Array(
'AggregateTo' => 'u',
'AggregatedTagName' => 'ListAffiliatesPaymentTypes',
'LocalTagName' => 'PrintList',
'LocalSpecial' => 'active',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'PaymentTypeId',
'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!'),
),
'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'),
'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('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down'),
- 'priority' => 8.3,
+ 'priority' => 6.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'),
'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', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'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),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif', '0_0' => 'icon16_affiliate_payment_type_disabled.gif', '1_0' => 'icon16_affiliate_payment_type.gif', '1_1' => 'icon16_affiliate_payment_type_primary.gif'),
'Fields' => Array(
'PaymentTypeId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Name' => Array( 'title' => 'la_col_Name', 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter'),
'Description' => Array( 'title' => 'la_col_Description', 'filter_block' => 'grid_like_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/manufacturers/manufacturers_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/manufacturers/manufacturers_config.php (revision 12379)
@@ -1,139 +1,139 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$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'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'manuf',
'HookToSpecial' => '',
'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPrepareStates',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ManufacturerId',
'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!'),
),
'manuf_list'=>Array( 'prefixes' => Array('manuf_List'),
'format' => "!la_title_Manufacturers!",
),
'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'),
'Sections' => Array(
'in-commerce:manufacturers' => Array(
'parent' => 'in-commerce',
'icon' => 'in-commerce:manufacturers',
'label' => 'la_tab_Manufacturers',
'url' => Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
- 'priority' => 6,
+ 'priority' => 5,
'type' => stTREE,
),
),
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array(''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array (
'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', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'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
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),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default'=>'icon16_manuf.gif'),
'Fields' => Array (
'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter'),
'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter'),
'URL' => Array ('title' => 'la_col_URL', 'filter_block' => 'grid_like_filter'),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Manufacturers',
'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short',
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/coupons/coupons_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/coupons/coupons_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/coupons/coupons_config.php (revision 12379)
@@ -1,182 +1,182 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'coup',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'CouponsEventHandler','file'=>'coupons_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'CouponsTagProcessor','file'=>'coupons_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'ord',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnUpdateCart', 'OnCheckout' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnApplyCoupon',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode', // 't' for temp '' for normal
),
'IDField' => 'CouponId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductsCoupons',
'SubItems' => Array('coupi'),
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('coup'=>'!la_title_Adding_Coupon!'),
'edit_status_labels' => Array('coup'=>'!la_title_Editing_Coupon!'),
'new_titlefield' => Array('coup'=>'!la_title_New_Coupon!'),
),
'coupons_list'=>Array('prefixes' => Array('coup_List'),
'format' => "!la_title_Coupons!",
),
'coupons_edit'=>Array( 'prefixes' => Array('coup'),
'format' => "#coup_status# '#coup_titlefield#' - !la_title_General!",
),
'coupons_items'=>Array('prefixes' => Array('coup','coupi_List'),
'format' => "#coup_status# '#coup_titlefield#' - !la_title_CouponItems!",
),
'coupons_clone'=>Array('prefixes' => Array('coup'),
'format' => "!la_CloneCoupon!",
),
'coupon_selector' => Array('format' => '!la_title_CouponSelector!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/coupon_edit', 'priority' => 1),
'items' => Array ('title' => 'la_tab_CouponsItems', 't' => 'in-commerce/discounts/coupon_items', 'priority' => 2),
),
),
'PermSection' => Array('main' => 'in-commerce:coupons'),
'Sections' => Array(
'in-commerce:coupons' => Array(
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts',
'label' => 'la_tab_Coupons',
'url' => Array('t' => 'in-commerce/discounts/coupons_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
- 'priority' => 2.2,
+ 'priority' => 4.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'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_Enabled', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
1 => Array('label' => 'la_Used', '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',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'CouponId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ),
'use_phrases' => 1, 'not_null' => 1, 'default' => 1
),
'Name' => Array ( 'type' =>'string', 'required' => 1, 'default' => null, 'max_len' => 255),
'Code' => Array (
'type' => 'string', 'required' => 1, 'default' => null,
'max_len' => 255, 'unique' => Array ('Code'),
),
'Expiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
'GroupId' => Array ('type' => 'int', 'default' => null, ),
'Type' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping'*/),
'not_null' => 1, 'default' => 1,
),
'Amount' => Array ('type' => 'double', 'default' => null),
'LastUsedBy' => 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' => 0, 'default' => null,
),
'LastUsedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => 0),
'NumberOfUses' => Array ('type' => 'int', 'default' => 1),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Fields' => Array(
'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter'),
'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter'),
'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter'),
'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter'),
),
),
'Radio' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Selector' => 'radio',
'Fields' => Array(
'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter'),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter'),
'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter'),
'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter'),
'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/affiliates/affiliates_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/affiliates/affiliates_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/affiliates/affiliates_config.php (revision 12379)
@@ -1,199 +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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'affil',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'AffiliatesEventHandler','file'=>'affiliates_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'AffiliatesTagProcessor','file'=>'affiliates_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array('OnCreate'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRegisterAsAffiliate',
),
Array(
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array('OnCreate'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCheckAffiliateAgreement',
),
),
'AggregateTags' => Array(
Array(
'AggregateTo' => 'u',
'AggregatedTagName' => 'IsAffiliate',
'LocalTagName' => 'User_IsAffiliate',
),
Array(
'AggregateTo' => 'u',
'AggregatedTagName' => 'AffiliateIsNotActive',
'LocalTagName' => 'User_AffiliateIsNotActive',
),
Array(
'AggregateTo' => 'u',
'AggregatedTagName' => 'AffiliateField',
'LocalTagName' => 'CurrentUserAffiliateField',
),
Array(
'AggregateTo' => 'u',
'AggregatedTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed',
'LocalTagName' => 'IsAffiliateOrRegisterAsAffiliateAllowed',
),
Array(
'AggregateTo' => 'm',
'AggregatedTagName' => 'RequireAffiliate',
'LocalTagName' => 'Main_RequireAffiliate',
),
Array(
'AggregateTo' => 'm',
'AggregatedTagName' => 'AllowAffiliateRegistration',
'LocalTagName' => 'AllowAffiliateRegistration',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'RegularEvents' => Array(
'store_affiliate' => Array('EventName' => 'OnStoreAffiliate', 'RunInterval' => 0, 'Type' => reBEFORE),
'reset_affiliate_stats' => Array('EventName' => 'OnResetStatistics', 'RunInterval' => 0, 'Type' => reBEFORE),
),
'IDField' => 'AffiliateId',
'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
'TitleField' => 'UserName',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('affil'=>'!la_title_Adding_Affiliate!'),
'edit_status_labels' => Array('affil'=>'!la_title_Editing_Affiliate!'),
'new_titlefield' => Array('affil'=>'!la_title_New_Affiliate!'),
),
'affiliates_list' => Array('prefixes' => Array('affil_List'), 'format' => "!la_title_Affiliates!"),
'affiliates_edit' => Array('prefixes' => Array('affil'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_General!"),
'affiliate_payments' => Array('prefixes' => Array('affil', 'apayments_List'), 'format' => "#affil_status# '#affil_titlefield#' - !la_title_Payments!"),
'affiliates_payout' => Array('prefixes' => Array('affil','apayments'), 'format' => "!la_title_PayOut_To! '#affil_titlefield#'"),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliates_edit', 'priority' => 1),
'payments' => Array ('title' => 'la_tab_Payments', 't' => 'in-commerce/affiliate_plans/affiliate_edit_payments', 'priority' => 2),
),
),
'PermSection' => Array('main' => 'in-commerce:affiliates'),
'Sections' => Array(
'in-commerce:affiliates_folder' => Array(
'parent' => 'in-commerce',
'icon' => 'affiliates',
'label' => 'la_tab_Affiliates',
+ 'use_parent_header' => 1,
'permissions' => Array(),
- 'priority' => 8,
+ 'priority' => 6,
'type' => stTREE,
),
'in-commerce:affiliates' => Array(
'parent' => 'in-commerce:affiliates_folder',
'icon' => 'affiliates',
'label' => 'la_tab_Affiliates',
'url' => Array('t' => 'in-commerce/affiliate_plans/affiliates_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
- 'priority' => 8.1,
+ 'priority' => 6.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'TableName' => TABLE_PREFIX.'Affiliates',
'CalculatedFields' => Array(
'' => Array (
'UserId' => 'u.PortalUserId',
'UserName' => 'IF( LENGTH(u.Login), u.Login, \'\')',
'PlanName' => 'ap.Name',
),
),
'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.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId'),
'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.'AffiliatePlans ap ON %1$s.AffiliatePlanId = ap.AffiliatePlanId'),
'SubItems' => Array('apayments'),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('CreatedOn' => 'desc', 'UserName' => 'asc'),
)
),
'Fields' => Array(
'AffiliateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array('type' => 'int', 'unique'=>Array('PortalUserId'), 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!', 'unique' => '!la_affiliate_already_exists!'), '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' => 0, ),
'AffiliatePlanId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, AffiliatePlanId FROM '.TABLE_PREFIX.'AffiliatePlans WHERE Enabled = 1 ORDER BY Name', 'option_key_field'=>'AffiliatePlanId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
'AccumulatedAmount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0.00'),
'AmountToPay' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1','default' => '0.00'),
'LastPaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'default' => null),
'LastOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Active', 2=>'la_Pending', 0=>'la_Disabled'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
'AffiliateCode' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
'ItemsSold' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(0 => ''), 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
'SSN' => Array('type' => 'string','not_null' => '1','default' => '', 'required' => 1),
'Comments' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'CreatedOn' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1', 'default' => '#NOW#'),
),
'VirtualFields' => Array(
'UserName' => Array('type'=>'string', 'default' => ''),
'PlanName' => Array('type'=>'string', 'default' => ''),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif', 0 => 'icon16_affiliate_disabled.gif', 1 => 'icon16_affiliate.gif', 2 => 'icon16_affiliate_pending.gif'),
'Fields' => Array(
'AffiliateId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'UserName' => Array( 'title' => 'la_col_UserName', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
'PlanName' => Array( 'title'=>'la_col_PlanName', 'filter_block' => 'grid_like_filter'),
'Status' => Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
'CreatedOn' => Array( 'title' => 'la_col_RegisteredOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/discounts/discounts_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/discounts/discounts_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/discounts/discounts_config.php (revision 12379)
@@ -1,140 +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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'd',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'DiscountsEventHandler','file'=>'discounts_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode', // 't' for temp '' for normal
),
'IDField' => 'DiscountId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductsDiscounts',
'SubItems' => Array('di'),
'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!'),
),
'discounts_list'=>Array('prefixes' => Array('d_List'),
'format' => "!la_title_Discounts!",
),
'discount_edit'=>Array( 'prefixes' => Array('d'),
'format' => "#d_status# '#d_titlefield#' - !la_title_General!",
),
'discount_items'=>Array('prefixes' => Array('d','di_List'),
'format' => "#d_status# '#d_titlefield#' - !la_title_DiscountItems!",
),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/discount_edit', 'priority' => 1),
'items' => Array ('title' => 'la_tab_DiscountItems', 't' => 'in-commerce/discounts/discount_items', 'priority' => 2),
),
),
'PermSection' => Array('main' => 'in-commerce:discounts'),
'Sections' => Array(
'in-commerce:discounts_folder' => Array(
'parent' => 'in-commerce',
'use_parent_header' => 1,
'icon' => 'discounts',
'label' => 'la_tab_DiscountsAndCoupons',
'permissions' => Array(),
- 'priority' => 5,
+ 'priority' => 4,
'type' => stTREE,
),
'in-commerce:discounts' => Array(
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts',
'label' => 'la_tab_Discounts',
'url' => Array('t' => 'in-commerce/discounts/discounts_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
- 'priority' => 2.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
+ 'priority' => 4.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'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',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'DiscountId' => Array('type' => 'int', '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 ),
'Name' => Array('type'=>'string','required' => 1, 'default' => null, 'max_len'=>255),
'Start' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'End' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'GroupId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE Personal = 0 ORDER BY Name', 'option_key_field'=>'GroupId', 'option_title_field'=>'Name', 'default' => 0),
'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping' */), 'default' => 1 ),
'Amount' => Array('type'=>'double', 'default' => null),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Fields' => Array(
'DiscountId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_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/in-commerce/units/gift_certificates/gift_certificates_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/gift_certificates/gift_certificates_config.php (revision 12378)
+++ branches/5.0.x/in-commerce/units/gift_certificates/gift_certificates_config.php (revision 12379)
@@ -1,145 +1,145 @@
<?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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'gc',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'GiftCertificateEventHandler', 'file' => 'gift_certificates_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'GiftCertificateTagProcessor', 'file' => 'gift_certificates_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'ord',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnUpdateCart', 'OnCheckout' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnApplyGiftCertificate',
),
),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'GiftCertificateId',
'StatusField' => Array('Status'),
'TitleField' => 'Recipient',
'TableName' => TABLE_PREFIX.'GiftCertificates',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('gc' => '!la_title_AddingGiftCertificate!'),
'edit_status_labels' => Array ('gc' => '!la_title_EditingGiftCertificate!'),
'new_titlefield' => Array ('gc' => '!la_title_NewGiftCertificate!'),
),
'gift_certificates_list' => Array ('prefixes' => Array ('gc_List'), 'format' => "!la_title_GiftCertificates!",),
'gift_certificates_edit' => Array ('prefixes' => Array ('gc'), 'format' => "#gc_status# '#gc_titlefield#' - !la_title_General!",),
),
'PermSection' => Array ('main' => 'in-commerce:gift-certificates'),
'Sections' => Array (
'in-commerce:gift-certificates' => Array (
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts',
'label' => 'la_tab_GiftCertificates',
'url' => Array('t' => 'in-commerce/discounts/gift_certificate_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
- 'priority' => 2.3,
+ 'priority' => 4.3, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'FilterMenu' => Array (
'Groups' => Array(
Array ('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
1 => Array('label' => 'la_Used', 'on_sql' => '', 'off_sql' => 'Status != 2' ),
2 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0' ),
)
),
'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s',),
'ItemSQLs' => Array ('' => 'SELECT * FROM %1$s',),
'ListSortings' => Array (
'' => Array(
'Sorting' => Array('Recipient' => 'asc'),
)
),
'Fields' => Array (
'GiftCertificateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'OrderId' => Array ('type' => 'int', 'default' => 0),
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1 ),
'SendVia' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 0 => 'la_opt_Email', 1 => 'la_opt_PostalMail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ),
'Purchaser' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'Recipient' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientEmail' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
'RecipientFirstname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientLastname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientAddress1' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientAddress2' => Array('type'=>'string', 'default'=>null, 'max_len'=>255),
'RecipientCity' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientState' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientZipcode' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientCountry' => 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', 'required'=>1
),
'RecipientPhone' => Array('type'=>'string','default'=>null, 'max_len'=>255),
'Message' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'Code' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array('Code')),
'AddDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#',),
'Expiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
'Amount' => Array('type'=>'double', 'default' => null, 'required' => 1, 'min_value_exc' => 0),
'Debit' => Array('type'=>'double', 'default' => null),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array('default' => 'icon16_custom.gif', 1 => 'icon16_discount.gif', 2 => 'icon16_discount_pending.gif', 0 => 'icon16_discount_disabled.gif'),
'Fields' => Array (
'GiftCertificateId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'Code' => Array ('title' => 'la_col_Code', 'filter_block' => 'grid_like_filter'),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
'Debit' => Array ('title' => 'la_col_RemainingAmount', 'filter_block' => 'grid_float_range_filter'),
'Amount' => Array ('title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
'Expiration' => Array ('title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
\ No newline at end of file
Event Timeline
Log In to Comment