Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Sun, Jan 5, 7:14 PM

in-commerce

This file is larger than 256 KB, so syntax highlighting was skipped.
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 12488)
+++ branches/5.0.x/in-commerce/units/affiliate_plans/affiliate_plans_config.php (revision 12489)
@@ -1,107 +1,113 @@
<?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' => 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'),
'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'),
- ),
- ),
-
+ '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',
+ ),
+ '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/in-commerce/units/downloads/downloads_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/downloads/downloads_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/downloads/downloads_config.php (revision 12489)
@@ -1,107 +1,111 @@
<?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' => 'down',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
Array('pseudo'=>'DownloadHelper','class'=>'DownloadHelper','file'=>'download_helper.php','build_event'=>'','require_classes'=>'kHelper'),
),
'AutoLoad' => true,
'Hooks' => Array(
/*Array(
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'p',
'HookToSpecial' => '',
'HookToEvent' => Array( 'onPreSave' ),
'DoPrefix' => 'pr',
'DoSpecial' => 'tang',
'DoEvent' => 'OnArrange',
),*/
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'TitlePresets' => Array(
'downloads_list'=>Array( 'prefixes' => Array('down_List'),
'format' => "!la_title_FileDownloads!",
),
),
'PermSection' => Array('main' => 'in-commerce:downloadlog'),
'Sections' => Array(
'in-commerce:downloadlog' => Array(
'parent' => 'in-portal:reports',
'icon' => 'download_log',
'label' => 'la_tab_DownloadLog',
'url' => Array('t' => 'in-commerce/downloads/downloads_list', 'pass' => 'm'),
'permissions' => Array('view', 'delete'),
'priority' => 7,
'type' => stTREE,
),
),
'IDField' => 'DownloadId',
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'UserDownloads',
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('StartedOn' => 'desc'),
)
),
'Fields' => Array(
'DownloadId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'Username' => Array('type' => 'string','not_null' => 1, 'default' => ''),
'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''),
'FileId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'Filename' => Array('type' => 'string','not_null' => 1, 'default' => ''),
'IPAddress' => Array('type' => 'string','not_null' => 1, 'default' => ''),
'StartedOn' => Array('type' => 'int','formatter' => 'kDateFormatter','not_null' => 1, 'default' => 0),
'EndedOn' => Array('type' => 'int','formatter' => 'kDateFormatter','not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array(
),
'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
- 'Fields' => Array(
- 'DownloadId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Username' => Array( 'title'=>'la_col_Username', 'filter_block' => 'grid_like_filter'),
- 'ProductName' => Array( 'title'=>'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter'),
- 'Filename' => Array( 'title'=>'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter'),
- 'IPAddress' => Array( 'title'=>'la_col_IPAddress', 'filter_block' => 'grid_like_filter'),
- 'StartedOn' => Array( 'title'=>'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter'),
- ),
- ),
+ 'Default' => Array(
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ 'Fields' => Array(
+ 'DownloadId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Username' => Array( 'title'=>'la_col_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'ProductName' => Array( 'title'=>'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Filename' => Array( 'title'=>'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'IPAddress' => Array( 'title'=>'la_col_IPAddress', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'StartedOn' => Array( 'title'=>'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
),
+ ),
+ ),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/reports/reports_event_handler.php
===================================================================
--- branches/5.0.x/in-commerce/units/reports/reports_event_handler.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/reports/reports_event_handler.php (revision 12489)
@@ -1,828 +1,823 @@
<?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 ReportsEventHandler extends kDBEventHandler {
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
// user can view any form on front-end
'OnRunReport' => Array ('self' => 'view'),
'OnUpdateConfig' => Array ('self' => 'view'),
'OnChangeStatistics' => Array ('self' => 'view'),
'OnPieChart' => Array ('self' => 'view'),
'OnPrintChart' => Array ('self' => 'view'),
'OnExportReport' => Array ('self' => 'view'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
function OnRunReport(&$event)
{
$this->Application->LinkVar('reports_finish_t');
$progress_t = $this->Application->GetVar('progress_t');
$event->redirect = $progress_t;
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info) $field_values = array_shift($items_info);
$object =& $event->getObject( Array('skip_autoload' => true) );
$object->SetFieldsFromHash($field_values);
$object->UpdateFormattersMasterFields();
$field_values['offset'] = 0;
$table_name = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_SaleReport';
$field_values['table_name'] = $table_name;
$this->Conn->Query('DROP TABLE IF EXISTS '.$table_name);
$filter_value = '';
$from = $object->GetDBField('FromDateTime');
$to = $object->GetDBField('ToDateTime');
$day_seconds = 23 * 60 * 60 + 59 * 60 + 59;
if ($from && !$to) {
$to = $from + $day_seconds;
}
elseif (!$from && $to) {
$from = $to - $day_seconds;
}
if ($from && $to) {
$filter_value = 'AND o.OrderDate >= '.$from.' AND o.OrderDate <= '.$to;
}
$ebay_table_fields = '';
$ebay_joins = '';
$ebay_query_fields = '';
$user_id = $this->Application->RecallVar('user_id');
$sql = 'DELETE FROM '.TABLE_PREFIX.'PersistantSessionData
WHERE
PortalUserId = "'.$user_id.'"
AND VariableName LIKE \'rep_columns_%\'';
$this->Conn->Query($sql);
if ($this->Application->isModuleEnabled('in-auction'))
{
if (in_array($field_values['ReportType'], Array(1,5))) // not overall.
{
$ebay_table_fields = ',
StoreQty int(11) NOT NULL DEFAULT 0,
eBayQty int(11) NOT NULL DEFAULT 0,
StoreAmount double(10,4) NOT NULL DEFAULT 0,
eBayAmount double(10,4) NOT NULL DEFAULT 0,
StoreProfit double(10,4) NOT NULL DEFAULT 0,
eBayProfit double(10,4) NOT NULL DEFAULT 0';
$ebay_joins = '
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
';
$ebay_query_fields = ',
SUM(IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)) as StoreQty,
SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)) as eBayQty,
SUM(IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)) as StoreAmount,
SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)) as eBayAmount,
SUM(IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)) as StoreProfit,
SUM(IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)) as eBayProfit
';
}
}
if ($field_values['ReportType'] == 1) { // by Category
$q = 'CREATE TABLE '.$table_name.' (
CategoryId int(11) NOT NULL DEFAULT 0,
Qty int(11) NOT NULL DEFAULT 0,
Cost double(10,4) NOT NULL DEFAULT 0,
Amount double(10,4) NOT NULL DEFAULT 0,
Tax double(10,4) NOT NULL DEFAULT 0,
Shipping double(10,4) NOT NULL DEFAULT 0,
Processing double(10,4) NOT NULL DEFAULT 0,
Profit double(10,4) NOT NULL DEFAULT 0
'.$ebay_table_fields.'
)';
$field_values['total'] = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Category');
$this->Conn->Query($q);
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
c.CategoryId,
SUM(od.Quantity) as Qty,
SUM(od.Cost * od.Quantity) as Cost,
SUM(od.Price * od.Quantity) as SaleAmount,
SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
SUM((od.Price - od.Cost) * od.Quantity) as Profit'
.$ebay_query_fields.'
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
ON ci.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = ci.CategoryId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
AND
ci.PrimaryCat = 1
'.$filter_value.'
GROUP BY c.CategoryId
HAVING NOT ISNULL(CategoryId)
';
$this->Conn->Query($q);
}
elseif ($field_values['ReportType'] == 2) { // by User
$q = 'CREATE TABLE '.$table_name.' (
PortalUserId int(11) NOT NULL DEFAULT 0,
Qty int(11) NOT NULL DEFAULT 0,
Cost double(10,4) NOT NULL DEFAULT 0,
Amount double(10,4) NOT NULL DEFAULT 0,
Tax double(10,4) NOT NULL DEFAULT 0,
Shipping double(10,4) NOT NULL DEFAULT 0,
Processing double(10,4) NOT NULL DEFAULT 0,
Profit double(10,4) NOT NULL DEFAULT 0
)';
$field_values['total'] = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Category');
$this->Conn->Query($q);
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
u.PortalUserId,
SUM(od.Quantity) as Qty,
SUM(od.Cost * od.Quantity) as Cost,
SUM(od.Price * od.Quantity) as SaleAmount,
SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
SUM((od.Price - od.Cost) * od.Quantity) as Profit
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u
ON u.PortalUserId = o.PortalUserId
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY u.PortalUserId
HAVING NOT ISNULL(PortalUserId)
';
$this->Conn->Query($q);
}
elseif ($field_values['ReportType'] == 5) { // by Product
$q = 'CREATE TABLE '.$table_name.' (
ProductId int(11) NOT NULL DEFAULT 0,
Qty int(11) NOT NULL DEFAULT 0,
Cost double(10,4) NOT NULL DEFAULT 0,
Amount double(10,4) NOT NULL DEFAULT 0,
Tax double(10,4) NOT NULL DEFAULT 0,
Shipping double(10,4) NOT NULL DEFAULT 0,
Processing double(10,4) NOT NULL DEFAULT 0,
Profit double(10,4) NOT NULL DEFAULT 0'
.$ebay_table_fields.'
)';
$field_values['total'] = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Products');
$this->Conn->Query($q);
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
p.ProductId,
SUM(od.Quantity) as Qty,
SUM(od.Cost * od.Quantity) as Cost,
SUM(od.Price * od.Quantity) as SaleAmount,
SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
SUM((od.Price - od.Cost) * od.Quantity) as Profit'
.$ebay_query_fields.'
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY p.ProductId
HAVING NOT ISNULL(ProductId)
';
$this->Conn->Query($q);
}
elseif ($field_values['ReportType'] == 12) { // Overall
$q = 'CREATE TABLE '.$table_name.' (
Marketplace tinyint(1) NOT NULL DEFAULT 0,
Qty int(11) NOT NULL DEFAULT 0,
Cost double(10,4) NOT NULL DEFAULT 0,
Amount double(10,4) NOT NULL DEFAULT 0,
Tax double(10,4) NOT NULL DEFAULT 0,
Shipping double(10,4) NOT NULL DEFAULT 0,
Processing double(10,4) NOT NULL DEFAULT 0,
Profit double(10,4) NOT NULL DEFAULT 0
)';
$this->Conn->Query($q);
if ($this->Application->isModuleEnabled('in-auction'))
{
$field_values['total'] = 2;
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
1 AS Marketplace,
SUM(IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)) as Qty,
SUM(IF(ISNULL(eod.OptionsSalt), od.Cost * od.Quantity, 0)) as Cost,
SUM(IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)) as SaleAmount,
SUM(IF(ISNULL(eod.OptionsSalt), o.VAT * od.Price * od.Quantity / o.SubTotal, 0)) as Tax,
SUM(IF(ISNULL(eod.OptionsSalt), o.ShippingCost * od.Price * od.Quantity / o.SubTotal, 0)) as Shipping,
SUM(IF(ISNULL(eod.OptionsSalt), o.ProcessingFee * od.Price * od.Quantity / o.SubTotal, 0)) as Processing,
SUM(IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)) as Profit
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
WHERE
o.Status IN (4,6)
'.$filter_value;
$this->Conn->Query($q);
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
2 AS Marketplace,
SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)) as Qty,
SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Cost * od.Quantity)) as Cost,
SUM(IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)) as SaleAmount,
SUM(IF(ISNULL(eod.OptionsSalt), 0, o.VAT * od.Price * od.Quantity / o.SubTotal)) as Tax,
SUM(IF(ISNULL(eod.OptionsSalt), 0, o.ShippingCost * od.Price * od.Quantity / o.SubTotal)) as Shipping,
SUM(IF(ISNULL(eod.OptionsSalt), 0, o.ProcessingFee * od.Price * od.Quantity / o.SubTotal)) as Processing,
SUM(IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)) as Profit
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
WHERE
o.Status IN (4,6)
'.$filter_value;
$this->Conn->Query($q);
} else {
$field_values['total'] = 1;
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
1 AS Marketplace,
SUM(od.Quantity) as Qty,
SUM(od.Cost * od.Quantity) as Cost,
SUM(od.Price * od.Quantity) as SaleAmount,
SUM(o.VAT * od.Price * od.Quantity / o.SubTotal) as Tax,
SUM(o.ShippingCost * od.Price * od.Quantity / o.SubTotal) as Shipping,
SUM(o.ProcessingFee * od.Price * od.Quantity / o.SubTotal) as Processing,
SUM((od.Price - od.Cost) * od.Quantity) as Profit
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
WHERE
o.Status IN (4,6)
'.$filter_value;
$this->Conn->Query($q);
}
}
$vars = array('rep_Page', 'rep_Sort1', 'rep_Sort1_Dir', 'rep_Sort2', 'rep_Sort2_Dir');
foreach ($vars as $var_name) {
$this->Application->RemoveVar($var_name);
}
//temporary
$event->redirect = $this->Application->GetVar('reports_finish_t');
$field_values['from'] = $from;
$field_values['to'] = $to;
$this->Application->StoreVar('report_options', serialize($field_values));
}
function OnUpdateConfig(&$event)
{
$report = $this->Application->RecallVar('report_options');
if (!$report) {
return ;
}
$field_values = unserialize($report);
$rep_options = $this->Application->getUnitOptions('rep');
$new_options = Array ();
$new_options['TableName'] = $field_values['table_name'];
$new_options['Fields'] = Array (
'Qty' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%d', 'default' => 0, 'totals' => 'sum'),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'Amount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'Tax' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'Shipping' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'Processing' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'Profit' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
);
if ( $this->Application->isModuleEnabled('in-auction') ) {
if ( in_Array ($field_values['ReportType'], Array (1, 5)) ) {
$new_options['Fields'] += Array (
'StoreQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'default' => 0, 'totals' => 'sum'),
'StoreAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'StoreProfit' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'eBayQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'default' => 0, 'totals' => 'sum'),
'eBayAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
'eBayProfit' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0, 'totals' => 'sum'),
);
}
}
if ($field_values['ReportType'] == 1) { // by Category
$new_options['ListSQLs'][''] =
'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = %1$s.CategoryId';
$new_options['Grids']['Default'] = Array (
- 'Icons' => Array ('default' => 'icon16_custom.gif'),
+ 'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'CategoryName' => Array ('title' => 'la_col_CategoryName', 'filter_block' => 'grid_like_filter'),
'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'StoreQty' => Array ('title' => 'la_col_StoreQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'eBayQty' => Array ('title' => 'la_col_eBayQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'StoreAmount' => Array ('title' => 'la_col_StoreGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'eBayAmount' => Array ('title' => 'la_col_eBayGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'StoreProfit' => Array ('title' => 'la_col_StoreProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'eBayProfit' => Array ('title' => 'la_col_eBayProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
),
);
if (!$this->Application->isModuleEnabled('in-auction')) {
$a_fields =& $new_options['Grids']['Default']['Fields'];
unset($a_fields['StoreQty']);
unset($a_fields['eBayQty']);
unset($a_fields['StoreAmount']);
unset($a_fields['eBayAmount']);
unset($a_fields['StoreProfit']);
unset($a_fields['eBayProfit']);
}
$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], Array (
'CategoryName' => Array ('type' => 'string', 'default' => ''),
'Metric' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => $this->GetMetricOptions($new_options, 'CategoryName'),
'use_phrases' => 1,
'default' => 0,
),
));
$lang = $this->Application->GetVar('m_lang');
// products root category
$products_category_id = $this->Application->findModule('Name', 'In-Commerce', 'RootCat');
// get root category name
$sql = 'SELECT LENGTH(l' . $lang . '_CachedNavbar)
FROM ' . TABLE_PREFIX . 'Category
WHERE CategoryId = '.$products_category_id;
$root_length = $this->Conn->GetOne($sql) + 4;
$new_options['CalculatedFields'][''] = array(
'CategoryName' => 'REPLACE(SUBSTR(c.l'.$lang.'_CachedNavbar, '.$root_length.'), "&|&", " > ")',
);
}
elseif ($field_values['ReportType'] == 2) { // by User
$new_options['ListSQLs'][''] =
'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u
ON u.PortalUserId = %1$s.PortalUserId';
$new_options['Grids']['Default'] = Array (
- 'Icons' => Array ('default' => 'icon16_custom.gif'),
+ 'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'Login' => Array ('title' => 'la_col_Login', 'filter_block' => 'grid_like_filter'),
'FirstName' => Array ('title' => 'la_col_FirstName', 'filter_block' => 'grid_like_filter'),
'LastName' => Array ('title' => 'la_col_LastName', 'filter_block' => 'grid_like_filter'),
'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
),
);
$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], Array (
'Login' => Array ('type' => 'string', 'default' => ''),
'FirstName' => Array ('type' => 'string', 'default' => ''),
'LastName' => Array ('type' => 'string', 'default' => ''),
));
$new_options['CalculatedFields'][''] = Array (
'Login' => 'u.Login',
'FirstName' => 'u.FirstName',
'LastName' => 'u.LastName',
);
}
elseif ($field_values['ReportType'] == 5) { // by Product
$new_options['ListSQLs'][''] =
'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = %1$s.ProductId';
$new_options['Grids']['Default'] = Array (
- 'Icons' => Array ('default' => 'icon16_custom.gif'),
+ 'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'ProductName' => Array ('title' => 'la_col_ProductName', 'filter_block' => 'grid_like_filter'),
'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'StoreQty' => Array ('title' => 'la_col_StoreQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'eBayQty' => Array ('title' => 'la_col_eBayQty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'StoreAmount' => Array ('title' => 'la_col_StoreGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'eBayAmount' => Array ('title' => 'la_col_eBayGMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1, 'filter_block' => 'grid_float_range_filter'),
'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'StoreProfit' => Array ('title' => 'la_col_StoreProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'eBayProfit' => Array ('title' => 'la_col_eBayProfit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
),
);
if (!$this->Application->isModuleEnabled('in-auction'))
{
$a_fields =& $new_options['Grids']['Default']['Fields'];
unset($a_fields['StoreQty']);
unset($a_fields['eBayQty']);
unset($a_fields['StoreAmount']);
unset($a_fields['eBayAmount']);
unset($a_fields['StoreProfit']);
unset($a_fields['eBayProfit']);
}
$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], Array (
'ProductName' => Array ('type' => 'string', 'default' => ''),
'Metric' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => $this->GetMetricOptions($new_options, 'ProductName'),
'use_phrases' => 1,
'default' => 0
),
));
$lang = $this->Application->GetVar('m_lang');
$new_options['CalculatedFields'][''] = Array (
'ProductName' => 'p.l'.$lang.'_Name',
);
}
elseif ($field_values['ReportType'] == 12) { // Overall
$new_options['ListSQLs'][''] =
'SELECT %1$s.* %2$s FROM %1$s';
$new_options['Fields']['Marketplace'] = Array (
'formatter' => 'kOptionsFormatter',
'options' => Array (
1 => 'la_OnlineStore',
2 => 'la_eBayMarketplace',
),
'use_phrases' => 1,
'default' => 1
);
$new_options['Grids']['Default'] = Array(
- 'Icons' => Array('default' => 'icon16_custom.gif'),
+ 'Icons' => Array('default' => 'icon16_item.png'),
'Fields' => Array(
'Marketplace' => Array ('title' => 'la_col_Marketplace', 'filter_block' => 'grid_options_filter'),
'Qty' => Array ('title' => 'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum', 'filter_block' => 'grid_range_filter'),
'Cost' => Array ('title' => 'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Amount' => Array ('title' => 'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Tax' => Array ('title' => 'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Shipping' => Array ('title' => 'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Processing' => Array ('title' => 'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
'Profit' => Array ('title' => 'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum', 'filter_block' => 'grid_float_range_filter'),
),
);
$new_options['VirtualFields'] = array_merge($rep_options['VirtualFields'], array(
'Metric' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => $this->GetMetricOptions($new_options, 'Marketplace'),
'use_phrases' => 1,
'default' => 0
),
));
$lang = $this->Application->GetVar('m_lang');
}
$new_options['ListSortings'] = Array(
'' => Array(
'Sorting' => Array('Amount' => 'desc'),
)
);
foreach ($new_options as $key => $val) {
$this->Application->setUnitOption('rep', $key, $val);
}
}
/**
* Enter description here...
*
* @param kdbItem $object
* @param string $search_field
* @param string $value
* @param string $type
*/
function processRangeField(&$object, $search_field, $type)
{
$value = $object->GetField($search_field);
if (!$value) return false;
$lang_current =& $this->Application->recallObject('lang.current');
$dt_separator = getArrayValue($object->GetFieldOptions($search_field), 'date_time_separator');
if (!$dt_separator) {
$dt_separator = ' ';
}
$time = ($type == 'from') ? adodb_mktime(0, 0, 0) : adodb_mktime(23, 59, 59);
$time = adodb_date($lang_current->GetDBField('InputTimeFormat'), $time);
$full_value = $value.$dt_separator.$time;
$formatter =& $this->Application->recallObject($object->Fields[$search_field]['formatter']);
$value_ts = $formatter->Parse($full_value, $search_field, $object);
$pseudo = getArrayValue($object->FieldErrors, $search_field, 'pseudo');
if ($pseudo) {
unset($object->FieldErrors[$search_field]); // remove error!
// invalid format -> ignore this date in search
return false;
}
return $value_ts;
}
/**
* Generate Metric Field Options
*
* @param array $a_config_options
* @param string $exclude_field
*/
function GetMetricOptions(&$a_config_options, $exclude_field)
{
$a_ret = Array();
foreach ($a_config_options['Grids']['Default']['Fields'] AS $field => $a_options)
{
if ($field == $exclude_field)
{
continue;
}
$a_ret[$field] = $a_options['title'];
}
return $a_ret;
}
function OnChangeStatistics(&$event)
{
$this->Application->StoreVar('ChartMetric', $this->Application->GetVar('metric'));
}
function OnPieChart(&$event)
{
$ChartHelper =& $this->Application->RecallObject('ChartHelper');
header("Content-type: image/png");
$width = $event->getEventParam('width');
- if ($width == 0)
- {
+ if (!$width) {
$width = 800;
}
$height = $event->getEventParam('height');
- if ($height == 0)
- {
+ if (!$height) {
$height = 600;
}
$a_data = unserialize($this->Application->RecallVar('graph_data'));
$chart = new LibchartPieChart($width, $height);
$dataSet = new LibchartXYDataSet();
foreach ($a_data AS $key=>$a_values)
{
$dataSet->addPoint(new LibchartPoint($a_values['Name'], $a_values['Metric']));
// $dataSet->addPoint(new LibchartPoint($a_values['Name'].' ('.$a_values['Metric'].')', $a_values['Metric']));
}
$chart->setDataSet($dataSet);
$chart->setTitle($this->Application->RecallVar('graph_metric'));
$chart->render();
$event->status = erSTOP;
}
/** Generates png-chart output
*
* @param kEvent $event
*/
function OnPrintChart(&$event)
{
$ChartHelper =& $this->Application->RecallObject('ChartHelper');
header("Content-type: image/png");
$width = $this->Application->GetVar('width');
if ($width == 0)
{
$width = 800;
}
$height = $this->Application->GetVar('height');
if ($height == 0)
{
$height = 400;
}
$chart = new LibchartLineChart($width, $height);
$a_labels = unserialize($this->Application->RecallVar('graph_labels'));
if ($this->Application->isModuleEnabled('in-auction'))
{
$serie1 = new LibchartXYDataSet();
$a_serie = unserialize($this->Application->RecallVar('graph_serie1'));
foreach ($a_labels AS $key=>$value)
{
$serie1->addPoint(new LibchartPoint($value, $a_serie[$key]));
}
}
$serie2 = new LibchartXYDataSet();
$a_serie = unserialize($this->Application->RecallVar('graph_serie2'));
foreach ($a_labels AS $key=>$value)
{
$serie2->addPoint(new LibchartPoint($value, $a_serie[$key]));
}
$dataSet = new LibchartXYSeriesDataSet();
if ($this->Application->isModuleEnabled('in-auction'))
{
$dataSet->addSerie($this->Application->RecallVar('graph_serie1_label'), $serie1);
}
$dataSet->addSerie($this->Application->RecallVar('graph_serie2_label'), $serie2);
$chart->setDataSet($dataSet);
$chart->setTitle($this->Application->RecallVar('graph_metric'));
$Plot =& $chart->getPlot();
$Plot->setGraphCaptionRatio(0.7);
$chart->render();
$event->status = erSTOP;
}
function OnExportReport(&$event)
{
$report =& $this->Application->recallObject($event->getPrefixSpecial(),'rep_List',Array('skip_counting'=>true,'per_page'=>-1) );
/* @var $report kDBList*/
+
$ReportItem =& $this->Application->recallObject('rep.item', 'rep', Array('skip_autoload' => true));
/* @var $ReportItem kDBItem*/
+
$a_grids = $this->Application->getUnitOption('rep', 'Grids');
$a_fields = $a_grids['Default']['Fields'];
$ret = '';
foreach ($a_fields AS $field => $a_props)
{
$ret .= '<commas>'.$field.'<commas><tab>';
}
$ret = substr($ret, 0, strlen($ret) - 5).'<cr>';
$report->Query(true);
$report->GoFirst();
$counter = 0;
$a_totals = Array();
- foreach ($a_fields AS $field => $a_props)
- {
+ foreach ($a_fields AS $field => $a_props) {
$counter++;
if ($counter == 1)
{
continue;
}
$a_totals[$field] = 0;
}
- foreach($report->Records as $a_row)
- {
-// echo '<pre>';
-// print_r($a_row);
-// print_r($ReportItem->FieldValues);
+ foreach($report->Records as $a_row) {
$ReportItem->SetFieldsFromHash($a_row);
-// echo '2222222222';
$row = '';
foreach ($a_fields AS $field => $a_props)
{
$row .= '<commas>'.$ReportItem->GetField($field).'<commas><tab>';
$a_totals[$field] += $a_row[$field];
}
$ret .= substr($row, 0, strlen($row) - 5).'<cr>';
}
+
// totals
$ReportItem->SetFieldsFromHash($a_totals);
$counter = 0;
foreach ($a_fields AS $field => $a_props)
{
$counter++;
if ($counter == 1)
{
$row = '<commas><commas><tab>';
continue;
}
$row .= '<commas>'.$ReportItem->GetField($field).'<commas><tab>';
}
$ret .= substr($row, 0, strlen($row) - 5).'<cr>';
$ret = str_replace("\r",'', $ret);
$ret = str_replace("\n",'', $ret);
$ret = str_replace('"','\'\'', $ret);
$ret = str_replace('<commas>','"', $ret);
$ret = str_replace('<tab>',',', $ret);
$ret = str_replace('<cr>',"\r", $ret);
$report_options = unserialize($this->Application->RecallVar('report_options'));
switch ($report_options['ReportType'])
{
case 1:
$file_name = '-ByCategory';
break;
case 2:
$file_name = '-ByUser';
break;
case 5:
$file_name = '-ByProduct';
break;
case 12:
$file_name = '';
break;
}
header("Content-type: application/txt");
header("Content-length: ".(string)strlen($ret));
header("Content-Disposition: attachment; filename=\"".html_entity_decode('SalesReport'.$file_name.'-'.date('d-M-Y').'.csv')."\"");
header("Pragma: no-cache"); //some IE-fixing stuff
echo $ret;
exit();
}
}
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/reports/reports_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/reports/reports_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/reports/reports_config.php (revision 12489)
@@ -1,135 +1,135 @@
<?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' => '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'),
'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!'),
),
'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:summary_logs',
+ 'icon' => 'in-commerce:sales_report',
'label' => 'la_tab_SaleReports',
'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',
), // key - special, value - list select sql
'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(
12 => 'la_Overall',
1 => 'la_ByCategory',
2 => 'la_ByUser',
5 => 'la_byProduct'
),'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('default'=>1),
'SkipEmpty' => array('default'=>1),
'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
+ 'Icons' => Array('default'=>'icon16_item.png'),
'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'),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/reports/reports_tag_processor.php
===================================================================
--- branches/5.0.x/in-commerce/units/reports/reports_tag_processor.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/reports/reports_tag_processor.php (revision 12489)
@@ -1,441 +1,441 @@
<?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 ReportsTagProcessor extends kDBTagProcessor {
function ReportStatus($params)
{
$field_values = $this->CalcReport($params);
if ($field_values['offset'] == $field_values['total']) {
$this->Application->Redirect($this->Application->RecallVar('reports_finish_t'));
$this->Application->RemoveVar('report_options');
}
else {
$this->Application->StoreVar('report_options', serialize($field_values));
}
return $field_values['offset'] * 100 / $field_values['total'];
}
function CalcReport($params)
{
$field_values = unserialize($this->Application->RecallVar('report_options'));
$per_step = 20;
$cats = $this->Conn->Query('SELECT * FROM '.TABLE_PREFIX.'Category ORDER BY CategoryId LIMIT '.$field_values['offset'].', '.$per_step);
foreach ($cats as $a_cat) {
if ($field_values['Recursive']) {
$cat_filter = 'c.ParentPath LIKE '.$this->Conn->qstr($a_cat['ParentPath'].'%');
}
else {
$cat_filter = 'c.CategoryId = '.$a_cat['CategoryId'];
}
$q = 'INSERT INTO '.$field_values['table_name'].'
SELECT
c.CategoryId,
SUM(od.Quantity) as Qty,
SUM(od.Cost) as Cost,
SUM(od.Price) as SaleAmount,
0 as Tax,
0 as Shipping,
0 as Processing,
SUM(od.Price - od.Cost) as Profit
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
ON ci.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = ci.CategoryId
WHERE
o.Status = 4
AND
ci.PrimaryCat = 1
AND
'.$cat_filter.'
GROUP BY c.CategoryId';
$this->Conn->Query($q);
$field_values['offset']++;
}
return $field_values;
}
function ReportTypeEquals($params)
{
$field_values = unserialize($this->Application->RecallVar('report_options'));
return ($field_values['ReportType'] == $params['value']);
}
function CalculateChart($params)
{
$a_report_options = unserialize($this->Application->RecallVar('report_options'));
$metric = $this->Application->RecallVar('ChartMetric');
if ($metric == '')
{
// get first option from unit config
$a_virtual_fields = $this->Application->getUnitOption('rep', 'VirtualFields');
foreach ($a_virtual_fields['Metric']['options'] AS $field => $label)
{
$metric = $field;
break;
}
}
$object =& $this->Application->recallObject('rep.params', null, Array('skip_autoload' => true));
$object->ID = 1;
$object->SetDBField('Metric', $metric);
// echo '<pre>';
// print_r($a_report_options);
// echo date('m/d/Y H:i:s', $a_report_options['from']).'<br>';
// echo date('m/d/Y H:i:s', $a_report_options['to']).'<br>';
if (!($a_report_options['from'] && $a_report_options['to'])) {
// calculate from & to as extreme order dates
$sql = 'SELECT MAX(OrderDate) AS date_to, MIN(OrderDate) AS date_frm
FROM '.TABLE_PREFIX.'Orders
WHERE
Status IN (4,6)
';
$a_dates = $this->Conn->GetRow($sql);
$a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_frm']), date('d', $a_dates['date_frm']), date('Y', $a_dates['date_frm']));
$a_report_options['to'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_to']), date('d', $a_dates['date_to']) + 1, date('Y', $a_dates['date_to'])) - 1;
}
$filter_value = 'AND o.OrderDate >= '.$a_report_options['from'].' AND o.OrderDate <= '.$a_report_options['to'];
if ($a_report_options['ReportType'] == 12)
{
// Overall
$selected_days = round(($a_report_options['to'] - $a_report_options['from'] + 1) / 3600 / 24);
// determine date interval
if ($selected_days < 2)
{
$step_seconds = 3600;
$step_labels = Array();
for ($i=0; $i<24; $i++)
{
$hour = str_pad($i, 2, '0', STR_PAD_LEFT);
$step_labels[$i] = $hour;
}
} elseif (
($selected_days < 31)
|| (date('mY', $a_report_options['from']) == date('mY', $a_report_options['to']))
)
{
$step_seconds = 24*3600;
$step_labels = Array();
$curr_date = $a_report_options['from'];
while ($curr_date <= $a_report_options['to'])
{
$curr_date += $step_seconds;
$step_labels[] = date('d-M', $curr_date);
}
} else {
$start_year = date('Y', $a_report_options['from']);
$start_month = date('m', $a_report_options['from']);
$end_month_year = date('Ym', $a_report_options['to']);
// big interval - move from date to the first day ot the month
$a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_report_options['from']), 1, date('Y', $a_report_options['from']));
$curr_time = $a_report_options['from'];
while (date('Ym', $curr_time) <= $end_month_year)
{
$step_labels[date('Ym', $curr_time)] = date('M-Y', $curr_time);
// add month
$curr_time = adodb_mktime(0,0,0, date('m', $curr_time) + 1, 1, date('Y', $curr_time));
}
$step_seconds = 0;
}
$a_expressions = Array(
'Qty' => 'od.Quantity',
'Cost' => 'od.Cost * od.Quantity',
'Amount' => 'od.Price * od.Quantity',
'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
'Profit' => '(od.Price - od.Cost) * od.Quantity',
);
if ($step_seconds)
{
$period_sql = 'FLOOR(
(o.OrderDate - '.$a_report_options['from'].')
/'.$step_seconds.'
)';
} else {
$period_sql = 'CONCAT(YEAR(FROM_UNIXTIME(o.OrderDate)),LPAD(MONTH(FROM_UNIXTIME(o.OrderDate)), 2, \'0\'))';
}
if ($this->Application->isModuleEnabled('in-auction'))
{
$sql = 'SELECT
'.$period_sql.' AS Period,
SUM(IF(ISNULL(eod.OptionsSalt), '.$a_expressions[$metric].', 0)) as StoreMetric,
SUM(IF(ISNULL(eod.OptionsSalt), 0, '.$a_expressions[$metric].')) as eBayMetric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY Period';
} else {
$sql = 'SELECT
'.$period_sql.' AS Period,
SUM('.$a_expressions[$metric].') as StoreMetric,
0 as eBayMetric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY Period';
}
$a_data = $this->Conn->Query($sql, 'Period');
// create series array
$a_serie1 = Array();
$a_serie2 = Array();
foreach ($step_labels AS $key => $label)
{
$a_serie1[$key] = (isset($a_data[$key]['eBayMetric']) && !is_null($a_data[$key]['eBayMetric'])) ? $a_data[$key]['eBayMetric'] : 0;
$a_serie2[$key] = (isset($a_data[$key]['StoreMetric']) && !is_null($a_data[$key]['StoreMetric'])) ? $a_data[$key]['StoreMetric'] : 0;
}
$show_date_from = date('m/d/Y', $a_report_options['from']);
$show_date_to = date('m/d/Y', $a_report_options['to']);
$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
$this->Application->StoreVar('graph_metric', $object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
$this->Application->StoreVar('graph_serie1', serialize($a_serie1));
$this->Application->StoreVar('graph_serie2', serialize($a_serie2));
$this->Application->StoreVar('graph_serie1_label', $this->Application->Phrase('la_eBayMarketplace'));
$this->Application->StoreVar('graph_serie2_label', $this->Application->Phrase('la_OnlineStore'));
$this->Application->StoreVar('graph_labels', serialize($step_labels));
return;
}
$ebay_joins = '';
if ($this->Application->isModuleEnabled('in-auction'))
{
$ebay_joins = '
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
';
}
if ($a_report_options['ReportType'] == 1)
{
// pie chart by category
$a_expressions = Array(
'Qty' => 'od.Quantity',
'Cost' => 'od.Cost * od.Quantity',
'Amount' => 'od.Price * od.Quantity',
'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
'Profit' => '(od.Price - od.Cost) * od.Quantity',
'StoreQty' => 'IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)',
'eBayQty' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)',
'StoreAmount' => 'IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)',
'eBayAmount' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)',
'StoreProfit' => 'IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)',
'eBayProfit' => 'IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)',
);
$lang = $this->Application->GetVar('m_lang');
$sql = 'SELECT
LEFT(c.l'.$lang.'_Name, 60) AS Name,
c.CategoryId,
SUM('.$a_expressions[$metric].') as Metric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
ON ci.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = ci.CategoryId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY c.CategoryId
HAVING NOT ISNULL(CategoryId)
ORDER BY Metric DESC
LIMIT 0,8
';
$a_data = $this->Conn->Query($sql, 'CategoryId');
$other_metric = 0;
if (count($a_data) > 7)
{
// gather ids for "others" call
$ids = join(',', array_keys($a_data));
$sql = 'SELECT
SUM('.$a_expressions[$metric].')
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
ON ci.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = ci.CategoryId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
AND c.CategoryId NOT IN ('.$ids.')
';
$other_metric = $this->Conn->GetOne($sql);
if ($other_metric != 0)
{
$a_data[0] = Array(
'Metric' => $other_metric,
'Name' => $this->Application->Phrase('la_Others'),
);
}
}
$show_date_from = date('m/d/Y', $a_report_options['from']);
$show_date_to = date('m/d/Y', $a_report_options['to']);
$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
- $this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_TopCategories_by').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
+ $this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_text_ReportByTopProductCategories').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
$this->Application->StoreVar('graph_data', serialize($a_data));
return;
}
if ($a_report_options['ReportType'] == 5)
{
// pie chart by product
$a_expressions = Array(
'Qty' => 'od.Quantity',
'Cost' => 'od.Cost * od.Quantity',
'Amount' => 'od.Price * od.Quantity',
'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
'Profit' => '(od.Price - od.Cost) * od.Quantity',
'StoreQty' => 'IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)',
'eBayQty' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)',
'StoreAmount' => 'IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)',
'eBayAmount' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)',
'StoreProfit' => 'IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)',
'eBayProfit' => 'IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)',
);
$lang = $this->Application->GetVar('m_lang');
$sql = 'SELECT
LEFT(p.l'.$lang.'_Name, 60) AS Name,
p.ProductId,
SUM('.$a_expressions[$metric].') as Metric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY p.ProductId
HAVING NOT ISNULL(ProductId)
ORDER BY Metric DESC
LIMIT 0,8
';
$a_data = $this->Conn->Query($sql, 'ProductId');
$other_metric = 0;
if (count($a_data) > 7)
{
// gather ids for "others" call
$ids = join(',', array_keys($a_data));
$sql = 'SELECT
SUM('.$a_expressions[$metric].')
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
AND p.ProductId NOT IN ('.$ids.')
';
$other_metric = $this->Conn->GetOne($sql);
if ($other_metric != 0)
{
$a_data[0] = Array(
'Metric' => $other_metric,
'Name' => $this->Application->Phrase('la_Others'),
);
}
}
$show_date_from = date('m/d/Y', $a_report_options['from']);
$show_date_to = date('m/d/Y', $a_report_options['to']);
$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
- $this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_TopProducts_by').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
+ $this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_text_ReportByTopProducts').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
$this->Application->StoreVar('graph_data', serialize($a_data));
}
}
function GetRandom($params)
{
return rand(1,10000000);
}
function IsPHPxOrGreater($params)
{
$curver = explode(".", phpversion());
return ($curver[0] >= $params['version']);
}
}
\ 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 12488)
+++ branches/5.0.x/in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 12489)
@@ -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',
+ 'icon' => 'transactions',
'label' => 'la_tab_PaymentLog',
'url' => Array('t' => 'in-commerce/payments/payments_list', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 6,
'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'),
+ 'Icons' => Array('default'=>'icon16_item.png'),
'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'),
+ 'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'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'),
+ 'Icons' => Array('default'=>'icon16_item.png'),
'Fields' => Array(
- 'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'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'),
+ 'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'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 12488)
+++ branches/5.0.x/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 12489)
@@ -1,99 +1,108 @@
<?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' => 5.3, // <parent_priority>.<own_priority>, because this section replaces parent in tree
- 'type' => stTAB,
- ),
- ),
+ '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' => 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'),
'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'),
+ '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',
+ ),
'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'),
+ '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/in-commerce/units/shipping_quote_engines/usps.php
===================================================================
--- branches/5.0.x/in-commerce/units/shipping_quote_engines/usps.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/shipping_quote_engines/usps.php (revision 12489)
@@ -1,1196 +1,1193 @@
<?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!');
define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service');
define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'You will need to have registered an account with USPS. Click <a target="_blank" href="https://secure.shippingapis.com/registration/"><strong>HERE</strong></a> for registration details. USPS expects you to use pounds as weight measure for your products.');
define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'An error occured with the USPS shipping calculations.<br>If you prefer to use USPS as your shipping method, please contact the store owner.');
define('MODULE_SHIPPING_USPS_TEXT_DAY', 'Day');
define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'Days');
define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'Weeks');
define('MODULE_SHIPPING_USPS_STATUS', 'True'); // Do you want to offer USPS shipping?
define('MODULE_SHIPPING_USPS_SERVER', 'production'); // An account at USPS is needed to use the Production server // production othervise value may be 'test'
define('MODULE_SHIPPING_USPS_HANDLING', '0'); // Handling fee for this shipping method
define('MODULE_SHIPPING_USPS_TAX_CLASS', '0'); // Use the following tax class on the shipping fee
define('MODULE_SHIPPING_USPS_ZONE', '0'); // If a zone is selected, only enable this shipping method for that zone.
define('MODULE_SHIPPING_USPS_SORT_ORDER', '0'); // Sort order of display.
define('MODULE_SHIPPING_USPS_TYPES', 'PRIORITY, PARCEL'); // EXPRESS, FIRST CLASS, BMP, MEDIA 'Select the domestic services to be offered:
define('MODULE_SHIPPING_USPS_TYPES_INTL', 'EXPRESS MAIL INTERNATIONAL (EMS), EXPRESS MAIL INT, EXPRESS MAIL INT FLAT RATE ENV, PRIORITY MAIL INT, PRIORITY MAIL INT FLAT RATE ENV, PRIORITY MAILINT FLAT RATE BOX, FIRST-CLASS MAIL INT');// 'GLOBAL EXPRESS, GLOBAL EXPRESS NON-DOC RECT, GLOBAL EXPRESS NON-DOC NON-RECT, Select the international services to be offered:
define('MODULE_SHIPPING_USPS_OPTIONS', 'Display weight, Display transit time'); //
//configuration values for insurance
define('MODULE_SHIPPING_USPS_INS1', '1.65');// 'US/Canada insurance for totals $.01-$50.00
define('MODULE_SHIPPING_USPS_INS2', '2.05');// 'US/Canada insurance for totals $50.01-$100
define('MODULE_SHIPPING_USPS_INS3', '2.45');// 'US/Canada insurance for totals $100.01-$200
define('MODULE_SHIPPING_USPS_INS4', '4.60');// 'US/Canada insurance for totals $200.01-$300
define('MODULE_SHIPPING_USPS_INS5', '.90');// 'US/Canada insurance for every $100 over $300 (add)
define('MODULE_SHIPPING_USPS_INS6', '2.40');// 'International insurance for totals $.01-$50.00
define('MODULE_SHIPPING_USPS_INS7', '3.30');// 'International insurance for totals $50.01-$100
define('MODULE_SHIPPING_USPS_INS8', '4.20');// 'International insurance for totals $100.01-$200
define('MODULE_SHIPPING_USPS_INS9', '5.10');// 'International insurance for totals $200.01-$300
define('MODULE_SHIPPING_USPS_INS10', '.90');// 'International insurance for every $100 over $300 (add)
define('MODULE_SHIPPING_USPS_INSURE', 'True');// 'Insure packages shipped by USPS?
define('MODULE_SHIPPING_USPS_INSURE_TAX', 'True');// 'Insure tax on packages shipped by USPS?
define('USPS_LOG_FILE', WRITEABLE .'/user_files/usps.log');
class USPS extends ShippingQuoteEngine
{
var $countries, $pounds, $ounces, $insurance_cost = 0, $shipping_origin_country, $store_first_name, $store_last_name, $company_name, $store_name, $store_address1, $store_address2, $store_city, $store_state, $store_zip5, $store_zip4, $store_phone, $usps_userid;
var $order = Array();
var $types = Array();
var $intl_types = Array();
function USPS()
{
parent::kBase();
// EXPRESS, FIRST CLASS, PRIORITY, PARCEL, BMP, MEDIA
$this->types = Array(
'EXPRESS' => 'Express Mail',
'FIRST CLASS' => 'First Class Mail',
'PRIORITY' => 'Priority Mail',
'PARCEL' => 'Parcel Post',
'BPM' => 'Bound Printed Matter',
'MEDIA' => 'Media Mail'
);
$this->intl_types = Array(
// 'GLOBAL EXPRESS' => 'Global Express Guaranteed',
// 'GLOBAL EXPRESS NON-DOC RECT' => 'Global Express Guaranteed Non-Document Rectangular',
// 'GLOBAL EXPRESS NON-DOC NON-RECT' => 'Global Express Guaranteed Non-Document Non-Rectangular',
'EXPRESS MAIL INT' => 'Express Mail International (EMS)',
'EXPRESS MAIL INT FLAT RATE ENV' => 'Express Mail International (EMS) Flat Rate Envelope',
'PRIORITY MAIL INT' => 'Priority Mail International',
'PRIORITY MAIL INT FLAT RATE ENV' => 'Priority Mail International Flat Rate Envelope',
'PRIORITY MAIL INT FLAT RATE BOX' => 'Priority Mail International Flat Rate Box',
'FIRST-CLASS MAIL INT' => 'First-Class Mail International'
);
// get 2-symbol country code
$country = $this->Application->ConfigValue('Comm_Shipping_Country');
if ($country != '') {
$db =& $this->Application->GetADODBConnection();
$this->shipping_origin_country = $db->GetOne(
'SELECT DestAbbr2
FROM '.TABLE_PREFIX.'StdDestinations
WHERE
DestAbbr = '.$db->qstr($country).'
AND destType = 1
'
);
}
$contact_name = trim($this->_prepare_xml_param($this->Application->ConfigValue('Comm_Contacts_Name')));
$split_pos = strpos($contact_name, ' ');
if ($split_pos === false) {
$this->store_first_name = $contact_name;
$this->store_last_name = '';
} else {
$this->store_first_name = substr($contact_name, 0, $split_pos);
$this->store_last_name = trim(substr($contact_name, $split_pos));
}
$this->company_name = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_CompanyName'));
$this->store_name = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_StoreName'));
$this->store_address1 = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_AddressLine1'));
$this->store_address2 = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_AddressLine2'));
if ($this->store_address2 == '') {
$this->store_address2 = $this->store_address1;
$this->store_address1 = '';
}
$this->store_city = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_City'));
$this->store_state = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_State'));
$zip = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Shipping_ZIP'));
$this->store_zip5 = substr($zip, 0, 5);
$this->store_zip4 = trim(substr($zip, 6), '-');
$this->store_phone = $this->_prepare_xml_param($this->Application->ConfigValue('Comm_Contacts_Phone'));
// get username and password fron config.
$a_params = $this->LoadParams();
$this->usps_userid = $a_params['AccountLogin'];
// Note by Erik: DO NOT CHANGE THIS ARRAY. It's values are sent to USPS service and any changes may impact class main functionality.
$this->countries = array(
'AF' => 'Afghanistan',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AD' => 'Andorra',
'AO' => 'Angola',
'AI' => 'Anguilla',
'AG' => 'Antigua and Barbuda',
'AR' => 'Argentina',
'AM' => 'Armenia',
'AW' => 'Aruba',
'AU' => 'Australia',
'AT' => 'Austria',
'AZ' => 'Azerbaijan',
'BS' => 'Bahamas',
'BH' => 'Bahrain',
'BD' => 'Bangladesh',
'BB' => 'Barbados',
'BY' => 'Belarus',
'BE' => 'Belgium',
'BZ' => 'Belize',
'BJ' => 'Benin',
'BM' => 'Bermuda',
'BT' => 'Bhutan',
'BO' => 'Bolivia',
'BA' => 'Bosnia-Herzegovina',
'BW' => 'Botswana',
'BR' => 'Brazil',
'VG' => 'British Virgin Islands',
'BN' => 'Brunei Darussalam',
'BG' => 'Bulgaria',
'BF' => 'Burkina Faso',
'MM' => 'Burma',
'BI' => 'Burundi',
'KH' => 'Cambodia',
'CM' => 'Cameroon',
'CA' => 'Canada',
'CV' => 'Cape Verde',
'KY' => 'Cayman Islands',
'CF' => 'Central African Republic',
'TD' => 'Chad',
'CL' => 'Chile',
'CN' => 'China',
'CX' => 'Christmas Island (Australia)',
'CC' => 'Cocos Island (Australia)',
'CO' => 'Colombia',
'KM' => 'Comoros',
'CG' => 'Congo (Brazzaville),Republic of the',
'ZR' => 'Congo, Democratic Republic of the',
'CK' => 'Cook Islands (New Zealand)',
'CR' => 'Costa Rica',
'CI' => 'Cote d\'Ivoire (Ivory Coast)',
'HR' => 'Croatia',
'CU' => 'Cuba',
'CY' => 'Cyprus',
'CZ' => 'Czech Republic',
'DK' => 'Denmark',
'DJ' => 'Djibouti',
'DM' => 'Dominica',
'DO' => 'Dominican Republic',
'TP' => 'East Timor (Indonesia)',
'EC' => 'Ecuador',
'EG' => 'Egypt',
'SV' => 'El Salvador',
'GQ' => 'Equatorial Guinea',
'ER' => 'Eritrea',
'EE' => 'Estonia',
'ET' => 'Ethiopia',
'FK' => 'Falkland Islands',
'FO' => 'Faroe Islands',
'FJ' => 'Fiji',
'FI' => 'Finland',
'FR' => 'France',
'GF' => 'French Guiana',
'PF' => 'French Polynesia',
'GA' => 'Gabon',
'GM' => 'Gambia',
'GE' => 'Georgia, Republic of',
'DE' => 'Germany',
'GH' => 'Ghana',
'GI' => 'Gibraltar',
'GB' => 'Great Britain and Northern Ireland',
'GR' => 'Greece',
'GL' => 'Greenland',
'GD' => 'Grenada',
'GP' => 'Guadeloupe',
'GT' => 'Guatemala',
'GN' => 'Guinea',
'GW' => 'Guinea-Bissau',
'GY' => 'Guyana',
'HT' => 'Haiti',
'HN' => 'Honduras',
'HK' => 'Hong Kong',
'HU' => 'Hungary',
'IS' => 'Iceland',
'IN' => 'India',
'ID' => 'Indonesia',
'IR' => 'Iran',
'IQ' => 'Iraq',
'IE' => 'Ireland',
'IL' => 'Israel',
'IT' => 'Italy',
'JM' => 'Jamaica',
'JP' => 'Japan',
'JO' => 'Jordan',
'KZ' => 'Kazakhstan',
'KE' => 'Kenya',
'KI' => 'Kiribati',
'KW' => 'Kuwait',
'KG' => 'Kyrgyzstan',
'LA' => 'Laos',
'LV' => 'Latvia',
'LB' => 'Lebanon',
'LS' => 'Lesotho',
'LR' => 'Liberia',
'LY' => 'Libya',
'LI' => 'Liechtenstein',
'LT' => 'Lithuania',
'LU' => 'Luxembourg',
'MO' => 'Macao',
'MK' => 'Macedonia, Republic of',
'MG' => 'Madagascar',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'MV' => 'Maldives',
'ML' => 'Mali',
'MT' => 'Malta',
'MQ' => 'Martinique',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'YT' => 'Mayotte (France)',
'MX' => 'Mexico',
'MD' => 'Moldova',
'MC' => 'Monaco (France)',
'MN' => 'Mongolia',
'MS' => 'Montserrat',
'MA' => 'Morocco',
'MZ' => 'Mozambique',
'NA' => 'Namibia',
'NR' => 'Nauru',
'NP' => 'Nepal',
'NL' => 'Netherlands',
'AN' => 'Netherlands Antilles',
'NC' => 'New Caledonia',
'NZ' => 'New Zealand',
'NI' => 'Nicaragua',
'NE' => 'Niger',
'NG' => 'Nigeria',
'KP' => 'North Korea (Korea, Democratic People\'s Republic of)',
'NO' => 'Norway',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PG' => 'Papua New Guinea',
'PY' => 'Paraguay',
'PE' => 'Peru',
'PH' => 'Philippines',
'PN' => 'Pitcairn Island',
'PL' => 'Poland',
'PT' => 'Portugal',
'QA' => 'Qatar',
'RE' => 'Reunion',
'RO' => 'Romania',
'RU' => 'Russia',
'RW' => 'Rwanda',
'SH' => 'Saint Helena',
'KN' => 'Saint Kitts (St. Christopher and Nevis)',
'LC' => 'Saint Lucia',
'PM' => 'Saint Pierre and Miquelon',
'VC' => 'Saint Vincent and the Grenadines',
'SM' => 'San Marino',
'ST' => 'Sao Tome and Principe',
'SA' => 'Saudi Arabia',
'SN' => 'Senegal',
'YU' => 'Serbia-Montenegro',
'SC' => 'Seychelles',
'SL' => 'Sierra Leone',
'SG' => 'Singapore',
'SK' => 'Slovak Republic',
'SI' => 'Slovenia',
'SB' => 'Solomon Islands',
'SO' => 'Somalia',
'ZA' => 'South Africa',
'GS' => 'South Georgia (Falkland Islands)',
'KR' => 'South Korea (Korea, Republic of)',
'ES' => 'Spain',
'LK' => 'Sri Lanka',
'SD' => 'Sudan',
'SR' => 'Suriname',
'SZ' => 'Swaziland',
'SE' => 'Sweden',
'CH' => 'Switzerland',
'SY' => 'Syrian Arab Republic',
'TW' => 'Taiwan',
'TJ' => 'Tajikistan',
'TZ' => 'Tanzania',
'TH' => 'Thailand',
'TG' => 'Togo',
'TK' => 'Tokelau (Union) Group (Western Samoa)',
'TO' => 'Tonga',
'TT' => 'Trinidad and Tobago',
'TN' => 'Tunisia',
'TR' => 'Turkey',
'TM' => 'Turkmenistan',
'TC' => 'Turks and Caicos Islands',
'TV' => 'Tuvalu',
'UG' => 'Uganda',
'UA' => 'Ukraine',
'AE' => 'United Arab Emirates',
'UY' => 'Uruguay',
'UZ' => 'Uzbekistan',
'VU' => 'Vanuatu',
'VA' => 'Vatican City',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'WF' => 'Wallis and Futuna Islands',
'WS' => 'Western Samoa',
'YE' => 'Yemen',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe'
);
$this->countryinsure = array(
'AF' => 0,
'AL' => 0,
'DZ' => 2185,
'AD' => 5000,
'AO' => 0,
'AI' => 415,
'AG' => 60,
'AR' => 5000,
'AM' => 1350,
'AW' => 830,
'AU' => 3370,
'AT' => 5000,
'AZ' => 5000,
'BS' => 2795,
'BH' => 0,
'BD' => 5000,
'BB' => 220,
'BY' => 1323,
'BE' => 5000,
'BZ' => 1600,
'BJ' => 170,
'BM' => 440,
'BT' => 440,
'BO' => 0,
'BA' => 5000,
'BW' => 145,
'BR' => 5000,
'VG' => 165,
'BN' => 4405,
'BG' => 1030,
'BF' => 530,
'MM' => 4045,
'BI' => 790,
'KH' => 0,
'CM' => 5000,
'CA' => 675,
'CV' => 0,
'KY' => 0,
'CF' => 4405,
'TD' => 440,
'CL' => 0,
'CN' => 1130,
'CX' => 3370,
'CC' => 3370,
'CO' => 0,
'KM' => 690,
'CG' => 1685,
'ZR' => 0,
'CK' => 980,
'CR' => 0,
'CI' => 5000,
'HR' => 5000,
'CU' => 0,
'CY' => 5000,
'CZ' => 5000,
'DK' => 5000,
'DJ' => 880,
'DM' => 0,
'DO' => 0,
'TP' => 0,
'EC' => 0,
'EG' => 1685,
'SV' => 0,
'GQ' => 0,
'ER' => 0,
'EE' => 2020,
'ET' => 1000,
'FK' => 510,
'FO' => 5000,
'FJ' => 600,
'FI' => 5000,
'FR' => 5000,
'GF' => 5000,
'PF' => 1015,
'GA' => 485,
'GM' => 2575,
'GE' => 1350,
'DE' => 5000,
'GH' => 5000,
'GI' => 5000,
'GB' => 857,
'GR' => 5000,
'GL' => 5000,
'GD' => 350,
'GP' => 5000,
'GT' => 0,
'GN' => 875,
'GW' => 21,
'GY' => 10,
'HT' => 0,
'HN' => 0,
'HK' => 5000,
'HU' => 5000,
'IS' => 5000,
'IN' => 2265,
'ID' => 0,
'IR' => 0,
'IQ' => 0,
'IE' => 5000,
'IL' => 0,
'IT' => 5000,
'JM' => 0,
'JP' => 5000,
'JO' => 0,
'KZ' => 5000,
'KE' => 815,
'KI' => 0,
'KW' => 1765,
'KG' => 1350,
'LA' => 0,
'LV' => 1350,
'LB' => 440,
'LS' => 440,
'LR' => 440,
'LY' => 0,
'LI' => 5000,
'LT' => 5000,
'LU' => 5000,
'MO' => 4262,
'MK' => 2200,
'MG' => 675,
'MW' => 50,
'MY' => 1320,
'MV' => 0,
'ML' => 950,
'MT' => 5000,
'MQ' => 5000,
'MR' => 635,
'MU' => 270,
'YT' => 5000,
'MX' => 0,
'MD' => 1350,
'MC' => 5000,
'MN' => 440,
'MS' => 2200,
'MA' => 5000,
'MZ' => 0,
'NA' => 4405,
'NR' => 220,
'NP' => 0,
'NL' => 5000,
'AN' => 830,
'NC' => 1615,
'NZ' => 980,
'NI' => 440,
'NE' => 810,
'NG' => 205,
'KP' => 0,
'NO' => 0,
'OM' => 575,
'PK' => 270,
'PA' => 0,
'PG' => 445,
'PY' => 0,
'PE' => 0,
'PH' => 270,
'PN' => 0,
'PL' => 1350,
'PT' => 5000,
'QA' => 2515,
'RE' => 5000,
'RO' => 5000,
'RU' => 5000,
'RW' => 0,
'SH' => 170,
'KN' => 210,
'LC' => 400,
'PM' => 5000,
'VC' => 130,
'SM' => 5000,
'ST' => 440,
'SA' => 0,
'SN' => 865,
'YU' => 5000,
'SC' => 0,
'SL' => 0,
'SG' => 4580,
'SK' => 5000,
'SI' => 4400,
'SB' => 0,
'SO' => 440,
'ZA' => 1760,
'GS' => 510,
'KR' => 5000,
'ES' => 5000,
'LK' => 35,
'SD' => 0,
'SR' => 535,
'SZ' => 560,
'SE' => 5000,
'CH' => 5000,
'SY' => 3080,
'TW' => 1350,
'TJ' => 1350,
'TZ' => 230,
'TH' => 1350,
'TG' => 2190,
'TK' => 295,
'TO' => 515,
'TT' => 930,
'TN' => 2200,
'TR' => 880,
'TM' => 675,
'TC' => 0,
'TV' => 4715,
'UG' => 0,
'UA' => 5000,
'AE' => 5000,
'UY' => 0,
'UZ' => 5000,
'VU' => 0,
'VA' => 5000,
'VE' => 0,
'VN' => 0,
'WF' => 1615,
'WS' => 295,
'YE' => 0,
'ZM' => 540,
'ZW' => 600,
'US' => 5000
);
}
function SetInsurance()
{
$this->insurance_cost = 0;
// Insurance module by Kevin Shelton
// divide the value of the order among the packages based on the order total or subtotal depending on whether or not you have configured to insure tax
$shipping_weight = $this->order['ShippingWeight'];
$shipping_num_boxes = $this->order['ShippingNumBoxes'];
$costperpkg = $this->order['SubTotal'] / $shipping_num_boxes;
// retrieve the maximum allowed insurance for the destination country and if the package value exceeds it then set package value to the maximum allowed
$maxins = $this->countryinsure[$this->order['ShippingCountry']];
if ($costperpkg > $maxins) $costperpkg = $maxins;
// if insurance not allowed for destination or insurance is turned off add nothing to shipping cost
if (($maxins == 0) || (MODULE_SHIPPING_USPS_INSURE == 'False')) {
$insurance = 0;
}
// US and Canada share the same insurance calculation (though not the same maximum)
else if (($this->order['ShippingCountry'] == 'US') || ($this->order['ShippingCountry'] == 'CA'))
{
if ($costperpkg<=50) {
$insurance=MODULE_SHIPPING_USPS_INS1;
}
else if ($costperpkg<=100) {
$insurance=MODULE_SHIPPING_USPS_INS2;
}
else if ($costperpkg<=200) {
$insurance=MODULE_SHIPPING_USPS_INS3;
}
else if ($costperpkg<=300) {
$insurance=MODULE_SHIPPING_USPS_INS4;
}
else {
$insurance = MODULE_SHIPPING_USPS_INS4 + ((ceil($costperpkg/100) -3) * MODULE_SHIPPING_USPS_INS5);
}
}
// if insurance allowed and is not US or Canada then calculate international insurance
else {
if ($costperpkg<=50) {
$insurance=MODULE_SHIPPING_USPS_INS6;
}
else if ($costperpkg<=100) {
$insurance=MODULE_SHIPPING_USPS_INS7;
}
else if ($costperpkg<=200) {
$insurance=MODULE_SHIPPING_USPS_INS8;
}
else if ($costperpkg<=300) {
$insurance=MODULE_SHIPPING_USPS_INS9;
}
else {
$insurance = MODULE_SHIPPING_USPS_INS9 + ((ceil($costperpkg/100) - 3) * MODULE_SHIPPING_USPS_INS10);
}
}
// usps doesnt accept zero weight
$shipping_weight = ($shipping_weight < 0.1 ? 0.1 : $shipping_weight);
$shipping_pounds = floor ($shipping_weight);
$shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight)));
$this->_setWeight($shipping_pounds, $shipping_ounces);
// Added by Kevin Chen (kkchen@uci.edu); Fixes the Parcel Post Bug July 1, 2004
// Refer to http://www.usps.com/webtools/htm/Domestic-Rates.htm documentation
// Thanks Ryan
if($shipping_pounds > 35 || ($shipping_pounds == 0 && $shipping_ounces < 6)){
$this->_setMachinable('False');
}
else{
$this->_setMachinable('True');
}
$this->insurance_cost = $insurance;
// End Kevin Chen July 1, 2004
}
function _setService($service)
{
$this->service = $service;
}
function _setWeight($pounds, $ounces=0)
{
$this->pounds = $pounds;
$this->ounces = $ounces;
}
function _setContainer($container)
{
$this->container = $container;
}
function _setSize($size)
{
$this->size = $size;
}
function _setMachinable($machinable)
{
$this->machinable = $machinable;
}
function PhoneClean($phone)
{
$res = ereg_replace("[(]|[)]|[\-]|[ ]|[#]|[\.]|[a-z](.*)|[A-Z](.*)", "", $phone);
if ( strlen($res) > 10 ) $res = substr($res, 0, 10);
return $res != '' ? $res : $phone;
}
function GetQuote($method = '')
{
if ( isset($this->types[$method]) || in_array($method, $this->intl_types)) {
$this->_setService($method);
}
$this -> _setContainer('None');
$this -> _setSize('REGULAR');
$this -> SetInsurance(); // ???
if ($this->order['ShippingCountry'] == $this->shipping_origin_country) {
$request='<?xml version="1.0"?>';
// PASSWORD="'.$this->usps_password.'"
$request.= '<RateV3Request USERID="'.$this->usps_userid.'">';
$services_count = 0;
if (isset($this->service)) {
$this->types = array($this->service => $this->types[$this->service]);
}
$dest_zip = str_replace(' ', '', $this->order['ShippingZip']);
$dest_zip = substr($dest_zip, 0, 5);
reset($this->types);
$allowed_types = explode(", ", MODULE_SHIPPING_USPS_TYPES);
while (list($key, $value) = each($this->types))
{
if ( !in_array($key, $allowed_types) ) continue;
$request .= '<Package ID="'.$services_count.'">'.
'<Service>'.$key.'</Service>'.
'<ZipOrigination>'.$this->store_zip5.'</ZipOrigination>'.
'<ZipDestination>'.$dest_zip.'</ZipDestination>'.
'<Pounds>'.$this->pounds.'</Pounds>'.
'<Ounces>'.$this->ounces.'</Ounces>'.
'<Size>'.$this->size.'</Size>'.
'<Machinable>'.$this->machinable.'</Machinable>'.
'</Package>';
$services_count++;
}
$request .= '</RateV3Request>';
$api_query = 'RateV3';
}
else {
$request = '<IntlRateRequest USERID="'.$this->usps_userid.'">'.
'<Package ID="0">'.
'<Pounds>'.$this->pounds.'</Pounds>'.
'<Ounces>'.$this->ounces.'</Ounces>'.
'<MailType>Package</MailType>'.
'<Country>'.$this->countries[$this->order['ShippingCountry']].'</Country>'.
'</Package>'.
'</IntlRateRequest>';
$api_query = 'IntlRate';
}
$request = 'API='.$api_query.'&XML=' . urlencode($request);
$body = $this->PostQuery($request);
$body = str_replace(chr(146), '', $body); // for bad `
// check for errors
if (strpos($body, '<Error>') !== false) {
$errors = Array ();
preg_match_all('/<Number>(.*?)<\/Number>/s', $body, $error_numbers);
preg_match_all('/<Description>(.*?)<\/Description>/s', $body, $error_descriptions);
foreach ($error_numbers[1] as $index => $error_number) {
$errors[$index] = $error_descriptions[1][$index];
if ($this->Application->isDebugMode()) {
$errors[$index] .= ' (' . $error_number . ')';
}
}
$errors = array_unique($errors); // we may have same errors on many packages, so don't show duplicates
return Array('error' => implode('<br/>', $errors));
}
// parse response
$xml_helper =& $this->Application->recallObject('kXMLHelper');
/* @var $xml_helper kXMLHelper */
$root_node =& $xml_helper->Parse($body);
/* @var $root_node kXMLNode */
$rates = Array();
// Domestic shipping
if ($this->order['ShippingCountry'] == $this->shipping_origin_country) {
$i = 0;
$postage_node =& $root_node->FindChild('Package');
do {
// $parcel_node =& $postage_node->firstChild;
$service = $postage_node->FindChildValue('MailService');
if ( $service != '' ) {
$i++;
$rates[$i] = Array();
$rates[$i]['Title'] = $service;
$rates[$i]['Rate'] = $this->insurance_cost + $postage_node->FindChildValue('Rate');
}
}
while ( $postage_node =& $postage_node->NextSibling());
}
else {
// for International Rates !!!
$allowed_types = array();
foreach( explode(", ", MODULE_SHIPPING_USPS_TYPES_INTL) as $value ) {
$allowed_types[$value] = $this->intl_types[$value];
}
$i = 0;
$service_node =& $root_node->FindChild('Service');
do {
$service = trim($service_node->FindChildValue('SvcDescription'));
if( !in_array($service, $allowed_types) ) continue;
$i++;
if ( $service_node->FindChildValue('MaxWeight') >= $this->pounds ) {
$rates[$i] = Array();
$rates[$i]['Title'] = $service;
$rates[$i]['MaxDimensions'] = $service_node->FindChildValue('MaxDimensions');
$rates[$i]['MaxWeight'] = $service_node->FindChildValue('MaxWeight');
$rates[$i]['SvcCommitments'] = $service_node->FindChildValue('SvcCommitments');
$rates[$i]['Rate'] = $this->insurance_cost + $service_node->FindChildValue('Postage');
}
}
while ( $service_node =& $service_node->NextSibling());
}
// print_r($rates);
// die('here');
return $rates;
}
function PostOrder()
{
$request='';
$base_request = '';
$this->SetInsurance();
// $this->order['ShippingCountry'] = $this->GetUSPSCountry($this->order['ShippingCountry']);
// Domestic Order
if ($this->order['ShippingCountry'] == $this->shipping_origin_country) {
// $dest_zip = str_replace(' ', '', $this->order['ShippingZip5']);
$this->order['ShippingZip5'] = substr($this->order['ShippingZip5'], 0, 5);
$WeightInOunces = floor($this->pounds * 16 + $this->ounces);
$base_request ='
<Option>1</Option>
<ImageParameters></ImageParameters>
<FromName>'.$this->store_name.'</FromName>
<FromFirm>'.$this->company_name.'</FromFirm>
<FromAddress1>'.$this->store_address1.'</FromAddress1>
<FromAddress2>'.$this->store_address2.'</FromAddress2>
<FromCity>'.$this->store_city.'</FromCity>
<FromState>'.$this->store_state.'</FromState>
<FromZip5>'.$this->store_zip5.'</FromZip5>
<FromZip4>'.$this->store_zip4.'</FromZip4>
<ToName>'.$this->order['FirstName'].' '.$this->order['LastName'].'</ToName>
<ToFirm>'.$this->order['ShippingCompany'].'</ToFirm>
<ToAddress1>'.$this->order['ShippingAddress2'].'</ToAddress1>
<ToAddress2>'.$this->order['ShippingAddress1'].'</ToAddress2>
<ToCity>'.$this->order['ShippingCity'].'</ToCity>
<ToState>'.$this->order['ShippingState'].'</ToState>
<ToZip5>'.$this->order['ShippingZip5'].'</ToZip5>
<ToZip4>'.$this->order['ShippingZip4'].'</ToZip4>
<WeightInOunces>'.$WeightInOunces.'</WeightInOunces>
<ServiceType>'.$this->order['ShippingService'].'</ServiceType>
<ImageType>PDF</ImageType>
<LabelDate>'.date('m/d/Y',time()).'</LabelDate>
<CustomerRefNo></CustomerRefNo>
<AddressServiceRequested></AddressServiceRequested>
<SenderName></SenderName><SenderEMail></SenderEMail>
<RecipientName></RecipientName>
<RecipientEMail></RecipientEMail>
';
$api_query = 'DeliveryConfirmationV3';
$xml_request = 'DeliveryConfirmationV3.0Request';
}
else {
// International Order(s)
$shipping_service = strtolower($this->order['ShippingService']);
$base_request = '<Option/>
<ImageParameters/>
<FromFirstName>'.$this->store_first_name.'</FromFirstName>
<FromLastName>'.$this->store_last_name.'</FromLastName>
<FromFirm>'.$this->company_name.'</FromFirm>
<FromAddress1>'.$this->store_address1.'</FromAddress1>
<FromAddress2>'.$this->store_address2.'</FromAddress2>
<FromCity>'.$this->store_city.'</FromCity>
<FromState>'.$this->store_state.'</FromState>
<FromZip5>'.$this->store_zip5.'</FromZip5>
<FromPhone>'.$this->PhoneClean($this->store_phone).'</FromPhone>
<ToName>'.$this->order['FirstName'].' '.$this->order['LastName'].'</ToName>
<ToFirm>'.$this->order['ShippingCompany'].'</ToFirm>
<ToAddress1></ToAddress1>
<ToAddress2>'.$this->order['ShippingAddress2'].'</ToAddress2>
<ToAddress3>'.$this->order['ShippingAddress1'].'</ToAddress3>
<ToCity>'.$this->order['ShippingCity'].'</ToCity>';
if ( $this->order['ShippingProvince'] != '' ) {
$base_request.='
<ToProvince>'.$this->order['ShippingProvince'].'</ToProvince>';
}
$base_request.='
<ToCountry>'.$this->countries[$this->order['ShippingCountry']].'</ToCountry>
<ToPostalCode>'.$this->order['ShippingZip'].'</ToPostalCode>
<ToPOBoxFlag>N</ToPOBoxFlag>
<ToPhone>'.$this->PhoneClean($this->order['ShippingPhone']).'</ToPhone>
<ToFax>'.$this->PhoneClean($this->order['ShippingFax']).'</ToFax>
<ToEmail>'.$this->order['Email'].'</ToEmail>
<ShippingContents>';
// add items
foreach ( $this->order['Items'] as $k => $value ) {
$base_request.='
<ItemDetail>
<Description>Computer Parts</Description>
<Quantity>'.$value['Qty'].'</Quantity>
<Value>'.($value['Price'] * $value['Qty']).'</Value>
<NetPounds>'.$value['NetPounds'].'</NetPounds>
<NetOunces>'.$value['NetOunces'].'</NetOunces>
<HSTariffNumber>123456</HSTariffNumber>
<CountryOfOrigin>United States</CountryOfOrigin>
</ItemDetail>';
}
// end add items
$base_request.='
</ShippingContents>
<GrossPounds>'.$this->pounds.'</GrossPounds>
<GrossOunces>'.$this->ounces.'</GrossOunces>
<ContentType>MERCHANDISE</ContentType>
<Agreement>Y</Agreement>
<InvoiceNumber>'.$this->order['InvoiceNumber'].'</InvoiceNumber>
<ImageType>PDF</ImageType>
<ImageLayout>ALLINONEFILE</ImageLayout>
<LabelDate>'.date('m/d/Y',time()).'</LabelDate>
';
if (strpos($shipping_service, 'express') !== false) {
$xml_request = 'ExpressMailIntlRequest';
$api_query = 'ExpressMailIntl';
}
elseif (strpos($shipping_service, 'priority') !== false) {
$xml_request = 'PriorityMailIntlRequest';
$api_query = 'PriorityMailIntl';
}
else {
$xml_request = 'FirstClassMailIntlRequest';
$api_query = 'FirstClassMailIntl';
}
}
$request.= '<'.$xml_request.' USERID="'.$this->usps_userid.'">';
$request.= $base_request;
$request.= '</'.$xml_request.'>';
// die($request);
$request = 'API='.$api_query.'&XML='.urlencode($request);
$body = $this->PostQuery($request, 1);
// check for errors
if (strpos($body, '<Error>') !== false) {
$errors = Array ();
preg_match_all('/<Number>(.*?)<\/Number>/s', $body, $error_numbers);
preg_match_all('/<Description>(.*?)<\/Description>/s', $body, $error_descriptions);
foreach ($error_numbers[1] as $index => $error_number) {
$errors[$index] = Array ('error_number' => $error_number, 'error_description' => $error_descriptions[1][$index]);
}
// TODO: find a way to return other error messages in same package as well
return $errors[0];
}
// parse response
$xml_helper =& $this->Application->recallObject('kXMLHelper');
$root_node =& $xml_helper->Parse($body);
/* @var $root_node kXMLNode */
$Postage = 0;
$label_file = $TrackingNumber = $PostnetBarCode = '';
// Domestic shipping
if ($this->order['ShippingCountry'] == $this->shipping_origin_country ) {
$delivery_node =& $root_node->FindChild('DeliveryConfirmationV3.0Response');
do {
$TrackingNumber = $delivery_node->FindChildValue('DeliveryConfirmationNumber');
$PostnetBarCode = $delivery_node->FindChildValue('Postnet');
$DeliveryConfirmationLabel = base64_decode($delivery_node->FindChildValue('DeliveryConfirmationLabel'));
}
while ( $delivery_node =& $delivery_node->NextSibling());
}
else {
if (strpos($shipping_service, 'express') !== false) {
$node_title = 'ExpressMailIntlResponse';
}
elseif (strpos($shipping_service, 'priority') !== false) {
$node_title = 'PriorityMailIntlResponse';
}
else {
$node_title = 'FirstClassMailIntlResponse';
}
$delivery_node =& $root_node->FindChild($node_title);
$PostnetBarCode = $delivery_node->FindChildValue('BarcodeNumber');
$Postage = $delivery_node->FindChildValue('Postage');
$DeliveryConfirmationLabel = base64_decode($delivery_node->FindChildValue('LabelImage'));
}
if ( $TrackingNumber != '' ) {
$label_file = USPS_LABEL_FOLDER.$TrackingNumber.".pdf";
}
elseif ( $PostnetBarCode != '' ) {
$label_file = USPS_LABEL_FOLDER.$PostnetBarCode.".pdf";
}
if ( $label_file != '' ) {
if (!$handle = fopen($label_file, 'a')) echo "Cannot open file ($label_file)";
if ( @fwrite($handle, $DeliveryConfirmationLabel) === FALSE) echo "Cannot write to file ($label_file)";
}
return array('TrackingNumber' => $TrackingNumber, 'PostnetBarCode' => $PostnetBarCode, 'Postage' => $Postage);
}
function GetUSPSCountry($country)
{
$country = $this->Application->Conn->GetOne('SELECT DestAbbr2 FROM '.TABLE_PREFIX.'StdDestinations WHERE DestAbbr = '.$this->Application->Conn->qstr($country));
if ( $country == '' ) $country = 'US';
return $country;
}
function GetShippingQuotes($params = null)
{
$weights = Kg2Pounds($params['packages']['0']['weight']);
$weight = '';
$weight = $weights[0];
if ( $weights[1] != '' ) {
$weight.='.'.$weights[1];
}
$country = $this->GetUSPSCountry($params['dest_country']);
$this->order = Array();
$this->order['ShippingWeight'] = $weight;
$this->order['ShippingNumBoxes'] = 1;
$this->order['ShippingZip'] = $params['dest_postal'];
$this->order['SubTotal'] = $params['amount'];
$this->order['ShippingCountry'] = $country;
$shipping_types = Array();
$rates = $this->GetQuote();
if ( !isset($rates['error']) ) {
$this->Application->RemoveVar('usps_errors');
$i = 1;
foreach ($rates as $k => $rate ) {
$shipping_types['USPS_'.$i] = Array(
'ShippingId' => 'USPS_'.$i,
'TotalCost' => $rate['Rate'],
'ShippingName' => $rate['Title'],
'Type' => '1',
'CODFlat' => '0',
'CODPercent' => '0',
'PortalGroups' => ',15,',
'InsuranceFee' => '',
'COD' => '0',
'SelectedOnly' => '0',
'Code' => $rate['Title']
);
$i++;
}
}
else {
// for Front-End (shipping screen) and Admin (Shipping Tab on editing order)
$this->Application->StoreVar('usps_errors', $rates['error']);
}
$this->Application->StoreVar('current_usps_shipping_types', serialize($shipping_types));
return $shipping_types;
}
function TrackOrder($TrackingNumber='')
{
if ( $TrackingNumber != '' ) {
// http://testing.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML=<TrackFieldRequest USERID="402INTEC7634"><TrackID ID="EJ958083578US"></TrackID></TrackFieldRequest>
$request = '<TrackRequest USERID="'.$this->usps_userid.'"><TrackID ID="'.$TrackingNumber.'"></TrackID></TrackRequest>';
$api_query = 'TrackV2';
$request = 'API='.$api_query.'&XML='.urlencode($request);
$body = $this->PostQuery($request);
// check for errors
if (strpos($body, '<Error>') !== false) {
$errors = Array ();
preg_match_all('/<Number>(.*?)<\/Number>/s', $body, $error_numbers);
preg_match_all('/<Description>(.*?)<\/Description>/s', $body, $error_descriptions);
foreach ($error_numbers[1] as $index => $error_number) {
$errors[$index] = $error_descriptions[1][$index];
if ($this->Application->isDebugMode()) {
$errors[$index] .= ' (' . $error_number . ')';
}
}
$errors = array_unique($errors); // we may have same errors on many packages, so don't show duplicates
return Array('error' => implode('<br/>', $errors));
}
$xml_helper =& $this->Application->recallObject('kXMLHelper');
$root_node =& $xml_helper->Parse($body);
/* @var $root_node kXMLNode */
// Tracking Shipping
$delivery_node =& $root_node->FindChild('TrackInfo');
$TrackSummary = $delivery_node->FindChildValue('TrackSummary');
// echo ' TrackSummary ('.$TrackingNumber.') = '.$TrackSummary.'<br>';
return strpos($TrackSummary, 'delivered') !== false ? 1 : 0;
}
else
return false;
}
function ProcessTrackOrders()
{
$sql = sprintf('SELECT `OrderId`, `ShippingTracking` FROM %s WHERE `Status` > 3 AND `Delivered` = 0', TABLE_PREFIX.'Orders');
$orders = $this->Application->Conn->Query($sql);
foreach ( $orders as $k => $order ) {
// try to track order
if ( $order['ShippingTracking'] != '' && $this->TrackOrder($order['ShippingTracking']) ) {
$update_order = sprintf("UPDATE %s SET `Delivered` = 1 WHERE %s = %s",
TABLE_PREFIX.'Orders',
$this->Application->getUnitOption('ord', 'IDField'),
$order[$this->Application->getUnitOption('ord', 'IDField')]
);
$this->Application->Conn->Query($update_order);
}
}
}
function PostQuery($request, $secure=0)
{
switch (MODULE_SHIPPING_USPS_SERVER) {
case 'production':
$usps_server = $secure > 0 ? 'https://secure.shippingapis.com' : 'http://production.shippingapis.com' ;
$api_dll = 'ShippingAPI.dll';
break;
case 'test':
$usps_server = $secure > 0 ? 'https://secure.shippingapis.com' : 'http://testing.shippingapis.com';
$api_dll = 'ShippingAPITest.dll';
break;
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $usps_server.'/'.$api_dll.'?'.$request);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$body = curl_exec($curl);
curl_close($curl);
- // echo ' body is <br>';
- // echo $body;
-
if (defined('USPS_LOG_FILE')) {
$filename = USPS_LOG_FILE;
if ( !$fp = fopen($filename, "a") ) echo("Failed opening file $filename");
}
$request_url = sprintf("Date %s : IP %s\n\nPost\n\n%s\n\nReplay\n\n%s\n\n",
date("m/d/Y H:i:s",time()),
$_SERVER['REMOTE_ADDR'],
$usps_server.'/'.$api_dll.'?'.urldecode($request),
$body
);
if (defined('USPS_LOG_FILE')) {
if (!fwrite($fp, $request_url)) echo("Failed writing to file $filename");
fclose($fp);
}
return $body;
}
function GetAvailableTypes()
{
return array();
$conn =& $this->Application->GetADODBConnection();
$types = $conn->Query('SELECT * FROM '.TABLE_PREFIX.'ShippingType');
$ret = array();
foreach ($types as $a_type) {
$a_type['_ClassName'] = get_class($this);
$a_type['_Id'] = 'CUST_'.$a_type['ShippingID'];
$a_type['_Name'] = '(Custom) '.$a_type['Name'];
$ret[] = $a_type;
}
return $ret;
}
function LoadParams()
{
$sql = 'SELECT Properties FROM '.$this->Application->getUnitOption('sqe', 'TableName').'
WHERE ClassName="USPS"';
$db =& $this->Application->GetADODBConnection();
return unserialize($db->GetOne($sql));
}
function _prepare_xml_param($value) {
return strip_tags($value);
}
}
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 12489)
@@ -1,134 +1,138 @@
<?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!');
+ defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $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'),
+ '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(
+ 'Hooks' => Array (
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'EngineId',
- 'StatusField' => Array('Status'),
+ 'StatusField' => Array ('Status'),
'TitleField' => 'Name',
- 'TitlePresets' => Array(
- 'default' => Array( 'edit_status_labels' => Array('sqe'=>'!la_title_EditingShippingQuoteEngine!'),
+ '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'),
+ 'PermSection' => Array ('main' => 'in-commerce:shipping_quote_engines'),
- 'Sections' => Array(
- 'in-commerce:shipping_quote_engines' => Array(
+ 'Sections' => Array (
+ 'in-commerce:shipping_quote_engines' => Array (
'parent' => 'in-commerce:shipping_folder',
- 'icon' => 'shipping',
+ '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'),
+ '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),
+ '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' ),
)
),
- '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(
- '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','not_null' => 1, 'default' => 0),
- 'Properties' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ClassName' => Array('type' => 'string','not_null' => '1','default' => ''),
+ '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', 'not_null' => '1', 'default' => ''),
+ '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')),
+ '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')),
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_shipping.gif', 0=>'icon16_shipping_disabled.gif', 1=>'icon16_shipping.gif'),
- 'Fields' => Array(
- 'EngineId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'title'=>'la_col_ShippingQuoteEngineName', 'filter_block' => 'grid_like_filter'),
- 'FlatSurcharge' => Array( 'title'=>'la_col_FlatSurcharge', 'filter_block' => 'grid_float_range_filter'),
- 'PercentSurcharge' => Array( 'title'=>'la_col_PercentSurcharge', 'filter_block' => 'grid_float_range_filter'),
- ),
-
- ),
- ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ '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/in-commerce/units/payment_type/payment_type_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/payment_type/payment_type_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/payment_type/payment_type_config.php (revision 12489)
@@ -1,140 +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.net/license/commercial/ for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $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'),
+ '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(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'PaymentTypeId',
- 'StatusField' => Array('Status', 'IsPrimary'),
+ '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!'),
+ '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'),
- 'new_titlefield' => Array('pt'=>'!la_title_NewPaymentType!'),
+ '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!"),
+ '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!"),
+ '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_Groups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4),
+ 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4),
),
),
- 'PermSection' => Array('main' => 'in-commerce:payment_types'),
+ 'PermSection' => Array ('main' => 'in-commerce:payment_types'),
- 'Sections' => Array(
- 'in-commerce:payment_types' => Array(
+ 'Sections' => Array (
+ 'in-commerce:payment_types' => Array (
'parent' => 'in-commerce:setting_folder',
- 'icon' => 'payment_types',
+ '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'),
+ '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'),
+ 'SubItems' => Array ('gwfv', 'ptc'),
- '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' ),
)
),
- 'CalculatedFields' => Array(
- '' => Array(
+ 'CalculatedFields' => Array (
+ '' => Array (
'Gateway' => TABLE_PREFIX.'Gateways.Name',
),
),
- 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
+ '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',
+ 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s',
),
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('Priority' => 'desc'),
- 'Sorting' => Array('Name' => 'asc'),
+ '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),
+ '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', 'not_null' => 1, 'default' => '',),
+ 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null' => 1),
+ 'Priority' => Array ('type' => 'int', 'not_null' => true, 'default' => 0),
+ 'IsPrimary' => Array ('type' => 'int', 'not_null' => true, 'default' => 0),
+ 'BuiltIn' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ),
+ 'GatewayId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Gateways', 'option_key_field' => 'GatewayId', 'option_title_field' => 'Name', 'default' => 1, 'not_null' => 1),
+ 'PlacedOrdersEdit' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '1', 'default' => '0.00'),
+ 'PortalGroups' => Array ('type' => 'string', 'not_null' => 1, 'default' => '',),
),
-/* 'VirtualFields' => Array(
+/* 'VirtualFields' => Array (
'Qty' => 1,
),*/
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif','0_0'=>'icon16_payment_disabled.gif','1_0'=>'icon16_payment.gif','1_1'=>'icon16_payment_primary.gif','0_1'=>'icon16_payment_disabled.gif'),
- 'Fields' => Array(
- 'PaymentTypeId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'title'=>'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td', 'filter_block' => 'grid_like_filter'),
- 'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'),
- 'BuiltIn' => Array( 'title'=>'la_col_BuiltIn', 'filter_block' => 'grid_options_filter'),
- ),
-
- ),
- ),
+ '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',
+ ),
+ '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/in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/manufacturers/manufacturers_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/manufacturers/manufacturers_config.php (revision 12489)
@@ -1,139 +1,143 @@
<?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',
+ 'icon' => 'manufacturers',
'label' => 'la_tab_Manufacturers',
'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',
), // 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'),
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
'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'),
+ '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/in-commerce/units/shipping/shipping_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/shipping/shipping_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/shipping/shipping_config.php (revision 12489)
@@ -1,166 +1,173 @@
<?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!');
+ defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $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'),
+ '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(
+ 'AggregateTags' => Array (
+ Array (
'AggregateTo' => 'ord',
'AggregatedTagName' => 'PrintShippingTypes',
'LocalTagName' => 'Order_PrintShippingTypes',
),
),
- 'Hooks' => Array(
- Array(
+ 'Hooks' => Array (
+ Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'sc',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'OnPropagate', 'OnClearAll' ),
+ 'HookToEvent' => Array ( 'OnPropagate', 'OnClearAll' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPreSave',
),
),
- 'QueryString' => Array(
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ShippingID',
- 'StatusField' => Array('Status'),
+ '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!'),
+ '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!"),
+ '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_Groups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5),
+ 'groups' => Array ('title' => 'la_tab_UserGroups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5),
),
),
- 'PermSection' => Array('main' => 'in-commerce:shipping'),
+ 'PermSection' => Array ('main' => 'in-commerce:shipping'),
- 'Sections' => Array(
- 'in-commerce:shipping_folder' => Array(
+ 'Sections' => Array (
+ 'in-commerce:shipping_folder' => Array (
'parent' => 'in-commerce:setting_folder',
- 'icon' => 'shipping',
+ 'icon' => 'conf_shipping',
'label' => 'la_tab_Shipping',
- 'permissions' => Array(),
+ 'permissions' => Array (),
'priority' => 4,
'type' => stTREE,
),
- 'in-commerce:shipping' => Array(
+ 'in-commerce:shipping' => Array (
'parent' => 'in-commerce:shipping_folder',
- 'icon' => 'shipping',
+ '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'),
+ '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'),
+ 'SubItems' => Array ('z', 'br'),
- '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' ),
)
),
- '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(
- 'ShippingID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'Code' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array('required' => 'Please fill in')),
- 'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in')),
- 'SpeedCode' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25),
- 'LocationFrom' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1),
- 'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1),
- 'BaseFee' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
- 'CODFlatSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
- 'CODPercentSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
- 'Status' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
- 'CostType' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
- 'ZeroIfEmpty' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
- 'PrecisionBeforeSep' => Array('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ),
- 'PrecisionAfterSep' => Array('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ),
- 'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => 0,),
- 'FreeShippingMinAmount' => Array('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
- 'IsFreePromoShipping' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'InsuranceFee' => Array('type' => 'float', 'default' => null),
+ 'Fields' => Array (
+ 'ShippingID' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Code' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array ('required' => 'Please fill in')),
+ 'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array ('required' => 'Please fill in')),
+ 'SpeedCode' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25),
+ 'LocationFrom' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1),
+ 'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1),
+ 'BaseFee' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
+ 'CODFlatSurcharge' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
+ 'CODPercentSurcharge' => Array ('type' => 'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
+ 'Status' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
+ 'CostType' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
+ 'ZeroIfEmpty' => Array ('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
+ 'PrecisionBeforeSep' => Array ('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ),
+ 'PrecisionAfterSep' => Array ('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ),
+ 'PortalGroups' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0,),
+ '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
),
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_shipping.gif', 0=>'icon16_shipping_disabled.gif', 1=>'icon16_shipping.gif'),
- 'Fields' => Array(
- 'ShippingID' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'title'=>'la_col_ShippingName', 'filter_block' => 'grid_range_filter'),
- 'Type' => Array( 'title'=>'la_col_ShippingType', 'filter_block' => 'grid_options_filter'),
- 'BaseFee' => Array( 'title'=>'la_col_BaseFee', 'filter_block' => 'grid_float_range_filter'),
- /*'CODFlatSurcharge' => Array( 'title'=>'la_col_CODFlatSurcharge', 'filter_block' => 'grid_float_range_filter'),*/
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ '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/in-commerce/units/taxes/taxes_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/taxes/taxes_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/taxes/taxes_config.php (revision 12489)
@@ -1,112 +1,115 @@
<?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!');
+ defined('FULL_PATH') or die('restricted access!');
- $config = Array(
+ $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(
+ 'hooks' => Array (),
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
- /*'Hooks' => Array(
- Array(
+ /*'Hooks' => Array (
+ Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'tax',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'onEdit' ),
+ '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!'),
+ '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'),
- 'new_titlefield' => Array('tax'=>'!la_title_NewTax!'),
+ '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(
+ 'Sections' => Array (
+ 'in-commerce:taxes' => Array (
'parent' => 'in-commerce:setting_folder',
- 'icon' => 'taxes',
+ 'icon' => 'conf_taxes',
'label' => 'la_tab_Taxes',
- 'url' => Array('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'),
- 'permissions' => Array('view', 'add', 'edit', 'delete'),
+ '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'),
+ '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'),
+ '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')),
+ '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')),
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_tax.gif'),
- 'Fields' => Array(
- 'TaxZoneId' => Array('title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'width'=>150, 'title'=>'la_col_ZoneName', 'filter_block' => 'grid_like_filter'),
- 'Type' => Array( 'width'=>100, 'title'=>'la_col_ZoneType', 'filter_block' => 'grid_options_filter'),
- 'TaxValue' => Array( 'width'=>100, 'title'=>'la_col_TaxValue', 'filter_block' => 'grid_float_range_filter'),
- 'ApplyToShipping' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToShipping', 'filter_block' => 'grid_options_filter'),
- 'ApplyToProcessing' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter'),
- ),
-
- ),
- ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ '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/in-commerce/units/coupons/coupons_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/coupons/coupons_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/coupons/coupons_config.php (revision 12489)
@@ -1,182 +1,191 @@
<?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',
+ 'icon' => 'discounts_coupons',
'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' => 3.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),
+ 'LastUsedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
'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'),
+ 'Icons' => Array(
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
'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'),
+ 'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
+ 'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
+ 'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter', 'width' => 130, ),
),
),
'Radio' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
- 'Selector' => 'radio',
+ 'Icons' => Array(
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
'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'),
+ 'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
+ 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
+ 'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
+ 'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter', 'width' => 130, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/zones/zones_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/zones/zones_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/zones/zones_config.php (revision 12489)
@@ -1,75 +1,79 @@
<?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(
+ $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'),
+ '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(
+ '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!'),
+ '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#'"),
+ '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'),
+ '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'),
+ '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, ),
+ '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, ),
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif'),
- 'Fields' => Array(
- 'ZoneID' => Array( 'width'=>150, 'title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'Name' => Array( 'width'=>150, 'title'=>'la_col_Title', 'filter_block' => 'grid_like_filter'),
- 'CODallowed' => Array( 'width'=>100, 'title'=>'la_col_CODallowed', 'filter_block' => 'grid_options_filter')
- ),
-
- ),
- ),
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ ),
+ '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/in-commerce/units/orders/orders_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/orders/orders_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/orders/orders_config.php (revision 12489)
@@ -1,489 +1,498 @@
<?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' => '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'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'ord',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnPreSave' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRecalculateItems',
),
/* OnApplyCoupon is called as hook for OnUpdateCart/OnCheckout, which calls OnRecalcualate themself
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'coup',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnApplyCoupon' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRecalculateItems',
),*/
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnCreate' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserCreate',
),
Array(
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array('OnCheckExpiredMembership'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCheckRecurringOrders',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnLogin' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
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' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
),
'AggregateTags' => Array(
Array(
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'LinkRemoveFromCart',
'LocalTagName' => 'Orditems_LinkRemoveFromCart',
),
Array(
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'ProductLink',
'LocalTagName' => 'Orderitems_ProductLink',
),
Array(
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'ProductExists',
'LocalTagName' => 'Orderitems_ProductExists',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'OrderId',
'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
'ViewMenuPhrase' => 'la_title_Orders',
- 'CatalogTabIcon' => 'in-commerce:icon16_orders.gif',
+ '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!'),
),
'orders_incomplete' => Array( 'prefixes' => Array('ord.incomplete_List'),
'format' => "!la_title_IncompleteOrders!",
),
'orders_pending' => Array( 'prefixes' => Array('ord.pending_List'),
'format' => "!la_title_PendingOrders!",
),
'orders_backorders' => Array( 'prefixes' => Array('ord.backorders_List'),
'format' => "!la_title_BackOrders!",
),
'orders_toship' => Array( 'prefixes' => Array('ord.toship_List'),
'format' => "!la_title_OrdersToShip!",
),
'orders_processed' => Array( 'prefixes' => Array('ord.processed_List'),
'format' => "!la_title_OrdersProcessed!",
),
'orders_returns' => Array( 'prefixes' => Array('ord.returns_List'),
'format' => "!la_title_OrdersReturns!",
),
'orders_denied' => Array( 'prefixes' => Array('ord.denied_List'),
'format' => "!la_title_OrdersDenied!",
),
'orders_archived' => Array( 'prefixes' => Array('ord.archived_List'),
'format' => "!la_title_OrdersArchived!",
),
'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!'),
'format' => "#ord_status# '#ord_titlefield#' - #orditems_status# '#orditems_titlefield#'",
),
'orders_export' => Array('format' => '!la_title_OrdersExport!'),
'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'),
'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'),
'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(
- 'icon' => 'icon16_orders.gif',
+ 'icon' => 'icon16_item.png',
'label' => 'la_title_Orders',
'js_url' => "#url#",
'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),
),
'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(
'' => 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' => 'ROUND(SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount,2)',
'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' => 'ROUND(SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount,2)',
/*'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'),
)
),
'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, 'not_null' => '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', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'AdminComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'not_null' => 1, 'using_fck' => 1, 'default' => ''),
'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','not_null' => '1','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', 'not_null' => '1','default' => ''),
'GWResult2' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'not_null' => '1','default' => ''),
'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('default'=>'icon16_orders.gif', 0 => 'icon16_orders.gif', 1 => 'icon16_orders_pending.gif', 5 => 'icon16_orders_disabled.gif'),
+ 'Icons' => Array(
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ 5 => 'icon16_disabled.png',
+ ),
'Fields' => Array(
- 'OrderId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'OrderDate' => Array( 'title'=>'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter'),
- 'OrderNumber' => Array( 'title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter'),
- '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_range_filter'),
- 'AffiliateUser' => Array( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter'),
- 'OnHold' => Array ('title' => 'la_col_OnHold', 'filter_block' => 'grid_options_filter'),
+ '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('default'=>'icon16_orders.gif', 0 => 'icon16_orders.gif', 1 => 'icon16_orders_pending.gif', 5 => 'icon16_orders_disabled.gif'),
+ 'Icons' => Array(
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ 5 => 'icon16_disabled.png',
+ ),
'Fields' => Array(
- 'OrderId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'OrderNumber' => Array('title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter'),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter'),
- 'OrderDate' => Array('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter'),
+ '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/in-commerce/units/currencies/currencies_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/currencies/currencies_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/currencies/currencies_config.php (revision 12489)
@@ -1,135 +1,142 @@
<?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(
+ $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'=>''),
+ '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(
+ 'hooks' => Array (),
+ 'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
- /*'Hooks' => Array(
- Array(
+ /*'Hooks' => Array (
+ Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'tax',
'HookToSpecial' => '',
- 'HookToEvent' => Array( 'onEdit' ),
+ 'HookToEvent' => Array ( 'onEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnLoadZoneForm',
),
),*/
'IDField' => 'CurrencyId',
- 'StatusField' => Array('Status', 'IsPrimary'),
+ '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!'),
+ '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'),
- 'new_titlefield' => Array('curr'=>'!la_title_NewCurrency!'),
+ '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'),
+ 'PermSection' => Array ('main' => 'in-commerce:currencies'),
- 'Sections' => Array(
- 'in-commerce:currencies' => Array(
+ 'Sections' => Array (
+ 'in-commerce:currencies' => Array (
'parent' => 'in-commerce:setting_folder',
- 'icon' => 'currencies',
+ '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'),
+ '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(),
+ '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(
+ 'CalculatedFields' => Array (
+ '' => Array (
'Translation' => 'phr.Translation',
),
),
- 'ListSortings' => Array(
- '' => Array(
- 'ForcedSorting' => Array('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'),
- 'Sorting' => Array('ISO' => 'asc'),
+ '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','not_null' => 1, 'default' => '#NOW#','formatter' => 'kDateFormatter'),
- '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),
+ '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', 'not_null' => 1, 'default' => '#NOW#', 'formatter' => 'kDateFormatter'),
+ '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),
),
- 'VirtualFields' => Array(
- 'Translation' => Array('type'=>'string'),
+ 'VirtualFields' => Array (
+ 'Translation' => Array ('type' => 'string'),
),
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif','0_0'=>'icon16_currency_disabled.gif','1_0'=>'icon16_currency.gif','1_1'=>'icon16_currency_primary.gif'),
- 'Fields' => Array(
- 'CurrencyId' => Array( 'width'=>100, 'title'=>'la_col_Id', 'data_block'=>'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
- 'ISO' => Array( 'width'=>100, 'title'=>'la_col_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter'),
- 'Translation' => Array( 'width'=>100, 'title'=>'la_col_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter'),
- 'RateToPrimary' => Array( 'width'=>100, 'title'=>'la_col_RateToPrimary', 'filter_block' => 'grid_float_range_filter'),
- 'Modified' => Array( 'width'=>100, 'title'=>'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter'),
+ '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',
+ ),
+ '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/in-commerce/units/products/products_config.php
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: branches/5.0.x/in-commerce/units/coupon_items/coupon_items_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/coupon_items/coupon_items_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/coupon_items/coupon_items_config.php (revision 12489)
@@ -1,116 +1,121 @@
<?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!');
+ defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'coupi',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'CouponItemsEventHandler','file'=>'coupon_items_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'CouponItemsTagProcessor','file'=>'coupon_items_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'p',
'HookToSpecial' => '-item',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteCouponItem',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'CouponItemId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductsCouponItems',
'CalculatedFields' => Array(
'' => Array(
'ProductId' => 'p.ProductId',
'ItemName' => 'IF(p.Name IS NULL,c.Name,p.l1_Name)',
'SKU' => 'p.SKU',
'Weight' => 'p.Weight',
'CreatedOn' => 'p.CreatedOn',
'BackOrderDate' => 'p.BackOrderDate',
'Status' => 'p.Status',
'CategoryId' => 'c.CategoryId',
),
),
'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category c ON %1$s.ItemResourceId = c.ResourceId',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
/*'BelongsTo' => Array(
Array('prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'),
),*/
'ForeignKey' => 'CouponId',
'ParentTableKey' => 'CouponId',
'ParentPrefix' => 'coup',
'AutoDelete' => true,
'AutoClone' => true,
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('ItemName' => 'asc'),
)
),
'Fields' => Array (
'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'CouponId' => Array('type' => 'int', 'default' => 0, ),
'ItemResourceId' => Array('type' => 'int', 'default' => 0, ),
'ItemType' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder' ), 'default' => 1, ),
),
'VirtualFields' => Array(
'ProductId' => Array(),
'ItemName' => Array(),
'SKU' => Array(),
'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f'),
'CreatedOn' => Array('formatter' => 'kDateFormatter', 'default'=>'#NOW#' ),
'BackOrderDate' => Array('formatter' => 'kDateFormatter'),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_entire_order.gif'),
'Fields' => Array(
- 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'),
+ 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter', 'width' => 200, ),
),
),
'CouponItems' => Array(
- 'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
+ 'Icons' => Array(
+ 'default' => 'icon16_product.png',
+ 0 => 'icon16_product_disabled.png',
+ 1 => 'icon16_product.png',
+ 2 => 'icon16_product_pending.png',
+ ),
'Fields' => Array(
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter'),
- 'ItemName' => Array( 'title'=>'la_col_ItemName', 'filter_block' => 'grid_like_filter'),
- 'ItemType' => Array( 'title'=>'la_col_CouponItemType', 'filter_block' => 'grid_options_filter'),
+ 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'ItemName' => Array( 'title'=>'la_col_ItemName', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
+ 'ItemType' => Array( 'title'=>'la_col_CouponItemType', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
),
),
),
);
\ 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 12488)
+++ branches/5.0.x/in-commerce/units/affiliates/affiliates_config.php (revision 12489)
@@ -1,200 +1,206 @@
<?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' => 5,
'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' => 5.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'),
+ 'Default' => Array(
+ 'Icons' => Array (
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_primary.png',
+ ),
+ 'Fields' => Array(
+ 'AffiliateId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'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'),
+
+ 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter', 'width' => 120, ),
+ 'CreatedOn' => Array( 'title' => 'la_col_RegisteredOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'Status' => Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
),
);
\ 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 12488)
+++ branches/5.0.x/in-commerce/units/discounts/discounts_config.php (revision 12489)
@@ -1,140 +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' => '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',
+ 'icon' => 'discounts_coupons',
'label' => 'la_tab_DiscountsAndCoupons',
'permissions' => Array(),
'priority' => 3,
'type' => stTREE,
),
'in-commerce:discounts' => Array(
'parent' => 'in-commerce:discounts_folder',
- 'icon' => 'discounts',
+ 'icon' => 'discounts_coupons',
'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' => 3.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'),
+ 'Icons' => Array(
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
'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'),
+ 'DiscountId' => 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, ),
+ 'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
+ 'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
+ 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 90, ),
+ 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/units/order_items/order_items_config.php
===================================================================
--- branches/5.0.x/in-commerce/units/order_items/order_items_config.php (revision 12488)
+++ branches/5.0.x/in-commerce/units/order_items/order_items_config.php (revision 12489)
@@ -1,164 +1,174 @@
<?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' => 'orditems',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array('class' => 'OrderItemsEventHandler', 'file' => 'order_items_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class' => 'OrderItemsTagProcessor', 'file' => 'order_items_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array (
Array (
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ItemFieldEquals',
'LocalTagName' => 'FieldEquals',
),
),
'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '',
'HookToEvent' => Array('OnPreSave', 'OnRecalculateItems'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUpdate',
),
),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'OrderItemId',
'TitleField' => 'OrderItemId',
'StatusField' => Array ('Status'),
'TableName' => TABLE_PREFIX.'OrderItems',
'ParentTableKey' => 'OrderId',
'ForeignKey' => 'OrderId',
'ParentPrefix' => 'ord',
'AutoDelete' => true,
'AutoClone' => true,
'ItemType' => 11,
'CalculatedFields' => Array (
'' => Array (
'ExtendedPrice' => '%1$s.Price * %1$s.Quantity',
'ExtendedPriceFlat' => '%1$s.FlatPrice * %1$s.Quantity',
'QuantityAvailable' => 'IF( ISNULL(p.QtyInStock) AND ISNULL(p.ProductId),"!la_ProductDeleted!", IF(p.Type = 1, IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock), "") )',
'ItemDiscount' => '(%1$s.FlatPrice - %1$s.Price)',
'SKU' => 'IF(p.InventoryStatus = 2 OR NOT ISNULL(poc.CombinationCRC), poc.SKU, p.SKU)', // inventory by options OR combination found
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.*, p.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products p ON %1$s.ProductId = p.ProductId
LEFT JOIN '.TABLE_PREFIX.'ProductOptionCombinations poc ON (%1$s.ProductId = poc.ProductId) AND (%1$s.OptionsSalt = poc.CombinationCRC)',
),
'ItemSQLs' => Array (
'' => 'SELECT *, (Quantity*Price) AS ExtendedPrice, 0 AS QuantityAvailable FROM %s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('ProductName' => 'asc', 'BackOrderFlag' => 'asc'),
)
),
'Fields' => Array (
'OrderItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'OrderId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''),
'Quantity' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'QuantityReserved' => Array('type' => 'int', 'default' => null),
'FlatPrice' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'),
'Price' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'),
'Cost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f','not_null' => '1','default' => '0.0000'),
'BackOrderFlag' => Array('type' => 'int', 'default' => 0),
'Weight' => Array ('type' => 'double', 'default' => NULL),
'ShippingTypeId' => Array ('type' => 'string', 'default' => NULL),
'ItemData' => Array('type' => 'string','default' => null),
'OptionsSalt' => Array('type' => 'int', 'default' => 0),
'SplitShippingGroup' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'PackageNum' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'ReturnType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Refund', 2 => 'la_opt_Exchange', 3 => 'la_opt_Warranty'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'ReturnAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => 0),
'ReturnedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
),
'VirtualFields' => Array (
'ExtendedPrice' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
'ExtendedPriceFlat' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
'QuantityAvailable' => Array('type'=>'int','default'=>0),
'DiscountType' => Array('type'=>'string','default'=>''),
'DiscountId' => Array('type'=>'int','default'=>0),
'Name' => Array('formatter' => 'kMultiLanguage'),
'ItemDiscount' => Array('type'=>'double','formatter'=>'kFormatter','format'=>'%01.2f','default'=>'0.00'),
'SKU' => Array('type' => 'string', 'default' => ''),
'MinQtyFreeShipping'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
),
'Grids' => Array (
'Default' => Array (
- 'Icons' => Array ('default' => 'icon16_product.gif', 1 => 'icon16_product.gif', 2 => 'icon16_product_pending.gif', 0 => 'icon16_product_disabled.gif'),
+ 'Icons' => Array (
+ 'default' => 'icon16_product.png',
+ 0 => 'icon16_product_disabled.png',
+ 1 => 'icon16_product.png',
+ 2 => 'icon16_product_pending.png',
+ ),
'Fields' => Array (
'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td', 'filter_block' => 'grid_like_filter'),
'Quantity' => Array ('title' => 'la_col_Quantity', 'data_block' => 'grid_quantity_td', 'filter_block' => 'grid_range_filter'),
'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'),
'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'),
'Price' => Array ('title' => 'la_col_Price', 'data_block' => 'grid_price_td', 'filter_block' => 'grid_float_range_filter'),
'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'data_block' => 'grid_extendedprice_td', 'filter_block' => 'grid_float_range_filter'),
'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'),
'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_float_range_filter'),
'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'),
),
),
'NotEditable' => Array (
- 'Icons' => Array ('default' => 'icon16_product.gif', 1 => 'icon16_product.gif', 2 => 'icon16_product_pending.gif', 0 => 'icon16_product_disabled.gif'),
+ 'Icons' => Array (
+ 'default' => 'icon16_product.png',
+ 0 => 'icon16_product_disabled.png',
+ 1 => 'icon16_product.png',
+ 2 => 'icon16_product_pending.png',
+ ),
'Fields' => Array (
'ProductName' => Array ('title' => 'la_col_ProductNameId', 'data_block' => 'grid_productname_td'),
'Quantity' => Array ('title' => 'la_col_Quantity', 'filter_block' => 'grid_range_filter'),
'QuantityReserved' => Array ('title' => 'la_col_QuantityReserved', 'filter_block' => 'grid_range_filter'),
'QuantityAvailable' => Array ('title' => 'la_col_QuantityAvailable', 'filter_block' => 'grid_range_filter'),
'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
'ExtendedPrice' => Array ('title' => 'la_col_ExtendedPrice', 'filter_block' => 'grid_float_range_filter'),
'ReturnType' => Array ('title' => 'la_col_ReturnType', 'data_block' => 'grid_options_td', 'filter_block' => 'grid_options_filter'),
'ReturnAmount' => Array ('title' => 'la_col_ReturnAmount', 'data_block' => 'grid_edit_td', 'filter_block' => 'grid_float_range_filter'),
'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_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 12488)
+++ branches/5.0.x/in-commerce/units/gift_certificates/gift_certificates_config.php (revision 12489)
@@ -1,145 +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!');
+ 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',
+ 'icon' => 'discounts_coupons',
'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' => 3.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 ),
+ 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
'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'),
+ 'Icons' => Array(
+ 'default' => 'icon16_item.png',
+ 0 => 'icon16_disabled.png',
+ 1 => 'icon16_item.png',
+ 2 => 'icon16_pending.png',
+ ),
'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'),
+ 'GiftCertificateId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
+ 'Code' => Array ('title' => 'la_col_Code', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
+ 'Debit' => Array ('title' => 'la_col_RemainingAmount', 'filter_block' => 'grid_float_range_filter', 'width' => 160, ),
+ 'Amount' => Array ('title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
+ 'Expiration' => Array ('title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl (revision 12489)
@@ -1,50 +1,50 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="manuf" section="in-commerce:manufacturers" title_preset="manuf_list" pagination="1"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('manuf', 'in-commerce/manufacturers/manufacturers_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('new_manufacturer', '<inp2:m_phrase label="la_ToolTip_NewManufacturer" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewManufacturer" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('manuf', 'in-commerce/manufacturers/manufacturers_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('manuf')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="manuf" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="manuf" IdField="ManufacturerId" grid="Default"/>
<script type="text/javascript">
Grids['manuf'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/visits/visits_list_incommerce.tpl (revision 12489)
@@ -1,71 +1,71 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="visits.incommerce" section="in-portal:visits" grid="visitsincommerce" title_preset="visits.incommerce_list" pagination="1"/>
<!-- 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();
function edit()
{
}
a_toolbar.AddButton( new ToolBarButton('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
window.location.href = window.location.href;
}
) );
- a_toolbar.AddButton( new ToolBarButton('reset', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>', function() {
std_delete_items('visits.incommerce');
}
) );
a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
std_csv_export('visits.incommerce', 'visitsincommerce', 'export/export_progress');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="visits.incommerce" grid="visitsincommerce"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_userlink_td">
<inp2:m_if check="UserFound" user_field="$user_field">
<a href="<inp2:UserLink edit_template='users/users_edit' user_field="$user_field"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
<inp2:m_else/>
<inp2:Field field="$field" grid="$grid"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_referer_td">
<div style="overflow: hidden;">
<inp2:m_if check="FieldEquals" field="$field" value="">
<span style="white-space: nowrap;"><inp2:m_Phrase label="la_visit_DirectReferer"/></span>
<inp2:m_else/>
<a href="<inp2:Field field="$field" grid="$grid"/>"><inp2:Field field="$field" grid="$grid" /></a>
</inp2:m_if>
</div>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="visits.incommerce" IdField="VisitId" grid="visitsincommerce" grid_filters="1"/>
<script type="text/javascript">
- Grids['visits.incommerce'].SetDependantToolbarButtons( new Array('reset') );
+ Grids['visits.incommerce'].SetDependantToolbarButtons( new Array('delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/shipping/shipping_type_groups.tpl (revision 12489)
@@ -1,118 +1,118 @@
<inp2:adm_SetPopupSize width="850" height="610"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="groups" tab_preset="Default"/>
<!-- 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('<inp2:s_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
submit_event('s','<inp2:s_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('s','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('s', '<inp2:s_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('s', '<inp2:s_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="s_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="s_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="s_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function go_to_tab(prefix_special, tab)
{
set_hidden_field(prefix_special+'_GoTab', tab);
document.getElementById('<inp2:s_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
submit_event(prefix_special,'OnPreSaveAndGoToTab',null);
}
function go_to_id(prefix_special, id)
{
set_hidden_field(prefix_special+'_GoId', id);
document.getElementById('<inp2:s_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
submit_event(prefix_special,'OnPreSaveAndGo')
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:s_SaveWarning name="grid_save_warning"/>
<inp2:s_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_id_label" prefix="s" field="ShippingID" title="!la_fld_Id!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="s" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="s" field="PortalGroups" title="!la_fld_UserGroups!" size="40"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
- <inp2:m_phrase label="la_fld_Groups"/>:
+ <inp2:m_phrase label="la_fld_UserGroups"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<table style="width: 300px">
<tr>
<td>
<inp2:m_DefineElement name="group_option">
<option value="<inp2:m_param name="GroupId"/>"><inp2:m_param name="Name"/></option>
</inp2:m_DefineElement>
<inp2:m_phrase label="la_fld_SelectedGroups"/><br />
- <select id="selected_groups" name="selected_groups[]" multiple="multiple" size="20" style="width: 200px">
+ <select id="selected_groups" name="selected_groups[]" multiple="multiple" size="15" style="width: 200px">
<inp2:s_ListGroups mode="selected" render_as="group_option"/>
</select>
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_groups', 'selected_groups'); select_sort('selected_groups')" 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('selected_groups', 'available_groups'); select_sort('available_groups');" class="button">
</td>
<td>
<inp2:m_phrase label="la_fld_AvailableGroups"/><br />
- <select id="available_groups" name="available_groups[]" multiple="multiple" size="20" style="width: 200px">
+ <select id="available_groups" name="available_groups[]" multiple="multiple" size="15" style="width: 200px">
<inp2:s_ListGroups render_as="group_option"/>
</select>
</td>
</tr>
</table>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/shipping/shipping_custom_list.tpl (revision 12489)
@@ -1,69 +1,69 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" pagination="1" title_preset="shipping_list" tabs="in-commerce/shipping/shipping_tabs"/>
<!-- 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('new_shipping', '<inp2:m_phrase label="la_ToolTip_New_Shipping" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Shipping" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('s', 'in-commerce/shipping/shipping_edit')
} ) );
function edit()
{
std_edit_item('s', 'in-commerce/shipping/shipping_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('s')
} ) );
function clone_items()
- {
- submit_event('s','onMassClone');
- }
+ {
+ submit_event('s','onMassClone');
+ }
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', clone_items) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('s','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('s','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="s" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="s" IdField="ShippingID" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['s'].SetDependantToolbarButtons( new Array('edit','delete','clone','approve','decline') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/shipping/shipping_costs.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/shipping/shipping_costs.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/shipping/shipping_costs.tpl (revision 12489)
@@ -1,220 +1,220 @@
<inp2:adm_SetPopupSize width="850" height="610"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="costs" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
var $checked_count = 0;
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('s','<inp2:s_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('s','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('s', '<inp2:s_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('s', '<inp2:s_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('flip', '<inp2:m_phrase label="la_ToolTip_Flip" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:flip', '<inp2:m_phrase label="la_ToolTip_Flip" escape="1"/>',
function() {
submit_event('s','OnFlip');
} ) );
- a_toolbar.AddButton( new ToolBarButton('clear_all', '<inp2:m_phrase label="la_ToolTip_ClearAll" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:clear_all', '<inp2:m_phrase label="la_ToolTip_ClearAll" escape="1"/>', function() {
if(confirm('<inp2:m_phrase label="la_ClearCostsWarning"/>'))
submit_event('sc','OnClearAll');
}
) );
- a_toolbar.AddButton( new ToolBarButton('modify', '<inp2:m_phrase label="la_ToolTip_Modify" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:modify', '<inp2:m_phrase label="la_ToolTip_Modify" escape="1"/>',
function() {
openSelector('s', '<inp2:m_t t="in-commerce/shipping/modify_selector" pass="all,sc" sc_event="OnSaveCreated"/>');
} ) );
a_toolbar.Render();
a_toolbar.DisableButton('modify');
<inp2:m_if check="s_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="s_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="s_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function reflect_toolbar($prefix_special, $id, $field)
{
var $element = document.getElementById($prefix_special+'['+$id+']['+$field+']');
if($element.checked)
{
$checked_count++;
}
else
{
$checked_count--;
}
if($checked_count)
{
a_toolbar.EnableButton('modify');
}
else
{
a_toolbar.DisableButton('modify');
}
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="precision_field">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field_name="$field" title="$title"/>
<td class="control-cell">
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>">
<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1" >
<inp2:{$prefix}_PredefinedOptions field="PrecisionBeforeSep" block="inp_option_phrase" selected="selected"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="PrecisionBeforeSep" block="inp_option_item" selected="selected"/>
</inp2:m_if>
</select>&nbsp;,&nbsp;<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionAfterSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionAfterSep"/>">
<inp2:m_if check="m_ParamEquals" name="use_phrases" value="1" >
<inp2:{$prefix}_PredefinedOptions field="PrecisionAfterSep" block="inp_option_phrase" selected="selected"/>
<inp2:m_else/>
<inp2:{$prefix}_PredefinedOptions field="PrecisionAfterSep" block="inp_option_item" selected="selected"/>
</inp2:m_if>
</select>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="row_header">
<td>
<input type="checkbox" name="<inp2:{$prefix}_InputName field="$IdField"/>" id="<inp2:{$prefix}_InputName field="$IdField"/>" value="<inp2:{$prefix}_field field="$IdField"/>" onclick="reflect_toolbar('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>, '<inp2:m_param name="IdField"/>')">
<inp2:m_RenderElement name="$header_caption"/>
<a href="javascript:propagate_values('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>)"><img src="<inp2:m_TemplatesBase module='In-Commerce'/>/img/list_horiz_propagate.gif" alt="<inp2:m_phrase label="la_PropagateValues"/>" border="0"></a>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="column_header">
<td align="center" style="border-left:1px solid black">
<input type="checkbox" name="<inp2:{$prefix}_InputName field="$IdField"/>" id="<inp2:{$prefix}_InputName field="$IdField"/>" value="<inp2:{$prefix}_field field="$IdField"/>" onclick="reflect_toolbar('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>, '<inp2:m_param name="IdField"/>')">
<inp2:m_RenderElement name="$header_caption"/>
<a href="javascript:propagate_values('<inp2:m_param name="prefix"/>', <inp2:{$prefix}_field field="$IdField"/>)"><img src="<inp2:m_TemplatesBase module='In-Commerce'/>/img/list_vertic_propagate.gif" alt="<inp2:m_phrase label="la_PropagateValues"/>" border="0"></a>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="zone_caption">
<nobr><inp2:z_field field="Name"/></nobr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="bracket_caption">
<inp2:m_if check="s_FieldEquals" name="Type" value="1">
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
<inp2:br_field field="Start"/>&nbsp;<inp2:m_Phrase label="la_kg" /> - <inp2:m_if check="br_fieldequals" field="End" value="-1">&infin;<inp2:m_else/><inp2:br_field field="End"/>&nbsp;<inp2:m_Phrase label="la_kg" /></inp2:m_if>
</inp2:m_if>
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
<inp2:br_field field="Start_a"/>&nbsp;<inp2:m_Phrase label="la_lbs" />&nbsp;<inp2:br_field field="Start_b"/>&nbsp;<inp2:m_Phrase label="la_oz" /> - <inp2:m_if check="br_fieldequals" field="End" value="-1">&infin;<inp2:m_else/><inp2:br_field field="End_a"/>&nbsp;<inp2:m_Phrase label="la_lbs" />&nbsp;<inp2:br_field field="End_b"/>&nbsp;<inp2:m_Phrase label="la_oz" /></inp2:m_if>
</inp2:m_if>
<inp2:m_else />
<nobr><inp2:br_field field="Start"/> - <inp2:m_if check="br_fieldequals" field="End" value="-1">&infin;<inp2:m_else/><inp2:br_field field="End" /></inp2:m_if></nobr>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="cost_cell">
<td style="border-left:1px solid black" align="center">
<nobr>$ <input type="text" maxlength="<inp2:s_CostInputSize/>" size="<inp2:s_CostInputSize/>" name="<inp2:sc_InputName field="Flat"/><inp2:m_if check="s_fieldequals" field="CostType" value="2">_input</inp2:m_if>" id="<inp2:sc_InputName field="Flat"/><inp2:m_if check="s_fieldequals" field="CostType" value="2" >_input</inp2:m_if>" value="<inp2:sc_field field="Flat" />"<inp2:m_if check="s_fieldequals" field="CostType" value="2" > disabled</inp2:m_if>>
% <input type="text" maxlength="<inp2:s_CostInputSize/>" size="<inp2:s_CostInputSize/>" name="<inp2:sc_InputName field="PerUnit"/><inp2:m_if check="s_fieldequals" field="CostType" value="1">_input</inp2:m_if>" id="<inp2:sc_InputName field="PerUnit"/><inp2:m_if check="s_fieldequals" field="CostType" value="1" >_input</inp2:m_if>" value="<inp2:sc_field field="PerUnit" />"<inp2:m_if check="s_fieldequals" field="CostType" value="1" > disabled</inp2:m_if>></nobr>
<inp2:m_if check="s_fieldequals" field="CostType" value="2" >
<input type="hidden" name="<inp2:sc_InputName field="Flat"/>" id="<inp2:sc_InputName field="Flat"/>" value="<inp2:sc_field field="Flat"/>">
</inp2:m_if>
<inp2:m_if check="s_fieldequals" field="CostType" value="1" >
<input type="hidden" name="<inp2:sc_InputName field="PerUnit"/>" id="<inp2:sc_InputName field="PerUnit"/>" value="<inp2:sc_field field="PerUnit"/>">
</inp2:m_if>
<input type="hidden" name="<inp2:sc_InputName field="BracketId"/>" id="<inp2:sc_InputName field="BracketId"/>" value="<inp2:br_field field="BracketId"/>">
<input type="hidden" name="<inp2:sc_InputName field="ZoneID"/>" id="<inp2:sc_InputName field="ZoneID"/>" value="<inp2:z_field field="ZoneID"/>">
</td>
</inp2:m_DefineElement>
<inp2:sc_SaveWarning name="grid_save_warning"/>
<inp2:sc_ErrorWarning name="form_error_warning"/>
<div id="scroll_container" mode="minimal">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="s" field="CostType" title="!la_fld_CostType!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="ZeroIfEmpty" title="!la_fld_EmptyCellsAre!" size="20"/>
<inp2:m_RenderElement name="precision_field" prefix="s" title="!la_Precision!"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_ShippingCosts!"/>
</table>
<div id="cost_container" style="overflow: auto;">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-top:none">
<inp2:s_ShowCostsTable/>
</table>
</div>
<input type="hidden" name="z_propagate_id" id="z_propagate_id" value="">
<input type="hidden" name="br_propagate_id" id="br_propagate_id" value="">
<script type="text/javascript">
function propagate_values(prefix,id)
{
document.getElementById(prefix + '_propagate_id').value = id;
submit_event('sc', 'OnPropagate');
}
document.getElementById('<inp2:s_InputName field="CostType"/>').onchange = saveShipping;
document.getElementById('<inp2:s_InputName field="PrecisionBeforeSep"/>').onchange = saveShipping;
document.getElementById('<inp2:s_InputName field="PrecisionAfterSep"/>').onchange = saveShipping;
function saveShipping()
{
submit_event('s', 'OnPreSave');
}
$(document).ready(
function() {
maximizeElement('#cost_container');
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/shipping/shipping_brackets.tpl (revision 12489)
@@ -1,267 +1,267 @@
<inp2:adm_SetPopupSize width="850" height="610"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="brackets" tab_preset="Default"/>
<!-- 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() {
submit_event('s','<inp2:s_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('s','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('s', '<inp2:s_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('s', '<inp2:s_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
function add_brackets()
{
submit_event('br', 'OnMoreBrackets')
}
- a_toolbar.AddButton( new ToolBarButton('more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
function infinity()
{
submit_event('br', 'OnInfinity');
}
- a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
function arrange_brackets()
{
submit_event('br', 'OnArrange')
}
- a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
a_toolbar.Render();
<inp2:m_if check="s_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="s_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="s_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="br_edit_box" >
<td>
<input type="text" size="<inp2:m_param name="size"/>" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
tabindex="<inp2:m_get param="tab_index"/>"
value="<inp2:m_param name="$field"/>"
>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="br_edit_max" >
<td>
<inp2:m_if check="s_FieldEquals" name="Type" value="1">
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
<input type="text"
<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
value="<inp2:m_param name="max"/>" size="10"
<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
<inp2:m_else />
onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start', 'End')"
</inp2:m_if>
/>
<inp2:m_phrase label="la_kg" />
</inp2:m_if>
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
<input type="text"
<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
value="<inp2:m_param name="max_a"/>" size="10"
<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
<inp2:m_else />
onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start_a', 'End_a')"
</inp2:m_if>
/>
<inp2:m_phrase label="la_lbs" />
<input type="text"
<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
value="<inp2:m_param name="max_b"/>" size="10"
<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
<inp2:m_else />
onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start_b', 'End_b')"
</inp2:m_if>
/>
<inp2:m_phrase label="la_oz" />
</inp2:m_if>
<inp2:m_else />
<input type="text" size="10"
<inp2:m_inc param="tab_index" by="1"/> tabindex="<inp2:m_get param="tab_index"/>"
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
value="<inp2:m_param name="max"/>"
<inp2:m_if check="m_ParamEquals" param="next_min_id" value="">
<inp2:m_else />
onchange="set_start(<inp2:m_param name="id"/>, <inp2:m_param name="next_min_id"/>,'<inp2:m_param name="PrefixSpecial"/>', 'Start', 'End')"
</inp2:m_if>
/>
</inp2:m_if>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="br_edit_min" >
<td>
<input type="hidden" name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="IdField"/>]" id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="IdField"/>]" value="<inp2:m_param name="id"/>">
<inp2:m_if check="s_FieldEquals" name="Type" value="1">
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="1">
<input type="text"
<inp2:m_if check="m_ParamEquals" param="first" value="1">
<inp2:m_inc param="tab_index" by="1"/>
tabindex="<inp2:m_get param="tab_index"/>"
<inp2:m_else/>
readonly
</inp2:m_if>
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
value="<inp2:m_param name="min"/>" size="10"
<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>/>
<inp2:m_phrase label="la_kg" />
</inp2:m_if>
<inp2:m_if check="lang.current_FieldEquals" field="UnitSystem" value="2">
<input type="text"
<inp2:m_if check="m_ParamEquals" param="first" value="1">
<inp2:m_inc param="tab_index" by="1"/>
tabindex="<inp2:m_get param="tab_index"/>"
<inp2:m_else/>
readonly
</inp2:m_if>
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_a]"
value="<inp2:m_param name="min_a"/>" size="10"
<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>/>
<inp2:m_phrase label="la_lbs" />
<input type="text"
<inp2:m_if check="m_ParamEquals" param="first" value="1">
<inp2:m_inc param="tab_index" by="1"/>
tabindex="<inp2:m_get param="tab_index"/>"
<inp2:m_else/>
readonly
</inp2:m_if>
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>_b]"
value="<inp2:m_param name="min_b"/>" size="10"
<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>/>
<inp2:m_phrase label="la_oz" />
</inp2:m_if>
<inp2:m_else />
<input type="text" size="10"
<inp2:m_if check="m_ParamEquals" param="first" value="1">
<inp2:m_inc param="tab_index" by="1"/>
tabindex="<inp2:m_get param="tab_index"/>"
<inp2:m_else/>
readonly
</inp2:m_if>
name="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="<inp2:m_param name="PrefixSpecial"/>[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
value="<inp2:m_param name="min"/>"
<inp2:m_if check="m_ParamEquals" param="first" value="1"><inp2:m_else/>disabled</inp2:m_if>
/>
</inp2:m_if>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="bracket">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="br_edit_min" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="Start" size="40" pass_params="true"/>
<inp2:m_RenderElement name="br_edit_max" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="End" size="40" pass_params="true"/>
</tr>
</inp2:m_DefineElement>
<script type="text/javascript" >
NumberFormatter.ThousandsSep = '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>';
NumberFormatter.DecimalSep = '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>';
function set_start(id, next_id, prefix_special, start_field, end_field)
{
//var next_id = id - 1;
var input_id = prefix_special + '[' + next_id + '][' + start_field + ']';
//var orig_id = prefix_special + '[' + id + '][Start]';
//alert('here');
if(document.getElementById(input_id) != null)
{
var new_value = NumberFormatter.Parse(document.getElementById(prefix_special + '[' + id + '][' + end_field + ']').value);
//alert(prefix_special + '[' + id + '][' + end_field + ']');
if( isNaN(new_value) ) new_value = 0;
document.getElementById(prefix_special + '[' + id + '][' + end_field + ']').value = NumberFormatter.Format(new_value);
document.getElementById(input_id).value = NumberFormatter.Format(new_value);
}
}
function enableKernelFormFields()
{
var kForm = document.forms.kernel_form;
var elem = false;
for (var i=0; i<kForm.elements.length; i++){
elem = kForm.elements[i];
if (elem.type == "text" && elem.disabled == true){
elem.disabled = false;
}
}
}
</script>
<inp2:m_DefineElement name="br_grid_th" >
<td class="columntitle_small"><inp2:m_phrase label="$phrase" /></td>
</inp2:m_DefineElement>
<inp2:br_SaveWarning name="grid_save_warning"/>
<inp2:br_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr nowrap="nowrap" class="grid-header-row-0">
<inp2:m_RenderElement name="br_grid_th" phrase="!la_col_Start!"/>
<inp2:m_RenderElement name="br_grid_th" phrase="!la_col_End!"/>
</tr>
<inp2:br_ShowBracketsForm block="bracket" IdField="BracketId"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
<script>
document.forms.kernel_form.onsubmit = enableKernelFormFields;
</script>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/shipping/shipping_zones.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/shipping/shipping_zones.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/shipping/shipping_zones.tpl (revision 12489)
@@ -1,93 +1,93 @@
<inp2:adm_SetPopupSize width="850" height="610"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="zones" pagination="1" pagination_prefix="z" tab_preset="Default"/>
<!-- 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() {
submit_event('s','<inp2:s_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('s','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('s', '<inp2:s_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('s', '<inp2:s_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Zone" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewShipZone" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('z', 'in-commerce/shipping/zone_edit')
} ) );
function edit()
{
opener_action('d');
submit_event('z', 'OnLoadZoneForm', 'in-commerce/shipping/zone_edit')
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('z')
} ) );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
submit_event('z', 'OnMassClone')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="s_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="s_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="s_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="z" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="z" IdField="ZoneID" grid="Default"/>
<script type="text/javascript">
Grids['z'].SetDependantToolbarButtons( new Array('edit','delete','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/shipping/zone_edit.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/shipping/zone_edit.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/shipping/zone_edit.tpl (revision 12489)
@@ -1,384 +1,384 @@
<inp2:adm_SetPopupSize width="650" height="480"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="zones_edit"/>
<!-- 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() {
SelectAll(document.getElementById('location_list[]'));
SelectToString(document.getElementById('location_list[]'));
submit_event('z','<inp2:z_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('z','OnCancel');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('z', '<inp2:z_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('z', '<inp2:z_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="z_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="z_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="z_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="destination_block">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="countries_multiple">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">&nbsp;</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<table>
<tr><td>
<inp2:m_Phrase label="la_zones_SelectedCountries"/>:<br/>
<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
<inp2:z_ShowCountries block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableCountries"/>:<br/>
<select name="ShippingZoneIdChooser" multiple size="10" size="10" style="width: 200px">
<inp2:z_ShowCountries block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="states_multiple">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">&nbsp;</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<select name="CountrySelector" onChange="change_country()">
<inp2:z_ShowCountries block="destination_block" show="has_states"/>
</select>
<br />
<table>
<tr><td>
<inp2:m_Phrase label="la_zones_SelectedStates"/>:<br/>
<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
<inp2:z_ShowStates block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableStates"/>:<br/>
<select name="ShippingZoneIdChooser" multiple size="10" style="width: 200px">
<inp2:z_ShowStates block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="zips_multiple">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">&nbsp;</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<select name="CountrySelector" onChange="change_country()">
<inp2:z_ShowCountries block="destination_block" show="all"/>
</select>
<br />
<table>
<tr><td>
<inp2:m_Phrase label="la_zones_SelectedZips"/>:<br/>
<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
<inp2:z_ShowZips block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableZips"/>:<br/>
<select name="ShippingZoneIdChooser" multiple size="10" style="width: 200px">
<inp2:z_ShowZips block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
<br>
<input type="text" name="zone_add" id="zone_add"> <input type="button" onClick="add_zone(document.getElementById('location_list[]'))" value="<inp2:m_Phrase label='la_btn_AddLocation'/>" class="button"/>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:z_SaveWarning name="grid_save_warning"/>
<inp2:z_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_ShippingZone!"/>
<inp2:m_RenderElement name="inp_id_label" prefix="z" field="ZoneID" title="!la_fld_Id!"/>
<inp2:m_RenderElement name="inp_label" prefix="z" field="ShippingTypeID" title="!la_fld_ShippingTypeId!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="z" field="Name" title="!la_fld_Zone_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="z" field="Name" title="!la_fld_ShipZoneName!" size="40"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="z" field="CODallowed" title="!la_fld_CODallowed!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="z" field="Type" title="!la_fld_Zone_Type!"/>
<!-- <inp2:z_ShowDestinations block="destination_block" /> -->
<inp2:m_if check="z_fieldequals" field="Type" value="1" >
<inp2:m_RenderElement name="countries_multiple" prefix="z" />
</inp2:m_if>
<inp2:m_if check="z_fieldequals" field="Type" value="2" >
<inp2:m_RenderElement name="states_multiple" prefix="z" />
</inp2:m_if>
<inp2:m_if check="z_fieldequals" field="Type" value="3" >
<inp2:m_RenderElement name="zips_multiple" prefix="z" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" value="" name="location_id" id="location_id">
<input type="hidden" value="" name="selected_destinations" id="selected_destinations">
<input type="hidden" name="z_OriginalSaveEvent" id="z_OriginalSaveEvent" value="<inp2:z_SaveEvent/>">
<input type="hidden" name="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" id="z[<inp2:z_field field="ZoneID"/>][ShippingTypeID]" value="<inp2:z_field field="ShippingTypeID"/>">
<input type="hidden" name="z_id" id="z_id" value="<inp2:z_Field field="ZoneID"/>">
<script>
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_1').onchange = change_type;
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_2').onchange = change_type;
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_3').onchange = change_type;
function change_type()
{
submit_event('z','OnTypeChange');
}
function change_country()
{
submit_event('z','OnCountryChange');
}
function remove_location(location_id)
{
document.getElementById('location_id').value = location_id;
submit_event('z', 'OnRemoveLocation');
}
function SelectToString(aSelect)
{
// written by Slava, patched by Alex, modified by SergeyG
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if(aSelect.options[i].selected == true) result += cur.value+',';
}
if(result.length > 0) result = result.substring(0,result.length-1);
document.getElementById('selected_destinations').value = result;
return result;
}
function add_zone(aSelect){
var el = document.getElementById('zone_add');
if (el)
{
if (el.value=='') return;
var found = false;
var valueArray;
for (i = 0; i < aSelect.options.length; i++){
valueArray = aSelect.options[i].value.split("|");
if (valueArray[1] == el.value){
found = true;
break;
}
}
if (!found){
aSelect.options[aSelect.length] = new Option(el.value, '0|'+el.value);
el.value='';
}
}
}
function SelectContainsValue(selectObject, searchValue)
{
for (i = 0; i < selectObject.options.length; i++){
if (selectObject.options[i].text == searchValue){
return true;
}
}
return false;
}
function SelectToArray(aSelect)
{
var an_arr = new Array();
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
an_arr[an_arr.length] = new Array(cur.text, cur.value, cur.selected);
}
return an_arr;
}
function ArrayToSelect(anArray, aSelect)
{
var initial_length = aSelect.length;
for (var i=initial_length-1; i >= 0; i--) { aSelect.options[i] = null; }
for (var i=0; i < anArray.length; i++)
{
cur = anArray[i];
aSelect.options[aSelect.length] = new Option(cur[0], cur[1]);
}
}
function SelectCompare(a, b)
{
if (a[0] < b[0])
return -1;
if (a[0] > b[0])
return 1;
return 0;
}
function MoveSelected(FromList, ToList)
{
FromArr = SelectToArray(FromList);
ToArr = SelectToArray(ToList);
NewFrom = Array();
for (var i=FromArr.length-1; i >= 0; i--)
{
cur = FromArr[i];
if (cur[2] && !SelectContainsValue(ToList, cur[0])) {
ToArr[ToArr.length] = cur;
}
else if(SelectContainsValue(ToList, cur[0])) {
}
else {
NewFrom[NewFrom.length] = cur;
}
}
NewFrom.sort(SelectCompare);
ToArr.sort(SelectCompare);
FromList = ArrayToSelect(NewFrom, FromList);
ToList = ArrayToSelect(ToArr, ToList);
}
function SelectToString2(aSelect)
{
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
result += cur.value+',';
}
return result;
}
function SelectAll(aSelect)
{
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
aSelect.options[i].selected = true;
}
// -----------
}
function OnlySelectedToString(aSelect)
{
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if (cur.selected)
result += cur.value+',';
}
return result;
}
function SelectMultipleSelected(aSelect, aStr)
{
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if (aStr.match("(^|\,)+"+cur.value+"(,|$)+") ) {
aSelect.options[i].selected = true;
}
}
}
function SelectAll(aSelect)
{
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
aSelect.options[i].selected = true;
}
}
// --------------
</SCRIPT>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl (revision 12489)
@@ -1,66 +1,66 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_list" pagination="1" tabs="in-commerce/affiliate_plans/affiliate_list_tabs"/>
<!-- 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();
function edit()
{
std_edit_item('affil', 'in-commerce/affiliate_plans/affiliates_edit');
}
- a_toolbar.AddButton( new ToolBarButton('new_affiliate', '<inp2:m_phrase label="la_ToolTip_New_Affiliate" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Affiliate" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('affil', 'in-commerce/affiliate_plans/affiliates_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('affil')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('affil','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('affil','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="affil" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_userlink_td" format="">
<a href="<inp2:UserLink edit_template='users/users_edit'/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" no_special="no_special" grid="$grid" format="$format"/></a>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="affil" IdField="AffiliateId" grid="Default"/>
<script type="text/javascript">
Grids['affil'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl (revision 12489)
@@ -1,74 +1,74 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" title_preset="affiliate_plans_list" pagination="1" tabs="in-commerce/affiliate_plans/affiliate_list_tabs"/>
<!-- 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();
function edit()
{
std_edit_item('ap', 'in-commerce/affiliate_plans/affiliate_plans_edit');
}
- a_toolbar.AddButton( new ToolBarButton('new_affiliate_plan', '<inp2:m_phrase label="la_ToolTip_New_Affiliate_Plan" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Affiliate_Plan" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('ap', 'in-commerce/affiliate_plans/affiliate_plans_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('ap')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
submit_event('ap','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('primary_affiliate_plan', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
submit_event('ap','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('ap','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('ap','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="ap" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="ap" IdField="AffiliatePlanId" grid="Default"/>
<script type="text/javascript">
- Grids['ap'].SetDependantToolbarButtons( new Array('edit','delete','clone', 'approve','decline','primary_affiliate_plan') );
+ Grids['ap'].SetDependantToolbarButtons( new Array('edit','delete','clone', 'approve','decline','setprimary') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl (revision 12489)
@@ -1,77 +1,77 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="apt" section="in-commerce:affiliate_payment_types" title_preset="affiliate_payment_types_list" pagination="1" tabs="in-commerce/affiliate_plans/affiliate_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('apt', 'in-commerce/affiliate_plans/affiliate_payment_types_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('new_affiliate_payment_type', '<inp2:m_phrase label="la_ToolTip_NewAffiliatePaymentType" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewAffiliatePaymentType" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('apt', 'in-commerce/affiliate_plans/affiliate_payment_types_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('apt')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep6') );
- a_toolbar.AddButton( new ToolBarButton('primary_affiliate_payment_type', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
submit_event('apt','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('apt','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('apt','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('apt','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('apt','OnMassMoveDown');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="apt" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="affiliate_payment_type_caption_td">
<inp2:Field field="$field" grid="$grid"/>
<inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority"/></sup></span></inp2:m_ifnot>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="apt" IdField="PaymentTypeId" grid="Default"/>
<script type="text/javascript">
- Grids['apt'].SetDependantToolbarButtons( new Array('edit','delete','primary_affiliate_payment_type','approve','decline','move_up','move_down') );
+ Grids['apt'].SetDependantToolbarButtons( new Array('edit','delete','setprimary','approve','decline','move_up','move_down') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/taxes/taxes_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/taxes/taxes_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/taxes/taxes_list.tpl (revision 12489)
@@ -1,57 +1,57 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="tax" section="in-commerce:taxes" title_preset="taxes_list" pagination="1"/>
<!-- 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('new_item', '<inp2:m_phrase label="la_ToolTip_New_Zone" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewTaxZone" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('tax', 'in-commerce/taxes/taxes_edit')
} ) );
function edit()
{
std_edit_item('tax', 'in-commerce/taxes/taxes_edit');
//submit_event('tax', 'OnLoadZoneForm', 'in-commerce/taxes/taxes_edit')
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('tax')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
submit_event('tax', 'OnMassClone')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="tax" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="tax" IdField="TaxZoneId" grid="Default"/>
<script type="text/javascript">
Grids['tax'].SetDependantToolbarButtons( new Array('edit','delete','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/catalog_tab.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/catalog_tab.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/catalog_tab.tpl (revision 12489)
@@ -1,102 +1,102 @@
<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
function createProductMenu() {
prod_menu = menuMgr.createMenu(rs('new_prod_menu'));
prod_menu.applyBorder(false, false, false, false);
prod_menu.dropShadow("none");
prod_menu.showIcon = true;
<inp2:m_DefineElement name="product_type_elem">
prod_menu.addItem(rs('product.type.<inp2:m_param name="key"/>'),'<inp2:m_phrase name="$option" escape="1"/>','javascript:new_product(<inp2:m_param name="key"/>);');
</inp2:m_DefineElement>
<inp2:{$prefix}_PredefinedOptions selected="selected" field="Type" block="product_type_elem" skip_autoload="true"/>
}
a_toolbar.AddButton(
new ToolBarButton(
- 'new_item',
+ 'in-commerce:new_product',
'<inp2:m_phrase label="la_ToolTip_NewProduct" escape="1"/>::<inp2:m_phrase label="la_ToolTip_NewProduct" escape="1"/>',
function() {
renderMenus();
- nls_showMenu(rs('new_prod_menu'), a_toolbar.GetButtonImage('new_item'));
+ nls_showMenu(rs('new_prod_menu'), a_toolbar.GetButtonImage('new_product'));
},
true
)
);
function new_product($type) {
$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
set_hidden_field('<inp2:m_param name="prefix"/>_new_type', $type);
<inp2:m_if check="m_Get" name="t" equals_to="catalog/catalog">
std_precreate_item($Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'));
<inp2:m_else/>
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
$kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
std_precreate_item(
$Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'),
function() {
$kf.action = $prev_action;
}
);
</inp2:m_if>
}
createProductMenu();
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="2">
- <div id="products_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/catalog_tab" edit_template="in-commerce/products/products_edit" category_id="-1" dep_buttons="new_item" class="catalog-tab"><!-- IE minimal height problem fix --></div>
+ <div id="products_div" prefix="<inp2:m_param name="prefix"/>" view_template="in-commerce/catalog_tab" edit_template="in-commerce/products/products_edit" category_id="-1" dep_buttons="new_product" class="catalog-tab"><!-- IE minimal height problem fix --></div>
<script type="text/javascript">$Catalog.registerTab('products');</script>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:$prefix_InitList grid="$grid_name"/>
$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword no_special="1" js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
<inp2:m_DefineElement name="qty_td">
<inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
</inp2:m_DefineElement>
<inp2:m_include template="in-auction/inc/grid_blocks" is_silent="1"/>
<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
</inp2:m_if>
Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
</inp2:m_if>
#separator#
<!-- products tab: begin -->
<inp2:m_RenderElement name="kernel_form" form_name="products_form"/>
<input type="hidden" name="<inp2:m_param name="prefix"/>_new_type" id="<inp2:m_param name="prefix"/>_new_type" value="">
<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ProductId" grid="$grid_name" menu_filters="yes"/>
<inp2:m_RenderElement name="kernel_form_end"/>
<!-- products tab: end -->
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:p_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/orders/orders_list_tabs.tpl (revision 12489)
@@ -1,28 +1,28 @@
<inp2:m_include template="in-commerce/orders/order_blocks"/>
<inp2:m_DefineElement name="orders_tabs">
+ <inp2:m_RenderElement name="tab_direct" title="la_tab_Incomplete" t="in-commerce/orders/orders_incomplete_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_Pending" t="in-commerce/orders/orders_pending_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_BackOrders" t="in-commerce/orders/orders_backorders_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_ToShip" t="in-commerce/orders/orders_toship_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_Processed" t="in-commerce/orders/orders_processed_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_Denied" t="in-commerce/orders/orders_denied_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_Returns" t="in-commerce/orders/orders_returns_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_Archived" t="in-commerce/orders/orders_archived_list"/>
- <inp2:m_RenderElement name="tab_direct" title="la_tab_Incomplete" t="in-commerce/orders/orders_incomplete_list"/>
<inp2:m_RenderElement name="tab_direct" title="la_tab_Search" t="in-commerce/orders/orders_search_list"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="tabs_container" tabs_render_as="orders_tabs"/>
<script type="text/javascript">
function print_orders($prefix_special, $t) {
if ($prefix_special.match(/(.*)\.(.*)/)) {
set_hidden_field('order_type', RegExp.$2);
}
set_hidden_field('remove_specials[' + $prefix_special + ']', 1);
open_popup($prefix_special, 'OnLoadSelected', $t, '750x700');
}
</script>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_billing.tpl (revision 12489)
@@ -1,228 +1,228 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_billing" tab_preset="Default"/>
<!-- 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() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
- a_toolbar.AddButton( new ToolBarButton('reset_to_shipping', '<inp2:m_phrase label="la_ToolTip_ResetToShipping" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_shipping', '<inp2:m_phrase label="la_ToolTip_ResetToShipping" escape="1"/>', function() {
submit_event('ord','OnResetToShipping');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
function OpenGWResults(field) {
openSelector('ord', '<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord"/>&field=' + field, '', '500x400');
}
</script>
<inp2:m_DefineElement name="inp_gwresults" is_last="" as_label="" currency="" is_last="">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td class="control-cell">
<inp2:m_if check="m_Param" name="display_field"><inp2:m_Param name="display_field"/>: <inp2:Field name="$field" format="$display_field"/></inp2:m_if>
<a href="javascript:OpenGWResults('<inp2:m_param name="field"/>')"><inp2:m_Phrase label="la_Details"/></a>
</td>
<inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
</tr>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_OrderBilling!"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingTo" title="!la_fld_BillingTo!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCompany" title="!la_fld_BillingCompany!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="!la_fld_BillingPhone!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingFax" title="!la_fld_BillingFax!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="!la_fld_BillingEmail!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress1" title="!la_fld_BillingAddress1!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress2" title="!la_fld_BillingAddress2!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="!la_fld_BillingCity!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="!la_fld_BillingState!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="!la_fld_BillingZip!" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="!la_fld_BillingCountry!" size="20"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentType" title="!la_fld_PaymentType!" onchange="submit_event('ord','OnPreSave');"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="!la_fld_IsRecurringBilling!"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="!la_fld_NextCharge!"/>
<!--<inp2:m_RenderElement name="inp_gwresults" prefix="ord" display_field="score" field="VerificationResult" title="!la_fld_VerificationResult!" />-->
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="!la_section_CreditCard!"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentCardType" title="!la_fld_PaymentCardType!"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="!la_fld_CreditCardNumber!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentNameOnCard" title="!la_fld_PaymentNameOnCard!" size="20"/>
<inp2:m_if check="ord_FieldVisible" field="PaymentCCExpDate">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="!la_fld_PaymentCCExpDate!"/>
<td class="control-cell">
<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpMonth"/>" id="<inp2:ord_InputName field="PaymentCCExpMonth"/>" value="<inp2:ord_Field field="PaymentCCExpMonth"/>">
/
<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpYear"/>" id="<inp2:ord_InputName field="PaymentCCExpYear"/>" value="<inp2:ord_Field field="PaymentCCExpYear"/>">
</td>
<inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="PaymentCCExpDate"/>
</tr>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentCVV2" title="!la_fld_PaymentCVV2!" size="5" maxlength="5"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentExpires!" size="16"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="ChargeOnNextApprove" title="!la_fld_ChargeOnNextApprove!"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="!la_fld_PaymentAccount!" size="20"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentDate!" size="16"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="!la_fld_AuthorizationResult!" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="!la_fld_CaptureResult!" />
</inp2:m_if>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingTo" title="!la_fld_BillingTo!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCompany" title="!la_fld_BillingCompany!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingPhone" title="!la_fld_BillingPhone!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingFax" title="!la_fld_BillingFax!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingEmail" title="!la_fld_BillingEmail!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress1" title="!la_fld_BillingAddress1!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress2" title="!la_fld_BillingAddress2!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCity" title="!la_fld_BillingCity!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingState" title="!la_fld_BillingState!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingZip" title="!la_fld_BillingZip!" size="10"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCountry" title="!la_fld_BillingCountry!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentType" title="!la_fld_PaymentType!"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="!la_fld_IsRecurringBilling!"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="!la_fld_NextCharge!"/>
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="VerificationResult" display_field="score" title="!la_fld_VerificationResult!" />
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="!la_section_CreditCard!"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCardType" title="!la_fld_PaymentCardType!"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="!la_fld_CreditCardNumber!"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentNameOnCard" title="!la_fld_PaymentNameOnCard!"/>
<inp2:m_if check="ord_FieldVisible" field="PaymentCCExpDate">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="!la_fld_PaymentCCExpDate!"/>
<td class="control-cell">
<inp2:ord_Field field="PaymentCCExpMonth"/> / <inp2:ord_Field field="PaymentCCExpYear"/>
</td>
<inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="PaymentCCExpDate"/>
</tr>
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCVV2" title="!la_fld_PaymentCVV2!"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentExpires!"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="!la_fld_PaymentAccount!"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="!la_fld_PaymentDate!"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="!la_fld_AuthorizationResult!" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="!la_fld_CaptureResult!" />
</inp2:m_if>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="CouponId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="CouponCode" title="!la_fld_CouponCode!" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="DiscountTotal" title="!la_fld_TotalSavings!" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ReturnTotal" title="!la_fld_TotalReturns!" />
<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
<inp2:m_else />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="AmountWithoutVAT" title="!la_fld_SubTotal!" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="VAT" title="!la_fld_VAT!" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GiftCertificateId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateCode" title="!la_fld_Gift_Certificate_Number!" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateDiscount" title="!la_fld_Gift_Certificate_Amount_Applied!" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="TotalAmount" title="!la_fld_TotalAmount!" />
<inp2:m_if check="ord_HasOriginalAmount" >
<inp2:m_RenderElement name="inp_label" prefix="ord" field="OriginalAmount" title="!la_fld_OriginalAmount!" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Billing">
<input type="hidden" name="check_billing_address" value="true" />
<inp2:m_if check="ord_UsingCreditCard">
<input type="hidden" name="check_credit_card" value="true" />
</inp2:m_if>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_items.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_items.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_items.tpl (revision 12489)
@@ -1,251 +1,251 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_SetParam grid="Default"/>
<inp2:m_else/>
<inp2:m_SetParam grid="NotEditable"/>
</inp2:m_if>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_items" grid="$grid" pagination="1" pagination_prefix="orditems" tab_preset="Default"/>
<!-- 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() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
function edit(){
std_edit_temp_item('orditems', 'in-commerce/orders/order_product_edit');
}
<inp2:m_if check="ord_OrderEditable">
//Order items related:
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>',
function() {
openSelector('orditems', '<inp2:adm_SelectorLink prefix="ord" selection_mode="single" tab_prefixes="p"/>', '', null, 'OnSaveItems');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('orditems')
} ) );
- a_toolbar.AddButton( new ToolBarButton('recalculate_order', '<inp2:m_phrase label="la_RecalculateOrder"/>',
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:recalculate_order', '<inp2:m_phrase label="la_RecalculateOrder"/>',
function() {
submit_event('ord', 'OnRecalculateItems');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="ord_Status" is_not="incomplete">
a_toolbar.HideButton('arrange');
</inp2:m_if>
<inp2:m_if check="ord_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
// stuff for updating extended price based on price & quantity entered
function CalculateSubtotal($prefix_special, $price_field, $result_id) {
if (typeof(Grids[$prefix_special]) != 'object') {
return false;
}
var $sub_total = 0;
var $grid_items = Grids[$prefix_special].Items;
for (var $i in $grid_items) {
$id = $grid_items[$i].ItemId;
var $price_control = document.getElementById($prefix_special + '['+$id+'][' + $price_field + ']');
$sub_total += NumberFormatter.Parse($price_field == 'ExtendedPrice' ? $price_control.innerHTML : $price_control.value);
}
document.getElementById($result_id).innerHTML = NumberFormatter.Format($sub_total.toFixed(2));
}
function UpdateExtendedPrice($prefix_special, $id)
{
<inp2:m_if check="ord_OrderEditable">
// 1. calculate current row extended price
var $qty = NumberFormatter.Parse(document.getElementById($prefix_special+'['+$id+'][Quantity]').value);
var $price = NumberFormatter.Parse(document.getElementById($prefix_special+'['+$id+'][Price]').value);
var $ext_price = Math.round($qty*$price*100)/100;
document.getElementById($prefix_special+'['+$id+'][ExtendedPrice]').innerHTML = NumberFormatter.Format($ext_price.toFixed(2));
// 2. recalculate subtotal
CalculateSubtotal($prefix_special, 'ExtendedPrice', 'order_subtotal');
</inp2:m_if>
// 3. recalculate return total
CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
}
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="orditems" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="option_value_element">
<inp2:m_param name="value"/> <inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element">
<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
<strong><inp2:m_param name="option"/>:</strong>
<inp2:PrintOptionValues render_as="option_value_element"/>
<inp2:m_else/>
<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
<inp2:m_if check="m_ParamEquals" name="price" value=""><inp2:m_else/> (<inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/>)</inp2:m_if>
</inp2:m_if><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_value_element_no_price">
<inp2:m_param name="value"/>
<inp2:m_if check="m_ParamEquals" name="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element_no_price">
<inp2:m_if check="m_ParamEquals" param="type" value="6"> <!-- checkboxes - multiple -->
<strong><inp2:m_param name="option"/>:</strong>
<inp2:PrintOptionValues render_as="option_value_element_no_price"/>
<inp2:m_else/>
<strong><inp2:m_param name="option"/>:</strong> <inp2:m_param name="value"/>
</inp2:m_if><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="product_image">
<img src="<inp2:m_param name="img_path" />" title="<inp2:m_param name="alt" />" alt="<inp2:m_param name="alt" />" <inp2:m_param name="img_size" /> border="0" /><br/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_productname_td" format="" module="">
<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
<div style="width: 120px;">
<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="noimage.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
</div>
</inp2:m_if>
<inp2:Field field="$field" first_chars="50"/> (<inp2:Field field="ProductId"/>)
<inp2:m_if check="ord_BackOrderFlag"><span class="error"><inp2:m_Phrase label="la_ItemBackordered"/></span></inp2:m_if>
<inp2:m_if check="HasOptions">
<br/>
<small>
<inp2:m_if check="FieldEquals" field="OptionsSelectionMode" value="0">
<!-- selectable options -->
<inp2:PrintOptions render_as="option_element"/>
<inp2:m_else/>
<!-- listed combinations -->
<inp2:PrintOptions render_as="option_element_no_price"/>
</inp2:m_if>
</small>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_edit_td">
<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="4">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_quantity_td">
<inp2:m_if check="FieldEquals" field="Type" value="1">
<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="4">
<inp2:m_else />
<span class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/></span>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="$PrefixSpecial" field="$field"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_price_td">
<input type="text" onkeyup="UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>', <inp2:{$PrefixSpecial}_Field field="OrderItemId"/>);" class="text" name="<inp2:{$PrefixSpecial}_InputName field="$field"/>" id="<inp2:{$PrefixSpecial}_InputName field="$field"/>" value="<inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>" size="5">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_extendedprice_td">
<span id="<inp2:InputName field="$field"/>"><inp2:Field field="$field" grid="$grid" format="%.2f"/></span>
<script type="text/javascript">UpdateExtendedPrice('<inp2:m_param name="PrefixSpecial"/>',<inp2:Field field="OrderItemId"/>);</script>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="orderitems_total_td">
<inp2:m_if check="FieldOption" field="$field" option="totals">
<inp2:FieldOption field="$field" option="totals" result_to_var="totals"/>
'<inp2:FieldTotal field="$field" function="$totals"/>'
<inp2:m_else/>
<inp2:m_if check="m_Param" name="field" equals_to="ReturnAmount">
'<span id="order_returntotal">0.00</span>'
</inp2:m_if>
<inp2:m_if check="m_Param" name="field" equals_to="ExtendedPrice">
<inp2:m_if check="ord_OrderEditable">
'<span id="order_subtotal">0.00</span>'
<inp2:m_else/>
'<span id="order_subtotal"><inp2:ord_Field name="SubTotal"/></span>'
</inp2:m_if>
</inp2:m_if>
<inp2:m_ifnot check="m_Param" name="field" equals_to="ReturnAmount|ExtendedPrice">
'&nbsp;'
</inp2:m_ifnot>
</inp2:m_if>
<inp2:m_ifnot check="m_Param" name="is_last">, </inp2:m_ifnot>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" grid="$grid" PrefixSpecial="orditems" IdField="OrderItemId" totals_block="orderitems_total_td" totals_render_as="grid_total_row"/>
<script type="text/javascript">
Grids['orditems'].SetDependantToolbarButtons( new Array('delete') );
<inp2:m_if check="ord_OrderEditable">
CalculateSubtotal('orditems', 'ExtendedPrice', 'order_subtotal');
</inp2:m_if>
CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="ord">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/orders/orders_edit_shipping.tpl (revision 12489)
@@ -1,250 +1,250 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_shipping" tab_preset="Default"/>
<!-- 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() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
- a_toolbar.AddButton( new ToolBarButton('reset_to_billing', '<inp2:m_phrase label="la_ToolTip_ResetToBilling" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_billing', '<inp2:m_phrase label="la_ToolTip_ResetToBilling" escape="1"/>', function() {
submit_event('ord','OnResetToBilling');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:m_if check="m_Recall" name="usps_errors">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="warning-table">
<tr>
<td valign="top" class="form-warning">
<inp2:m_Recall name="usps_errors" />
<inp2:m_RemoveVar name="usps_errors"/>
</td>
</tr>
</table>
</inp2:m_if>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_OrderShipping!"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTo" title="!la_fld_ShippingTo!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCompany" title="!la_fld_ShippingCompany!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingPhone" title="!la_fld_ShippingPhone!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingFax" title="!la_fld_ShippingFax!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingEmail" title="!la_fld_ShippingEmail!" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress1" title="!la_fld_ShippingAddress1!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress2" title="!la_fld_ShippingAddress2!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCity" title="!la_fld_ShippingCity!" size="20"/>
<script type="text/javascript">
function update_address()
{
submit_event('ord','OnQuietPreSave');
}
</script>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingState" title="!la_fld_ShippingState!" size="20" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingZip" title="!la_fld_ShippingZip!" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="!la_fld_ShippingCountry!" size="20" />
<inp2:m_DefineElement name="order_option">
<input onclick="submit_event('ord','OnQuietPreSave');" class="simple" type="radio" <inp2:m_param name="checked"/> name="<inp2:InputName field="$field"/>" id="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;<br>
</inp2:m_DefineElement>
<!-- <inp2:m_RenderElement name="inp_edit_radio" prefix="ord" field="ShippingOption" title="!la_fld_ShippingOption!" size="20" /> -->
<inp2:m_DefineElement name="order_shipping_type">
<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
</inp2:m_DefineElement>
<inp2:m_DefineElement name="order_shipment">
<tr class="<inp2:m_odd_even var="shipping_odd_even" odd="table-color1" even="table-color2"/>">
<td style="border-right: 1px solid black"><inp2:m_param name="shipment"/></td>
<td>
<select style="width:230px;" name="<inp2:m_param name="field_name"/>" id="<inp2:m_param name="field_name"/>">
<inp2:ord_PrintShippingTypes block="order_shipping_type" />
</select>
</td>
</tr>
</inp2:m_DefineElement>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingOptions"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<inp2:ord_PredefinedOptions field="ShippingOption" block="order_option" selected="checked" />
</td>
</tr>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingType"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<table border="0" cellspacing="1" cellpadding="3" width="100%" style="border: 1px solid black; border-collapse: collapse">
<tr class="subsectiontitle" style="border-bottom: 1px solid black">
<td width="25%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_Shipment" /></b></td>
<td width="45%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_ShippingType" /></b></td>
</tr>
<inp2:ord_PrintShippings block="order_shipment"/>
</table>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCost" title="!la_fld_ShippingCost!" size="10"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="!la_fld_InsuranceFee!" size="10" format="$ %.2f"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCustomerAccount" title="!la_fld_ShippingCustomerAccount!" size="30"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTracking" title="!la_fld_ShippingTracking!" size="30"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="ShippingDate" title="!la_fld_ShippingDate!" size="16"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingTo" title="!la_fld_ShippingTo!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCompany" title="!la_fld_ShippingCompany!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingPhone" title="!la_fld_ShippingPhone!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingFax" title="!la_fld_ShippingFax!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingEmail" title="!la_fld_ShippingEmail!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingAddress1" title="!la_fld_ShippingAddress1!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingAddress2" title="!la_fld_ShippingAddress2!" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCity" title="!la_fld_ShippingCity!" size="20"/>
<script type="text/javascript">
function update_address()
{
submit_event('ord','OnQuietPreSave');
}
</script>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCountry" title="!la_fld_ShippingCountry!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingState" title="!la_fld_ShippingState!" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingZip" title="!la_fld_ShippingZip!" size="10"/>
<inp2:m_DefineElement name="order_option_label">
<inp2:m_param name="key"/> <inp2:m_phrase label="$option"/>
</inp2:m_DefineElement>
<!--inp2:m_ParseBlock name="inp_edit_radio" prefix="ord" field="ShippingOption" title="!la_fld_ShippingOption!" size="20"/-->
<inp2:m_DefineElement name="order_shipping_type">
<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
</inp2:m_DefineElement>
<inp2:m_DefineElement name="order_shipment_label">
<inp2:m_param name="shipment"/> - <inp2:ord_PrintShippingTypes block="order_shipping_type" selected_only="1"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingOption" title="!la_fld_ShippingOptions!" size="10"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingType"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<inp2:ord_PrintShippings block="order_shipment_label"/>
</td>
</tr>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCost" title="!la_fld_ShippingCost!" size="10" format="$ %.2f"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="!la_fld_InsuranceFee!" size="10" format="$ %.2f"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCustomerAccount" title="!la_fld_ShippingCustomerAccount!" size="30"/>
<inp2:m_DefineElement name="inp_shipping_label" is_last="" as_label="" currency="" is_last="">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title="$title" is_last="$is_last"/>
<td valign="top" class="control-cell">
<inp2:{$prefix}_Field field="$field" as_label="$as_label" currency="$currency"/>
<inp2:m_if check="{$prefix}_USPSLabelFound" field="$field">
&nbsp; &nbsp;<a href="#" onClick="javascript:submit_event('<inp2:m_Param name="prefix"/>', 'OnDownloadLabel'); return false;"><inp2:m_Phrase label="la_ViewLabel"/></a>
</inp2:m_if>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_shipping_label" prefix="ord" field="ShippingTracking" title="!la_fld_ShippingTracking!" size="30"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingDate" title="!la_fld_ShippingDate!" size="16"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Shipping">
<input type="hidden" name="check_shipping_address" value="true" />
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/orders/orders_incomplete_list.tpl (revision 12489)
@@ -1,80 +1,80 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord.incomplete" section="in-commerce:orders" title_preset="orders_incomplete" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
set_hidden_field('remove_specials[ord.incomplete]',1);
std_edit_item('ord.incomplete', 'in-commerce/orders/orders_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('new_order', '<inp2:m_phrase label="la_ToolTip_New_Order" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Order" escape="1"/>',
function() {
set_hidden_field('remove_specials[ord.incomplete]',1);
std_precreate_item('ord.incomplete', 'in-commerce/orders/orders_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
set_hidden_field('remove_specials[ord.incomplete]',1);
submit_event('ord.incomplete','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
submit_event('ord.incomplete','OnMassOrderDeny');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
submit_event('ord.incomplete','OnMassOrderArchive');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:place_order', '<inp2:m_phrase label="la_ToolTip_PlaceOrder" escape="1"/>', function() {
submit_event('ord.incomplete','OnMassPlaceOrder');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
// a_toolbar.AddButton( new ToolBarSeparator('sep5') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.incomplete', 'in-commerce/orders/orders_print');
}
) );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.incomplete" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="ord.incomplete" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.incomplete'].SetDependantToolbarButtons( new Array('edit','delete','clone','deny','archive','place_order','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','incomplete');
</script>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/orders/orders_search_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/orders/orders_search_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/orders/orders_search_list.tpl (revision 12489)
@@ -1,71 +1,71 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord.search" section="in-commerce:orders" grid="Search" title_preset="orders_search" pagination="1" tabs="in-commerce/orders/orders_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
set_hidden_field('remove_specials[ord.search]',1);
std_edit_item('ord.search', 'in-commerce/orders/orders_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('goto_order', '<inp2:m_phrase label="la_ToolTip_GoToOrder" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:goto_order', '<inp2:m_phrase label="la_ToolTip_GoToOrder" escape="1"/>',
function() {
submit_event('ord.search','OnGoToOrder');
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
set_hidden_field('export_finish_t', 'in-commerce/orders/export/export_finish');
set_hidden_field('export_progress_t', 'in-commerce/orders/export/export_progress');
open_popup('ord.search', 'OnExport', 'in-commerce/orders/export/export');
}
) );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.search', 'in-commerce/orders/orders_print');
}
) );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="ord.search" grid="Search"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="ord.search" IdField="OrderId" grid="Search" menu_filters="yes"/>
<script type="text/javascript">
Grids['ord.search'].SetDependantToolbarButtons( new Array('edit','delete','print','goto_order','archive') );
function processUserSelector($field, $selector) {
var $user_id = parseInt( $selector.Grids['u'].GetSelected() );
var $field_mask = '<inp2:ord.search_SearchInputName field="#FIELD_NAME#" filter_type="like" grid="Search"/>';
document.getElementById( $field_mask.replace('#FIELD_NAME#', $field) ).value = $selector.$user_logins[ $user_id ];
}
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','search');
</script>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/currencies/currencies_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/currencies/currencies_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/currencies/currencies_list.tpl (revision 12489)
@@ -1,118 +1,118 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="curr" section="in-commerce:currencies" title_preset="currencies_list" pagination="1"/>
<!-- 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();
function edit()
{
std_edit_item('curr', 'in-commerce/currencies/currencies_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarSeparator('sep6') );
- a_toolbar.AddButton( new ToolBarButton('primary_currency', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
submit_event('curr','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('curr','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('curr','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('curr','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('curr','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
- a_toolbar.AddButton( new ToolBarButton('update_rates', '<inp2:m_phrase label="la_ToolTip_UpdateRates" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:update_rates', '<inp2:m_phrase label="la_ToolTip_UpdateRates" escape="1"/>', function() {
if(Grids['curr'].CountSelected() > 0)
{
message = '<inp2:m_phrase label="la_warning_UpdateSelectedCurrencyRates" />?';
}
else
{
message = '<inp2:m_phrase label="la_warning_UpdateAllCurrencyRates" />?';
}
if(confirm(message))
{
submit_event('curr','OnUpdateRates');
}
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="curr_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="curr_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="curr_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="curr" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="currency_caption_td" >
<inp2:Field field="$field" grid="$grid"/>
<inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="curr" IdField="CurrencyId" grid="Default"/>
<script type="text/javascript">
- Grids['curr'].SetDependantToolbarButtons( new Array('edit','primary_currency','approve','decline','move_up','move_down') );
+ Grids['curr'].SetDependantToolbarButtons( new Array('edit','setprimary','approve','decline','move_up','move_down') );
</script>
<inp2:m_DefineElement name="remove_unused_warning" >
<input type="hidden" name="unused_ids" id="unused_ids" value="<inp2:m_param name="unused_ids" />">
<script type="text/javascript">
if(inpConfirm('<inp2:m_phrase label="la_WarningCurrenciesNotUsed" />: <inp2:m_param name="unused_iso" />. <inp2:m_phrase label="la_WarningRemoveUnusedCurrencies" />?'))
{
submit_event('curr', 'OnDisableUnused');
}
</script>
</inp2:m_DefineElement>
<inp2:curr_DisableUnusedWarning block="remove_unused_warning" />
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_relations.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_relations.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_relations.tpl (revision 12489)
@@ -1,105 +1,105 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="rel" title_preset="relations" tab_preset="Default"/>
<!-- 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() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Relations related:
- a_toolbar.AddButton( new ToolBarButton('new_relation', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Relation" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
openSelector('rel', '<inp2:adm_SelectorLink prefix="rel" selection_mode="single" tab_prefixes="all"/>', 'TargetId', '950x600');
} ) );
function edit()
{
std_edit_temp_item('rel', 'in-commerce/products/relations_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('rel')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('rel','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('rel','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="rel" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="rel" IdField="RelationshipId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['rel'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
</script>
<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
</script>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_files.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_files.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_files.tpl (revision 12489)
@@ -1,129 +1,129 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="file" title_preset="files" tab_preset="Default"/>
<!-- 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() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('new_file', '<inp2:m_phrase label="la_ToolTip_NewFile" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewFile" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('file', 'in-commerce/products/file_edit')
} ) );
function edit()
{
std_edit_temp_item('file', 'in-commerce/products/file_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('file')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('file','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('file','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('file','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('file','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep5') );
a_toolbar.AddButton( new ToolBarButton('primary_file', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
submit_event('file','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep6') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="file" grid="Default"/>
</tr>
</tbody>
</table>
<div id="scroll_container" mode="minimal">
<table class="edit-form" style="border-bottom: 1px solid black;">
<inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="8"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
<inp2:m_RenderElement name="subsection" title="!la_section_Files!"/>
</table>
</div>
<inp2:m_DefineElement name="file_caption_td" module="">
<inp2:Field field="$field" grid="$grid"/><inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="file" IdField="FileId" grid="Default"/>
<script type="text/javascript">
Grids['file'].SetDependantToolbarButtons( new Array('edit','delete','primary_file','move_up','move_down','approve','decline') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_images.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_images.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_images.tpl (revision 12489)
@@ -1,107 +1,107 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="img" title_preset="images" tab_preset="Default"/>
<inp2:m_include t="incs/image_blocks"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
std_edit_temp_item('img', 'in-commerce/products/images_edit');
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('new_image', '<inp2:m_phrase label="la_ToolTip_New_Images" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Images" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('img', 'in-commerce/products/images_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('img')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('img','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('img','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarButton('primary_image', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
submit_event('img','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="img" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="img" IdField="ImageId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['img'].SetDependantToolbarButtons( new Array('edit','delete','move_up','move_down','primary_image') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_list.tpl (revision 12489)
@@ -1,70 +1,70 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" title_preset="product_list" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('p', 'in-commerce/products/products_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('p', 'in-commerce/products/products_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('p')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('p','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('p','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('p','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('p','OnMassMoveDown');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="p" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="preview">
<inp2:m_RenderElement name="preview_td" PrefixSpecial="$PrefixSpecial" field="$field" type="auto" max_width="100" max_height="100"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="p" IdField="ProductId" grid="Default"/>
<script type="text/javascript">
Grids['p'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_access_pricing.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_access_pricing.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_access_pricing.tpl (revision 12489)
@@ -1,85 +1,85 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="pr" grid="Access" title_preset="access_pricing" tab_preset="Default"/>
<!-- 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() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Pricing related:
- a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_PricingLimit" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_PricingLimit" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('pr', 'in-commerce/products/access_pricing_edit')
} ) );
function edit()
{
std_edit_temp_item('pr', 'in-commerce/products/access_pricing_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('pr')
} ) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="pr" grid="Access"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="negotiated_td">
<input disabled type="checkbox" <inp2:Field field="$field" checked="checked"/> >
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="pr" IdField="PriceId" grid="Access"/>
<script type="text/javascript">
Grids['pr'].SetDependantToolbarButtons( new Array('edit','delete') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_reviews.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_reviews.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_reviews.tpl (revision 12489)
@@ -1,115 +1,115 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="rev" title_preset="reviews" tab_preset="Default"/>
<!-- 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() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Pricing related:
- a_toolbar.AddButton( new ToolBarButton('new_review', '<inp2:m_phrase label="la_ToolTip_NewReview" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewReview" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('rev', 'in-commerce/products/review_edit')
} ) );
function edit()
{
std_edit_temp_item('rev', 'in-commerce/products/review_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('rev')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('rev','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('rev','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('rev','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('rev','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep5') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="rev" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="reviewtext_checkbox_td">
<inp2:Field field="$field" no_special="no_special" cut_first="100"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="rev" IdField="ReviewId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['rev'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_packagecontent.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_packagecontent.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_packagecontent.tpl (revision 12489)
@@ -1,95 +1,95 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="p.content" title_preset="content" tab_preset="Default"/>
<!-- 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() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add_Items" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="p"/>', 'PackageContent', null, 'OnSaveItems');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
submit_event('p.content','OnRemovePackageItem');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
function edit()
{
alert();
}
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="p.content" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_include t="categories/ci_blocks"/>
<inp2:m_DefineElement name="qty_td" >
<inp2:Field field="QtyInStock" grid="$grid"/>/<inp2:Field field="QtyReserved" grid="$grid"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="p.content" IdField="ProductId" grid="Default" menu_filters="yes" types="content"/>
<input type="hidden" name="TargetId" id="TargetId" value="<inp2:m_get name="TargetId"/>">
<input type="hidden" name="TargetType" id="TargetType" value="<inp2:m_get name="TargetType"/>">
<input type="hidden" name="main_prefix" id="main_prefix" value="p">
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
</script>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/products/products_options.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/products/products_options.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/products/products_options.tpl (revision 12489)
@@ -1,128 +1,128 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="po" title_preset="options" tab_preset="Default"/>
<!-- 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() {
submit_event('p','<inp2:p_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('p', '<inp2:p_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('p', '<inp2:p_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
//Pricing related:
- a_toolbar.AddButton( new ToolBarButton('new_option', '<inp2:m_phrase label="la_ToolTip_NewOption" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:new_option', '<inp2:m_phrase label="la_ToolTip_NewOption" escape="1"/>',
function() {
std_new_item('po', 'in-commerce/products/option_edit')
} ) );
function edit()
{
std_edit_temp_item('po', 'in-commerce/products/option_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('po')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('po','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('po','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep5') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="p_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="p_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="p_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="po" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="option_name_td">
<inp2:Field field="$field" grid="$grid"/><inp2:m_ifnot check="Field" field="Priority" equals_to="0"><span class="priority"><sup><inp2:Field field="Priority" /></sup></span></inp2:m_ifnot>
</inp2:m_DefineElement>
<script type="text/javascript">
function openCombinations() {
set_hidden_field('events[poc.edit]', 'OnNew');
openSelector('p', '<inp2:m_Link t="in-commerce/products/option_combinations" pass="all,poc" poc_id=""/>', '', '800x600');
}
</script>
<div id="scroll_container" mode="minimal">
<table class="edit-form" style="border-bottom: 1px solid black;">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_phrase label="la_fld_ManageCombinations"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<a href="javascript:openCombinations();">Open</a>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="OptionsSelectionMode" title="!la_fld_OptionsSelectionMode!"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_RenderElement name="grid" PrefixSpecial="po" IdField="ProductOptionId" grid="Default"/>
<script type="text/javascript">
Grids['po'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','move_up','move_down') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/import.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/import.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/import.tpl (revision 12489)
@@ -1,232 +1,232 @@
<inp2:adm_SetPopupSize width="780" height="670"/>
<inp2:m_include t="incs/header"/>
<inp2:p.import_PresetFormFields/>
<inp2:m_RenderElement name="combined_header" prefix="adm" section="in-portal:main_import" title_preset="import"/>
<!-- 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() {
+ a_toolbar.AddButton( new ToolBarButton('import', '<inp2:m_phrase label="la_ToolTip_Import" escape="1"/>', function() {
document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
submit_event('p.import','OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p.import','OnGoBack');
}
) );
a_toolbar.Render();
function check_radio($id)
{
document.getElementById($id).checked = true;
}
// gets value of checked radio button
function get_checked($field_name) {
var $ret = false;
var $fields = document.getElementsByName($field_name);
for(var $i = 0; $i < $fields.length; $i++) {
if ($fields[$i].checked) {
$ret = $fields[$i].value;
break;
}
}
return $ret;
}
// enable/disable form fields based on other field values
function reflectFormFields()
{
var $auto_fields = get_checked('<inp2:p.import_InputName field="FieldTitles"/>') == 1 ? true : false;
if ($auto_fields) {
document.getElementById('_cb_<inp2:p.import_InputName field="SkipFirstRow"/>').checked = true;
}
document.getElementById('_cb_<inp2:p.import_InputName field="SkipFirstRow"/>').onchange();
document.getElementById('<inp2:p.import_InputName field="ExportColumns"/>').disabled = $auto_fields;
document.getElementById('<inp2:p.import_InputName field="AvailableColumns"/>').disabled = $auto_fields;
var $btn = null;
var $btns = Array('up', 'down', 'left', 'right');
var $i = 0;
while ($i < $btns.length) {
$btn = document.getElementById('btn_move_'+$btns[$i]);
$btn.disabled = $auto_fields;
$btn.className = $auto_fields ? 'button-disabled' : 'button';
$i++;
}
}
Application.setHook('p.import:OnBeforeOpenSelector',
function() {
document.getElementById('export_columns').value = select_to_string('<inp2:p.import_InputName field="ExportColumns"/>');
}
);
$(document).ready(
function() {
$('#step_number').text(3);
}
);
</script>
</td>
</tr>
</tbody>
</table>
<inp2:p.import_SaveWarning name="grid_save_warning"/>
<inp2:p.import_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename"/>
<td class="control-cell">
<table border="0">
<tr>
<td>
<input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_1"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="1"> checked</inp2:m_if> value="1" />
</td>
<td>
<label for="<inp2:p.import_InputName field="ImportSource"/>_1">upload</label>
</td>
<td>
<input type="file" name="<inp2:p.import_InputName field="ImportFilename"/>" id="<inp2:p.import_InputName field="ImportFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_1');">
</td>
</tr>
<tr>
<td>
<input type="radio" name="<inp2:p.import_InputName field="ImportSource"/>" id="<inp2:p.import_InputName field="ImportSource"/>_2"<inp2:m_if check="p.import_FieldEquals" field="ImportSource" value="2"> checked</inp2:m_if> value="2" />
</td>
<td>
<label for="<inp2:p.import_InputName field="ImportSource"/>_2">select</label>
</td>
<td>
<select name="<inp2:p.import_InputName field="ImportLocalFilename"/>" onclick="check_radio('<inp2:p.import_InputName field="ImportSource"/>_2');">
<inp2:p.import_PredefinedOptions field="ImportLocalFilename" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
<inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="ImportSource"/>
</tr>
<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="SkipFirstRow" title="la_fld_SkipFirstRow"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="p.import" field="FieldTitles" title="la_fld_FieldTitles" onclick="reflectFormFields();"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ExportColumns" title="la_fld_ExportColumns"/>
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ExportColumns" title="la_fld_ImportColumns"/>
<td class="control-cell">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" id="btn_move_up" onclick="move_options_up('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button">
<input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" id="btn_move_down" onclick="move_options_down('<inp2:p.import_InputName field="ExportColumns"/>', 1)" class="button"><br />
<img src="img/spacer.gif" width="1" height="5" alt=""><br />
</td>
<td><img src="img/spacer.gif" width="45" height="1" alt=""><br></td>
<td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
</tr>
<tr>
<td>
<select multiple id="<inp2:p.import_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
<inp2:p.import_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
</select>
<input type="hidden" id="export_columns" name="<inp2:p.import_InputName field="ExportColumns"/>" value="<inp2:p.import_Field field="ExportColumns"/>" />
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" id="btn_move_left" onclick="move_selected('<inp2:p.import_InputName field="AvailableColumns"/>', '<inp2:p.import_InputName field="ExportColumns"/>')" class="button"><br>
<img src="img/spacer.gif" width="1" height="4" alt=""><br>
<input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" id="btn_move_right" onclick="move_selected('<inp2:p.import_InputName field="ExportColumns"/>', '<inp2:p.import_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.import_InputName field="AvailableColumns"/>');" class="button">
</td>
<td>
<select multiple id="<inp2:p.import_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
<inp2:p.import_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
</select>
</td>
</tr>
</table>
</td>
<inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="ExportColumns"/>
</tr>
<!-- CATEGORY SELECTOR: BEGIN -->
<inp2:m_DefineElement name="root_cat_caption">
<inp2:c_RootCategoryName/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="category_caption">
<inp2:m_param name="separator"/><inp2:m_param name="cat_name"/>
</inp2:m_DefineElement>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory"/>
<td class="control-cell">
<b><inp2:p.import_CategoryPath separator=" &gt; " root_cat_render_as="root_cat_caption" render_as="category_caption" session_var="ImportCategory"/></b>
<input type="hidden" name="<inp2:p.import_InputName field='CategoryId'/>" value="<inp2:p.import_Field field='CategoryId' db='db'/>" />
<a href="javascript:openSelector('p.import', '<inp2:adm_SelectorLink prefix="p.import" selection_mode="single" tab_prefixes="none"/>', 'ImportCategory', null, 'OnSaveSettings');"><img src="img/icons/icon24_cat.gif" border="0" align="absmiddle" /></a>
</td>
<td class="error"><inp2:p.import_Error field="CategoryId"/>&nbsp;</td>
</tr>
<!-- CATEGORY SELECTOR: END -->
<inp2:m_RenderElement name="inp_edit_box" prefix="p.import" field="CategorySeparator" title="la_fld_CategorySeparator" size="2" maxlength="1"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.import" field="ReplaceDuplicates" title="la_fld_ReplaceDuplicates" />
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod"/>
<td class="control-cell">
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="1"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1" value="1" />
</td>
<td>
<label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
</td>
</tr>
<tr>
<td valign="top">
<input type="radio"<inp2:m_if check="p.import_FieldEquals" field="CheckDuplicatesMethod" value="2"> checked</inp2:m_if> name="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>" id="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2" value="2" />
</td>
<td>
<label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_2"><inp2:m_phrase name="la_OtherFields" />: </label>
<inp2:p.import_PredefinedOptions prefix="p.import" field="DuplicateCheckFields" block="inp_checkbox_item" selected="checked"/>
<inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
</td>
</tr>
</table>
</td>
<inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="CheckDuplicatesMethod"/>
</tr>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/discounts/coupons_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/discounts/coupons_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/discounts/coupons_list.tpl (revision 12489)
@@ -1,67 +1,67 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('coup', 'in-commerce/discounts/coupon_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('in-commerce:new_discount', '<inp2:m_phrase label="la_ToolTip_New_Coupon" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Coupon" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('coup', 'in-commerce/discounts/coupon_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('coup')
} ) );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
//set_event('sc', 'OnSaveCreated');
openSelector('coup', '<inp2:m_t t="in-commerce/discounts/coupon_clone_selector" pass="all"/>', '', '500x260');
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('coup','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('coup','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="coup" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="coup" IdField="CouponId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['coup'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/discounts/coupon_items.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/discounts/coupon_items.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/discounts/coupon_items.tpl (revision 12489)
@@ -1,116 +1,116 @@
<inp2:adm_SetPopupSize width="870" height="600"/>
<inp2:m_include t="incs/header"/>
<inp2:m_if check="coupi_IsEntireOrder">
<inp2:m_SetParam grid="Default"/>
<inp2:m_else/>
<inp2:m_SetParam grid="CouponItems"/>
</inp2:m_if>
<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_items" grid="$grid" pagination="1" pagination_prefix="coupi" tab_preset="Default"/>
<!-- 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() {
submit_event('coup','<inp2:coup_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('coup','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('coup', '<inp2:coup_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('coup', '<inp2:coup_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
- a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
openSelector('coupi', '<inp2:adm_SelectorLink prefix="coupi" selection_mode="multi" tabs_dependant="no" tab_prefixes="p"/>', '');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('coupi')
} ) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
function() {
if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
{
submit_event('coupi', 'OnEntireOrder');
}
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
<inp2:m_if check="coup_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="coup_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="coup_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function edit()
{
// required for correct row selection
}
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="coupi" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_item_td">
<inp2:m_if check="FieldEquals" field="ItemType" value="1">
<inp2:Field field="ProductId" no_special="no_special"/>
<inp2:m_else/>
<inp2:Field field="CategoryId" no_special="no_special"/>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="coupi" IdField="CouponItemId" grid="$grid"/>
<script type="text/javascript">
<inp2:m_if check="coupi_IsEntireOrder" >
a_toolbar.DisableButton('new_item');
</inp2:m_if>
Grids['coupi'].SetDependantToolbarButtons( new Array('delete') );
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="coupi">
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/discounts/discounts_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/discounts/discounts_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/discounts/discounts_list.tpl (revision 12489)
@@ -1,61 +1,61 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discounts_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('d', 'in-commerce/discounts/discount_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('in-commerce:new_discount', '<inp2:m_phrase label="la_ToolTip_New_Discount" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Discount" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('d', 'in-commerce/discounts/discount_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('d')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('d','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('d','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="d" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="d" IdField="DiscountId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['d'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/discounts/gift_certificate_list.tpl (revision 12489)
@@ -1,63 +1,63 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="gc" section="in-commerce:gift-certificates" title_preset="gift_certificates_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('gc', 'in-commerce/discounts/gift_certificate_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('in-commerce:new_discount', '<inp2:m_phrase label="la_ToolTip_NewGiftCertificate" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewGiftCertificate" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('gc', 'in-commerce/discounts/gift_certificate_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('gc')
} ) );
a_toolbar.AddButton( new ToolBarButton('e-mail', '<inp2:m_phrase label="la_ToolTip_SendMail" escape="1"/>', function() {
submit_event('gc', 'OnEmailGiftCertificate');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="gc" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="gc" IdField="GiftCertificateId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['gc'].SetDependantToolbarButtons( new Array('edit','delete','e-mail') );
addLoadEvent(
function() {
<inp2:m_if check="m_Recall" name="print_certificate_id">
openSelector('gc', '<inp2:gc_PrintLink template="in-commerce/discounts/gift_certificate_print" no_amp="1"/>');
</inp2:m_if>
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/img/logo_bg.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/logo_bg.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_option.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_option.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_product.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_product.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_goto_order_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_goto_order_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_goto_order_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_goto_order_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_option_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_option_f2.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_option_f3.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_option_f3.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_product_f2.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_new_product_f2.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_goto_order.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/toolbar/tool_goto_order.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.2
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_pending.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan_primary.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_payment.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_payment.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_pending.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon_payment__pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon_payment__pending.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_currency_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_currency_primary.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_shipping_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_shipping_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_orders_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_orders_pending.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_entire_order.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_entire_order.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_shipping.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_payment_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_payment_primary.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_custom.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_custom.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_pricing.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_pricing.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_orders_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_orders_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_discount_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_discount_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_pricing_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_pricing_primary.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_payment_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_payment_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_discount_pending.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_discount_pending.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_reciprocal.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_tax.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_tax.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_currency_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_currency_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_currency.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_currency.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_orders.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_disabled.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_disabled.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_primary.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_payment_type_primary.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_affiliate_plan.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_manuf.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_manuf.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_relation_one-way.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_discount.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_discount.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_item.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_item.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_primary.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_primary.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_products.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_products.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_pending.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_pending.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_disabled.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_disabled.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_disabled.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_disabled.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_new.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/itemicons/icon16_product_new.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_affiliates.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_affiliates.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_payment_types.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_currencies.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_currencies.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_in-commerce.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_manufacturers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_manufacturers.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_payment_types.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_manufacturers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_manufacturers.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_payment_types.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_affiliate_plans.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_affiliate_plans.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_affiliates.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_affiliates.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_affiliates.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_affiliates.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_visits.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_visits.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_orders.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_orders.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_manufacturers.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_manufacturers.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_discounts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_discounts.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_shipping.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_download_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_download_log.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_download_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_download_log.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_settings_contacts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_settings_contacts.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_download_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_download_log.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_taxes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_taxes.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_payment_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_payment_log.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_in-commerce.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_in-commerce.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_in-commerce.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_payment_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_payment_log.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_visits.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_visits.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_summary_logs.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_summary_logs.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.4.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_discounts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_discounts.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_payment_log.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_payment_log.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_summary_logs.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_summary_logs.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.4.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_summary_logs.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_summary_logs.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.4.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_discounts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_discounts.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_shipping.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_shipping.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_shipping.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_settings_contacts.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_settings_contacts.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_taxes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_taxes.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_products.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_products.gif
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_taxes.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_taxes.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_affiliate_payment_types.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_affiliate_payment_types.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_products.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_products.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_currencies.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_currencies.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_orders.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_list_orders.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_currencies.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon46_currencies.gif
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_manufacturers.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_manufacturers.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_discounts_coupons.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_discounts_coupons.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_shipping.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_shipping.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_taxes.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_taxes.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_orders.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_orders.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_ecommerce.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_ecommerce.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_ecommerce_general.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_ecommerce_general.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_sales_report.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_sales_report.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_products.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_products.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_ecommerce.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_ecommerce.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_payment_types.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_payment_types.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_affiliates.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_affiliates.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_currencies.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_currencies.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_download_log.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_download_log.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_transactions.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_transactions.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_contact_info.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/5.0.x/in-commerce/admin_templates/img/icons/icon24_conf_contact_info.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_list.tpl (revision 12489)
@@ -1,104 +1,104 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="payment_type_list" pagination="1"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('pt', 'in-commerce/payment_type/payment_type_edit');
}
var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('in-commerce:new_paymenttype', '<inp2:m_phrase label="la_ToolTip_NewPaymentType" escape="1"/>',
+ a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_NewPaymentType" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('pt', 'in-commerce/payment_type/payment_type_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('pt')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
- a_toolbar.AddButton( new ToolBarButton('primary_paymenttype', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('setprimary', '<inp2:m_phrase label="la_ToolTip_setPrimary" escape="1"/>', function() {
submit_event('pt','OnSetPrimary');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('pt','OnMassApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('pt','OnMassDecline');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
submit_event('pt','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('pt','OnMassMoveDown');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="pt" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="payment_caption_td">
<inp2:Field field="$field" grid="$grid"/>
<span class="priority"><inp2:m_if check="FieldEquals" field="Priority" value="0"><inp2:m_else/><sup><inp2:Field field="Priority" /></sup></inp2:m_if></span>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="primary_type_delete_error">
<script type="text/javascript">
alert('<inp2:m_Phrase label="la_error_CannotDeletePaymentType"/>');
</script>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="pt" IdField="PaymentTypeId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
- Grids['pt'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','primary_paymenttype') );
+ Grids['pt'].SetDependantToolbarButtons( new Array('edit', 'delete', 'approve', 'decline', 'setpaymenttype', 'move_up', 'move_down') );
</script>
<inp2:m_DefineElement name="remove_unused_warning">
<input type="hidden" name="unused_ids" id="unused_ids" value="<inp2:m_param name="unused_ids" />">
<script type="text/javascript">
if(inpConfirm('<inp2:m_phrase label="la_WarningCurrenciesNotUsed" />: <inp2:m_param name="unused_iso" />. <inp2:m_phrase label="la_WarningRemoveUnusedCurrencies" />?'))
{
submit_event('curr', 'OnDisableUnused');
}
</script>
</inp2:m_DefineElement>
<inp2:curr_DisableUnusedWarning block="remove_unused_warning" />
<inp2:pt_DeleteError block="primary_type_delete_error"/>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_groups.tpl (revision 12489)
@@ -1,119 +1,119 @@
<inp2:adm_SetPopupSize width="790" height="520"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="group_list" tab_preset="Default"/>
<!-- 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('<inp2:pt_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
submit_event('pt','<inp2:pt_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('pt','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('pt', '<inp2:pt_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('pt', '<inp2:pt_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="pt_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="pt_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="pt_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
function go_to_tab(prefix_special, tab)
{
set_hidden_field(prefix_special+'_GoTab', tab);
document.getElementById('<inp2:pt_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
submit_event(prefix_special,'OnPreSaveAndGoToTab',null);
}
function go_to_id(prefix_special, id)
{
set_hidden_field(prefix_special+'_GoId', id);
document.getElementById('<inp2:pt_InputName field="PortalGroups"/>').value = select_to_string('selected_groups');
submit_event(prefix_special,'OnPreSaveAndGo')
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:pt_SaveWarning name="grid_save_warning"/>
<inp2:pt_ErrorWarning name="form_error_warning"/>
-<inp2:m_RenderElement name="inp_edit_hidden" prefix="pt" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="pt" field="PortalGroups" title="!la_fld_UserGroups!" size="40"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_label" prefix="pt" field="PaymentTypeId" title="!la_fld_Id!"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
- <inp2:m_phrase label="la_fld_Groups"/>:
+ <inp2:m_phrase label="la_fld_UserGroups"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<table style="width: 300px">
<tr>
<td>
<inp2:m_DefineElement name="group_option">
<option value="<inp2:m_param name="GroupId"/>"><inp2:m_param name="Name"/></option>
</inp2:m_DefineElement>
<inp2:m_phrase label="la_fld_SelectedGroups"/>
- <select id="selected_groups" name="selected_groups[]" multiple="multiple" size="20" style="width: 200px">
+ <select id="selected_groups" name="selected_groups[]" multiple="multiple" size="15" style="width: 200px">
<inp2:pt_ListGroups mode="selected" render_as="group_option"/>
</select>
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_groups', 'selected_groups'); select_sort('selected_groups')" 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('selected_groups', 'available_groups'); select_sort('available_groups');" class="button">
</td>
<td>
<inp2:m_phrase label="la_fld_AvailableGroups"/>
- <select id="available_groups" name="available_groups[]" multiple="multiple" size="20" style="width: 200px">
+ <select id="available_groups" name="available_groups[]" multiple="multiple" size="15" style="width: 200px">
<inp2:pt_ListGroups render_as="group_option"/>
</select>
</td>
</tr>
</table>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl
===================================================================
--- branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl (revision 12488)
+++ branches/5.0.x/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl (revision 12489)
@@ -1,136 +1,136 @@
<inp2:adm_SetPopupSize width="790" height="520"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="gateway" tab_preset="Default"/>
<inp2:m_DefineElement name="GatewayFieldsDiv">
<inp2:m_RenderElement name="grid_data_td" />
</inp2:m_DefineElement>
<inp2:m_DefineElement name="dummy">
</inp2:m_DefineElement>
<!-- 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() {
submit_event('pt','<inp2:pt_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('pt','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('pt', '<inp2:pt_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('pt', '<inp2:pt_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="pt_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="pt_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="pt_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
function refresh_fields() {
var $dropdown=document.getElementById('pt[<inp2:m_get name="pt_id" />][GatewayId]');
var $table=document.getElementById('gateway_fields');
var $display_style='';
var $i=0;
if (is.gecko || !is.ie) {
on_style = 'table-row';
}
else {
on_style = 'block';
}
while($i<$table.rows.length)
{
$row=$table.rows[$i];
if( isset($row.getAttribute('GatewayId')) )
{
$display_style=($row.getAttribute('GatewayId') == $dropdown.options[$dropdown.selectedIndex].value) ? on_style : 'none';
// alert('current display is '+$row.style.display+' setting it to '+$display_style);
$row.style.display = $display_style;
// alert('set');
}
$i++;
}
}
</script>
<inp2:m_DefineElement name="gw_input_text">
- <input type="text" name="<inp2:gwf_InputName field="Value"/>" id="<inp2:gwf_InputName field="Value"/>" value="<inp2:gwf_gwConfigValue/>" tabindex="<inp2:m_get param="tab_index"/>">
+ <input type="text" name="<inp2:gwf_InputName field="Value"/>" id="<inp2:gwf_InputName field="Value"/>" value="<inp2:gwf_gwConfigValue/>" tabindex="<inp2:m_get param="tab_index"/>" style="width:80%">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="gw_input_select">
<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:gwf_InputName field="Value"/>" id="<inp2:gwf_InputName field="Value"/>">
<inp2:PredefinedOptions field="Value" block="inp_option_phrase" selected="selected"/>
</select>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="gw_input_checkbox">
<input type="hidden" id="<inp2:gwf_InputName field="Value"/>" name="<inp2:gwf_InputName field="Value"/>" value="<inp2:gwf_gwConfigValue/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:gwf_InputName field="Value"/>" name="_cb_<inp2:gwf_InputName field="Value"/>" <inp2:gwf_gwConfigValue checked="checked"/> class="<inp2:m_param name="class"/>" onchange="update_checkbox(this, document.getElementById('<inp2:gwf_InputName field="Value"/>'));">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="gateway_field">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>" GatewayId="<inp2:m_param name="gateway_id"/>" style="display: <inp2:m_param name="display"/>;">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:gwf_Field field="FieldName"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<inp2:m_RenderElement name="$input_block" pass_params="true"/>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:gwf_initGWConfigValues/>
<inp2:pt_SaveWarning name="grid_save_warning"/>
<inp2:pt_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form" id="gateway_fields">
<inp2:m_RenderElement name="inp_edit_options" prefix="pt" field="GatewayId" title="!la_fld_Gateway!" onchange="refresh_fields()"/>
<inp2:gwf_PrintList block="gateway_field" input_block_prefix="gw_input_" per_page="-1"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.0.x/in-commerce/install/upgrades.sql
===================================================================
--- branches/5.0.x/in-commerce/install/upgrades.sql (revision 12488)
+++ branches/5.0.x/in-commerce/install/upgrades.sql (revision 12489)
@@ -1,60 +1,60 @@
# ===== v 4.3.9 =====
INSERT INTO ImportScripts VALUES (DEFAULT, 'Products from CSV file [In-Commerce]', '', 'p', 'In-Commerce', '', 'CSV', '1');
ALTER TABLE Products ADD OnSale TINYINT(1) NOT NULL default '0' AFTER Featured, ADD INDEX (OnSale);
UPDATE Phrase SET Module = 'In-Commerce' WHERE Phrase IN ('lu_comm_Images', 'lu_comm_ImagesHeader');
# ===== v 5.0.0 =====
UPDATE Category SET Template = '/in-commerce/designs/section' WHERE Template = 'in-commerce/store/category';
UPDATE Category SET CachedTemplate = '/in-commerce/designs/section' WHERE CachedTemplate = 'in-commerce/store/category';
UPDATE ConfigurationValues SET VariableValue = '/in-commerce/designs/section' WHERE VariableName = 'p_CategoryTemplate';
UPDATE ConfigurationValues SET VariableValue = 'in-commerce/designs/detail' WHERE VariableName = 'p_ItemTemplate';
DELETE FROM PersistantSessionData WHERE VariableName IN ('affil_columns_.', 'ap_columns_.', 'apayments_columns_.', 'apayments.log_columns_.', 'd_columns_.', 'coup_columns_.', 'file_columns_.', 'po_columns_.', 'z_columns_.', 'tax_columns_.');
DELETE FROM PersistantSessionData WHERE VariableName LIKE '%ord.%';
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:products.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:setting_folder.view', 11, 1, 1, 0);
INSERT INTO ShippingQuoteEngines VALUES (DEFAULT, 'USPS.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";s:0:"";s:15:"AccountPassword";N;s:10:"UPSEnabled";N;s:10:"UPSAccount";s:0:"";s:11:"UPSInvoiced";N;s:10:"FDXEnabled";N;s:10:"FDXAccount";s:0:"";s:10:"DHLEnabled";N;s:10:"DHLAccount";s:0:"";s:11:"DHLInvoiced";N;s:10:"USPEnabled";N;s:10:"USPAccount";s:0:"";s:11:"USPInvoiced";N;s:10:"ARBEnabled";N;s:10:"ARBAccount";s:0:"";s:11:"ARBInvoiced";N;s:10:"1DYEnabled";N;s:10:"2DYEnabled";N;s:10:"3DYEnabled";N;s:10:"GNDEnabled";N;s:10:"ShipMethod";N;}', 'USPS');
INSERT INTO ConfigurationAdmin VALUES ('Comm_CompanyName', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts');
UPDATE ConfigurationAdmin SET prompt = 'la_text_StoreName', DisplayOrder = 10.02 WHERE VariableName = 'Comm_StoreName';
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Name', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL, NULL, 10.03, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Name', '', 'In-Commerce', 'in-commerce:contacts');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Comm_Contacts_Phone';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Comm_Contacts_Fax';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'Comm_Contacts_Email';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'Comm_Contacts_Additional';
-DELETE FROM Phrase WHERE Phrase IN ('la_fld_ManufacturerId', 'la_fld_DiscountId', 'la_fld_CouponId', 'la_fld_AffiliatePlanId', 'la_fld_AffiliateId', 'la_fld_ZoneId', 'la_fld_EngineId', 'la_fld_ShippingId', 'la_fld_ProductId', 'la_fld_OptionId', 'la_fld_CurrencyId');
+DELETE FROM Phrase WHERE Phrase IN ('la_fld_ManufacturerId', 'la_fld_DiscountId', 'la_fld_CouponId', 'la_fld_AffiliatePlanId', 'la_fld_AffiliateId', 'la_fld_ZoneId', 'la_fld_EngineId', 'la_fld_ShippingId', 'la_fld_ProductId', 'la_fld_OptionId', 'la_fld_CurrencyId', 'la_fld_Zone_Name');
UPDATE Phrase SET Module = 'In-Commerce' WHERE ((Phrase LIKE '%Product%' OR Phrase LIKE '%Shipping%' OR Phrase LIKE '%Coupon%' OR Phrase LIKE '%Discount%' OR Phrase LIKE '%Report%' OR Phrase LIKE '%Currency%' OR Phrase LIKE '%Cart%') AND (Module = 'Core'));
# ===== v 5.0.1 =====
UPDATE ConfigurationValues SET VariableValue = 'in-commerce/products/product_detail' WHERE VariableName = 'p_ItemTemplate';
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_Session,2=la_opt_PermanentCookie' WHERE VariableName = 'Comm_AffiliateStorageMethod';
UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
WHERE VariableName IN ('product_OrderProductsByDir', 'product_OrderProductsThenByDir');
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal'
WHERE VariableName = 'Comm_PriceBracketCalculation';
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year'
WHERE VariableName IN ('product_ReviewDelay_Interval', 'product_RatingDelay_Interval');
UPDATE CustomField SET FieldLabel = 'la_fld_cust_p_ItemTemplate', Prompt = 'la_fld_cust_p_ItemTemplate' WHERE FieldName = 'p_ItemTemplate';
UPDATE Events SET Type = 1 WHERE Event = 'BACKORDER.FULLFILL';
UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('product_RatingDelay_Value', 'product_ReviewDelay_Value');
\ No newline at end of file

Event Timeline