Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Sun, Feb 2, 10:46 PM

in-commerce

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/RC/in-commerce/units/affiliate_plans/affiliate_plans_config.php
===================================================================
--- branches/RC/in-commerce/units/affiliate_plans/affiliate_plans_config.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliate_plans/affiliate_plans_config.php (revision 11549)
@@ -1,87 +1,96 @@
<?php
$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! (#ap_recordcount#)"),
+
+ '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! (#api_recordcount#)"),
-
+ 'affiliate_plans_items' => Array('prefixes' => Array('ap','api_List'), 'format' => "#ap_status# '#ap_titlefield#' - !la_title_AffiliatePlansBrackets!"),
+
),
-
+
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/affiliate_plans/affiliate_plans_edit', 'priority' => 1),
+ 'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/affiliate_plans/affiliate_plans_brackets', 'priority' => 2),
+// 'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/affiliate_plans/affiliate_plans_items', 'priority' => 3),
+ ),
+ ),
+
'PermSection' => Array('main' => 'in-commerce:affiliate_plans'),
-
+
'Sections' => Array(
'in-commerce:affiliate_plans' => Array(
'parent' => 'in-commerce:affiliates_folder',
'icon' => 'affiliates',
'label' => 'la_tab_AffiliatePlans',
'url' => Array('t' => 'in-commerce/affiliate_plans/affiliate_plans_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary'),
'priority' => 8.2,
'type' => stTAB,
- ),
+ ),
),
-
+
'TableName' => TABLE_PREFIX.'AffiliatePlans',
-
+
'ListSQLs' => Array('' => 'SELECT * FROM %s'),
'ItemSQLs' => Array('' => 'SELECT * FROM %s'),
- 'SubItems' => Array('apbrackets', /*'api'*/),
- 'ListSortings' => Array(
+ '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(
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td'),
- 'PlanType' => Array( 'title' => 'la_col_PlanType'),
- 'Enabled' => Array( 'title' => 'la_col_Status'),
+ 'AffiliatePlanId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+ 'PlanType' => Array( 'title' => 'la_col_PlanType', 'filter_block' => 'grid_options_filter'),
+ 'Enabled' => Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
),
),
-
+
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliate_plans/affiliate_plans_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.28
\ No newline at end of property
+1.28.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php (revision 11549)
@@ -1,30 +1,37 @@
<?php
class AffiliatePlansItemsTagProcessor extends kDBTagProcessor {
function IsEntireOrder($params)
{
- $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List',$params);
- $sql = 'SELECT COUNT(*) FROM '.$object->TableName.' WHERE ItemType=0 AND AffiliatePlanId='.$this->Application->GetVar('ap_id');
+ $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+ if ($this->Application->IsTempMode($this->Prefix)) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
+
+ $sql = 'SELECT COUNT(*)
+ FROM ' . $table_name . '
+ WHERE (ItemType = 0) AND (AffiliatePlanId = ' . $this->Application->GetVar('ap_id') . ')';
return $this->Conn->GetOne($sql);
}
-
+
function ItemIcon($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
if($object->GetDBField('ItemType') == 2)
{
$cat_object =& $this->Application->recallObject('c');
$cat_object->Load( $object->GetDBField('CategoryId') );
$cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
return $cat_tag_processor->ItemIcon();
}
else
{
return parent::ItemIcon($params);
- }
+ }
}
-
+
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliate_plans_items/affiliate_plans_items_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.2.8.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/gateways/gw_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/gateways/gw_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/gateways/gw_tag_processor.php (revision 11549)
@@ -1,101 +1,103 @@
<?php
class GatewayTagProcessor extends kDBTagProcessor {
/**
* Payment gateway config values for current payment type
*
* @var Array
* @access private
*/
var $ConfigValues=Array();
/**
* Payment type id for current gateway values
*
* @var int
* @access private
*/
var $PaymentTypeID=0;
function initGWConfigValues()
{
$payment_type_id = $this->Application->GetVar('pt_id');
$GWConfigValue =& $this->Application->recallObject('gwfv');
$sql = 'SELECT Value, GWConfigFieldId FROM '.$GWConfigValue->TableName.' WHERE PaymentTypeId = '.$payment_type_id;
$this->ConfigValues = $this->Conn->GetCol($sql,'GWConfigFieldId');
}
function gwConfigValue($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
$id = $object->GetID();
$value = isset($this->ConfigValues[$id]) ? $this->ConfigValues[$id] : '';
if( !$this->HasParam($params, 'no_special') ) $value = htmlspecialchars($value);
if( getArrayValue($params,'checked' ) ) $value = ($value == 1) ? 'checked' : '';
return $value;
}
function PrintList($params)
{
$list =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List', $params);
$id_field = $this->Application->getUnitOption($this->Prefix,'IDField');
$list->Query();
$list->GoFirst();
$block_params=$this->prepareTagParams($params);
$block_params['name']=$params['block'];
$block_params['pass_params']='true';
$payment_type_object =& $this->Application->recallObject('pt');
+ $o = '';
+
while (!$list->EOL())
{
$this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) );
$display_style = $payment_type_object->GetDBField('GatewayId') == $list->GetDBField('GatewayId') ? 'table-row' : 'none';
$block_params['input_block'] = $params['input_block_prefix'].$list->GetDBField('ElementType');
$block_params['gateway_id'] = $list->GetDBField('GatewayId');
$block_params['display'] = $display_style;
- $o.= $this->Application->ParseBlock($block_params, 1);
+ $o .= $this->Application->ParseBlock($block_params, 1);
$list->GoNext();
}
return $o;
}
function PredefinedOptions($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
$value = $this->gwConfigValue($params);
$options = explode(',', $object->GetDBField('ValueList') );
$block_params = $this->prepareTagParams($params);
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['pass_params'] = 'true';
$o = '';
foreach ($options as $key_val)
{
list($key,$val) = explode('=', $key_val);
$block_params['key'] = $key;
$block_params['option'] = $val;
$block_params['selected'] = ( $key == $value ? ' '.$params['selected'] : '');
$block_params['PrefixSpecial'] = $this->getPrefixSpecial();
$o .= $this->Application->ParseBlock($block_params, 1);
}
return $o;
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/gateways/gw_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/downloads/downloads_config.php
===================================================================
--- branches/RC/in-commerce/units/downloads/downloads_config.php (revision 11548)
+++ branches/RC/in-commerce/units/downloads/downloads_config.php (revision 11549)
@@ -1,96 +1,96 @@
<?php
$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! (#down_recordcount#)",
+ '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_no_icon'),
- 'Username' => Array( 'title'=>'la_col_Username' ),
- 'ProductName' => Array( 'title'=>'la_col_DownloadedProductName' ),
- 'Filename' => Array( 'title'=>'la_col_DownloadedFileName' ),
- 'IPAddress' => Array( 'title'=>'la_col_IPAddress' ),
- 'StartedOn' => Array( 'title'=>'la_col_StartedOn' ),
+ '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'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/downloads/downloads_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12
\ No newline at end of property
+1.12.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/product_options/product_options_config.php
===================================================================
--- branches/RC/in-commerce/units/product_options/product_options_config.php (revision 11548)
+++ branches/RC/in-commerce/units/product_options/product_options_config.php (revision 11549)
@@ -1,80 +1,81 @@
<?php
$config = Array(
'Prefix' => 'po',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ProductOptionsEventHandler','file'=>'product_options_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ProductOptionsTagProcessor','file'=>'product_options_tag_processor.php','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
Array('pseudo'=>'kProductOptionsHelper','class'=>'kProductOptionsHelper','file'=>'product_options_helper.php','build_event'=>''),
),
'AutoLoad' => true,
'Hooks' => Array(
),
'AggregateTags' => Array(
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListOptions',
'LocalTagName' => 'ListOptions',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'TitleField' => 'Name',
'IDField' => 'ProductOptionId',
'TableName' => TABLE_PREFIX.'ProductOptions',
'ForeignKey' => 'ProductId',
'ParentTableKey' => 'ProductId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => array('poc'),
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
'ForcedSorting' => Array('Priority' => 'desc'),
)
),
'Fields' => Array (
'ProductOptionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Name' => Array('type' => 'string', 'required' => 1, 'max_len' => 255, 'not_null' => 1, 'default' => '',),
'OptionType' => Array('type' => 'int', 'required' => 1, 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => '!la_EmptyValue!', 1 => '!la_type_select!', 5 => '!la_type_text!', 4 => '!la_type_textarea!', 3 => '!la_type_radio!', 6 => '!la_type_checkbox!' /*, 2 => '!la_type_password!' */), 'not_null' => 1, 'default' => 0),
'Required' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
'Listable' => Array('type' => 'int', 'not_null'=>1, 'default'=>0, 'formatter'=>'kOptionsFormatter', 'use_phrases'=>1, 'options'=>array(0=>'la_No', 1=>'la_Yes')),
'Priority' => Array('type' => 'int', 'not_null'=>1, 'default'=>0),
'Values' => Array ('type' => 'string', 'default' => NULL),
'Prices' => Array ('type' => 'string', 'default' => NULL),
'PriceTypes' => Array ('type' => 'string', 'default' => NULL),
),
'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(
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'option_name_td'),
- 'OptionType' => Array( 'title'=>'la_col_OptionType' ),
- 'Required' => Array( 'title'=>'la_col_Required' ),
- /*'Listable' => Array( 'title'=>'la_col_Listable' ),*/
+ 'ProductOptionId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'option_name_td', 'filter_block' => 'grid_like_filter'),
+ 'OptionType' => Array( 'title'=>'la_col_OptionType', 'filter_block' => 'grid_options_filter'),
+ 'Required' => Array( 'title'=>'la_col_Required', 'filter_block' => 'grid_options_filter'),
+ /*'Listable' => Array( 'title'=>'la_col_Listable', 'filter_block' => 'grid_options_filter'),*/
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/product_options/product_options_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.1
\ No newline at end of property
+1.10.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/units/pricing/pricing_config.php
===================================================================
--- branches/RC/in-commerce/units/pricing/pricing_config.php (revision 11548)
+++ branches/RC/in-commerce/units/pricing/pricing_config.php (revision 11549)
@@ -1,120 +1,120 @@
<?php
$config = Array(
'Prefix' => 'pr',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'PricingEventHandler','file'=>'pricing_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'PricingTagProcessor','file'=>'pricing_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
// for tangible products: pricings are always aranged before saveing product
Array(
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '',
'HookToEvent' => Array('OnPreSave'),
'DoPrefix' => '',
'DoSpecial' => 'tang',
'DoEvent' => 'OnArrange',
),
),
'AggregateTags' => Array(
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'Price',
'LocalTagName' => 'ProductPrice',
),
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListPriceBrackets',
'LocalTagName' => 'Product_ListPriceBrackets',
),
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'HasQuantityPricing',
'LocalTagName' => 'Product_HasQuantityPricing',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'StatusField' => Array('IsPrimary'),
'IDField' => 'PriceId',
'TableName' => TABLE_PREFIX.'ProductsPricing',
'ForeignKey' => 'ProductId',
'ParentTableKey' => 'ProductId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('MinQty' => 'asc'),
)
),
'Fields' => Array(
'PriceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'MinQty' => Array('type' => 'int', 'default' => 0),
'MaxQty' => Array('type' => 'int', 'default' => 0),
'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
'Price' => Array('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
'Negotiated' => Array('type' => 'int', 'default' => 0),
'Points' => Array('type' => 'int', 'default' => 0),
'AccessDuration'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'AccessUnit' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
'Description' => Array('type' => 'string', 'max_len' => 255, 'default' => NULL),
'IsPrimary' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
'GroupId' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
// 'AccessRebillDate' => Array('type'=>'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=>'1', 'default'=>0),
// Customization healtheconomics.org
// 'DurationType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
// 'AccessExpiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter'),
// Customization healtheconomics.org --
),
'VirtualFields' => Array(
),
'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(
- 'MinQty' => Array( 'title'=>'la_col_MinQty', 'data_block' => 'grid_checkbox_td'),
- 'MaxQty' => Array( 'title'=>'la_col_MaxQty' ),
- 'Price' => Array( 'title'=>'la_col_Price' ),
- 'Points' => Array( 'title'=>'la_col_Points' ),
- 'Cost' => Array( 'title'=>'la_col_Cost' ),
- 'Negotiated' => Array( 'title'=>'la_col_Negotiated', 'data_block' => 'negotiated_td' ),
+ 'MinQty' => Array( 'title'=>'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'MaxQty' => Array( 'title'=>'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
+ 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_range_filter'),
+ 'Points' => Array( 'title'=>'la_col_Points', 'filter_block' => 'grid_range_filter'),
+ 'Cost' => Array( 'title'=>'la_col_Cost', 'filter_block' => 'grid_range_filter'),
+ 'Negotiated' => Array( 'title'=>'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
),
),
*/
'Access' => Array(
'Icons' => Array('default'=>'icon16_pricing.gif','0'=>'icon16_pricing.gif','1'=>'icon16_pricing_primary.gif'),
'Fields' => Array(
- 'AccessDuration' => Array( 'title'=>'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td'),
- 'AccessUnit' => Array( 'title'=>'la_col_AccessDurationUnit'),
- 'Description' => Array( 'title'=>'la_col_Description' ),
- 'Price' => Array( 'title'=>'la_col_Price' ),
+ 'AccessDuration' => Array( 'title'=>'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'AccessUnit' => Array( 'title'=>'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
+ 'Description' => Array( 'title'=>'la_col_Description', 'filter_block' => 'grid_like_filter'),
+ 'Price' => Array( 'title'=>'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/pricing/pricing_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.20
\ No newline at end of property
+1.20.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/reports/reports_event_handler.php
===================================================================
--- branches/RC/in-commerce/units/reports/reports_event_handler.php (revision 11548)
+++ branches/RC/in-commerce/units/reports/reports_event_handler.php (revision 11549)
@@ -1,824 +1,819 @@
<?php
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) {
+ function OnUpdateConfig(&$event)
+ {
$report = $this->Application->RecallVar('report_options');
- if (!$report)
- {
- return;
+ if (!$report) {
+ return ;
}
+
$field_values = unserialize($report);
$rep_options = $this->Application->getUnitOptions('rep');
- $new_options = array();
+ $new_options = Array ();
$new_options['TableName'] = $field_values['table_name'];
- $new_options['Fields'] = array(
- 'Qty' => array('formatter'=>'kFormatter', 'format'=>'%d', 'totals' => 'sum'),
- 'Cost' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'Amount' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'Tax' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'Shipping' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'Processing' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'Profit' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
+ $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('formatter'=>'kFormatter', 'format'=>'%d', 'totals' => 'sum'),
- 'StoreAmount' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'StoreProfit' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'eBayQty' => array('formatter'=>'kFormatter', 'format'=>'%d', 'totals' => 'sum'),
- 'eBayAmount' => array('formatter'=>'kFormatter', 'format'=>'%.2f', 'totals' => 'sum'),
- 'eBayProfit' => array('formatter'=>'kFormatter', 'format'=>'%.2f', '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'),
- 'Fields' => Array(
- 'CategoryName' => Array( 'title'=>'la_col_CategoryName' ),
- 'Qty' => Array( 'title'=>'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'StoreQty' => Array( 'title'=>'la_col_StoreQty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'eBayQty' => Array( 'title'=>'la_col_eBayQty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'Cost' => Array( 'title'=>'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Amount' => Array( 'title'=>'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'StoreAmount' => Array( 'title'=>'la_col_StoreGMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'eBayAmount' => Array( 'title'=>'la_col_eBayGMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Tax' => Array( 'title'=>'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Shipping' => Array( 'title'=>'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Processing' => Array( 'title'=>'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Profit' => Array( 'title'=>'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'StoreProfit' => Array( 'title'=>'la_col_StoreProfit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'eBayProfit' => Array( 'title'=>'la_col_eBayProfit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
+ $new_options['Grids']['Default'] = Array (
+ 'Icons' => Array ('default' => 'icon16_custom.gif'),
+ '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'))
- {
+ 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(),
+ $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
+ '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;
+ $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'),
- 'Fields' => Array(
- 'Login' => Array( 'title'=>'la_col_Login' ),
- 'FirstName' => Array( 'title'=>'la_col_FirstName' ),
- 'LastName' => Array( 'title'=>'la_col_LastName' ),
- 'Qty' => Array( 'title'=>'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'Cost' => Array( 'title'=>'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum'),
- 'Amount' => Array( 'title'=>'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Tax' => Array( 'title'=>'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Shipping' => Array( 'title'=>'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Processing' => Array( 'title'=>'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Profit' => Array( 'title'=>'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- ),
- );
+ $new_options['Grids']['Default'] = Array (
+ 'Icons' => Array ('default' => 'icon16_custom.gif'),
+ '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(),
- 'FirstName' => array(),
- 'LastName' => array(),
+ $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(
+ $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'),
- 'Fields' => Array(
- 'ProductName' => Array( 'title'=>'la_col_ProductName' ),
- 'Qty' => Array( 'title'=>'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'StoreQty' => Array( 'title'=>'la_col_StoreQty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'eBayQty' => Array( 'title'=>'la_col_eBayQty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'Cost' => Array( 'title'=>'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Amount' => Array( 'title'=>'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'StoreAmount' => Array( 'title'=>'la_col_StoreGMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'eBayAmount' => Array( 'title'=>'la_col_eBayGMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Tax' => Array( 'title'=>'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Shipping' => Array( 'title'=>'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Processing' => Array( 'title'=>'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum', 'hidden' => 1 ),
- 'Profit' => Array( 'title'=>'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'StoreProfit' => Array( 'title'=>'la_col_StoreProfit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'eBayProfit' => Array( 'title'=>'la_col_eBayProfit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
+
+ $new_options['Grids']['Default'] = Array (
+ 'Icons' => Array ('default' => 'icon16_custom.gif'),
+ '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(),
+ $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(
+
+ $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(
+ $new_options['Fields']['Marketplace'] = Array (
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
1 => 'la_OnlineStore',
2 => 'la_eBayMarketplace',
),
- 'use_phrases'=>1,
- 'default'=>1
+ 'use_phrases' => 1,
+ 'default' => 1
);
$new_options['Grids']['Default'] = Array(
- 'Icons' => Array('default'=>'icon16_custom.gif'),
+ 'Icons' => Array('default' => 'icon16_custom.gif'),
'Fields' => Array(
- 'Marketplace' => Array( 'title'=>'la_col_Marketplace'),
- 'Qty' => Array( 'title'=>'la_col_Qty', 'td_style' => 'text-align: center', 'total' => 'sum'),
- 'Cost' => Array( 'title'=>'la_col_Cost', 'td_style' => 'text-align: right', 'total' => 'sum'),
- 'Amount' => Array( 'title'=>'la_col_GMV', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Tax' => Array( 'title'=>'la_col_Tax', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Shipping' => Array( 'title'=>'la_col_Shipping', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Processing' => Array( 'title'=>'la_col_Processing', 'td_style' => 'text-align: right', 'total' => 'sum' ),
- 'Profit' => Array( 'title'=>'la_col_Profit', 'td_style' => 'text-align: right', 'total' => 'sum' ),
+ '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)
{
$width = 800;
}
$height = $event->getEventParam('height');
if ($height == 0)
{
$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)
{
$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);
$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
Property changes on: branches/RC/in-commerce/units/reports/reports_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.2
\ No newline at end of property
+1.1.4.3
\ No newline at end of property
Index: branches/RC/in-commerce/units/reports/reports_config.php
===================================================================
--- branches/RC/in-commerce/units/reports/reports_config.php (revision 11548)
+++ branches/RC/in-commerce/units/reports/reports_config.php (revision 11549)
@@ -1,119 +1,124 @@
<?php
$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,
- 'hooks' => Array(),
+
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode', // 't' for temp '' for normal
),
- /* 'IDField' => '',
- 'StatusField' => Array(),
- 'TitleField' => '',
- 'TableName' => '',
- 'SubItems' => Array(),*/
'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',
'label' => 'la_tab_SaleReports',
'url' => Array('t' => 'in-commerce/reports/reports', 'pass' => 'm,rep', 'rep_event'=>'OnNew'),
'permissions' => Array('view', 'add'),
'priority' => 20,
'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_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Fields' => Array(
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td' ),
- 'Start_formatted' => Array( 'title'=>'la_col_Start', 'sort_field' => 'Start' ),
- 'End_formatted' => Array( 'title'=>'la_col_End', 'sort_field' => 'End' ),
- 'GroupId' => Array( 'title'=>'la_col_Group' ),
- 'Type' => Array( 'title'=>'la_col_Type' ),
- 'Amount' => Array( 'title'=>'la_col_Amount' ),
+ '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
Property changes on: branches/RC/in-commerce/units/reports/reports_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.2
\ No newline at end of property
+1.1.4.3
\ No newline at end of property
Index: branches/RC/in-commerce/units/reports/reports_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/reports/reports_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/reports/reports_tag_processor.php (revision 11549)
@@ -1,430 +1,430 @@
<?php
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))
+ if (count($a_data) > 7)
{
// gather ids for "others" call
$ids = join(',', array_keys($a_data));
$sql = 'SELECT
- SUM('.$a_expressions[$metric].')
+ 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_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))
+ if (count($a_data) > 7)
{
// gather ids for "others" call
$ids = join(',', array_keys($a_data));
$sql = 'SELECT
- SUM('.$a_expressions[$metric].')
+ 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_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
Property changes on: branches/RC/in-commerce/units/reports/reports_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.3
\ No newline at end of property
+1.1.4.4
\ No newline at end of property
Index: branches/RC/in-commerce/units/brackets/brackets_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/brackets/brackets_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/brackets/brackets_tag_processor.php (revision 11549)
@@ -1,184 +1,187 @@
<?php
class BracketsTagProcessor extends kDBTagProcessor {
function Field($params)
{
$value = parent::Field($params);
- if ( ($params['field'] == 'Start' || $params['name'] == 'End') && $value == -1)
+
+ if ( ($params['field'] == 'Start' || $params['name'] == 'End') && $value == -1) {
$value = '&#8734;';
+ }
+
return $value;
}
function ShowBracketsForm($params)
{
$shipping_object =& $this->Application->recallObject('s');
$default_start = ($shipping_object->GetDBField('Type') == 1) ? 0 : 1;
$brackets_helper =& $this->Application->recallObject('BracketsHelper');
/* @var $brackets_helper kBracketsHelper */
$brackets_helper->InitHelper('Start', 'End', Array(), $default_start );
$br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
$event = new kEvent($this->getPrefixSpecial(true) . ':OnArrange');
$br_data = $brackets_helper->getBrackets($event);
$linked_info = $br_object->getLinkedInfo($this->Special);
if (!$br_data) {
$sql = 'SELECT * FROM '.$br_object->TableName.' WHERE '.$linked_info['ForeignKey'].' = '.$linked_info['ParentId'];
$brackets = $this->Conn->Query($sql, $br_object->IDField);
usort($brackets, Array(&$brackets_helper, 'compareBrackets'));
$dummy =& $this->Application->recallObject($this->Prefix.'.-dummy', null, array('skip_autoload' => true));
/* @var $dummy kDBItem */
// performs number formatting
foreach($brackets as $id => $values)
{
foreach($values as $value_key=>$value_val){
$dummy->SetDBField($value_key, $value_val);
$brackets[$id][$value_key] = $dummy->GetField($value_key);
}
}
$br_data = $brackets;
$brackets_helper->setBrackets($event, $brackets);
}
else {
usort($br_data, Array(&$brackets_helper, 'compareBrackets'));
$br_data = $brackets_helper->formatBrackets($br_data);
}
$ret = '';
if ( is_array($br_data) ) {
$block_params = $this->prepareTagParams($params);
$block_params['IdField'] = $br_object->IDField;
$block_params['name'] = $params['block'];
$first = true;
$main_object =& $this->Application->recallObject($linked_info['ParentPrefix'].'.'.$this->Special);
// $plan_type = $main_object->GetDBField('PlanType');
// $limits_format = ($plan_type == 2) ? '%d' : $br_object->Fields['Start']['format'];
// this is needed to find next id
$br_data_copy = $br_data;
foreach($br_data as $id => $values)
{
foreach($values as $value_key => $value_val)
{
$block_params[$value_key] = $value_val;
}
reset($values);
next($br_data_copy);
$next_bracket = current($br_data_copy);
// $values['Start'] = sprintf($limits_format, $values['Start']);
// $values['End'] = sprintf($limits_format, $values['End']);
$block_params['id'] = $values[$br_object->IDField];
$block_params['min'] = ($id == -1) ? ($values['Start'] ? $values['Start'] : 0) : $values['Start'];
$block_params['max'] = ($values['End'] == -1) ? '&#8734;' : $values['End'];
$block_params['next_min_id'] = $next_bracket[$br_object->IDField];
$lang_object =& $this->Application->recallObject('lang.current');
if($lang_object->GetDBField('UnitSystem') == 2 && $main_object->GetDBField('Type') == 1)
{
if($block_params['min'] === '')
{
$block_params['min_a'] = '';
$block_params['min_b'] = '';
}
else
{
list($block_params['min_a'], $block_params['min_b']) = Kg2Pounds($block_params['min']);
}
if($block_params['max'] == '&#8734;')
{
$block_params['max_a'] = '&#8734;';
$block_params['max_b'] = '';
}
else
{
list($block_params['max_a'], $block_params['max_b']) = Kg2Pounds($block_params['max']);
}
}
if($first)
{
$block_params['first'] = 1;
$first = false;
}
else
{
$block_params['first'] = 0;
}
$ret .= $this->Application->ParseBlock($block_params, 1);
}
}
return $ret;
}
/*function ShowBracketsForm($params)
{
$br_object =& $this->Application->recallObject( $this->getPrefixSpecial() );
$br_data = $this->Application->GetVar('br');
if(!$br_data)
{
$sql = 'SELECT * FROM '.$br_object->TableName.
' WHERE ShippingTypeID = '.$this->Application->GetVar('s_id');
$brackets = $this->Conn->Query($sql, 'BracketId');
usort($brackets, 'bracket_comp');
$br_data = array_reverse($brackets);
$this->Application->SetVar('br', $br_data);
}
else
{
$br_data = array_reverse($br_data);
}
$ret = '';
if( is_array($br_data) )
{
$i = -count($br_data);
ksort($br_data);
foreach($br_data as $record)
{
$temp_sorted[$i] = $record;
$i++;
}
$br_data = array_reverse($temp_sorted, true);
$block_params['name'] = $params['block'];
$first = true;
foreach($br_data as $id => $values)
{
$block_params['id'] = $id;
$block_params['start'] = ($id == -1) ? ($values['Start'] ? $values['Start'] : 0) : $values['Start'];
$block_params['end'] = ($values['End'] == -1) ? '&infin;' : $values['End'];
if ($first)
{
$block_params['first'] = 1;
$first = false;
}
else
{
$block_params['first'] = 0;
}
$ret .= $this->Application->ParseBlock($block_params);
}
}
return $ret;
}*/
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/brackets/brackets_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12.2.1
\ No newline at end of property
+1.12.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php
===================================================================
--- branches/RC/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (revision 11548)
+++ branches/RC/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php (revision 11549)
@@ -1,54 +1,53 @@
<?php
class PaymentTypeCurrenciesEventHandler extends kDBEventHandler {
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnCreate(&$event)
{
- if($currency_id_list = $this->Application->GetVar( 'currency_list' ))
- {
- $object =& $event->getObject( Array('skip_autoload' => true) );
- $this->Application->setUnitOption('pt','AutoLoad',true);
- $payment_type_object =& $this->Application->recallObject('pt');
- $parent_info = $object->getLinkedInfo();
- $pt_id = $parent_info['ParentId'];
-
- if(!$pt_id) return;
-
- $sql = 'DELETE FROM '.$object->TableName.' WHERE PaymentTypeId = '.$pt_id;
- $this->Conn->Query($sql);
-
-
- if($currency_id_list)
- {
- foreach($currency_id_list as $id)
- {
- $object->SetDBField('CurrencyId', $id);
- $object->SetDBField('PaymentTypeId', $pt_id);
- $this->customProcessing($event,'before');
-
- if( $object->Create() )
- {
- if ( $object->IsTempTable() ) $object->setTempID();
- $this->customProcessing($event,'after');
- $event->status=erSUCCESS;
- }
- else
- {
- $event->status=erFAIL;
- $event->redirect=false;
- $this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
- $object->setID(0);
- }
+ $currency_id_list = $this->Application->GetVar('currency_list');
+
+ if (!$currency_id_list) {
+ return ;
+ }
+
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ $pt_id = $this->Application->GetVar('pt_id');
+
+ if ($pt_id === false) {
+ return ;
+ }
+
+ $sql = 'DELETE FROM ' . $object->TableName . '
+ WHERE PaymentTypeId = ' . $pt_id;
+ $this->Conn->Query($sql);
+
+ foreach ($currency_id_list as $id) {
+ $object->SetDBField('CurrencyId', $id);
+ $object->SetDBField('PaymentTypeId', $pt_id);
+ $this->customProcessing($event, 'before');
+
+ if ( $object->Create() ) {
+ if ( $object->IsTempTable() ) {
+ $object->setTempID();
}
+
+ $this->customProcessing($event, 'after');
+ $event->status = erSUCCESS;
+ }
+ else {
+ $event->status = erFAIL;
+ $event->redirect = false;
+ $this->Application->SetVar($event->Prefix_Special . '_SaveEvent', 'OnCreate');
+ $object->setID(0);
}
}
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/payment_type_currencies/payment_type_currencies_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/files/files_config.php
===================================================================
--- branches/RC/in-commerce/units/files/files_config.php (revision 11548)
+++ branches/RC/in-commerce/units/files/files_config.php (revision 11549)
@@ -1,103 +1,104 @@
<?php
$config = Array(
'Prefix' => 'file',
'ItemClass' => Array('class'=>'FilesItem','file'=>'files.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'FilesEventHandler','file'=>'files_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array(
Array(
'AggregateTo' => '#PARENT#',
'AggregatedTagName' => 'ListFiles',
'LocalTagName' => 'PrintList',
'LocalSpecial' => 'downl',
),
),
'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',
),
'StatusField' => Array('Status', 'IsPrimary'),
'IDField' => 'FileId',
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductFiles',
'ForeignKey' => 'ProductId',
'ParentTableKey' => 'ProductId',
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array( ''=>'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'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' ),
)
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('IsPrimary' => 'desc','Priority' => 'desc'),
'Sorting' => Array('AddedOn' => 'desc','Version' => 'desc'),
)
),
'Fields' => Array(
'FileId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array('type' => 'string','not_null' => '1','default' => ''),
'Version' => Array('type' => 'string','not_null' => '1','default' => ''),
'FilePath' => Array('type' => 'string','not_null' => '1','default' => ''),
'RealPath' => Array('type' => 'string', 'not_null' => 1, 'formatter'=>'kUploadFormatter', 'skip_empty'=>1, 'default' => '', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0, 'size_field' => 'Size', 'orig_name_field' => 'FilePath', 'content_type_field' => 'MIMEType', 'max_size' => 50000000,
'error_msgs' => Array( 'bad_file_format' => '!la_error_InvalidFileFormat!',
'bad_file_size' => '!la_error_FileTooLarge!',
'cant_save_file' => '!la_error_cant_save_file!'
)
),
'Size' => Array('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'IsPrimary' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'AddedOn' => Array('type' => 'int','formatter' => 'kDateFormatter','not_null' => '1','default' => '#NOW#'),
'AddedById' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'MIMEType' => Array('type' => 'string','not_null' => '1','default' => ''),
),
'VirtualFields' => Array(
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif', '1_0' => 'icon16_file.gif', '1_1' => 'icon16_file_primary.gif', '0_0' => 'icon16_file_disabled.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
'Fields' => Array(
- 'Name' => Array( 'title'=>'la_col_FileName', 'data_block' => 'file_caption_td', 'module' => 'In-Portal'),
- 'FilePath' => Array( 'title'=>'la_col_FilePath' ),
- 'Version' => Array( 'title'=>'la_col_Version' ),
- 'Size' => Array( 'title'=>'la_col_Size' ),
- 'AddedOn' => Array( 'title'=>'la_col_AddedOn', 'format'=>'_regional_DateFormat' ),
+ 'FileId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title'=>'la_col_FileName', 'data_block' => 'file_caption_td', 'filter_block' => 'grid_like_filter'),
+ 'FilePath' => Array( 'title'=>'la_col_FilePath', 'filter_block' => 'grid_like_filter'),
+ 'Version' => Array( 'title'=>'la_col_Version', 'filter_block' => 'grid_like_filter'),
+ 'Size' => Array( 'title'=>'la_col_Size', 'filter_block' => 'grid_float_range_filter'),
+ 'AddedOn' => Array( 'title'=>'la_col_AddedOn', 'format'=>'_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/files/files_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12.2.2
\ No newline at end of property
+1.12.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_config.php (revision 11549)
@@ -1,137 +1,139 @@
<?php
$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! (#apayments.log_recordcount#)"),
+ 'payments_log' => Array('prefixes' => Array('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!"),
),
'Sections' => Array(
'in-commerce:paymentlog' => Array(
'parent' => 'in-portal:reports',
'icon' => 'payment_log',
'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','not_null' => '1','default' => ''),
'PaymentReference' => Array('type' => 'string','not_null' => '1','default' => ''),
'PaymentTypeId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT Name, PaymentTypeId FROM '.TABLE_PREFIX.'AffiliatePaymentTypes WHERE Status = 1 ORDER BY IsPrimary DESC, Priority DESC, Name ASC', 'option_key_field'=>'PaymentTypeId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array(
'Username' => Array('type' => 'string'),
'PortalUserId' => Array('type' => 'int'),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_affiliate_payment.gif'),
'Fields' => Array(
- 'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'data_block' => 'grid_checkbox_td'),
- 'Amount' => Array( 'title' => 'la_col_Amount'),
- 'Comment' => Array( 'title' => 'la_col_Comment', 'data_block' => 'grid_cutted_box_td'),
- 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType' ),
- 'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'data_block' => 'grid_cutted_box_td'),
+ 'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter'),
+ 'Amount' => Array( 'title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+ 'Comment' => Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
+ 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
+ 'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
),
),
'Log' => Array(
'Icons' => Array('default'=>'icon16_affiliate_payment.gif'),
'Fields' => Array(
- 'Username' => Array( 'title' => 'la_col_Username', 'data_block' => 'grid_userlink_checkbox_td'),
- 'PaymentDate' => Array( 'title' => 'la_col_PaymentDate'),
- 'Amount' => Array( 'title' => 'la_col_Amount', 'data_block' => 'grid_currency_td'),
- 'Comment' => Array( 'title' => 'la_col_Comment', 'data_block' => 'grid_cutted_box_td'),
- 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType' ),
- 'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'data_block' => 'grid_cutted_box_td'),
+ 'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Username' => Array( 'title' => 'la_col_Username', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
+ 'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter'),
+ 'Amount' => Array( 'title' => 'la_col_Amount', 'data_block' => 'grid_currency_td', 'filter_block' => 'grid_float_range_filter'),
+ 'Comment' => Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
+ 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
+ 'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.17
\ No newline at end of property
+1.17.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php (revision 11549)
@@ -1,46 +1,52 @@
<?php
class AffiliatePaymentsTagProcessor extends kDBTagProcessor {
/**
* Returns url for editing user from current record
*
* @param Array $params
* @return string
*/
function UserLink($params)
{
- $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params );
+ $object =& $this->getObject($params);
$user_id = $object->GetDBField('PortalUserId');
- if($user_id)
- {
- //return $this->Application->HREF('in-commerce/users/users_edit_general','', Array('u_id' => $user_id) );
- $resource_id = $this->Conn->GetOne('SELECT ResourceId FROM '.TABLE_PREFIX.'PortalUser WHERE PortalUserId = '.$user_id);
- return 'javascript:OpenUserEdit('.$resource_id.');';
+
+ if ($user_id) {
+ $url_params = Array (
+ 'm_opener' => 'd',
+ 'u_mode' => 't',
+ 'u_event' => 'OnEdit',
+ 'u_id' => $user_id,
+ 'pass' => 'all,u'
+ );
+
+ return $this->Application->HREF($params['edit_template'], '', $url_params);
}
}
-
+
function ListPayments($params)
- {
+ {
$o = '';
- $params['render_as'] = $params['item_render_as'];
+ $params['render_as'] = $params['item_render_as'];
$o_payments = $this->PrintList($params);
-
+
if ($o_payments)
{
$payments_params = Array('name' => $params['header_render_as']);
$o = $this->Application->ParseBlock($payments_params);
$o .= $o_payments;
}
else
{
$payments_params = array('name' => $params['empty_mypayments_render_as']);
$o = $this->Application->ParseBlock($payments_params);
}
-
- return $o;
+
+ return $o;
}
-
+
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliate_payments/affiliate_payments_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.1.32.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php
===================================================================
--- branches/RC/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php (revision 11549)
@@ -1,88 +1,88 @@
<?php
$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! (#apt_recordcount#)"),
+
+ 'affiliate_payment_types_list' => Array('prefixes' => Array('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"),
'affiliate_payment_types_edit' => Array('prefixes' => Array('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"),
-
+
),
-
+
'PermSection' => Array('main' => 'in-commerce:affiliate_payment_types'),
-
+
'Sections' => Array(
'in-commerce:affiliate_payment_types' => Array(
'parent' => 'in-commerce:affiliates_folder',
'icon' => 'affiliates',
'label' => 'la_tab_AffiliatePaymentTypes',
'url' => Array('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down'),
'priority' => 8.3,
'type' => stTAB,
- ),
+ ),
),
-
+
'TableName' => TABLE_PREFIX.'AffiliatePaymentTypes',
-
+
'ListSQLs' => Array('' => 'SELECT * FROM %s'),
'ItemSQLs' => Array('' => 'SELECT * FROM %s'),
- 'ListSortings' => Array(
+ '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','not_null' => '1','default' => ''),
'IsPrimary' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
),
-
+
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif', '0_0' => 'icon16_affiliate_payment_type_disabled.gif', '1_0' => 'icon16_affiliate_payment_type.gif', '1_1' => 'icon16_affiliate_payment_type_primary.gif'),
'Fields' => Array(
- 'PaymentTypeId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'),
- 'Name' => Array( 'title' => 'la_col_Name', 'data_block' => 'affiliate_payment_type_caption_td'),
- 'Description' => Array( 'title' => 'la_col_Description'),
+ 'PaymentTypeId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title' => 'la_col_Name', 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter'),
+ 'Description' => Array( 'title' => 'la_col_Description', 'filter_block' => 'grid_like_filter'),
),
),
-
+
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliate_payment_types/affiliate_payment_types_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
===================================================================
--- branches/RC/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 11548)
+++ branches/RC/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php (revision 11549)
@@ -1,122 +1,122 @@
<?php
$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'=>'ShippingQuoteCollector','class'=>'ShippingQuoteCollector','file'=>'shipping_quote_collector.php','build_event'=>'','require_classes'=>'ShippingQuoteEngine'),
),
'AutoLoad' => true,
'Hooks' => Array(
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'EngineId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TitlePresets' => Array(
'default' => Array( 'edit_status_labels' => Array('sqe'=>'!la_title_EditingShippingQuoteEngine!'),
),
'engine_list'=>Array( 'prefixes' => Array('sqe_List'),
- 'format' => "!la_title_ShippingQuoteEngines! (#sqe_recordcount#)",
+ 'format' => "!la_title_ShippingQuoteEngines!",
),
'engine_edit'=>Array( 'prefixes' => Array('sqe'),
'format' => "#sqe_status# '#sqe_titlefield#' - !la_title_General!",
),
),
-
+
'PermSection' => Array('main' => 'in-commerce:shipping_quote_engines'),
-
+
'Sections' => Array(
'in-commerce:shipping_quote_engines' => Array(
'parent' => 'in-commerce:shipping_folder',
'icon' => 'shipping',
'label' => 'la_tab_ShippingQuoteEngines',
'url' => Array('t' => 'in-commerce/shipping/shipping_list', 'pass' => 'm'),
'permissions' => Array('view', 'edit', 'advanced:approve', 'advanced:decline'),
'priority' => 5.2,
'type' => stTAB,
),
),
-
+
'TableName' => TABLE_PREFIX.'ShippingQuoteEngines',
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
'ListSQLs' => Array( ''=> 'SELECT * FROM %s'),
// key - special, value - list select sql
'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'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' => ''),
),
'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' ),
- 'Name' => Array( 'title'=>'la_col_ShippingQuoteEngineName' ),
- 'FlatSurcharge' => Array( 'title'=>'la_col_FlatSurcharge' ),
- 'PercentSurcharge' => Array( 'title'=>'la_col_PercentSurcharge' ),
+ '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'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/shipping_quote_engines/shipping_quote_engines_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
===================================================================
--- branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 11548)
+++ branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 11549)
@@ -1,319 +1,360 @@
<?php
class ProductOptionCombinationsEventHandler extends kDBEventHandler{
/**
* Apply custom processing to item
*
* @param kEvent $event
*/
function customProcessing(&$event, $type)
{
if ($type == 'after') {
return true;
}
-
+
switch ($event->Name) {
case 'OnCreate':
case 'OnUpdate':
$object =& $event->getObject();
$options = unserialize($object->GetDBField('Combination'));
ksort($options);
$object->SetDBField('CombinationCRC', crc32(serialize($options)));
break;
case 'OnMassDelete':
// delete only option combinations that has no assiciated inventory
$object =& $event->getObject();
$ids = $event->getEventParam('ids');
$sql = 'SELECT '.$object->IDField.'
FROM '.$object->TableName.'
WHERE ('.$object->IDField.' IN ('.implode(',', $ids).')) AND
(QtyInStock = 0) AND (QtyReserved = 0) AND (QtyBackOrdered = 0) AND (QtyOnOrder = 0)';
$event->setEventParam('ids', $this->Conn->GetCol($sql));
break;
}
}
/**
* GetOptionValues
*
* @param kEvent $event
*/
function GetOptionValues(&$event, $option_id)
{
$object =& $event->getObject();
if ($object->IsTempTable()) {
$table = $this->Application->GetTempName(TABLE_PREFIX.'ProductOptions', 'prefix:'.$event->Prefix);
}
else {
$table = TABLE_PREFIX.'ProductOptions';
}
$query = 'SELECT `Values` FROM '.$table.' WHERE ProductOptionId = '.$option_id;
return explode(',', $this->Conn->GetOne($query));
}
function CreateCombinations(&$event, $fields, $current_option=null)
{
$recursed = false;
$combination = $fields['Combination'];
foreach ($combination as $option_id => $option)
{
if ($option_id == $current_option || $recursed) continue;
if ($option == '_ANY_') {
$recursed = true;
$values = $this->GetOptionValues($event, $option_id);
foreach ($values as $a_value) {
$fields['Combination'][$option_id] = $a_value;
$this->CreateCombinations($event, $fields, $option_id);
}
}
}
if (!$recursed) {
$object =& $event->getObject();
$salt = $fields['Combination'];
ksort($salt);
$object->Load(crc32(serialize($salt)), 'CombinationCRC');
$object->SetFieldsFromHash($fields);
$this->customProcessing($event,'before');
if ($object->Loaded) { // Update if such combination already exists
if( $object->Update() )
{
$this->customProcessing($event,'after');
$event->status=erSUCCESS;
}
}
else {
if( $object->Create($event->getEventParam('ForceCreateId')) )
{
if( $object->IsTempTable() ) $object->setTempID();
$this->customProcessing($event,'after');
$event->status=erSUCCESS;
}
}
}
}
function UpdateCombinations(&$event, $fields, $current_option=null)
{
$recursed = false;
$combination = $fields['Combination'];
foreach ($combination as $option_id => $option)
{
if ($option_id == $current_option || $recursed) continue;
if ($option == '_ANY_') {
$recursed = true;
$values = $this->GetOptionValues($event, $option_id);
foreach ($values as $a_value) {
$fields['Combination'][$option_id] = $a_value;
$this->UpdateCombinations($event, $fields, $option_id);
}
}
}
if (!$recursed) {
$object =& $event->getObject();
$edit_id = $object->GetId();
$salt = $fields['Combination'];
ksort($salt);
// try to load combination by salt - if loaded, it will update the combination
$object->Load(crc32(serialize($salt)), 'CombinationCRC');
if (!$object->Loaded) {
$object->Load($edit_id);
}
$object->SetFieldsFromHash($fields);
$this->customProcessing($event,'before');
if( $object->Update() )
{
$this->customProcessing($event,'after');
$event->status=erSUCCESS;
}
}
}
function OnCreate(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
list($id,$field_values) = each($items_info);
$object->SetFieldsFromHash($field_values);
if (!$object->Validate()) {
$event->status = erFAIL;
$event->redirect = false;
$this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate');
$object->setID($id);
return;
}
$this->CreateCombinations($event, $field_values);
}
}
function OnUpdate(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
foreach($items_info as $id => $field_values)
{
$object->Load($id);
$object->SetFieldsFromHash($field_values);
if (!$object->Validate()) {
$event->status = erFAIL;
$event->redirect = false;
return;
}
$this->UpdateCombinations($event, $field_values);
/*$this->customProcessing($event, 'before');
if( $object->Update($id) )
{
$this->customProcessing($event, 'after');
$event->status=erSUCCESS;
}
else
{
$event->status=erFAIL;
$event->redirect=false;
break;
}*/
}
}
$this->Application->SetVar($event->GetPrefixSpecial().'_id', '');
}
/**
* Builds item (loads if needed)
*
* @param kEvent $event
* @access protected
*/
function OnItemBuild(&$event)
{
$object =& $event->getObject();
$this->dbBuild($object,$event);
$sql = $this->ItemPrepareQuery($event);
$sql = $this->Application->ReplaceLanguageTags($sql);
$object->setSelectSQL($sql);
// 2. loads if allowed
$auto_load = $this->Application->getUnitOption($event->Prefix,'AutoLoad');
$skip_autload = $event->getEventParam('skip_autoload');
if($auto_load && !$skip_autload) $this->LoadItem($event);
$actions =& $this->Application->recallObject('kActions');
$actions->Set($event->Prefix_Special.'_GoTab', '');
$actions->Set($event->Prefix_Special.'_GoId', '');
}
function LoadItem(&$event)
{
$object =& $event->getObject();
$id = $this->getPassedID($event);
if (!$id) {
$event->CallSubEvent('OnNew');
}
else {
if ($object->Load($id) )
{
$actions =& $this->Application->recallObject('kActions');
$actions->Set($event->Prefix_Special.'_id', $object->GetId() );
}
else
{
//$object->setID($id);
}
}
}
/**
* Get's special of main item for linking with subitem
*
* @param kEvent $event
* @return string
*/
function getMainSpecial(&$event)
{
$special = $event->getEventParam('main_special');
if($special === false || $special == '$main_special')
{
$special = $event->Special;
}
if ($special == 'grid') {
$special = '';
}
return $special;
}
function OnBeforeClone(&$event)
{
$event->Init($event->Prefix, '-item');
$object =& $event->getObject();
$options_mapping = $this->Application->GetVar('poc_mapping');
if (!$options_mapping) return;
foreach ($options_mapping as $original => $new)
{
$comb_data = unserialize($object->GetDBField('Combination'));
$n_combs = array();
foreach ($comb_data as $key => $val)
{
$n_key = $key == $original ? $new : $key;
$n_combs[$n_key] = $val;
}
ksort($n_combs);
$n_combs = serialize($n_combs);
$n_crc = crc32($n_combs);
$object->SetDBField('Combination', $n_combs);
$object->SetDBField('CombinationCRC', $n_crc);
}
}
-
+
/**
* Restore back values from live table to temp table before overwriting live with temp
*
* @param kEvent $event
*/
function OnBeforeDeleteFromLive(&$event)
{
// check if product inventory management is via options and then proceed
-
+
$id = $event->getEventParam('id');
$products_table = $this->Application->getUnitOption('p', 'TableName');
$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
-
+
$sql = 'SELECT p.InventoryStatus
FROM '.$products_table.' p
LEFT JOIN '.$table_name.' poc ON poc.ProductId = p.ProductId
WHERE poc.'.$id_field.' = '.$id;
-
- if ($this->Conn->GetOne($sql) == 2) {
+
+ if ($this->Conn->GetOne($sql) == 2) {
$live_object =& $this->Application->recallObject($event->Prefix.'.itemlive', null, Array('skip_autoload' => true));
$live_object->SwitchToLive();
$live_object->Load($id);
-
+
$temp_object =& $this->Application->recallObject($event->Prefix.'.itemtemp', null, Array('skip_autoload' => true));
$temp_object->SwitchToTemp();
$temp_object->Load($id);
-
+
$temp_object->SetDBFieldsFromHash($live_object->FieldValues, Array('QtyInStock','QtyReserved','QtyBackOrdered','QtyOnOrder'));
$temp_object->Update();
}
}
+
+ /**
+ * Create search filters based on search query
+ *
+ * @param kEvent $event
+ * @access protected
+ */
+ function OnSearch(&$event)
+ {
+ parent::OnSearch($event);
+
+ $this->_saveProduct($event);
+ }
+
+ /**
+ * Clear search keywords
+ *
+ * @param kEvent $event
+ * @access protected
+ */
+ function OnSearchReset(&$event)
+ {
+ parent::OnSearchReset($event);
+
+ $this->_saveProduct($event);
+ }
+
+ /**
+ * Makes event remember product id (if passed)
+ *
+ * @param kEvent $event
+ */
+ function _saveProduct(&$event)
+ {
+ $product_id = $this->Application->GetVar('p_id');
+
+ if ($product_id) {
+ $event->SetRedirectParam('p_id', $product_id);
+ }
+ }
+
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/product_option_combinations/product_option_formatters.php
===================================================================
--- branches/RC/in-commerce/units/product_option_combinations/product_option_formatters.php (revision 11548)
+++ branches/RC/in-commerce/units/product_option_combinations/product_option_formatters.php (revision 11549)
@@ -1,102 +1,113 @@
<?php
class kCombinationFormatter extends kFormatter {
function Format($value, $field_name, $object, $format=null)
{
$o = '';
$options = $object->GetFieldOptions($field_name);
if ( isset($format) ) $options['format'] = $format;
$data = unserialize($value);
$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
-
+
$top_prefix = $this->Application->GetTopmostPrefix($object->Prefix);
$use_temp = substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't';
-
+
foreach ($data as $key=>$val) {
$conv_key = $opt_helper->ConvertKey($key, $object->GetDBField('ProductId'),$use_temp);
if (is_array($val)) {
$val = join(',', $val);
}
$o .= sprintf($options['format'], $conv_key['Name'], $val);
}
return $o;
}
function Parse($value, $field_name, &$object)
{
if (!is_array($value)) {
$object->FieldErrors[$field_name]['pseudo'] = 'required';
return '';
}
else {
if (isset($object->Fields[$field_name]['required']) && $object->Fields[$field_name]['required']) {
foreach ($value as $key=>$val)
{
if ($val == '') {
$object->FieldErrors[$field_name]['pseudo'] = 'required';
}
}
}
}
return serialize($value);
}
}
class kCombPriceFormatter extends kFormatter {
+ /**
+ * Enter description here...
+ *
+ * @param mixed $value
+ * @param string $field_name
+ * @param kDBItem $object
+ * @param string $format
+ * @return string
+ */
function Format($value, $field_name, $object, $format=null)
{
- if ($object->Fields[$field_name]['converted']) {
+ $options = $object->GetFieldOptions($field_name);
+ $converted = array_key_exists('converted', $options) ? $options['converted'] : false;
+
+ if ($converted) {
$lang =& $this->Application->recallObject('lang.current');
return $lang->formatNumber($object->GetDBField($field_name), 2);
-// return sprintf($object->Fields[$field_name]['format'], $object->GetDBField($field_name));
}
$data = unserialize($object->GetDBField('Combination'));
$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
$price = $object->GetDBField('BasePrice');
$addition = 0;
-
+
$top_prefix = $this->Application->GetTopmostPrefix($object->Prefix);
$use_temp = substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't';
-
+
foreach ($data as $key=>$val) {
$conv_key = $opt_helper->ConvertKey($key, $object->GetDBField('ProductId'), $use_temp);
$parsed = $opt_helper->ExplodeOptionValues($conv_key);
if (!$parsed) continue;
$conv_prices = $parsed['Prices'];
$conv_price_types = $parsed['PriceTypes'];
if ($conv_price_types[$val] == '$')
{
$addition += $conv_prices[$val];
}
elseif ($conv_price_types[$val] == '%')
{
$addition += $price * $conv_prices[$val] / 100;
}
}
$price += $addition;
$price_type = $object->GetDBField('PriceType');
$price_mod = $object->GetDBField('Price');
switch ($price_type) {
case 1: // = override
$price = $price_mod;
break;
case 2: // flat
$price = $price + $price_mod;
break;
case 3: // percent
$price = $price * (1 + $price_mod / 100);
break;
}
return $price;
}
}
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/product_option_combinations/product_option_formatters.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_config.php
===================================================================
--- branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 11548)
+++ branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_config.php (revision 11549)
@@ -1,113 +1,115 @@
<?php
$config = Array(
'Prefix' => 'poc',
'ItemClass' => Array('class'=>'kPOCItem','file'=>'products_option_combination_item.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ProductOptionCombinationsEventHandler','file'=>'product_option_combinations_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ProductOptionCombinationsTagProcessor','file'=>'product_option_combinations_tag_processor.php','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
Array('pseudo'=>'kCombinationFormatter','class'=>'kCombinationFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
Array('pseudo'=>'kCombPriceFormatter','class'=>'kCombPriceFormatter','file'=>'product_option_formatters.php','build_event'=>'','require_classes'=>'kFormatter'),
),
'AutoLoad' => true,
'Hooks' => Array(
),
'AggregateTags' => Array(
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'TitleField' => 'CombinationId',
'IDField' => 'CombinationId',
'TableName' => TABLE_PREFIX.'ProductOptionCombinations',
'ForeignKey' => array('p' => 'ProductId'),
'ParentTableKey' => array('p' => 'ProductId'),
'ParentPrefix' => 'p',
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = %1$s.ProductId
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing ON '.TABLE_PREFIX.'ProductsPricing.ProductId = %1$s.ProductId AND '.TABLE_PREFIX.'ProductsPricing.IsPrimary = 1
',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Combination' => 'asc'),
'ForcedSorting' => Array('Priority' => 'desc'),
)
),
'Fields' => Array (
'CombinationId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'Combination' => Array('type' => 'string', 'required' => 1, 'formatter' => 'kCombinationFormatter', 'format'=>"%s: %s<br>", 'not_null' => 1, 'default' => '', ),
'CombinationCRC' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'PriceType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
'Price' => Array('type' => 'float', 'required' => 1, 'formatter' => 'kFormatter', 'default' => '', ),
'WeightType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Txt_=', 2 => 'la_Flat', 3 => 'la_Percent'), 'use_phrases' => 1, 'default' => 3, ),
'Weight' => Array('type' => 'float', 'formatter' => 'kFormatter', 'default' => 0, ),
'Availability' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options'=>array(0=>'la_No', 1=>'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1, ),
'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'QtyInStock' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
'QtyReserved' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
'QtyBackOrdered' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
'QtyOnOrder' => Array('type' => 'int', 'not_null' => '1', 'default' => 0),
'SKU' => Array('type' => 'string', 'not_null' => '1', 'default' => ''),
),
'CalculatedFields' => Array(
'' => Array(
'FinalPrice' => 'IF(%1$s.PriceType = 1, %1$s.Price,
IF(%1$s.PriceType = 2, '.TABLE_PREFIX.'ProductsPricing.Price + %1$s.Price,
'.TABLE_PREFIX.'ProductsPricing.Price * (1 + %1$s.Price/100)
)
)',
'BasePrice' => TABLE_PREFIX.'ProductsPricing.Price',
),
),
'VirtualFields' => Array(
'FinalPrice' => Array('formatter'=>'kCombPriceFormatter', 'format' => '%.2f'),
),
'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(
- 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td'),
- 'SKU' => Array( 'title'=>'la_col_SKU' ),
- 'Availability' => Array( 'title'=>'la_col_Availability' ),
- 'Price' => Array( 'title'=>'la_col_Price', 'data_block' => 'price_td' ),
- /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td' ),*/
+ 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'SKU' => Array( 'title'=>'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+ 'Availability' => Array( 'title'=>'la_col_Availability', 'filter_block' => 'grid_options_filter'),
+ 'Price' => Array( 'title'=>'la_col_Price', 'data_block' => 'price_td', 'filter_block' => 'grid_float_range_filter'),
+ /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
),
),
-
+
'Inventory' => Array (
'Icons' => Array ('default' => 'icon16_custom.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+ 'Selector' => 'radio',
'Fields' => Array (
- 'Combination' => Array('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td'),
- 'SKU' => Array('title' => 'la_col_SKU'),
- 'QtyInStock' => Array('title'=>'la_col_QtyInStock'),
- 'QtyReserved' => Array('title'=>'la_col_QtyReserved'),
- 'QtyBackOrdered'=> Array('title'=>'la_col_QtyBackOrdered'),
- 'QtyOnOrder' => Array('title'=>'la_col_QtyOnOrder'),
+ 'Combination' => Array('title' => 'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'SKU' => Array('title' => 'la_col_SKU', 'filter_block' => 'grid_like_filter'),
+ 'QtyInStock' => Array('title'=>'la_col_QtyInStock', 'filter_block' => 'grid_range_filter'),
+ 'QtyReserved' => Array('title'=>'la_col_QtyReserved', 'filter_block' => 'grid_range_filter'),
+ 'QtyBackOrdered'=> Array('title'=>'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
+ 'QtyOnOrder' => Array('title'=>'la_col_QtyOnOrder', 'filter_block' => 'grid_range_filter'),
),
),
'Radio' => Array (
+ 'Selector' => 'radio',
'Icons' => Array('default'=>'icon16_custom.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
'Fields' => Array(
- 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td'),
- 'FinalPrice' => Array( 'title'=>'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary' ),
- /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td' ),*/
+ 'Combination' => Array( 'title'=>'la_col_Combination', 'data_block' => 'grid_combination_td', 'filter_block' => 'grid_empty_filter'),
+ 'FinalPrice' => Array( 'title'=>'la_col_Price', 'data_block' => 'grid_data_td', 'currency' => 'primary', 'filter_block' => 'grid_float_range_filter'),
+ /*'Weight' => Array( 'title'=>'la_col_Weight', 'data_block' => 'weight_td', 'filter_block' => 'grid_float_range_filter'),*/
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/product_option_combinations/product_option_combinations_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/payment_type/payment_type_config.php
===================================================================
--- branches/RC/in-commerce/units/payment_type/payment_type_config.php (revision 11548)
+++ branches/RC/in-commerce/units/payment_type/payment_type_config.php (revision 11549)
@@ -1,119 +1,129 @@
<?php
$config = Array(
'Prefix' => 'pt',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'PaymentTypeEventHandler','file'=>'payment_type_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'PaymentTypeTagProcessor','file'=>'payment_type_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'PaymentTypeId',
'StatusField' => Array('Status', 'IsPrimary'),
'TableName' => TABLE_PREFIX.'PaymentTypes',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('pt'=>'!la_title_AddingPaymentType!'),
'edit_status_labels' => Array('pt'=>'!la_title_EditingPaymentType!'),
'new_titlefield' => Array('pt'=>'!la_title_NewPaymentType!'),
),
'payment_type_list'=>Array( 'prefixes' => Array('pt_List'),
- 'format' => "!la_title_PaymentTypes! (#pt_recordcount#)",
+ 'format' => "!la_title_PaymentTypes!",
),
'payment_type_edit'=>Array( 'prefixes' => Array('pt'),
'new_titlefield' => Array('pt'=>'!la_title_NewPaymentType!'),
'format' => "#pt_status# '#pt_titlefield#' - !la_title_General!",
),
'gateway' => Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Gateway!"),
+ 'group_list' => Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Groups!"),
'payment_currencies_edit' => Array('prefixes' => Array('pt'), 'format' => "#pt_status# '#pt_titlefield#' - !la_title_Currencies!"),
),
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/payment_type/payment_type_edit', 'priority' => 1),
+ 'gateway' => Array ('title' => 'la_tab_Gateway', 't' => 'in-commerce/payment_type/payment_type_gateway', 'priority' => 2),
+ 'currencies' => Array ('title' => 'la_tab_Currencies', 't' => 'in-commerce/payment_type/payment_type_currencies', 'priority' => 3),
+ 'groups' => Array ('title' => 'la_tab_Groups', 't' => 'in-commerce/payment_type/payment_type_groups', 'priority' => 4),
+ ),
+ ),
+
'PermSection' => Array('main' => 'in-commerce:payment_types'),
'Sections' => Array(
'in-commerce:payment_types' => Array(
'parent' => 'in-commerce',
'icon' => 'payment_types',
'label' => 'la_tab_PaymentTypes',
'url' => Array('t' => 'in-commerce/payment_type/payment_type_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 6,
'type' => stTREE,
),
),
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'SubItems' => Array('gwfv','ptc'),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
'CalculatedFields' => Array(
'' => Array(
'Gateway' => TABLE_PREFIX.'Gateways.Name',
),
),
'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Gateways ON %1$s.GatewayId = '.TABLE_PREFIX.'Gateways.GatewayId',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'PaymentTypeId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len' => 100),
'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
'Instructions' => Array ('type' => 'string', 'default' => NULL),
'AdminComments' => Array ('type' => 'string', 'default' => NULL),
'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_Enabled', 0 => 'la_Disabled' ), 'default' => 0, 'not_null' => 1),
'Priority' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'IsPrimary' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'BuiltIn' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array ( 1 => 'la_BuiltIn', 0 => 'la_UserDefined' ), 'default' => 0, 'not_null' => 1 ),
'GatewayId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Gateways', 'option_key_field'=>'GatewayId', 'option_title_field'=>'Name', 'default' => 1, 'not_null' => 1),
'PlacedOrdersEdit' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'ProcessingFee' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '1','default' => '0.00'),
'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => '',),
),
/* 'VirtualFields' => Array(
'Qty' => 1,
),*/
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif','0_0'=>'icon16_payment_disabled.gif','1_0'=>'icon16_payment.gif','1_1'=>'icon16_payment_primary.gif','0_1'=>'icon16_payment_disabled.gif'),
'Fields' => Array(
- 'PaymentTypeId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td' ),
- 'Name' => Array( 'title'=>'la_col_PaymentTypeName', 'data_block' => 'payment_caption_td' ),
- 'Description' => Array( 'title'=>'la_col_Description' ),
- 'BuiltIn' => Array( 'title'=>'la_col_BuiltIn' ),
+ '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'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/payment_type/payment_type_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.19
\ No newline at end of property
+1.19.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/payment_type/payment_type_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/payment_type/payment_type_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/payment_type/payment_type_tag_processor.php (revision 11549)
@@ -1,40 +1,42 @@
<?php
class PaymentTypeTagProcessor extends kDBTagProcessor{
function DeleteError($params){
$o = '';
$error = $this->Application->RecallVar('pt_delete_error');
if ($error){
$params['name']=$params['block'];
$o = $this->Application->ParseBlock($params);
$this->Application->RemoveVar('pt_delete_error');
}
return $o;
}
function ListGroups($params)
{
$object =& $this->getObject($params);
$selected = trim($object->GetDBField('PortalGroups'), ',');
$selected_arr = explode(',', $selected);
$all_groups = $this->Conn->Query('SELECT GroupId, Name FROM '.TABLE_PREFIX.'PortalGroup ORDER BY NAME', 'GroupId');
$o = '';
- foreach ($all_groups as $a_group)
- {
+ $mode = array_key_exists('mode', $params) ? $params['mode'] : false;
+
+ foreach ($all_groups as $a_group) {
$is_selected = in_array($a_group['GroupId'], $selected_arr);
- $continue = $params['mode'] == 'selected' ? !$is_selected : $is_selected;
+ $continue = $mode == 'selected' ? !$is_selected : $is_selected;
if ($continue) continue;
$block_params = $a_group;
$block_params['name'] = $params['render_as'];
$o .= $this->Application->ParseBlock($block_params);
}
+
return $o;
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/payment_type/payment_type_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/RC/in-commerce/units/manufacturers/manufacturers_config.php (revision 11548)
+++ branches/RC/in-commerce/units/manufacturers/manufacturers_config.php (revision 11549)
@@ -1,128 +1,128 @@
<?php
$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_recordcount#)",
+ 'format' => "!la_title_Manufacturers!",
),
'manuf_edit'=>Array( 'prefixes' => Array('manuf'),
'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturer!'),
'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
),
),
'PermSection' => Array('main' => 'in-commerce:manufacturers'),
'Sections' => Array(
'in-commerce:manufacturers' => Array(
'parent' => 'in-commerce',
'icon' => 'in-commerce:manufacturers',
'label' => 'la_tab_Manufacturers',
'url' => Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 3,
'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','not_null' => '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_ImageFiles!',
'multiple' => false,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
'IsPopular' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
'Phone' => Array('type' => 'string','default' => null),
'Fax' => Array('type' => 'string', 'default' => null),
'Address1' => Array('type' => 'string','default' => null),
'Address2' => Array('type' => 'string', 'default' => null),
'City' => Array('type' => 'string','default' => null),
'State' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array(), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null),
'Zip' => Array('type' => 'string', 'default' => null),
'Country' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
'options_sql'=>'SELECT %1$s
FROM '.TABLE_PREFIX.'StdDestinations
LEFT JOIN '.TABLE_PREFIX.'Phrase
ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
WHERE
DestType=1
AND
LanguageId = %2$s
ORDER BY Translation',
'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', 'default' => null),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default'=>'icon16_manuf.gif'),
'Fields' => Array (
- 'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td'),
- 'Name' => Array ('title' => 'la_col_ManufacturerName'),
- 'IsPopular' => Array ('title' => 'la_col_IsPopular'),
- 'URL' => Array ('title' => 'la_col_URL'),
+ 'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter'),
+ 'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter'),
+ 'URL' => Array ('title' => 'la_col_URL', 'filter_block' => 'grid_like_filter'),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Manufacturers',
'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short',
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/manufacturers/manufacturers_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.4
\ No newline at end of property
+1.10.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/units/shipping/shipping_event_handler.php
===================================================================
--- branches/RC/in-commerce/units/shipping/shipping_event_handler.php (revision 11548)
+++ branches/RC/in-commerce/units/shipping/shipping_event_handler.php (revision 11549)
@@ -1,178 +1,185 @@
<?php
class ShippingEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnFlip' => Array('self' => 'add|edit'),
'OnApplyModifier' => Array('self' => 'add|edit'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
+ /**
+ * Presets shipping cost object based on shipping fields
+ *
+ * @param kEvent $event
+ */
function OnAfterItemLoad(&$event)
{
$object =& $event->getObject();
+
$format = '%01.'.$object->GetDBField('PrecisionAfterSep').'f'; // %01.2f
$zero_if_empty = $object->GetDBField('ZeroIfEmpty');
- $sc_object =& $this->Application->recallObject('sc');
- $flat_options = $sc_object->getFieldOptions('Flat');
- $perunit_options = $sc_object->getFieldOptions('PerUnit');
+ $sc_object =& $this->Application->recallObject('sc', null, Array ('raise_warnings' => 0));
+ /* @var $sc_object kDBItem */
+ $flat_options = $sc_object->GetFieldOptions('Flat');
$flat_options['format'] = $format;
$flat_options['default'] = $zero_if_empty ? 0 : null;
+ $sc_object->SetFieldOptions('Flat', $flat_options);
+
+ $perunit_options = $sc_object->GetFieldOptions('PerUnit');
$perunit_options['format'] = $format;
$perunit_options['default'] = $zero_if_empty ? 0 : null;
-
- $sc_object->setFieldOptions('Flat', $flat_options);
- $sc_object->setFieldOptions('PerUnit', $perunit_options);
+ $sc_object->SetFieldOptions('PerUnit', $perunit_options);
}
/**
* Enter description here...
*
* @param kEvent $event
* @return unknown
*/
function OnApplyModifier(&$event)
{
// $event->CallSubEvent('');
$zones_object =& $this->Application->recallObject('z');
$cost_object =& $this->Application->recallObject('sc');
$object = $event->getObject();
$operation = $this->Application->GetVar('operation');
$formatter =& $this->Application->recallObject('kFormatter');
$modify_by = $formatter->TypeCast($this->Application->GetVar('modify_by'), array('type'=>'float'));
$cost_type = $object->GetDBField('CostType');
$brackets = $this->Application->GetVar('br');
$zones = $this->Application->GetVar('z');
$conditions = Array();
if( is_array($zones) ) {
$conditions['zones'] = 'ZoneID IN ('.implode( ',', array_keys($zones) ).')';
}
if( is_array($brackets) ) {
$conditions['brackets'] = 'BracketId IN ('.implode( ',', array_keys($brackets) ).')';
}
$conditions = implode(' OR ', $conditions);
if(!$conditions)
{
$this->finalizePopup($event);
return false;
}
$sql = 'SELECT ShippingCostId FROM '.$cost_object->TableName.' WHERE '.$conditions;
$res = $this->Conn->GetCol($sql);
switch($cost_type)
{
case 1:
$affected_fields = Array(0 => 'Flat');
break;
case 2:
$affected_fields = Array(0 => 'PerUnit');
break;
default:
$affected_fields = Array(0 => 'PerUnit', 1 => 'Flat');
}
foreach($affected_fields as $field)
{
if($operation == '/' && $modify_by == 0) break;
$sql = 'UPDATE '.$cost_object->TableName.'
SET '.$field.'='.$field.$operation.$modify_by.'
WHERE ShippingCostId IN ('.implode(',', $res).')
AND NOT('.$field.' IS NULL)
AND '.$field.$operation.$modify_by.'>=0';
$this->Conn->Query($sql);
}
$this->finalizePopup($event);
}
function OnFlip(&$event)
{
$object =& $event->getObject();
$aligment = $this->Application->GetLinkedVar('CostsTableAligment');
$new_align = $aligment ? 0 : 1;
$this->Application->SetVar('CostsTableAligment', $new_align);
$this->Application->LinkVar('CostsTableAligment');
$this->OnPreSave($event);
$event->status=erSUCCESS;
}
function OnSave(&$event)
{
$this->OnAfterItemLoad($event);
parent::OnSave($event);
}
function OnAfterItemCreate(&$event)
{
$event->CallSubEvent('OnAnyChange');
}
function OnAfterItemUpdate(&$event)
{
$event->CallSubEvent('OnAnyChange');
}
function OnAfterItemDelete(&$event)
{
$event->CallSubEvent('OnAnyChange');
}
function OnAnyChange(&$event)
{
$sql = 'DELETE FROM '.TABLE_PREFIX.'Cache WHERE VarName LIKE "ShippingQuotes%"';
$this->Conn->Query($sql);
}
function OnPreSaveCreated(&$event){
parent::OnPreSaveCreated($event);
$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
$object =& $event->getObject( Array('skip_autoload' => true) );
$object->SetDBField('PortalGroups', ','.$default_group.',');
}
function UpdateGroups(&$event){
$object = &$event->getObject();
if ($event->Name == 'OnPreSaveCreated') {
$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
$selected_groups = $default_group;
}
else {
$selected_groups = $object->GetDBField('PortalGroups');
}
if ($selected_groups && $selected_groups!='') {
$selected_groups = str_replace('|', ',', $selected_groups);
$selected_groups = ','.trim($selected_groups, ',').',';
$object->SetDBField('PortalGroups', $selected_groups);
}
}
function customProcessing(&$event, $when){
$this->UpdateGroups($event);
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/shipping/shipping_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.14
\ No newline at end of property
+1.14.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/shipping/shipping_config.php
===================================================================
--- branches/RC/in-commerce/units/shipping/shipping_config.php (revision 11548)
+++ branches/RC/in-commerce/units/shipping/shipping_config.php (revision 11549)
@@ -1,144 +1,155 @@
<?php
$config = Array(
'Prefix' => 's',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ShippingEventHandler','file'=>'shipping_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ShippingTagProcessor','file'=>'shipping_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'AggregateTags' => Array(
Array(
'AggregateTo' => 'ord',
'AggregatedTagName' => 'PrintShippingTypes',
'LocalTagName' => 'Order_PrintShippingTypes',
),
),
'Hooks' => Array(
Array(
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'sc',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnPropagate', 'OnClearAll' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPreSave',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ShippingID',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('s'=>'!la_title_AddingShippingType!'),
'edit_status_labels' => Array('s'=>'!la_title_EditingShippingType!'),
'new_titlefield' => Array('s'=>'!la_title_NewShippingType!'),
),
'shipping_list'=>Array( 'prefixes' => Array('s_List'),
- 'format' => "!la_title_ShippingTypes! (#s_recordcount#)",
+ 'format' => "!la_title_ShippingTypes!",
),
'shipping_type_edit'=>Array( 'prefixes' => Array('s'),
'format' => "#s_status# '#s_titlefield#' - !la_title_General!",
),
'zones' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Zones!"),
'brackets' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Brackets!"),
'costs' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Costs!"),
+ 'groups' => Array('prefixes' => Array('s'), 'format' => "#s_status# '#s_titlefield#' - !la_title_Groups!"),
'select_modifier' => Array('prefixes' => Array('s'), 'format' => "!la_title_ApplyModifier!"),
),
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/shipping/shipping_edit', 'priority' => 1),
+ 'zones' => Array ('title' => 'la_tab_ShippingZones', 't' => 'in-commerce/shipping/shipping_zones', 'priority' => 2),
+ 'brackets' => Array ('title' => 'la_tab_Brackets', 't' => 'in-commerce/shipping/shipping_brackets', 'priority' => 3),
+ 'costs' => Array ('title' => 'la_tab_Costs', 't' => 'in-commerce/shipping/shipping_costs', 'priority' => 4),
+ 'groups' => Array ('title' => 'la_tab_Groups', 't' => 'in-commerce/shipping/shipping_type_groups', 'priority' => 5),
+ ),
+ ),
+
'PermSection' => Array('main' => 'in-commerce:shipping'),
'Sections' => Array(
'in-commerce:shipping_folder' => Array(
'parent' => 'in-commerce',
'icon' => 'shipping',
'label' => 'la_tab_Shipping',
'permissions' => Array(),
'priority' => 5,
'type' => stTREE,
),
'in-commerce:shipping' => Array(
'parent' => 'in-commerce:shipping_folder',
'icon' => 'shipping',
'label' => 'la_tab_CustomShippingTypes',
'url' => Array('t' => 'in-commerce/shipping/shipping_custom_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 5.1,
'type' => stTAB,
),
),
'TableName' => TABLE_PREFIX.'ShippingType',
'SubItems' => Array('z', 'br'),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
)
),
'ListSQLs' => Array( ''=> 'SELECT * FROM %s'),
// key - special, value - list select sql
'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'ShippingID' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Code' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>25, 'error_msgs' => Array('required' => 'Please fill in')),
'Name' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required'=>true, 'max_len'=>100, 'error_msgs' => Array('required' => 'Please fill in')),
'SpeedCode' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => true, 'max_len' => 25),
'LocationFrom' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Riga', 2 => 'Salaspils', 3 => 'Chicago', 4 => 'Dublin'), 'not_null' => true, 'default' => 1),
'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(1 => 'la_ByWeight', 2 => 'la_ByItem', 3 => 'la_ByAmount', 4 => 'la_Handling'), 'not_null' => true, 'default' => 1),
'BaseFee' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
'CODFlatSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
'CODPercentSurcharge' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0, 'not_null' => true),
'Status' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled', 2 => 'la_SelectedOnly' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
'CostType' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Flat', 2 => 'la_PerUnit', 3 => 'la_Combined' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
'ZeroIfEmpty' => Array('type' => 'int', 'options' => Array ( 1 => 'la_Zeros', 0 => 'la_NoShipments' ), 'use_phrases' => 1, 'default' => 1, 'not_null' => true ),
'PrecisionBeforeSep' => Array('type' => 'int', 'options' => Array ( 1 => '1 digit', 2 => '2 digits', 3 => '3 digits', 4 => '4 digits' ), 'default' => 2, 'not_null' => true ),
'PrecisionAfterSep' => Array('type' => 'int', 'options' => Array ( 0 => 'none', 1 => '1 digit', 2 => '2 digits' ), 'default' => 2, 'not_null' => true ),
'PortalGroups' => Array('type' => 'string', 'not_null' => 1, 'default' => 0,),
'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),
'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' ),
- 'Name' => Array( 'title'=>'la_col_ShippingName' ),
- 'Type' => Array( 'title'=>'la_col_ShippingType' ),
- 'BaseFee' => Array( 'title'=>'la_col_BaseFee' ),
- /*'CODFlatSurcharge' => Array( 'title'=>'la_col_CODFlatSurcharge' ),*/
+ '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'),*/
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/shipping/shipping_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.16.2.3
\ No newline at end of property
+1.16.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/units/taxes/taxes_config.php
===================================================================
--- branches/RC/in-commerce/units/taxes/taxes_config.php (revision 11548)
+++ branches/RC/in-commerce/units/taxes/taxes_config.php (revision 11549)
@@ -1,100 +1,101 @@
<?php
$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'),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
/*'Hooks' => Array(
Array(
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'tax',
'HookToSpecial' => '',
'HookToEvent' => Array( 'onEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnLoadZoneForm',
),
),*/
'IDField' => 'TaxZoneId',
'TitleField' => 'Name',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('tax'=>'!la_title_AddingTaxZone!'),
'edit_status_labels' => Array('tax'=>'!la_title_EditingTaxZone!'),
'new_titlefield' => Array('tax'=>'!la_title_NewTaxZone!'),
),
'taxes_list'=>Array( 'prefixes' => Array('tax_List'),
- 'format' => "!la_title_Taxes! (#tax_recordcount#)",
+ 'format' => "!la_title_Taxes!",
),
'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'),
-
+
'Sections' => Array(
'in-commerce:taxes' => Array(
'parent' => 'in-commerce',
'icon' => 'taxes',
'label' => 'la_tab_Taxes',
'url' => Array('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 7,
'type' => stTREE,
- ),
+ ),
),
-
+
'TableName' => TABLE_PREFIX.'TaxZones',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array('taxdst'),
- 'ListSQLs' => Array( ''=> 'SELECT * FROM %s'),
+ 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s FROM %s'),
// key - special, value - list select sql
- 'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'),
+
'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')),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_tax.gif'),
'Fields' => Array(
- 'Name' => Array( 'width'=>150, 'title'=>'la_col_ZoneName', 'data_block'=>'grid_checkbox_td' ),
- 'Type' => Array( 'width'=>100, 'title'=>'la_col_ZoneType' ),
- 'TaxValue' => Array( 'width'=>100, 'title'=>'la_col_TaxValue' ),
- 'ApplyToShipping' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToShipping' ),
- 'ApplyToProcessing' => Array( 'width'=>60, 'title'=>'la_col_TaxApplyToProcessing' ),
+ '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'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/taxes/taxes_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/coupons/coupons_config.php
===================================================================
--- branches/RC/in-commerce/units/coupons/coupons_config.php (revision 11548)
+++ branches/RC/in-commerce/units/coupons/coupons_config.php (revision 11549)
@@ -1,144 +1,153 @@
<?php
$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! (#coup_recordcount#)",
+ '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! (#coupi_recordcount#)",
+ 'format' => "#coup_status# '#coup_titlefield#' - !la_title_CouponItems!",
),
'coupons_clone'=>Array('prefixes' => Array('coup'),
'format' => "!la_CloneCoupon!",
),
+ 'coupon_selector' => Array('format' => '!la_title_CouponSelector!'),
+
),
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/coupon_edit', 'priority' => 1),
+ 'items' => Array ('title' => 'la_tab_CouponsItems', 't' => 'in-commerce/discounts/coupon_items', 'priority' => 2),
+ ),
+ ),
+
'PermSection' => Array('main' => 'in-commerce:coupons'),
'Sections' => Array(
'in-commerce:coupons' => Array(
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts',
'label' => 'la_tab_Coupons',
'url' => Array('t' => 'in-commerce/discounts/coupons_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 2.2,
'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' ), 'not_null' => 1, 'default' => 1 ), // options => (3 => 'la_FreeShipping')
'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'=>0),
'LastUsedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => 0),
'NumberOfUses' => Array('type'=>'int', 'default' => 1,),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Fields' => Array(
- 'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td' ),
- 'Name' => Array( 'title'=>'la_col_Name'),
- 'Code' => Array( 'title'=>'la_col_CouponCode'),
- 'Expiration_formatted' => Array( 'title'=>'la_col_Expiration', 'sort_field' => 'Expiration' ),
- 'Type' => Array( 'title'=>'la_col_Type' ),
- 'Amount' => Array( 'title'=>'la_col_Amount' ),
- 'LastUsedBy' => Array('title'=>'la_col_LastUsedBy'),
- 'LastUsedOn_formatted' => Array('title'=>'la_col_LastUsedOn', 'sort_field' => 'LastUsedOn' ),
- 'NumberOfUses' => Array('title'=>'la_col_NumberOfUses'),
+ 'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+ 'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter'),
+ 'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
+ 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+ 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+ 'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter'),
+ 'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter'),
+ 'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter'),
),
),
'Radio' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Selector' => 'radio',
'Fields' => Array(
- 'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td' ),
- 'Name' => Array( 'title'=>'la_col_Name'),
- 'Code' => Array( 'title'=>'la_col_CouponCode'),
- 'Expiration_formatted' => Array( 'title'=>'la_col_Expiration', 'sort_field' => 'Expiration' ),
- 'Type' => Array( 'title'=>'la_col_Type' ),
- 'Amount' => Array( 'title'=>'la_col_Amount' ),
- 'LastUsedBy' => Array('title'=>'la_col_LastUsedBy'),
- 'LastUsedOn_formatted' => Array('title'=>'la_col_LastUsedOn', 'sort_field' => 'LastUsedOn' ),
- 'NumberOfUses' => Array('title'=>'la_col_NumberOfUses'),
+ 'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+ 'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter'),
+ 'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
+ 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+ 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+ 'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter'),
+ 'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter'),
+ 'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/coupons/coupons_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.15.2.1
\ No newline at end of property
+1.15.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/units/discount_items/discount_items_config.php
===================================================================
--- branches/RC/in-commerce/units/discount_items/discount_items_config.php (revision 11548)
+++ branches/RC/in-commerce/units/discount_items/discount_items_config.php (revision 11549)
@@ -1,105 +1,105 @@
<?php
-
+
$config = Array(
'Prefix' => 'di',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'DiscountItemsEventHandler','file'=>'discount_items_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'DiscountItemsTagProcessor','file'=>'discount_items_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
- 'Hooks' => Array(
+ 'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'p',
'HookToSpecial' => '-item',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteDiscountedItem',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'DiscountItemId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductsDiscountItems',
'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',
+ 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' => 'DiscountId',
'ParentTableKey' => 'DiscountId',
'ParentPrefix' => 'd',
'AutoDelete' => true,
'AutoClone' => true,
-
- 'ListSortings' => Array(
+
+ 'ListSortings' => Array(
'' => Array(
'Sorting' => Array('ItemName' => 'asc'),
)
),
-
+
'Fields' => Array (
'DiscountItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'DiscountId' => 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' ),
+ 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'),
),
-
+
),
'DiscountItems' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
'Fields' => Array(
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_checkbox_td' ),
- 'ItemName' => Array( 'title'=>'la_col_ItemName' ),
- 'ItemType' => Array( 'title'=>'la_col_ItemType' ),
+ '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_ItemType', 'filter_block' => 'grid_options_filter'),
),
-
+
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/discount_items/discount_items_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/discount_items/discount_items_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/discount_items/discount_items_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/discount_items/discount_items_tag_processor.php (revision 11549)
@@ -1,30 +1,37 @@
<?php
class DiscountItemsTagProcessor extends kDBTagProcessor {
function IsEntireOrder($params)
{
- $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List',$params);
- $sql = 'SELECT COUNT(*) FROM '.$object->TableName.' WHERE ItemType=0 AND DiscountId='.$this->Application->GetVar('d_id');
+ $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+ if ($this->Application->IsTempMode($this->Prefix)) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
+
+ $sql = 'SELECT COUNT(*)
+ FROM ' . $table_name . '
+ WHERE (ItemType = 0) AND (DiscountId = ' . $this->Application->GetVar('d_id') . ')';
return $this->Conn->GetOne($sql);
}
-
+
function ItemIcon($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
if($object->GetDBField('ItemType') == 2)
{
$cat_object =& $this->Application->recallObject('c');
$cat_object->Load( $object->GetDBField('CategoryId') );
$cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
return $cat_tag_processor->ItemIcon();
}
else
{
return parent::ItemIcon($params);
- }
+ }
}
-
+
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/discount_items/discount_items_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.8.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/zones/zones_config.php
===================================================================
--- branches/RC/in-commerce/units/zones/zones_config.php (revision 11548)
+++ branches/RC/in-commerce/units/zones/zones_config.php (revision 11549)
@@ -1,63 +1,64 @@
<?php
-
+
$config = Array(
'Prefix' => 'z',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ZonesEventHandler','file'=>'zones_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ZonesTagProcessor','file'=>'zones_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'ZoneID',
'TitleField' => 'Name',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('z'=>'!la_title_AddingShippingZone!'),
'edit_status_labels' => Array('z'=>'!la_title_EditingShippingZone!'),
'new_titlefield' => Array('z'=>'!la_title_NewShippingZone!'),
),
'zones_edit' => Array( 'prefixes' => Array('z'), 'format' => "#z_status# - '#z_titlefield#'"),
),
'TableName' => TABLE_PREFIX.'ShippingZones',
'ForeignKey' => 'ShippingTypeID', //Name of the field in this table used as ForeignKey
'ParentTableKey' => 'ShippingID', //Name of the field in parent table linked with ForeignKey
'ParentPrefix' => 's', //Prefix of parent item
'AutoDelete' => true,
'AutoClone' => true,
-
+
'SubItems' => Array('dst', 'sc'),
-
+
'ListSQLs' => Array( ''=> 'SELECT * FROM %s'),
// key - special, value - list select sql
'ItemSQLs' => Array( ''=> 'SELECT * FROM %s'),
-
- 'ListSortings' => Array(
+
+ '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, ),
),
-
+
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_custom.gif'),
'Fields' => Array(
- 'Name' => Array( 'width'=>150, 'title'=>'la_col_Title', 'data_block'=>'grid_checkbox_td' ),
- 'CODallowed' => Array( 'width'=>100, 'title'=>'la_col_CODallowed' )
+ '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')
),
-
+
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/zones/zones_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/orders/orders_event_handler.php
===================================================================
--- branches/RC/in-commerce/units/orders/orders_event_handler.php (revision 11548)
+++ branches/RC/in-commerce/units/orders/orders_event_handler.php (revision 11549)
@@ -1,3893 +1,3848 @@
<?php
class OrdersEventHandler extends kDBEventHandler
{
/**
* Checks permissions of user
*
* @param kEvent $event
*/
function CheckPermission(&$event)
{
if (!$this->Application->IsAdmin()) {
if ($event->Name == 'OnCreate') {
// user can't initiate custom order creation directly
return false;
}
$user_id = $this->Application->RecallVar('user_id');
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ($items_info) {
// when POST is present, then check when is beeing submitted
$order_session_id = $this->Application->RecallVar($event->getPrefixSpecial(true).'_id');
$order_dummy =& $this->Application->recallObject($event->Prefix.'.-item', null, Array('skip_autoload' => true));
foreach ($items_info as $id => $field_values) {
if ($order_session_id != $id) {
// user is trying update not his order, even order from other guest
return false;
}
$order_dummy->Load($id);
// session_id matches order_id from submit
if ($order_dummy->GetDBField('PortalUserId') != $user_id) {
// user performs event on other user order
return false;
}
$status_field = array_shift($this->Application->getUnitOption($event->Prefix, 'StatusField'));
if (isset($field_values[$status_field]) && $order_dummy->GetDBField($status_field) != $field_values[$status_field]) {
// user can't change status by himself
return false;
}
if ($order_dummy->GetDBField($status_field) != ORDER_STATUS_INCOMPLETE) {
// user can't edit orders being processed
return false;
}
if ($event->Name == 'OnUpdate') {
// all checks were ok -> it's user's order -> allow to modify
return true;
}
}
}
}
return parent::CheckPermission($event);
}
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
// admin
'OnRecalculateItems' => Array('self' => 'add|edit'),
'OnResetToUser' => Array('self' => 'add|edit'),
'OnResetToBilling' => Array('self' => 'add|edit'),
'OnResetToShipping' => Array('self' => 'add|edit'),
'OnMassOrderApprove' => Array('self' => 'advanced:approve'),
'OnMassOrderDeny' => Array('self' => 'advanced:deny'),
'OnMassOrderArchive' => Array('self' => 'advanced:archive'),
'OnMassPlaceOrder' => Array('self' => 'advanced:place'),
'OnMassOrderProcess' => Array('self' => 'advanced:process'),
'OnMassOrderShip' => Array('self' => 'advanced:ship'),
'OnResetToPending' => Array('self' => 'advanced:reset_to_pending'),
'OnLoadSelected' => Array('self' => 'view'), // print in this case
'OnGoToOrder' => Array('self' => 'view'),
// front-end
'OnViewCart' => Array('self' => true),
'OnAddToCart' => Array('self' => true),
'OnRemoveFromCart' => Array('self' => true),
'OnUpdateCart' => Array('self' => true),
'OnUpdateItemOptions' => Array('self' => true),
'OnCleanupCart' => Array('self' => true),
'OnContinueShopping' => Array('self' => true),
'OnCheckout' => Array('self' => true),
'OnSelectAddress' => Array('self' => true),
'OnProceedToBilling' => Array('self' => true),
'OnProceedToPreview' => Array('self' => true),
'OnCompleteOrder' => Array('self' => true),
'OnRemoveCoupon' => Array('self' => true),
'OnRemoveGiftCertificate' => Array('self' => true),
'OnCancelRecurring' => Array('self' => true),
'OnAddVirtualProductToCart' => Array('self' => true),
'OnItemBuild' => Array('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
function mapEvents()
{
parent::mapEvents();
$common_events = Array(
'OnResetToUser' => 'OnResetAddress',
'OnResetToBilling' => 'OnResetAddress',
'OnResetToShipping' => 'OnResetAddress',
'OnMassOrderProcess' => 'MassInventoryAction',
'OnMassOrderApprove' => 'MassInventoryAction',
'OnMassOrderDeny' => 'MassInventoryAction',
'OnMassOrderArchive' => 'MassInventoryAction',
'OnMassOrderShip' => 'MassInventoryAction',
'OnOrderProcess' => 'InventoryAction',
'OnOrderApprove' => 'InventoryAction',
'OnOrderDeny' => 'InventoryAction',
'OnOrderArchive' => 'InventoryAction',
'OnOrderShip' => 'InventoryAction',
);
$this->eventMethods = array_merge($this->eventMethods, $common_events);
}
/* ======================== FRONT ONLY ======================== */
function OnQuietPreSave(&$event)
{
$object =& $event->getObject();
$object->IgnoreValidation = true;
$event->CallSubEvent('OnPreSave');
$object->IgnoreValidation = false;
}
/**
* Sets new address to order
*
* @param kEvent $event
*/
function OnSelectAddress(&$event)
{
if ($this->Application->IsAdmin()) return true;
$object =& $event->getObject();
$shipping_address_id = $this->Application->GetVar('shipping_address_id');
$billing_address_id = $this->Application->GetVar('billing_address_id');
if ($shipping_address_id || $billing_address_id) {
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$address =& $this->Application->recallObject('addr.-item','addr', Array('skip_autoload' => true));
$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$addr_list->Query();
}
if ($shipping_address_id > 0) {
$addr_list->CopyAddress($shipping_address_id, 'Shipping');
$address->Load($shipping_address_id);
$address->MarkAddress('Shipping');
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$object->setRequired('ShippingState', false);
}
elseif ($shipping_address_id == -1) {
$object->ResetAddress('Shipping');
}
if ($billing_address_id > 0) {
$addr_list->CopyAddress($billing_address_id, 'Billing');
$address->Load($billing_address_id);
$address->MarkAddress('Billing');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
$object->setRequired('BillingState', false);
}
elseif ($billing_address_id == -1) {
$object->ResetAddress('Billing');
}
$event->redirect = false;
$object->IgnoreValidation = true;
$this->RecalculateTax($event);
$object->Update();
}
/**
* Updates order with registred user id
*
* @param kEvent $event
*/
function OnUserCreate(&$event)
{
if( !($event->MasterEvent->status == erSUCCESS) ) return false;
$ses_id = $this->Application->RecallVar('front_order_id');
if($ses_id)
{
$this->updateUserID($ses_id, $event);
$this->Application->RemoveVar('front_order_id');
}
}
/**
* Enter description here...
*
* @param unknown_type $event
* @return unknown
*/
function OnUserLogin(&$event)
{
if( !($event->MasterEvent->status == erSUCCESS) ) {
return false;
}
$ses_id = $this->Application->RecallVar('ord_id');
if ($ses_id) $this->updateUserID($ses_id, $event);
$user_id = $this->Application->RecallVar('user_id');
$affiliate_id = $this->isAffiliate($user_id);
if($affiliate_id) $this->Application->setVisitField('AffiliateId', $affiliate_id);
$event->CallSubEvent('OnRecalculateItems');
}
function updateUserID($order_id, &$event)
{
$table = $this->Application->getUnitOption($event->Prefix,'TableName');
$id_field = $this->Application->getUnitOption($event->Prefix,'IDField');
$user_id = $this->Application->RecallVar('user_id');
$this->Conn->Query('UPDATE '.$table.' SET PortalUserId = '.$user_id.' WHERE '.$id_field.' = '.$order_id);
$affiliate_id = $this->isAffiliate($user_id);
if($affiliate_id)
{
$this->Conn->Query('UPDATE '.$table.' SET AffiliateId = '.$affiliate_id.' WHERE '.$id_field.' = '.$order_id);
}
}
function isAffiliate($user_id)
{
$affiliate_user =& $this->Application->recallObject('affil.-item', null, Array('skip_autoload' => true) );
$affiliate_user->Load($user_id, 'PortalUserId');
return $affiliate_user->isLoaded() ? $affiliate_user->GetDBField('AffiliateId') : 0;
}
function ChargeOrder(&$order)
{
$gw_data = $order->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
$payment_result = $gateway_object->DirectPayment($order->FieldValues, $gw_data['gw_params']);
$sql = 'UPDATE %s SET GWResult1 = %s WHERE %s = %s';
$sql = sprintf($sql, $order->TableName, $this->Conn->qstr($gateway_object->getGWResponce()), $order->IDField, $order->GetID() );
$this->Conn->Query($sql);
$order->SetDBField('GWResult1', $gateway_object->getGWResponce() );
return array('result'=>$payment_result, 'data'=>$gateway_object->parsed_responce, 'gw_data' => $gw_data, 'error_msg'=>$gateway_object->getErrorMsg());
}
function OrderEmailParams(&$order)
{
$billing_email = $order->GetDBField('BillingEmail');
$user_email = $this->Conn->GetOne(' SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
WHERE PortalUserId = '.$order->GetDBField('PortalUserId'));
$email_params = Array();
$email_params['_user_email'] = $user_email; //for use when shipping vs user is required in InvetnoryAction
$email_params['to_email'] = $billing_email ? $billing_email : $user_email;
$email_params['to_name'] = $order->GetDBField('BillingTo');
return $email_params;
}
function PrepareCoupons(&$event, &$order)
{
$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
$order_items->linkToParent($order->Special);
$order_items->Query();
$order_items->GoFirst();
$assigned_coupons = array();
$coup_handler =& $this->Application->recallObject('coup_EventHandler');
foreach($order_items->Records as $product_item)
{
if ($product_item['ItemData']) {
$item_data = unserialize($product_item['ItemData']);
if (isset($item_data['AssignedCoupon']) && $item_data['AssignedCoupon']) {
$coupon_id = $item_data['AssignedCoupon'];
// clone coupon, get new coupon ID
$coupon =& $this->Application->recallObject('coup',null,array('skip_autload' => true));
/* @var $coupon kDBItem */
$coupon->Load($coupon_id);
if (!$coupon->isLoaded()) continue;
$coup_handler->SetNewCode($coupon);
$coupon->NameCopy();
$coupon->SetDBField('Name', $coupon->GetDBField('Name').' (Order #'.$order->GetField('OrderNumber').')');
$coupon->Create();
// add coupon code to array
array_push($assigned_coupons, $coupon->GetDBField('Code'));
}
}
}
/* @var $order OrdersItem */
if ($assigned_coupons) {
$comments = $order->GetDBField('AdminComment');
if ($comments) $comments .= "\r\n";
$comments .= "Issued coupon(s): ". join(',', $assigned_coupons);
$order->SetDBField('AdminComment', $comments);
$order->Update();
}
if ($assigned_coupons) $this->Application->SetVar('order_coupons', join(',', $assigned_coupons));
}
/**
* Completes order if possible
*
* @param kEvent $event
* @return bool
*/
function OnCompleteOrder(&$event)
{
$this->LockTables($event);
if (!$this->CheckQuantites($event)) return;
$this->ReserveItems($event);
$order =& $event->getObject();
$charge_result = $this->ChargeOrder($order);
if (!$charge_result['result']) {
$this->FreeItems($event);
$this->Application->StoreVar('gw_error', $charge_result['error_msg']);
//$this->Application->StoreVar('gw_error', getArrayValue($charge_result, 'data', 'responce_reason_text') );
$event->redirect = $this->Application->GetVar('failure_template');
$event->redirect_params['m_cat_id'] = 0;
if ($event->Special == 'recurring') { // if we set failed status for other than recurring special the redirect will not occur
$event->status = erFAIL;
}
return false;
}
// call CompleteOrder events for items in order BEFORE SplitOrder (because ApproveEvents are called there)
$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
$order_items->linkToParent($order->Special);
$order_items->Query(true);
$order_items->GoFirst();
foreach($order_items->Records as $product_item)
{
if (!$product_item['ProductId']) continue; // product may have been deleted
$this->raiseProductEvent('CompleteOrder', $product_item['ProductId'], $product_item);
}
$shipping_control = getArrayValue($charge_result, 'gw_data', 'gw_params', 'shipping_control');
if ($event->Special != 'recurring') {
if ($shipping_control && $shipping_control != SHIPPING_CONTROL_PREAUTH ) {
// we have to do it here, because the coupons are used in the e-mails
$this->PrepareCoupons($event, $order);
}
$email_event_user =& $this->Application->EmailEventUser('ORDER.SUBMIT', $order->GetDBField('PortalUserId'), $this->OrderEmailParams($order));
$email_event_admin =& $this->Application->EmailEventAdmin('ORDER.SUBMIT');
}
if ($shipping_control === false || $shipping_control == SHIPPING_CONTROL_PREAUTH ) {
$order->SetDBField('Status', ORDER_STATUS_PENDING);
$order->Update();
}
else {
$this->SplitOrder($event, $order);
}
if( !$this->Application->IsAdmin() )
{
// for tracking code
$this->Application->StoreVar('last_order_amount', $order->GetDBField('TotalAmount'));
$this->Application->StoreVar('last_order_number', $order->GetDBField('OrderNumber'));
$this->Application->StoreVar('last_order_customer', $order->GetDBField('BillingTo'));
$this->Application->StoreVar('last_order_user', $order->GetDBField('Username'));
$event->redirect = $this->Application->GetVar('success_template');
$event->redirect_params['m_cat_id'] = 0;
}
else
{
// $event->CallSubEvent('OnSave');
}
$order_id = $order->GetId();
$order_idfield = $this->Application->getUnitOption('ord','IDField');
$order_table = $this->Application->getUnitOption('ord','TableName');
$original_amount = $order->GetDBField('SubTotal') + $order->GetDBField('ShippingCost') + $order->GetDBField('VAT') + $order->GetDBField('ProcessingFee') + $order->GetDBField('InsuranceFee') - $order->GetDBField('GiftCertificateDiscount');
$sql = 'UPDATE '.$order_table.'
SET OriginalAmount = '.$original_amount.'
WHERE '.$order_idfield.' = '.$order_id;
$this->Conn->Query($sql);
$this->Application->StoreVar('front_order_id', $order_id);
$this->Application->RemoveVar('ord_id');
}
/**
* Set billing address same as shipping
*
* @param kEvent $event
*/
function setBillingAddress(&$event)
{
$object =& $event->getObject();
if ($object->HasTangibleItems()) {
if ($this->Application->GetVar('same_address')) {
// copy shipping address to billing
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
list($id, $field_values) = each($items_info);
$address_fields = Array('To', 'Company', 'Phone', 'Fax', 'Email', 'Address1', 'Address2', 'City', 'State', 'Zip', 'Country');
foreach ($address_fields as $address_field) {
$items_info[$id]['Billing'.$address_field] = $object->GetDBField('Shipping'.$address_field);
}
$this->Application->SetVar($event->getPrefixSpecial(true), $items_info);
}
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnProceedToPreview(&$event)
{
$this->setBillingAddress($event);
$event->CallSubEvent('OnUpdate');
$event->redirect = $this->Application->GetVar('preview_template');
}
function OnViewCart(&$event)
{
$this->StoreContinueShoppingLink();
$event->redirect = $this->Application->GetVar('viewcart_template');
}
function OnContinueShopping(&$event)
{
$env = $this->Application->GetVar('continue_shopping_template');
if (!$env || $env == '__default__') {
$env = $this->Application->RecallVar('continue_shopping');
}
if (!$env) {
$env = 'in-commerce/index';
}
$event->redirect = $env;
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnCheckout(&$event)
{
$this->OnUpdateCart($event);
if ($event->getEventParam('RecalculateChangedCart'))
{
$event->SetRedirectParam('checkout_error', $event->redirect_params['checkout_error']);
}
else
{
$object =& $event->getObject();
if(!$object->HasTangibleItems())
{
$object->SetDBField('ShippingTo', '');
$object->SetDBField('ShippingCompany', '');
$object->SetDBField('ShippingPhone', '');
$object->SetDBField('ShippingFax', '');
$object->SetDBField('ShippingEmail', '');
$object->SetDBField('ShippingAddress1', '');
$object->SetDBField('ShippingAddress2', '');
$object->SetDBField('ShippingCity', '');
$object->SetDBField('ShippingState', '');
$object->SetDBField('ShippingZip', '');
$object->SetDBField('ShippingCountry', '');
$object->SetDBField('ShippingType', 0);
$object->SetDBField('ShippingCost', 0);
$object->SetDBField('ShippingCustomerAccount', '');
$object->SetDBField('ShippingTracking', '');
$object->SetDBField('ShippingDate', 0);
$object->SetDBField('ShippingOption', 0);
$object->SetDBField('ShippingInfo', '');
$object->Update();
}
$event->redirect = $this->Application->GetVar('next_step_template');
$order_id = $this->Application->GetVar('order_id');
if($order_id !== false) $event->redirect_params['ord_id'] = $order_id;
}
}
/**
* Redirect user to Billing checkout step
*
* @param kEvent $event
*/
function OnProceedToBilling(&$event)
{
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
list($id,$field_values) = each($items_info);
$object =& $event->getObject();
$payment_type_id = $object->GetDBField('PaymentType');
if(!$payment_type_id)
{
$default_type = $this->Conn->GetOne('SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes WHERE IsPrimary = 1');
if($default_type)
{
$field_values['PaymentType'] = $default_type;
$items_info[$id] = $field_values;
$this->Application->SetVar( $event->getPrefixSpecial(true), $items_info );
}
}
}
$event->CallSubEvent('OnUpdate');
$event->redirect = $this->Application->GetVar('next_step_template');
}
function OnCancelRecurring(&$event)
{
$order =& $event->GetObject();
$order->SetDBField('IsRecurringBilling', 0);
$order->Update();
if ($this->Application->GetVar('cancelrecurring_ok_template'))
{
$event->redirect = $this->Application->GetVar('cancelrecurring_ok_template');
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnAfterItemUpdate(&$event)
{
$object =& $event->getObject();
$cvv2 = $object->GetDBField('PaymentCVV2');
if($cvv2 !== false) $this->Application->StoreVar('CVV2Code', $cvv2);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnUpdate(&$event)
{
$this->setBillingAddress($event);
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$object =& $event->getObject();
if( $object->HasTangibleItems() )
{
$cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
}
$cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
parent::OnUpdate($event);
if ($this->Application->IsAdmin()) {
return true;
}
else {
$event->redirect_params = Array('opener' => 's');
}
if ($event->status == erSUCCESS) {
$this->createMissingAddresses($event);
}
else {
// strange: recalculate total amount on error
$object->SetDBField('TotalAmount', $object->getTotalAmount());
}
}
/**
* Creates new address
*
* @param kEvent $event
*/
function createMissingAddresses(&$event)
{
if (!$this->Application->LoggedIn()) {
return false;
}
$object =& $event->getObject();
$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$addr_list->Query();
$address_dummy =& $this->Application->recallObject('addr.-item', null, Array('skip_autoload' => true));
$address_prefixes = Array('Billing', 'Shipping');
$address_fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
foreach ($address_prefixes as $address_prefix) {
$address_id = $this->Application->GetVar(strtolower($address_prefix).'_address_id');
if (!$this->Application->GetVar('check_'.strtolower($address_prefix).'_address')) {
// form type doesn't match check type, e.g. shipping check on billing form
continue;
}
if ($address_id > 0) {
$address_dummy->Load($address_id);
}
else {
$address_dummy->SetDBField('PortalUserId', $this->Application->RecallVar('user_id') );
}
foreach ($address_fields as $address_field) {
$address_dummy->SetDBField($address_field, $object->GetDBField($address_prefix.$address_field));
}
$address_dummy->MarkAddress($address_prefix, false);
$ret = ($address_id > 0) ? $address_dummy->Update() : $address_dummy->Create();
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnPreSave(&$event)
{
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$object =& $event->getObject();
if ( $object->GetID() !== false)
{
if( $object->HasTangibleItems() )
{
$cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry');
}
$cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry');
}
parent::OnPreSave($event);
}
function OnUpdateCart(&$event)
{
$this->Application->HandleEvent($items_event, 'orditems:OnUpdate');
return $event->CallSubEvent('OnRecalculateItems');
}
/**
* Adds item to cart
*
* @param kEvent $event
*/
function OnAddToCart(&$event)
{
$this->StoreContinueShoppingLink();
$qty = $this->Application->GetVar('qty');
$options = $this->Application->GetVar('options');
// multiple or options add
$items = Array();
if (is_array($qty)) {
foreach ($qty as $item_id => $combinations)
{
if (is_array($combinations)) {
foreach ($combinations as $comb_id => $comb_qty) {
if ($comb_qty == 0) continue;
$items[] = array('item_id' => $item_id, 'qty' => $comb_qty, 'comb' => $comb_id);
}
}
else {
$items[] = array('item_id' => $item_id, 'qty' => $combinations);
}
}
}
if (!$items) {
if (!$qty || is_array($qty)) $qty = 1;
$item_id = $this->Application->GetVar('p_id');
if (!$item_id) return ;
$items = array(array('item_id' => $item_id, 'qty' => $qty));
}
// remember item data passed to event when called
$default_item_data = $event->getEventParam('ItemData');
$default_item_data = $default_item_data ? unserialize($default_item_data) : Array();
foreach ($items as $an_item) {
$item_id = $an_item['item_id'];
$qty = $an_item['qty'];
$comb = getArrayValue($an_item, 'comb');
$item_data = $default_item_data;
$product =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
$product->Load($item_id);
$event->setEventParam('ItemData', null);
if ($product->GetDBField('AssignedCoupon')) {
$item_data['AssignedCoupon'] = $product->GetDBField('AssignedCoupon');
}
// 1. store options information OR
if ($comb) {
$combination = $this->Conn->GetOne('SELECT Combination FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationId = '.$comb);
$item_data['Options'] = unserialize($combination);
}
elseif (is_array($options)) {
$item_data['Options'] = $options[$item_id];
}
// 2. store subscription information OR
if( $product->GetDBField('Type') == 2 ) // subscriptions
{
$item_data = $this->BuildSubscriptionItemData($item_id, $item_data);
}
// 3. store package information
if( $product->GetDBField('Type') == 5 ) // package
{
$package_content_ids = $product->GetPackageContentIds();
$product_package_item =& $this->Application->recallObject('p.-packageitem');
$package_item_data = array();
foreach ($package_content_ids as $package_item_id){
$product_package_item->Load($package_item_id);
$package_item_data[$package_item_id] = array();
if( $product_package_item->GetDBField('Type') == 2 ) // subscriptions
{
$package_item_data[$package_item_id] = $this->BuildSubscriptionItemData($package_item_id, $item_data);
}
}
$item_data['PackageContent'] = $product->GetPackageContentIds();
$item_data['PackageItemsItemData'] = $package_item_data;
}
$event->setEventParam('ItemData', serialize($item_data));
// 1 for PacakgeNum when in admin - temporary solution to overcome splitting into separate sub-orders
// of orders with items added through admin when approving them
$this->AddItemToOrder($event, $item_id, $qty, $this->Application->IsAdmin() ? 1 : null);
}
if ($event->status == erSUCCESS && !$event->redirect) {
$event->redirect_params['pass'] = 'm';
$event->redirect_params['pass_category'] = 0; //otherwise mod-rewrite shop-cart URL will include category
$event->redirect = true;
}
else {
if ($this->Application->IsAdmin()) {
$event->redirect_params['opener'] = 'u';
}
}
}
/**
* Check if required options are selected & selected option combination is in stock
*
* @param kEvent $event
* @param Array $options
* @param int $product_id
* @param int $qty
* @param int $selection_mode
* @return bool
*/
function CheckOptions(&$event, &$options, $product_id, $qty, $selection_mode)
{
// 1. check for required options
$selection_filter = $selection_mode == 1 ? ' AND OptionType IN (1,3,6) ' : '';
$req_options = $this->Conn->GetCol('SELECT ProductOptionId FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$product_id.' AND Required = 1 '.$selection_filter);
$result = true;
foreach ($req_options as $opt_id) {
if (!getArrayValue($options, $opt_id)) {
$this->Application->SetVar('opt_error', 1); //let the template know we have an error
$result = false;
}
}
// 2. check for option combinations in stock
$comb_salt = $this->OptionsSalt($options, true);
if ($comb_salt) {
// such option combination is defined explicitly
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$sql = 'SELECT Availability
FROM '.$poc_table.'
WHERE CombinationCRC = '.$comb_salt;
$comb_availble = $this->Conn->GetOne($sql);
// 2.1. check if Availability flag is set, then
if ($comb_availble == 1) {
// 2.2. check for quantity in stock
$table = Array();
$table['poc'] = $this->Application->getUnitOption('poc', 'TableName');
$table['p'] = $this->Application->getUnitOption('p', 'TableName');
$table['oi'] = $this->TablePrefix($event).'OrderItems';
$object =& $event->getObject();
$ord_id = $object->GetID();
// 2.3. check if some amount of same combination & product are not already in shopping cart
$sql = 'SELECT '.
$table['p'].'.InventoryStatus,'.
$table['p'].'.BackOrder,
IF('.$table['p'].'.InventoryStatus = 2, '.$table['poc'].'.QtyInStock, '.$table['p'].'.QtyInStock) AS QtyInStock,
IF('.$table['oi'].'.OrderItemId IS NULL, 0, '.$table['oi'].'.Quantity) AS Quantity
FROM '.$table['p'].'
LEFT JOIN '.$table['poc'].' ON
'.$table['p'].'.ProductId = '.$table['poc'].'.ProductId
LEFT JOIN '.$table['oi'].' ON
('.$table['oi'].'.OrderId = '.$ord_id.') AND
('.$table['oi'].'.OptionsSalt = '.$comb_salt.') AND
('.$table['oi'].'.ProductId = '.$product_id.') AND
('.$table['oi'].'.BackOrderFlag = 0)
WHERE '.$table['poc'].'.CombinationCRC = '.$comb_salt;
$product_info = $this->Conn->GetRow($sql);
if ($product_info['InventoryStatus']) {
$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
if (!$backordering || $product_info['BackOrder'] == 0) {
// backordering is not enabled generally or for this product directly, then check quantities in stock
if ($qty + $product_info['Quantity'] > $product_info['QtyInStock']) {
$this->Application->SetVar('opt_error', 2);
$result = false;
}
}
}
}
elseif ($comb_availble !== false) {
$this->Application->SetVar('opt_error', 2);
$result = false;
}
}
if ($result) {
$event->status = erSUCCESS;
$event->redirect = $this->Application->IsAdmin() ? true : $this->Application->GetVar('shop_cart_template');
}
else {
$event->status = erFAIL;
}
return $result;
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnUpdateItemOptions(&$event)
{
$opt_data = $this->Application->GetVar('options');
$options = getArrayValue($opt_data, $this->Application->GetVar('p_id'));
if (!$options) {
$qty_data = $this->Application->GetVar('qty');
$comb_id = key(getArrayValue($qty_data, $this->Application->GetVar('p_id')));
$options = unserialize($this->Conn->GetOne('SELECT Combination FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationId = '.$comb_id));
}
if (!$options) return;
$ord_item =& $this->Application->recallObject('orditems.-opt', null, Array ('skip_autoload' => true));
/* @var $ord_item kDBItem */
$ord_item->Load($this->Application->GetVar('orditems_id'));
// assuming that quantity cannot be changed during order item editing
if (!$this->CheckOptions($event, $options, $ord_item->GetDBField('ProductId'), 0, $ord_item->GetDBField('OptionsSelectionMode'))) return;
$item_data = unserialize($ord_item->GetDBField('ItemData'));
$item_data['Options'] = $options;
$ord_item->SetDBField('ItemData', serialize($item_data));
$ord_item->SetDBField('OptionsSalt', $this->OptionsSalt($options));
$ord_item->Update();
$event->CallSubEvent('OnRecalculateItems');
if ($event->status == erSUCCESS && $this->Application->IsAdmin()) {
$event->redirect_params['opener'] = 'u';
}
}
function BuildSubscriptionItemData($item_id, $item_data)
{
$products_table = $this->Application->getUnitOption('p', 'TableName');
$products_idfield = $this->Application->getUnitOption('p', 'IDField');
$sql = 'SELECT AccessGroupId FROM %s WHERE %s = %s';
$item_data['PortalGroupId'] = $this->Conn->GetOne( sprintf($sql, $products_table, $products_idfield, $item_id) );
$pricing_table = $this->Application->getUnitOption('pr', 'TableName');
$pricing_idfield = $this->Application->getUnitOption('pr', 'IDField');
// $sql = 'SELECT AccessDuration, AccessUnit, DurationType, AccessExpiration FROM %s WHERE %s = %s';
$sql = 'SELECT * FROM %s WHERE %s = %s';
$pricing_id = $this->GetPricingId($item_id, $item_data);
$item_data['PricingId'] = $pricing_id;
$pricing_info = $this->Conn->GetRow( sprintf($sql, $pricing_table, $pricing_idfield, $pricing_id ) );
$unit_secs = Array(1 => 1, 2 => 60, 3 => 3600, 4 => 86400, 5 => 604800, 6 => 2592000, 7 => 31536000);
/*
// Customization healtheconomics.org
$item_data['DurationType'] = $pricing_info['DurationType'];
$item_data['AccessExpiration'] = $pricing_info['AccessExpiration'];
// Customization healtheconomics.org --
*/
$item_data['Duration'] = $pricing_info['AccessDuration'] * $unit_secs[ $pricing_info['AccessUnit'] ];
return $item_data;
}
function OnRemoveCoupon(&$event)
{
$object =& $event->getObject();
$this->RemoveCoupon($object);
$event->CallSubEvent('OnRecalculateItems');
$event->SetRedirectParam('checkout_error', 7);
}
function RemoveCoupon(&$object)
{
$coupon_id = $object->GetDBField('CouponId');
$coupon =& $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
$res = $coupon->Load($coupon_id);
$uses = $coupon->GetDBField('NumberOfUses');
if($res && isset($uses))
{
$coupon->SetDBField('NumberOfUses', $uses + 1);
$coupon->SetDBField('Status', 1);
$coupon->Update();
}
$object->SetDBField('CouponId', 0);
$object->SetDBField('CouponDiscount', 0);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnAddVirtualProductToCart(&$event)
{
$l_info = $this->Application->GetVar('l');
if($l_info)
{
foreach($l_info as $link_id => $link_info) {}
$item_data['LinkId'] = $link_id;
$item_data['ListingTypeId'] = $link_info['ListingTypeId'];
}
else
{
$link_id = $this->Application->GetVar('l_id');
$sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption('l', 'TableName').'
WHERE LinkId = '.$link_id;
$sql = 'SELECT ListingTypeId FROM '.$this->Application->getUnitOption('ls', 'TableName').'
WHERE ItemResourceId = '.$this->Conn->GetOne($sql);
$item_data['LinkId'] = $link_id;
$item_data['ListingTypeId'] = $this->Conn->GetOne($sql);
}
$sql = 'SELECT VirtualProductId FROM '.$this->Application->getUnitOption('lst', 'TableName').'
WHERE ListingTypeId = '.$item_data['ListingTypeId'];
$item_id = $this->Conn->GetOne($sql);
$event->setEventParam('ItemData', serialize($item_data));
$this->AddItemToOrder($event, $item_id);
$event->redirect = $this->Application->GetVar('shop_cart_template');
// don't pass unused info to shopping cart, brokes old mod-rewrites
$event->SetRedirectParam('pass', 'm'); // not to pass link id
$event->SetRedirectParam('m_cat_id', 0); // not to pass link id
}
function OnRemoveFromCart(&$event)
{
$ord_item_id = $this->Application->GetVar('orditems_id');
$ord_id = $this->getPassedId($event);
$this->Conn->Query('DELETE FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$ord_id.' AND OrderItemId = '.$ord_item_id);
$this->OnRecalculateItems($event);
}
function OnCleanupCart(&$event)
{
$object =& $event->getObject();
$sql = 'DELETE FROM '.TABLE_PREFIX.'OrderItems
WHERE OrderId = '.$this->getPassedID($event);
$this->Conn->Query($sql);
$this->RemoveCoupon($object);
$this->RemoveGiftCertificate($object);
$this->OnRecalculateItems($event);
}
/**
* Returns order id from session or last used
*
* @param kEvent $event
* @return int
*/
function getPassedId(&$event)
{
$event->setEventParam('raise_warnings', 0);
$passed = parent::getPassedID($event);
if( $this->Application->IsAdmin() ) return $passed;
if ($event->Special == 'last') {
// return last order id (for using on thank you page)
return $this->Application->RecallVar('front_order_id');
}
$ses_id = $this->Application->RecallVar( $event->getPrefixSpecial(true).'_id' );
if ( $passed && ($passed != $ses_id) )
{
$query = 'SELECT PortalUserId FROM '.TABLE_PREFIX.'Orders WHERE OrderId = '.$passed;
$user_id = $this->Conn->GetOne($query);
if ($user_id != $this->Application->RecallVar('user_id'))
{
$this->Application->SetVar($event->getPrefixSpecial().'_id', 0);
return 0;
}
else
{
return $passed;
}
}
else // not passed or equals to ses_id
{
if (!$ses_id)
{
$this->CreateNewCart($event);
return $this->Application->RecallVar($event->getPrefixSpecial(true).'_id');
}
else
{
return $ses_id;
}
}
return $passed;
}
function CreateNewCart(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$new_number = $this->getNextOrderNumber($event);
$object->SetDBField('Number', $new_number);
$object->SetDBField('SubNumber', 0);
$object->SetDBField('Type', 0); //incomplete
$object->SetDBField('VisitId', $this->Application->RecallVar('visit_id') );
$user_id = $this->Application->RecallVar('user_id');
if (!$user_id) $user_id = -2; //Guest
$object->SetDBField('PortalUserId', $user_id);
$affiliate_id = $this->isAffiliate($user_id);
if($affiliate_id)
{
$object->SetDBField('AffiliateId', $affiliate_id);
}
else
{
$affiliate_storage_method = $this->Application->ConfigValue('Comm_AffiliateStorageMethod');
$object->SetDBField('AffiliateId', $affiliate_storage_method == 1 ? (int)$this->Application->RecallVar('affiliate_id') : (int)$this->Application->GetVar('affiliate_id') );
}
$default_type = $this->Conn->GetOne('SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes WHERE IsPrimary = 1');
if($default_type)
{
$object->SetDBField('PaymentType', $default_type);
}
$object->Create();
$this->Application->SetVar($event->getPrefixSpecial(true).'_id', $object->GetId());
$this->Application->StoreVar($event->getPrefixSpecial(true).'_id', $object->GetId());
}
function StoreContinueShoppingLink()
{
list($index_file, $env) = explode('|', $this->Application->recallVar('last_template'));
$last_t = $this->Application->BaseURL().$index_file.'?'.ENV_VAR_NAME.'='.$env;
$this->Application->StoreVar('continue_shopping', 'external:'.PROTOCOL.SERVER_NAME.$this->Application->RecallVar('last_url'));
}
/**
* Sets required fields for order, based on current checkout step
* !!! Do not use switch here, since all cases may be on the same form simultaniously
*
* @param kEvent $event
*/
function SetStepRequiredFields(&$event)
{
$order =& $event->getObject();
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ($items_info) {
// updated address available from SUBMIT -> use it
list($id, $field_values) = each($items_info);
}
else {
// no updated address -> use current address
$field_values = Array (
'ShippingCountry' => $order->GetDBField('ShippingCountry'),
'BillingCountry' => $order->GetDBField('BillingCountry'),
'PaymentType' => $order->GetDBField('PaymentType'),
);
}
// shipping address required fields
if ($this->Application->GetVar('check_shipping_address')) {
$has_tangibles = $order->HasTangibleItems();
$req_fields = array('ShippingTo', 'ShippingAddress1', 'ShippingCity', 'ShippingZip', 'ShippingCountry', 'ShippingPhone');
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = $has_tangibles;
}
if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'ShippingCountry') )) {
$order->Fields['ShippingState']['required'] = true; // $has_tangibles
}
}
// billing address required fields
if ($this->Application->GetVar('check_billing_address')) {
$req_fields = array('BillingTo', 'BillingAddress1', 'BillingCity', 'BillingZip', 'BillingCountry', 'BillingPhone');
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = true;
}
if ($cs_helper->CountryHasStates( getArrayValue($field_values, 'BillingCountry') )) {
$order->Fields['BillingState']['required'] = true;
}
}
$check_cc = $this->Application->GetVar('check_credit_card');
$ord_event = $this->Application->GetVar($event->getPrefixSpecial().'_event');
if (($ord_event !== 'OnProceedToPreview') && !$this->Application->IsAdmin()) {
// don't check credit card when going from "billing info" to "order preview" step
$check_cc = 0;
}
if ($check_cc && ($field_values['PaymentType'] == $order->GetDBField('PaymentType'))) {
// cc check required AND payment type was not changed during SUBMIT
if ($this->Application->IsAdmin()) {
$req_fields = array('PaymentCardType', 'PaymentAccount', 'PaymentNameOnCard', 'PaymentCCExpDate');
}
else {
$req_fields = array('PaymentCardType', 'PaymentAccount', 'PaymentNameOnCard', 'PaymentCCExpDate', 'PaymentCVV2');
}
foreach ($req_fields as $field) {
$order->Fields[$field]['required'] = true;
}
}
}
/**
* Set's order's user_id to user from session or Guest otherwise
*
* @param kEvent $event
*/
function CheckUser(&$event)
{
if ( $this->Application->IsAdmin() ) return;
$order =& $event->GetObject();
$ses_user = $this->Application->RecallVar('user_id');
if ($order->GetDBField('PortalUserId') != $ses_user) {
if ($ses_user == 0) $ses_user = -2; //Guest
$order->SetDBField('PortalUserId', $ses_user);
// since CheckUser is called in OnBeforeItemUpdate, we don't need to call udpate here, just set the field
}
}
/* ======================== ADMIN ONLY ======================== */
/**
* Prepare temp tables and populate it
* with items selected in the grid
*
* @param kEvent $event
*/
function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
$object =& $event->getObject();
$new_number = $this->getNextOrderNumber($event);
$object->SetDBField('Number', $new_number);
$object->SetDBField('SubNumber', 0);
$object->SetDBField('OrderIP', $_SERVER['REMOTE_ADDR']);
$order_type = $this->getTypeBySpecial( $this->Application->GetVar('order_type') );
$object->SetDBField('Status', $order_type);
}
/**
* When cloning orders set new order number to them
*
* @param kEvent $event
*/
function OnBeforeClone(&$event)
{
$object =& $event->getObject();
if (substr($event->Special, 0, 9) == 'recurring') {
$object->SetDBField('SubNumber', $object->getNextSubNumber());
$object->SetDBField('OriginalAmount', 0); // needed in this case ?
}
else {
$new_number = $this->getNextOrderNumber($event);
$object->SetDBField('Number', $new_number);
$object->SetDBField('SubNumber', 0);
$object->SetDBField('OriginalAmount', 0);
}
$object->SetDBField('OrderDate', adodb_mktime());
$object->UpdateFormattersSubFields();
$object->SetDBField('GWResult1', '');
$object->SetDBField('GWResult2', '');
}
function OnReserveItems(&$event)
{
$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
$order_items->linkToParent('-inv');
// force re-query, since we are updateing through orditem ITEM, not the list, and
// OnReserveItems may be called 2 times when fullfilling backorders through product edit - first time
// from FullFillBackorders and second time from OnOrderProcess
$order_items->Query(true);
$order_items->GoFirst();
// query all combinations used in this order
$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
$product_object->SwitchToLive();
$order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
$combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
$combinations = $this->queryCombinations($order_items);
$event->status = erSUCCESS;
while (!$order_items->EOL()) {
$rec = $order_items->getCurrentRecord();
$product_object->Load( $rec['ProductId'] );
if (!$product_object->GetDBField('InventoryStatus')) {
$order_items->GoNext();
continue;
}
$inv_object =& $this->getInventoryObject($product_object, $combination_item, $combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ]);
$lack = $rec['Quantity'] - $rec['QuantityReserved'];
if ($lack > 0) {
// reserve lack or what is available (in case if we need to reserve anything, by Alex)
$to_reserve = min($lack, $inv_object->GetDBField('QtyInStock') - $product_object->GetDBField('QtyInStockMin'));
if ($to_reserve < $lack) $event->status = erFAIL; // if we can't reserve the full lack
//reserve in order
$order_item->SetDBFieldsFromHash($rec);
$order_item->SetDBField('QuantityReserved', $rec['QuantityReserved'] + $to_reserve);
$order_item->SetId($rec['OrderItemId']);
$order_item->Update();
//update product - increase reserved, decrease in stock
$inv_object->SetDBField('QtyReserved', $inv_object->GetDBField('QtyReserved') + $to_reserve);
$inv_object->SetDBField('QtyInStock', $inv_object->GetDBField('QtyInStock') - $to_reserve);
$inv_object->SetDBField('QtyBackOrdered', $inv_object->GetDBField('QtyBackOrdered') - $to_reserve);
$inv_object->Update();
if ($product_object->GetDBField('InventoryStatus') == 2) {
// inventory by options, then restore changed combination values back to common $combinations array !!!
$combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ] = $inv_object->FieldValues;
}
}
$order_items->GoNext();
}
return true;
}
function OnOrderPrint(&$event)
{
$event->redirect_params = Array('opener'=>'s');
}
/**
* Processes order each tab info resetting to other tab info / to user info
*
* @param kEvent $event
* @access public
*/
function OnResetAddress(&$event)
{
$to_tab = $this->Application->GetVar('to_tab');
$from_tab = substr($event->Name,strlen('OnResetTo'));
// load values from db
$object =& $event->getObject();
// update values from submit
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info) $field_values = array_shift($items_info);
$object->SetFieldsFromHash($field_values);
$this->DoResetAddress($object, $from_tab, $to_tab);
$object->Update();
$event->redirect = false;
}
/**
- * Validates passed search parameters and stores them in session if all is ok
- *
- * @param kEvent $event
- */
- function OnSearch(&$event)
- {
- if($event->Special != 'sitem') parent::OnSearch($event);
-
- $object =& $event->getObject( Array('skip_autoload' => true) );
-
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- if($items_info)
- {
- $id = 0;
- $object->Load($id);
- $field_values = $items_info[$id];
- $object->SetFieldsFromHash($field_values);
- if( $object->Validate() )
- {
- $fields = Array('OrderNumber','OrderSearchId','Username','CustomerName',
- 'FromDateTime','ToDateTime','FromAmount','ToAmount',
- 'AffiliateUser', 'Status', 'OrderIP', 'PaymentAccount');
-
- $search_filter = Array();
- foreach($fields as $field)
- {
- $value = $object->GetDBField($field);
- if( strlen($value) == 0 || ($field == 'Status' && $value == -1) ) continue; // because 0 is normal order status
-
- $field_options = $object->GetFieldOptions($field);
-
- $search_field = getArrayValue($field_options,'filter_field');
- if($search_field === false) $search_field = $field;
-
- $filter_type = isset($object->VirtualFields[$search_field]) ? 'having' : 'where';
- $table_name = ($filter_type == 'where') ? '`'.$object->TableName.'`.' : '';
-
- $filter_name_map = Array('range_from' => '`%s` >= \'%s\'', 'range_to' => '`%s` <= \'%s\'', 'equals' => '`%s` = \'%s\'', 'like' => '`%s` LIKE \'%%%s%%\'');
- if($field_options['filter_type'] == 'like')
- {
- $value = preg_replace( '/\'(.*)\'/U', '\\1', $this->Conn->qstr( str_replace('\\','\\\\', $value) ) );
- }
-
- $search_value = $table_name.sprintf($filter_name_map[ $field_options['filter_type'] ], $search_field, $value);
-
- $search_filter[$field] = Array('search_value'=> $object->GetField($field), 'type' => $filter_type, 'value' => $search_value);
- }
-
- if(!$search_filter)
- {
- $event->Init($event->Prefix, 'search');
- $this->OnSearchReset($event);
- $event->Init($event->Prefix, 'sitem');
- return false;
- }
-
- $this->Application->StoreVar('ord.search_search_filter', serialize($search_filter) );
- $this->Application->StoreVar('ord.search_search_keyword', 'orders search :)');
- }
- else
- {
- $this->Application->setEvent('ord.sitem',''); // not to submit 2 event at one in temp table
- $event->redirect = false;
- }
- }
- }
-
- /**
* Processes item selection from popup item selector
*
* @todo Is this called ? (by Alex)
* @param kEvent $event
*/
function OnProcessSelected(&$event)
{
$selected_ids = $this->Application->GetVar('selected_ids');
$product_ids = $selected_ids['p'];
if ($product_ids) {
$product_ids = explode(',', $product_ids);
// !!! LOOK OUT - Adding items to Order in admin is handled in order_ITEMS_event_handler !!!
foreach ($product_ids as $product_id) {
$this->AddItemToOrder($event, $product_id);
}
}
$this->finalizePopup($event);
}
function OnMassPlaceOrder(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$ids = $this->StoreSelectedIDs($event);
if($ids)
{
foreach($ids as $id)
{
$object->Load($id);
$this->DoPlaceOrder($event);
}
}
$event->status = erSUCCESS;
}
/**
* Universal
* Checks if QtyInStock is enough to fullfill backorder (Qty - QtyReserved in order)
*
* @param int $ord_id
* @return bool
*/
function ReadyToProcess($ord_id)
{
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$query = ' SELECT SUM(IF( IF('.TABLE_PREFIX.'Products.InventoryStatus = 2, '.$poc_table.'.QtyInStock, '.TABLE_PREFIX.'Products.QtyInStock) - '.TABLE_PREFIX.'Products.QtyInStockMin >= ('.TABLE_PREFIX.'OrderItems.Quantity - '.TABLE_PREFIX.'OrderItems.QuantityReserved), 0, 1))
FROM '.TABLE_PREFIX.'OrderItems
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = '.TABLE_PREFIX.'OrderItems.ProductId
LEFT JOIN '.$poc_table.' ON ('.$poc_table.'.CombinationCRC = '.TABLE_PREFIX.'OrderItems.OptionsSalt) AND ('.$poc_table.'.ProductId = '.TABLE_PREFIX.'OrderItems.ProductId)
WHERE OrderId = '.$ord_id.'
GROUP BY OrderId';
// IF (IF(InventoryStatus = 2, poc.QtyInStock, p.QtyInStock) - QtyInStockMin >= (Quantity - QuantityReserved), 0, 1
return ($this->Conn->GetOne($query) == 0);
}
/**
* Return all option combinations used in order
*
* @param kDBList $order_items
* @return Array
*/
function queryCombinations(&$order_items)
{
// 1. collect combination crc used in order
$combinations = Array();
while (!$order_items->EOL()) {
$row = $order_items->getCurrentRecord();
if ($row['OptionsSalt'] == 0) {
$order_items->GoNext();
continue;
}
$combinations[] = '(poc.ProductId = '.$row['ProductId'].') AND (poc.CombinationCRC = '.$row['OptionsSalt'].')';
$order_items->GoNext();
}
$order_items->GoFirst();
$combinations = array_unique($combinations); // if same combination+product found as backorder & normal order item
if ($combinations) {
// 2. query data about combinations
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$sql = 'SELECT CONCAT(poc.ProductId, "_", poc.CombinationCRC) AS CombinationKey, poc.*
FROM '.$poc_table.' poc
WHERE ('.implode(') OR (', $combinations).')';
return $this->Conn->Query($sql, 'CombinationKey');
}
return Array();
}
/**
* Returns object to perform inventory actions on
*
* @param ProductsItem $product current product object in order
* @param kDBItem $combination combination dummy object
* @param Array $combination_data pre-queried combination data
* @return kDBItem
*/
function &getInventoryObject(&$product, &$combination, $combination_data)
{
if ($product->GetDBField('InventoryStatus') == 2) {
// inventory by option combinations
$combination->SetDBFieldsFromHash($combination_data);
$combination->setID($combination_data['CombinationId']);
$change_item =& $combination;
}
else {
// inventory by product ifself
$change_item =& $product;
}
return $change_item;
}
/**
* Approve order ("Pending" tab)
*
* @param kDBList $order_items
* @return int new status of order if any
*/
function approveOrder(&$order_items)
{
$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
$order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
$combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
$combinations = $this->queryCombinations($order_items);
while (!$order_items->EOL()) {
$rec = $order_items->getCurrentRecord();
$order_item->SetDBFieldsFromHash($rec);
$order_item->SetId($rec['OrderItemId']);
$order_item->SetDBField('QuantityReserved', 0);
$order_item->Update();
$product_object->Load( $rec['ProductId'] );
if (!$product_object->GetDBField('InventoryStatus')) {
// if no inventory info is collected, then skip this order item
$order_items->GoNext();
continue;
}
$inv_object =& $this->getInventoryObject($product_object, $combination_item, $combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ]);
// decrease QtyReserved by amount of product used in order
$inv_object->SetDBField('QtyReserved', $inv_object->GetDBField('QtyReserved') - $rec['Quantity']);
$inv_object->Update();
if ($product_object->GetDBField('InventoryStatus') == 2) {
// inventory by options, then restore changed combination values back to common $combinations array !!!
$combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ] = $inv_object->FieldValues;
}
$order_items->GoNext();
}
return true;
}
function restoreOrder(&$order_items)
{
$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
$product_object->SwitchToLive();
$order_item =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
$combination_item =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
$combinations = $this->queryCombinations($order_items);
while( !$order_items->EOL() )
{
$rec = $order_items->getCurrentRecord();
$product_object->Load( $rec['ProductId'] );
if (!$product_object->GetDBField('InventoryStatus')) {
// if no inventory info is collected, then skip this order item
$order_items->GoNext();
continue;
}
$inv_object =& $this->getInventoryObject($product_object, $combination_item, $combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ]);
// cancelling backorderd qty if any
$lack = $rec['Quantity'] - $rec['QuantityReserved'];
if ($lack > 0 && $rec['BackOrderFlag'] > 0) { // lack should have been recorded as QtyBackOrdered
$inv_object->SetDBField('QtyBackOrdered', $inv_object->GetDBField('QtyBackOrdered') - $lack);
}
// canceling reservation in stock
$inv_object->SetDBField('QtyReserved', $inv_object->GetDBField('QtyReserved') - $rec['QuantityReserved']);
// putting remaining freed qty back to stock
$inv_object->SetDBField('QtyInStock', $inv_object->GetDBField('QtyInStock') + $rec['QuantityReserved']);
$inv_object->Update();
$product_h =& $this->Application->recallObject('p_EventHandler');
if ($product_object->GetDBField('InventoryStatus') == 2) {
// inventory by options, then restore changed combination values back to common $combinations array !!!
$combinations[ $rec['ProductId'].'_'.$rec['OptionsSalt'] ] = $inv_object->FieldValues;
// using freed qty to fullfill possible backorders
$product_h->FullfillBackOrders($product_object, $inv_object->GetID());
}
else {
// using freed qty to fullfill possible backorders
$product_h->FullfillBackOrders($product_object, 0);
}
$order_item->SetDBFieldsFromHash($rec);
$order_item->SetId($rec['OrderItemId']);
$order_item->SetDBField('QuantityReserved', 0);
$order_item->Update();
$order_items->GoNext();
}
return true;
}
/**
* Approve order + special processing
*
* @param kEvent $event
*/
function MassInventoryAction(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
return;
}
// process order products
$object =& $this->Application->recallObject($event->Prefix.'.-inv', null, Array('skip_autoload' => true));
$ids = $this->StoreSelectedIDs($event);
if($ids)
{
foreach($ids as $id)
{
$object->Load($id);
$this->InventoryAction($event);
}
}
}
function InventoryAction(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
return;
}
$event_status_map = Array(
'OnMassOrderApprove' => ORDER_STATUS_TOSHIP,
'OnOrderApprove' => ORDER_STATUS_TOSHIP,
'OnMassOrderDeny' => ORDER_STATUS_DENIED,
'OnOrderDeny' => ORDER_STATUS_DENIED,
'OnMassOrderArchive' => ORDER_STATUS_ARCHIVED,
'OnOrderArchive' => ORDER_STATUS_ARCHIVED,
'OnMassOrderShip' => ORDER_STATUS_PROCESSED,
'OnOrderShip' => ORDER_STATUS_PROCESSED,
'OnMassOrderProcess' => ORDER_STATUS_TOSHIP,
'OnOrderProcess' => ORDER_STATUS_TOSHIP,
);
$order_items =& $this->Application->recallObject('orditems.-inv','orditems_List',Array('skip_counting'=>true,'per_page'=>-1) );
$order_items->linkToParent('-inv');
$order_items->Query();
$order_items->GoFirst();
$object =& $this->Application->recallObject($event->Prefix.'.-inv');
/* @var $object OrdersItem */
if ($object->GetDBField('OnHold')) {
// any actions have no effect while on hold
return ;
}
// preparing new status, but not setting it yet
$object->SetDBField('Status', $event_status_map[$event->Name]);
$set_new_status = false;
$event->status = erSUCCESS;
$email_params = $this->OrderEmailParams($object);
switch ($event->Name) {
case 'OnMassOrderApprove':
case 'OnOrderApprove':
$set_new_status = false; //on succsessfull approve order will be split and new orders will have new statuses
if ($object->GetDBField('ChargeOnNextApprove')) {
$charge_info = $this->ChargeOrder($object);
if (!$charge_info['result']) {
break;
}
// removing ChargeOnNextApprove
$object->SetDBField('ChargeOnNextApprove', 0);
$sql = 'UPDATE '.$object->TableName.' SET ChargeOnNextApprove = 0 WHERE '.$object->IDField.' = '.$object->GetID();
$this->Conn->Query($sql);
}
// charge user for order in case if we user 2step charging (e.g. AUTH_ONLY + PRIOR_AUTH_CAPTURE)
$gw_data = $object->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
$charge_result = $gateway_object->Charge($object->FieldValues, $gw_data['gw_params']);
$sql = 'UPDATE %s SET GWResult2 = %s WHERE %s = %s';
$sql = sprintf($sql, $object->TableName, $this->Conn->qstr($gateway_object->getGWResponce()), $object->IDField, $object->GetID() );
$this->Conn->Query($sql);
$object->SetDBField('GWResult2', $gateway_object->getGWResponce() );
if ($charge_result) {
$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
foreach ($order_items->Records as $product_item) {
if (!$product_item['ProductId']) {
// product may have been deleted
continue;
}
$product_object->Load($product_item['ProductId']);
$hits = floor( $product_object->GetDBField('Hits') ) + 1;
$sql = 'SELECT MAX(Hits) FROM '.$this->Application->getUnitOption('p', 'TableName').'
WHERE FLOOR(Hits) = '.$hits;
$hits = ( $res = $this->Conn->GetOne($sql) ) ? $res + 0.000001 : $hits;
$product_object->SetDBField('Hits', $hits);
$product_object->Update();
/*$sql = 'UPDATE '.$this->Application->getUnitOption('p', 'TableName').'
SET Hits = Hits + '.$product_item['Quantity'].'
WHERE ProductId = '.$product_item['ProductId'];
$this->Conn->Query($sql);*/
}
$this->PrepareCoupons($event, $object);
$this->SplitOrder($event, $object);
if ($object->GetDBField('IsRecurringBilling') != 1) {
$email_event_user =& $this->Application->EmailEventUser('ORDER.APPROVE', $object->GetDBField('PortalUserId'), $email_params);
// Mask credit card with XXXX
if ($this->Application->ConfigValue('Comm_MaskProcessedCreditCards')) {
$this->maskCreditCard($object, 'PaymentAccount');
$set_new_status = 1;
}
}
}
break;
case 'OnMassOrderDeny':
case 'OnOrderDeny':
foreach ($order_items->Records as $product_item) {
if (!$product_item['ProductId']) {
// product may have been deleted
continue;
}
$this->raiseProductEvent('Deny', $product_item['ProductId'], $product_item);
}
$email_event_user =& $this->Application->EmailEventUser('ORDER.DENY', $object->GetDBField('PortalUserId'), $email_params);
if ($event->Name == 'OnMassOrderDeny' || $event->Name == 'OnOrderDeny') {
// inform payment gateway that order was declined
$gw_data = $object->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
$gateway_object->OrderDeclined($object->FieldValues, $gw_data['gw_params']);
}
// !!! LOOK HERE !!!
// !!!! no break !!!! here on purpose!!!
case 'OnMassOrderArchive':
case 'OnOrderArchive':
// it's critical to update status BEFORE processing items because
// FullfillBackorders could be called during processing and in case
// of order denial/archive fullfill could reserve the qtys back for current backorder
$object->Update();
$this->restoreOrder($order_items);
$set_new_status = false; // already set
break;
case 'OnMassOrderShip':
case 'OnOrderShip':
$set_new_status = $this->approveOrder($order_items);
// $set_new_status = $this->shipOrder($order_items);
$object->SetDBField('ShippingDate', adodb_mktime());
$object->UpdateFormattersSubFields();
$shipping_email = $object->GetDBField('ShippingEmail');
$email_params['to_email'] = $shipping_email ? $shipping_email : $email_params['_user_email'];
$email_event_user =& $this->Application->EmailEventUser('ORDER.SHIP', $object->GetDBField('PortalUserId'), $email_params);
// inform payment gateway that order was shipped
$gw_data = $object->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
$gateway_object->OrderShipped($object->FieldValues, $gw_data['gw_params']);
break;
case 'OnMassOrderProcess':
case 'OnOrderProcess':
if ($this->ReadyToProcess($object->GetID())) {
$event->CallSubEvent('OnReserveItems');
if ($event->status == erSUCCESS) $set_new_status = true;
$email_event_user =& $this->Application->EmailEventUser('BACKORDER.PROCESS', $object->GetDBField('PortalUserId'), $email_params);
} else {
$event->status = erFAIL;
}
break;
}
if ($set_new_status) {
$object->Update();
}
}
/**
* Hides last 4 digits from credit card number
*
* @param OrdersItem $object
* @param string $field
*/
function maskCreditCard(&$object, $field)
{
$value = $object->GetDBField($field);
$value = preg_replace('/'.substr($value, -4).'$/', str_repeat('X', 4), $value);
$object->SetDBField($field, $value);
}
/**
* Get next free order number
*
* @param kEvent $event
*/
function getNextOrderNumber(&$event)
{
$object =& $event->getObject();
$sql = 'SELECT MAX(Number) FROM '.$this->Application->GetLiveName($object->TableName);
return max($this->Conn->GetOne($sql) + 1, $this->Application->ConfigValue('Comm_Next_Order_Number'));
}
/**
* Set's new order address based on another address from order (e.g. billing from shipping)
*
* @param unknown_type $object
* @param unknown_type $from
* @param unknown_type $to
*/
function DoResetAddress(&$object, $from, $to)
{
$fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
if ($from == 'User') {
// skip theese fields when coping from user, because they are not present in user profile
$tmp_fields = array_flip($fields);
// unset($tmp_fields['Company'], $tmp_fields['Fax'], $tmp_fields['Address2']);
$fields = array_flip($tmp_fields);
}
// apply modification
foreach ($fields as $field_name) {
$object->SetDBField($to.$field_name, $object->GetDBField($from.$field_name));
}
}
/**
* Set's additional view filters set from "Orders" => "Search" tab
*
* @param kEvent $event
*/
function AddFilters(&$event)
{
parent::AddFilters($event);
if($event->Special != 'search') return true;
$search_filter = $this->Application->RecallVar('ord.search_search_filter');
if(!$search_filter) return false;
$search_filter = unserialize($search_filter);
$event->setPseudoClass('_List');
$object =& $event->getObject();
foreach($search_filter as $filter_name => $filter_params)
{
$filter_type = $filter_params['type'] == 'where' ? WHERE_FILTER : HAVING_FILTER;
$object->addFilter($filter_name, $filter_params['value'], $filter_type, FLT_VIEW);
}
}
/**
* Set's status incomplete to all cloned orders
*
* @param kEvent $event
*/
function OnAfterClone(&$event)
{
$id = $event->getEventParam('id');
$table = $this->Application->getUnitOption($event->Prefix,'TableName');
$id_field = $this->Application->getUnitOption($event->Prefix,'IDField');
// set cloned order status to Incomplete
$sql = 'UPDATE '.$table.' SET Status = 0 WHERE '.$id_field.' = '.$id;
$this->Conn->Query($sql);
}
/* ======================== COMMON CODE ======================== */
/**
* Split one timestamp field into 2 virtual fields
*
* @param kEvent $event
* @access public
*/
function OnAfterItemLoad(&$event)
{
// get user fields
$object =& $event->getObject();
$user_id = $object->GetDBField('PortalUserId');
if($user_id)
{
$user_info = $this->Conn->GetRow('SELECT *, CONCAT(FirstName,\' \',LastName) AS UserTo FROM '.TABLE_PREFIX.'PortalUser WHERE PortalUserId = '.$user_id);
$fields = Array('UserTo'=>'UserTo','UserPhone'=>'Phone','UserFax'=>'Fax','UserEmail'=>'Email',
'UserAddress1'=>'Street','UserAddress2'=>'Street2','UserCity'=>'City','UserState'=>'State',
'UserZip'=>'Zip','UserCountry'=>'Country','UserCompany'=>'Company');
foreach($fields as $object_field => $user_field)
{
$object->SetDBField($object_field,$user_info[$user_field]);
}
}
$object->SetDBField('PaymentCVV2', $this->Application->RecallVar('CVV2Code') );
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
$this->SetStepRequiredFields($event);
// needed in OnAfterItemUpdate
$this->Application->SetVar('OriginalShippingOption', $object->GetDBField('ShippingOption'));
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
$object = &$event->getObject();
if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return;
$this->CheckUser($event);
if(!$object->GetDBField('OrderIP'))
{
$object->SetDBField('OrderIP', $_SERVER['REMOTE_ADDR']);
}
$shipping_option = $this->Application->GetVar('OriginalShippingOption');
$new_shipping_option = $object->GetDBField('ShippingOption');
if ($shipping_option != $new_shipping_option) {
$this->UpdateShippingOption($event);
}
else {
$this->UpdateShippingTypes($event);
}
$this->RecalculateProcessingFee($event);
$this->UpdateShippingTotal($event);
$this->RecalculateGift($event);
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @access protected
* @see OnListBuild
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
$types = $event->getEventParam('types');
if($types == 'myorders' || $types == 'myrecentorders')
{
$user_id = $this->Application->RecallVar('user_id');
$object->addFilter('myitems_user1','%1$s.PortalUserId = '.$user_id);
$object->addFilter('myitems_user2','%1$s.PortalUserId > 0');
$object->addFilter('Status','%1$s.Status != 0');
}
else if ($event->Special == 'returns') {
// $object->addFilter('returns_filter',TABLE_PREFIX.'Orders.Status = '.ORDER_STATUS_PROCESSED.' AND (
// SELECT SUM(ReturnType)
// FROM '.TABLE_PREFIX.'OrderItems oi
// WHERE oi.OrderId = '.TABLE_PREFIX.'Orders.OrderId
// ) > 0');
$object->addFilter('returns_filter',TABLE_PREFIX.'Orders.Status = '.ORDER_STATUS_PROCESSED.' AND '.TABLE_PREFIX.'Orders.ReturnTotal > 0');
}
else if ($event->Special == 'user') {
$user_id = $this->Application->GetVar('u_id');
$object->addFilter('user_filter','%1$s.PortalUserId = '.$user_id);
}
else {
$special = $event->Special ? $event->Special : $this->Application->GetVar('order_type');
if ($special != 'search') {
// don't filter out orders by special in case of search tab
$object->addFilter( 'status_filter', '%1$s.Status='.$this->getTypeBySpecial($special) );
}
if ( $event->getEventParam('selected_only') ) {
$ids = $this->StoreSelectedIDs($event);
$object->addFilter( 'selected_filter', '%1$s.OrderId IN ('.implode(',', $ids).')');
}
}
}
function getTypeBySpecial($special)
{
$special2type = Array('incomplete'=>0,'pending'=>1,'backorders'=>2,'toship'=>3,'processed'=>4,'denied'=>5,'archived'=>6);
return $special2type[$special];
}
function getSpecialByType($type)
{
$type2special = Array(0=>'incomplete',1=>'pending',2=>'backorders',3=>'toship',4=>'processed',5=>'denied',6=>'archived');
return $type2special[$type];
}
function LockTables(&$event)
{
$read = Array();
$write_lock = '';
$read_lock = '';
$write = Array('Orders','OrderItems','Products');
foreach ($write as $tbl) {
$write_lock .= TABLE_PREFIX.$tbl.' WRITE,';
}
foreach ($read as $tbl) {
$read_lock .= TABLE_PREFIX.$tbl.' READ,';
}
$write_lock = rtrim($write_lock, ',');
$read_lock = rtrim($read_lock, ',');
$lock = trim($read_lock.','.$write_lock, ',');
//$this->Conn->Query('LOCK TABLES '.$lock);
}
+ /**
+ * Checks shopping cart products quantities
+ *
+ * @param kEvent $event
+ * @return bool
+ */
function CheckQuantites(&$event)
{
if ($this->OnRecalculateItems($event)) { // if something has changed in the order
if ( $this->Application->IsAdmin() )
{
if ($this->UseTempTables($event)) {
$event->redirect = 'in-commerce/orders/orders_edit_items';
}
}
else
{
$event->redirect = $this->Application->GetVar('viewcart_template');
}
return false;
}
return true;
}
function DoPlaceOrder(&$event)
{
$order =& $event->getObject();
$table_prefix = $this->TablePrefix($event);
$this->LockTables($event);
if (!$this->CheckQuantites($event)) return false;
//everything is fine - we could reserve items
$this->ReserveItems($event);
$this->SplitOrder($event, $order);
return true;
}
function &queryOrderItems(&$event, $table_prefix)
{
$order =& $event->getObject();
$ord_id = $order->GetId();
// TABLE_PREFIX and $table_prefix are NOT the same !!!
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$query = ' SELECT
BackOrderFlag, '.
$table_prefix.'OrderItems.OrderItemId, '.
$table_prefix.'OrderItems.Quantity, '.
$table_prefix.'OrderItems.QuantityReserved,
IF('.TABLE_PREFIX.'Products.InventoryStatus = 2, '.$poc_table.'.QtyInStock, '.TABLE_PREFIX.'Products.QtyInStock) AS QtyInStock, '.
TABLE_PREFIX.'Products.QtyInStockMin, '.
$table_prefix.'OrderItems.ProductId, '.
TABLE_PREFIX.'Products.InventoryStatus,'.
$table_prefix.'OrderItems.OptionsSalt AS CombinationCRC
FROM '.$table_prefix.'OrderItems
LEFT JOIN '.TABLE_PREFIX.'Products ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
LEFT JOIN '.$poc_table.' ON ('.$poc_table.'.CombinationCRC = '.$table_prefix.'OrderItems.OptionsSalt) AND ('.$poc_table.'.ProductId = '.$table_prefix.'OrderItems.ProductId)
WHERE OrderId = '.$ord_id.' AND '.TABLE_PREFIX.'Products.Type = 1
ORDER BY BackOrderFlag ASC';
$items = $this->Conn->Query($query);
return $items;
}
function ReserveItems(&$event)
{
$table_prefix = $this->TablePrefix($event);
$items =& $this->queryOrderItems($event, $table_prefix);
foreach ($items as $an_item) {
if (!$an_item['InventoryStatus']) {
$to_reserve = $an_item['Quantity'] - $an_item['QuantityReserved'];
}
else {
if ($an_item['BackOrderFlag'] > 0) { // we don't need to reserve if it's backordered item
$to_reserve = 0;
}
else {
$to_reserve = min($an_item['Quantity']-$an_item['QuantityReserved'], $an_item['QtyInStock']-$an_item['QtyInStockMin']); //it should be equal, but just in case
}
$to_backorder = $an_item['BackOrderFlag'] > 0 ? $an_item['Quantity']-$an_item['QuantityReserved'] : 0;
}
if ($to_backorder < 0) $to_backorder = 0; //just in case
$query = ' UPDATE '.$table_prefix.'OrderItems
SET QuantityReserved = IF(QuantityReserved IS NULL, '.$to_reserve.', QuantityReserved + '.$to_reserve.')
WHERE OrderItemId = '.$an_item['OrderItemId'];
$this->Conn->Query($query);
if (!$an_item['InventoryStatus']) continue;
$update_clause = ' QtyInStock = QtyInStock - '.$to_reserve.',
QtyReserved = QtyReserved + '.$to_reserve.',
QtyBackOrdered = QtyBackOrdered + '.$to_backorder;
if ($an_item['InventoryStatus'] == 1) {
// inventory by product, then update it's quantities
$query = ' UPDATE '.TABLE_PREFIX.'Products
SET '.$update_clause.'
WHERE ProductId = '.$an_item['ProductId'];
}
else {
// inventory = 2 -> by product option combinations
$poc_idfield = $this->Application->getUnitOption('poc', 'IDField');
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$query = ' UPDATE '.$poc_table.'
SET '.$update_clause.'
WHERE (ProductId = '.$an_item['ProductId'].') AND (CombinationCRC = '.$an_item['CombinationCRC'].')';
}
$this->Conn->Query($query);
}
}
function FreeItems(&$event)
{
$table_prefix = $this->TablePrefix($event);
$items =& $this->queryOrderItems($event, $table_prefix);
foreach ($items as $an_item) {
$to_free = $an_item['QuantityReserved'];
if ($an_item['InventoryStatus']) {
if ($an_item['BackOrderFlag'] > 0) { // we don't need to free if it's backordered item
$to_free = 0;
}
// what's not reserved goes to backorder in stock for orderitems marked with BackOrderFlag
$to_backorder_free = $an_item['BackOrderFlag'] > 0 ? $an_item['Quantity'] - $an_item['QuantityReserved'] : 0;
if ($to_backorder_free < 0) $to_backorder_free = 0; //just in case
$update_clause = ' QtyInStock = QtyInStock + '.$to_free.',
QtyReserved = QtyReserved - '.$to_free.',
QtyBackOrdered = QtyBackOrdered - '.$to_backorder_free;
if ($an_item['InventoryStatus'] == 1) {
// inventory by product
$query = ' UPDATE '.TABLE_PREFIX.'Products
SET '.$update_clause.'
WHERE ProductId = '.$an_item['ProductId'];
}
else {
// inventory by option combinations
$poc_idfield = $this->Application->getUnitOption('poc', 'IDField');
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$query = ' UPDATE '.$poc_table.'
SET '.$update_clause.'
WHERE (ProductId = '.$an_item['ProductId'].') AND (CombinationCRC = '.$an_item['CombinationCRC'].')';
}
$this->Conn->Query($query);
}
$query = ' UPDATE '.$table_prefix.'OrderItems
SET QuantityReserved = IF(QuantityReserved IS NULL, 0, QuantityReserved - '.$to_free.')
WHERE OrderItemId = '.$an_item['OrderItemId'];
$this->Conn->Query($query);
}
}
/**
* Enter description here...
*
* @param kEvent $event
* @param OrdersItem $object
*/
function SplitOrder(&$event, &$object)
{
$affiliate_event = new kEvent('affil:OnOrderApprove');
$affiliate_event->setEventParam('Order_PrefixSpecial', $object->getPrefixSpecial() );
$this->Application->HandleEvent($affiliate_event);
$table_prefix = $this->TablePrefix($event);
$order =& $object;
$ord_id = $order->GetId();
$shipping_option = $order->GetDBField('ShippingOption');
$backorder_select = $shipping_option == 0 ? '0 As BackOrderFlag' : 'BackOrderFlag';
// setting PackageNum to 0 for Non-tangible items, for tangibles first package num is always 1
$query = ' SELECT OrderItemId
FROM '.$table_prefix.'OrderItems
LEFT JOIN '.TABLE_PREFIX.'Products
ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
WHERE '.TABLE_PREFIX.'Products.Type > 1 AND OrderId = '.$ord_id;
$non_tangibles = $this->Conn->GetCol($query);
if ($non_tangibles) {
$query = 'UPDATE '.$table_prefix.'OrderItems SET PackageNum = 0 WHERE OrderItemId IN ('.implode(',', $non_tangibles).')';
$this->Conn->Query($query);
}
// grouping_data:
// 0 => Product Type
// 1 => if NOT tangibale and NOT downloadable - OrderItemId,
// 2 => ProductId
// 3 => Shipping PackageNum
$query = 'SELECT
'.$backorder_select.',
PackageNum,
ProductName,
ShippingTypeId,
CONCAT('.TABLE_PREFIX.'Products.Type,
"_",
IF ('.TABLE_PREFIX.'Products.Type NOT IN ('.PRODUCT_TYPE_DOWNLOADABLE.','.PRODUCT_TYPE_TANGIBLE.'),
CONCAT(OrderItemId, "_", '.TABLE_PREFIX.'Products.ProductId),
""),
"_",
PackageNum
) AS Grouping,
SUM(Quantity) AS TotalItems,
SUM('.$table_prefix.'OrderItems.Weight*Quantity) AS TotalWeight,
SUM(Price * Quantity) AS TotalAmount,
SUM(QuantityReserved) AS TotalReserved,
'.TABLE_PREFIX.'Products.Type AS ProductType
FROM '.$table_prefix.'OrderItems
LEFT JOIN '.TABLE_PREFIX.'Products
ON '.TABLE_PREFIX.'Products.ProductId = '.$table_prefix.'OrderItems.ProductId
WHERE OrderId = '.$ord_id.'
GROUP BY BackOrderFlag, Grouping
ORDER BY BackOrderFlag ASC, PackageNum ASC, ProductType ASC';
$sub_orders = $this->Conn->Query($query);
$processed_sub_orders = Array();
// in case of recurring billing this will not be 0 as usual
//$first_sub_number = ($event->Special == 'recurring') ? $object->getNextSubNumber() - 1 : 0;
$first_sub_number = $object->GetDBField('SubNumber');
$next_sub_number = $first_sub_number;
$group = 1;
$order_has_gift = $order->GetDBField('GiftCertificateDiscount') > 0 ? 1 : 0;
$skip_types = Array (PRODUCT_TYPE_TANGIBLE, PRODUCT_TYPE_DOWNLOADABLE);
foreach ($sub_orders as $sub_order_data) {
$sub_order =& $this->Application->recallObject('ord.-sub'.$next_sub_number, 'ord');
/* @var $sub_order OrdersItem */
if ($this->UseTempTables($event) && $next_sub_number == 0) {
$sub_order =& $order;
}
$sub_order->SetDBFieldsFromHash($order->FieldValues);
$sub_order->SetDBField('SubNumber', $next_sub_number);
$sub_order->SetDBField('SubTotal', $sub_order_data['TotalAmount']);
$grouping_data = explode('_', $sub_order_data['Grouping']);
$named_grouping_data['Type'] = $grouping_data[0];
if (!in_array($named_grouping_data['Type'], $skip_types)) {
$named_grouping_data['OrderItemId'] = $grouping_data[1];
$named_grouping_data['ProductId'] = $grouping_data[2];
$named_grouping_data['PackageNum'] = $grouping_data[3];
}
else {
$named_grouping_data['PackageNum'] = $grouping_data[2];
}
if ($named_grouping_data['Type'] == PRODUCT_TYPE_TANGIBLE) {
$sub_order->SetDBField('ShippingCost', getArrayValue( unserialize($order->GetDBField('ShippingInfo')), $sub_order_data['PackageNum'], 'TotalCost') );
$sub_order->SetDBField('InsuranceFee', getArrayValue( unserialize($order->GetDBField('ShippingInfo')), $sub_order_data['PackageNum'], 'InsuranceFee') );
$sub_order->SetDBField('ShippingInfo', serialize(Array(1 => getArrayValue( unserialize($order->GetDBField('ShippingInfo')), $sub_order_data['PackageNum']))));
}
else {
$sub_order->SetDBField('ShippingCost', 0);
$sub_order->SetDBField('InsuranceFee', 0);
$sub_order->SetDBField('ShippingInfo', ''); //otherwise orders w/o shipping wills still have shipping info!
}
$amount_percent = $sub_order->getTotalAmount() * 100 / $order->getTotalAmount();
// proportional affiliate commission splitting
if ($order->GetDBField('AffiliateCommission') > 0) {
$sub_order->SetDBField('AffiliateCommission', $order->GetDBField('AffiliateCommission') * $amount_percent / 100 );
}
$amount_percent = ($sub_order->GetDBField('SubTotal') + $sub_order->GetDBField('ShippingCost')) * 100 / ($order->GetDBField('SubTotal') + $order->GetDBField('ShippingCost'));
if ($order->GetDBField('ProcessingFee') > 0) {
$sub_order->SetDBField('ProcessingFee', round($order->GetDBField('ProcessingFee') * $amount_percent / 100, 2));
}
$sub_order->RecalculateTax();
$original_amount = $sub_order->GetDBField('SubTotal') + $sub_order->GetDBField('ShippingCost') + $sub_order->GetDBField('VAT') + $sub_order->GetDBField('ProcessingFee') + $sub_order->GetDBField('InsuranceFee') - $sub_order->GetDBField('GiftCertificateDiscount');
$sub_order->SetDBField('OriginalAmount', $original_amount);
if ($named_grouping_data['Type'] == 1 && ($sub_order_data['BackOrderFlag'] > 0
||
($sub_order_data['TotalItems'] != $sub_order_data['TotalReserved'])) ) {
$sub_order->SetDBField('Status', ORDER_STATUS_BACKORDERS);
if ($event->Special != 'recurring') { // just in case if admin uses tangible backordered products in recurring orders
$email_event_user =& $this->Application->EmailEventUser('BACKORDER.ADD', $sub_order->GetDBField('PortalUserId'), $this->OrderEmailParams($sub_order));
$email_event_admin =& $this->Application->EmailEventAdmin('BACKORDER.ADD');
}
}
else {
switch ($named_grouping_data['Type']) {
case PRODUCT_TYPE_DOWNLOADABLE:
$sql = 'SELECT oi.*
FROM '.TABLE_PREFIX.'OrderItems oi
LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
WHERE (OrderId = %s) AND (p.Type = '.PRODUCT_TYPE_DOWNLOADABLE.')';
$downl_products = $this->Conn->Query( sprintf($sql, $ord_id) );
$product_ids = Array();
foreach ($downl_products as $downl_product) {
$this->raiseProductEvent('Approve', $downl_product['ProductId'], $downl_product, $next_sub_number);
$product_ids[] = $downl_product['ProductId'];
}
break;
case PRODUCT_TYPE_TANGIBLE:
$sql = 'SELECT '.$backorder_select.', oi.*
FROM '.TABLE_PREFIX.'OrderItems oi
LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
WHERE (OrderId = %s) AND (BackOrderFlag = 0) AND (p.Type = '.PRODUCT_TYPE_TANGIBLE.')';
$products = $this->Conn->Query( sprintf($sql, $ord_id) );
foreach ($products as $product) {
$this->raiseProductEvent('Approve', $product['ProductId'], $product, $next_sub_number);
}
break;
default:
$order_item_fields = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$named_grouping_data['OrderItemId']);
$this->raiseProductEvent('Approve', $named_grouping_data['ProductId'], $order_item_fields, $next_sub_number);
break;
}
$sub_order->SetDBField('Status', $named_grouping_data['Type'] == PRODUCT_TYPE_TANGIBLE ? ORDER_STATUS_TOSHIP : ORDER_STATUS_PROCESSED);
}
if ($next_sub_number == $first_sub_number) {
$sub_order->SetId($order->GetId());
$sub_order->Update();
}
else {
$sub_order->Create();
}
switch ($named_grouping_data['Type']) {
case PRODUCT_TYPE_TANGIBLE:
$query = 'UPDATE '.$table_prefix.'OrderItems SET OrderId = %s WHERE OrderId = %s AND PackageNum = %s';
$query = sprintf($query, $sub_order->GetId(), $ord_id, $sub_order_data['PackageNum']);
break;
case PRODUCT_TYPE_DOWNLOADABLE:
$query = 'UPDATE '.$table_prefix.'OrderItems SET OrderId = %s WHERE OrderId = %s AND ProductId IN (%s)';
$query = sprintf($query, $sub_order->GetId(), $ord_id, implode(',', $product_ids) );
break;
default:
$query = 'UPDATE '.$table_prefix.'OrderItems SET OrderId = %s WHERE OrderId = %s AND OrderItemId = %s';
$query = sprintf($query, $sub_order->GetId(), $ord_id, $named_grouping_data['OrderItemId']);
break;
}
$this->Conn->Query($query);
if ($order_has_gift) {
// gift certificate can be applied only after items are assigned to suborder
$sub_order->RecalculateGift($event);
$original_amount = $sub_order->GetDBField('SubTotal') + $sub_order->GetDBField('ShippingCost') + $sub_order->GetDBField('VAT') + $sub_order->GetDBField('ProcessingFee') + $sub_order->GetDBField('InsuranceFee') - $sub_order->GetDBField('GiftCertificateDiscount');
$sub_order->SetDBField('OriginalAmount', $original_amount);
$sub_order->Update();
}
$processed_sub_orders[] = $sub_order->GetID();
$next_sub_number++;
$group++;
}
foreach ($processed_sub_orders as $sub_id) {
// update DiscountTotal field
$sql = 'SELECT SUM(ROUND(FlatPrice-Price,2)*Quantity) FROM '.$table_prefix.'OrderItems WHERE OrderId = '.$sub_id;
$discount_total = $this->Conn->GetOne($sql);
$sql = 'UPDATE '.$sub_order->TableName.'
SET DiscountTotal = '.$this->Conn->qstr($discount_total).'
WHERE OrderId = '.$sub_id;
$this->Conn->Query($sql);
}
}
/**
* Call products linked event when spefcfic action is made to product in order
*
* @param string $event_type type of event to get from product ProcessingData = {Approve,Deny,CompleteOrder}
* @param int $product_id ID of product to gather processing data from
* @param Array $order_item_fields OrderItems table record fields (with needed product & order in it)
*/
function raiseProductEvent($event_type, $product_id, $order_item_fields, $next_sub_number=null)
{
$sql = 'SELECT ProcessingData
FROM '.TABLE_PREFIX.'Products
WHERE ProductId = '.$product_id;
$processing_data = $this->Conn->GetOne($sql);
if ($processing_data) {
$processing_data = unserialize($processing_data);
$event_key = getArrayValue($processing_data, $event_type.'Event');
// if requested type of event is defined for product, only then process it
if ($event_key) {
$event = new kEvent($event_key);
$event->setEventParam('field_values', $order_item_fields);
$event->setEventParam('next_sub_number', $next_sub_number);
$this->Application->HandleEvent($event);
}
}
}
+ /**
+ * Updates product info in shopping cart
+ *
+ * @param kEvent $event
+ * @param unknown_type $prod_id
+ * @param unknown_type $back_order
+ * @param unknown_type $qty
+ * @param unknown_type $price
+ * @param unknown_type $discounted_price
+ * @param unknown_type $discount_type
+ * @param unknown_type $discount_id
+ * @param unknown_type $order_item_id
+ * @param unknown_type $options_salt
+ * @param unknown_type $passed_item_data
+ * @param unknown_type $cost
+ * @return unknown
+ */
function UpdateOrderItem(&$event, $prod_id, $back_order, $qty, $price, $discounted_price, $discount_type, $discount_id, $order_item_id = 0, $options_salt = 0, $passed_item_data=null, $cost=0)
{
$price = (float) $price;
$discounted_price = (float) $discounted_price;
$qty = (int) $qty;
$ord_id = $this->getPassedId($event);
$table_prefix = $this->TablePrefix($event);
if($order_item_id)
{
$query = ' SELECT OrderItemId, Quantity, FlatPrice, Price, BackOrderFlag, ItemData FROM '.$table_prefix.'OrderItems
WHERE OrderItemId = '.$order_item_id;
}
else
{
// try to load specified Product by its Id and BackOrderFlag in the order
$query = 'SELECT OrderItemId, Quantity, FlatPrice, Price, BackOrderFlag, ItemData FROM '.$table_prefix.'OrderItems
WHERE
OrderId = '.$ord_id.'
AND
ProductId = '.$prod_id.'
AND
BackOrderFlag '.($back_order ? ' >= 1' : ' = 0').'
AND
OptionsSalt = '.$options_salt;
}
$item_row = $this->Conn->GetRow($query);
$item_id = $item_row['OrderItemId'];
$object =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
$item_data = $item_row['ItemData'];
if($item_data)
{
$item_data = unserialize($item_data);
}
$orig_discount_type = (int)getArrayValue($item_data, 'DiscountType');
$orig_discount_id = (int)getArrayValue($item_data, 'DiscountId');
if ($item_id) { // if Product already exists in the order
if ($qty > 0 &&
$item_row['Quantity'] == $qty &&
round($item_row['FlatPrice'], 3) == round($price, 3) &&
round($item_row['Price'], 3) == round($discounted_price, 3) &&
$orig_discount_type == $discount_type &&
$orig_discount_id == $discount_id)
{
return false;
}
$object->Load($item_id);
if ($qty > 0) { // Update Price by _TOTAL_ qty
$object->SetDBField('Quantity', $qty);
$object->SetDBField('FlatPrice', $price );
$object->SetDBField('Price', $discounted_price );
$object->SetDBField('Cost', $cost);
if($item_data = $object->GetDBField('ItemData'))
{
$item_data = unserialize($item_data);
}
else
{
$item_data = Array();
}
$item_data['DiscountType'] = $discount_type;
$item_data['DiscountId'] = $discount_id;
$object->SetDBField('ItemData', serialize($item_data));
$object->Update();
}
else { // delete products with 0 qty
$object->Delete();
}
}
elseif ($qty > 0) { // if we are adding product
$product =& $this->Application->recallObject('p');
$product->Load($prod_id);
$object->SetDBField('ProductId', $prod_id);
$object->SetDBField('ProductName', $product->GetField('Name'));
$object->SetDBField('Quantity', $qty);
$object->SetDBField('FlatPrice', $price );
$object->SetDBField('Price', $discounted_price );
$object->SetDBField('Cost', $cost);
$object->SetDBField('OrderId', $ord_id);
$object->SetDBField('BackOrderFlag', $back_order);
if ($passed_item_data && !is_array($passed_item_data)) {
$passed_item_data = unserialize($passed_item_data);
}
// $item_data = Array('DiscountType' => $discount_type, 'DiscountId' => $discount_id);
$item_data = $passed_item_data;
$object->SetDBField('ItemData', serialize($item_data));
$object->Create();
if( $this->UseTempTables($event) ) $object->SetTempId();
}
else {
return false; // item requiring to set qty to 0, meaning already does not exist
}
return true;
}
function OptionsSalt($options, $comb_only=false)
{
$helper =& $this->Application->recallObject('kProductOptionsHelper');
return $helper->OptionsSalt($options, $comb_only);
}
/**
* Enter description here...
*
* @param kEvent $event
* @param int $item_id
*/
function AddItemToOrder(&$event, $item_id, $qty = null, $package_num = null)
{
if (!isset($qty)) {
$qty = 1;
}
// Loading product to add
$product =& $this->Application->recallObject('p.toadd', null, Array('skip_autoload' => true));
$product->Load($item_id);
$object =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
$order =& $this->Application->recallObject('ord');
$ord_id = $order->GetID();
if($item_data = $event->getEventParam('ItemData'))
{
$item_data = unserialize($item_data);
}
else
{
$item_data = Array();
}
$options = getArrayValue($item_data, 'Options');
if (!$this->CheckOptions($event, $options, $item_id, $qty, $product->GetDBField('OptionsSelectionMode'))) return;
// Checking if such product already exists in the cart
$keys['OrderId'] = $ord_id;
$keys['ProductId'] = $product->GetId();
if (isset($item_data['Options'])) {
$options_salt = $this->OptionsSalt($item_data['Options']);
$keys['OptionsSalt'] = $options_salt;
}
else {
$options_salt = null;
}
$exists = $object->Load($keys);
$object->SetDBField('ProductId', $product->GetId());
$object->SetDBField('ProductName', $product->GetField('l'.$this->Application->GetDefaultLanguageId().'_Name'));
$object->SetDBField('Weight', $product->GetDBField('Weight'));
if (isset($item_data['Options'])) {
$object->SetDBField('OptionsSalt', $options_salt);
}
if (isset($package_num)) {
$object->SetDBField('PackageNum', $package_num);
}
if($product->GetDBField('Type') == PRODUCT_TYPE_TANGIBLE || $product->GetDBField('Type') == 6)
{
$object->SetDBField('Quantity', $object->GetDBField('Quantity') + $qty);
}
else // Types: 2,3,4
{
$object->SetDBField('Quantity', $qty); // 1
$exists = false;
}
if (isset($item_data['ForcePrice'])) {
$price = $item_data['ForcePrice'];
}
else {
$price = $this->GetPlainProductPrice($product->GetId(), $object->GetDBField('Quantity'), $product->GetDBField('Type'), $order, $options_salt, $item_data);
}
$cost = $this->GetProductCost($product->GetId(), $object->GetDBField('Quantity'), $product->GetDBField('Type'), $options_salt, $item_data);
$object->SetDBField('FlatPrice', $price);
$couponed_price = $this->GetCouponDiscountedPrice($order->GetDBField('CouponId'), $product->GetId(), $price);
$discounted_price = $this->GetDiscountedProductPrice($product->GetId(), $price, $discount_id, $order);
if( $couponed_price < $discounted_price )
{
$discounted_price = $couponed_price;
$discount_type = 'coupon';
$discount_id = $order->GetDBField('CouponId');
}
else
{
$discount_type = 'discount';
$discount_id = $discount_id;
}
$item_data['DiscountType'] = $discount_type;
$item_data['DiscountId'] = $discount_id;
$item_data['IsRecurringBilling'] = $product->GetDBField('IsRecurringBilling');
// it item is processed in order using new style, then put such mark in orderitem record
$processing_data = $product->GetDBField('ProcessingData');
if ($processing_data) {
$processing_data = unserialize($processing_data);
if (getArrayValue($processing_data, 'HasNewProcessing')) {
$item_data['HasNewProcessing'] = 1;
}
}
$object->SetDBField('ItemData', serialize($item_data));
$object->SetDBField('Price', $discounted_price); // will be retrieved later
$object->SetDBField('Cost', $cost);
$object->SetDBField('BackOrderFlag', 0); // it will be updated in OnRecalculateItems later if needed
$object->SetDBField('OrderId', $ord_id);
if ($exists) {
if ($qty > 0) {
$object->Update();
}
else {
$object->Delete();
}
}
else {
$object->Create();
if ($this->UseTempTables($event)) {
$object->setTempID();
}
}
$this->Application->HandleEvent($ord_event, 'ord:OnRecalculateItems');
/*if ($ord_event->getEventParam('RecalculateChangedCart') && !$this->Application->IsAdmin() ) {
$event->SetRedirectParam('checkout_error', $ord_event->redirect_params['checkout_error']);
}*/
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function UpdateShippingTotal(&$event)
{
if ($this->Application->GetVar('ebay_notification') == 1) {
// TODO: get rid of this "if"
return ;
}
$object =& $event->getObject();
$ord_id = $object->GetId();
$shipping_option = $object->GetDBField('ShippingOption');
$backorder_select = $shipping_option == 0 ? '0 As BackOrderFlag' : 'BackOrderFlag';
$table_prefix = $this->TablePrefix($event);
$shipping_info = $object->GetDBField('ShippingInfo') ? unserialize( $object->GetDBField('ShippingInfo') ) : false;
$shipping_total = 0;
$insurance_fee = 0;
if( is_array($shipping_info) )
{
foreach ($shipping_info as $a_shipping)
{
// $id_elements = explode('_', $a_shipping['ShippingTypeId']);
$shipping_total += $a_shipping['TotalCost'];
$insurance_fee += $a_shipping['InsuranceFee'];
}
}
$object->SetDBField('ShippingCost', $shipping_total);
$object->SetDBField('InsuranceFee', $insurance_fee);
// no need to update, it will be called in calling method
$this->RecalculateTax($event);
}
/**
* Recompile shopping cart, splitting or grouping orders and backorders depending on total quantityes.
* First it counts total qty for each ProductId, and then creates order for available items
* and backorder for others. It also updates the sub-total for the order
*
* @param kEvent $event
* @return bool Returns true if items splitting/grouping were changed
*/
function OnRecalculateItems(&$event)
{
if($checkout_error = $this->Application->GetVar('set_checkout_error'))
{
$event->SetRedirectParam('checkout_error', $checkout_error);
}
$order =& $event->getObject();
/* @var $order OrdersItem */
if ( !$order->isLoaded() ) $this->LoadItem($event); // try to load
$ord_id = (int)$order->GetID();
if ( !$order->isLoaded() ) return; //order has not been created yet
if( $order->GetDBField('Status') != ORDER_STATUS_INCOMPLETE )
{
return;
}
$table_prefix = $this->TablePrefix($event);
// process only tangible products here
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$query = ' SELECT oi.ProductId, oi.OptionsSalt, oi.ItemData, SUM(oi.Quantity) AS Quantity,
IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock) AS QtyInStock,
p.QtyInStockMin, p.BackOrder, p.InventoryStatus
FROM '.$table_prefix.'OrderItems AS oi
LEFT JOIN '.TABLE_PREFIX.'Products AS p ON oi.ProductId = p.ProductId
LEFT JOIN '.$poc_table.' poc ON (poc.CombinationCRC = oi.OptionsSalt) AND (oi.ProductId = poc.ProductId)
WHERE (oi.OrderId = '.$ord_id.') AND (p.Type = 1)
GROUP BY oi.ProductId, OptionsSalt';
$items = $this->Conn->Query($query);
$result = false;
$cost_total = 0;
$sub_total = 0;
$sub_total_flat = 0;
$coupon_discount = 0;
$pending_operations = Array();
$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
$coupon_id = $order->GetDBField('CouponId');
foreach ($items as $row) {
$a_item_data = isset($row['ItemData']) ? unserialize($row['ItemData']) : Array();
$min_qty = $this->GetMinQty($row['ProductId']);
if ($row['Quantity'] > 0 && $row['Quantity'] < $min_qty) {
$row['Quantity'] = $min_qty;
$event->SetRedirectParam('checkout_error', 6);
}
$back_order = 0;
$to_order = 0;
if (!$row['InventoryStatus']) {
$available = $row['Quantity']*2; // always available;
}
else {
// if there are not enough qty AND backorder is auto or backorder is always
$available = $row['QtyInStock'] - $row['QtyInStockMin'];
$available = max(0, $available); // just in case
}
if (
$backordering && // backordering generally enabled
(
($row['Quantity'] > $available)
&&
($row['BackOrder'] == 2) //auto
)
||
$row['BackOrder'] == 1 // always
)
{ // split order into order & backorder
if ($row['BackOrder'] == 1) { //Always backorder
$available = 0;
$to_order = 0;
$back_order = $row['Quantity'];
}
else { //Auto
$to_order = $available;
$back_order = $row['Quantity'] - $available;
}
if (isset($a_item_data['ForcePrice'])) {
$price = $a_item_data['ForcePrice'];
}
else {
$price = $this->GetPlainProductPrice( $row['ProductId'], $to_order + $back_order, 1, $order, $row['OptionsSalt'], $row['ItemData'] );
}
$cost = $this->GetProductCost( $row['ProductId'], $to_order + $back_order, 1, $row['OptionsSalt'], $row['ItemData'] );
$discounted_price = $this->GetDiscountedProductPrice( $row['ProductId'], $price, $discount_id, $order );
$couponed_price = $this->GetCouponDiscountedPrice( $coupon_id, $row['ProductId'], $price );
if($couponed_price < $discounted_price)
{
$discounted_price = $couponed_price;
$coupon_discount += ($price - $couponed_price) * ($to_order + $back_order);
$discount_type = 'coupon';
$discount_id = $coupon_id;
}
else
{
$discount_type = 'discount';
}
$pending_operations[] = Array( $row['ProductId'], 0, $to_order, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost );
$pending_operations[] = Array( $row['ProductId'], 1, $back_order, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost);
}
else { // store as normal order (and remove backorder)
// we could get here with backorder=never then we should order only what's available
$to_order = min($row['Quantity'], $available);
if (isset($a_item_data['ForcePrice'])) {
$price = $a_item_data['ForcePrice'];
}
else {
$price = $this->GetPlainProductPrice( $row['ProductId'], $to_order + $back_order, 1, $order, $row['OptionsSalt'], $row['ItemData'] );
}
$cost = $this->GetProductCost( $row['ProductId'], $to_order + $back_order, 1, $row['OptionsSalt'], $row['ItemData'] );
$discounted_price = $this->GetDiscountedProductPrice( $row['ProductId'], $price, $discount_id, $order );
$couponed_price = $this->GetCouponDiscountedPrice( $coupon_id, $row['ProductId'], $price );
if($couponed_price < $discounted_price)
{
$discounted_price = $couponed_price;
$coupon_discount += ($price - $couponed_price) * ($to_order + $back_order);
$discount_type = 'coupon';
$discount_id = $coupon_id;
}
else
{
$discount_type = 'discount';
}
$pending_operations[] = Array( $row['ProductId'], 0, $to_order, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost );
$pending_operations[] = Array( $row['ProductId'], 1, 0, $price, $discounted_price, $discount_type, $discount_id, 0, $row['OptionsSalt'], $row['ItemData'], $cost ); // this removes backorders
if ($to_order < $row['Quantity']) { // has changed
if ($to_order > 0) {
$event->SetRedirectParam('checkout_error', 2);
}
else {
$event->SetRedirectParam('checkout_error', 3);
}
$result = true;
}
}
$sub_total_flat += ($to_order + $back_order) * $price;
$sub_total += ($to_order + $back_order) * $discounted_price;
$cost_total += ($to_order + $back_order) * $cost;
}
// process subscriptions, services and downloadable: begin
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$query = ' SELECT oi.OrderItemId, oi.ProductId, oi.Quantity, oi.OptionsSalt, oi.ItemData,
IF(p.InventoryStatus = 2, poc.QtyInStock, p.QtyInStock) AS QtyInStock,
p.QtyInStockMin, p.BackOrder, p.InventoryStatus, p.Type
FROM '.$table_prefix.'OrderItems AS oi
LEFT JOIN '.TABLE_PREFIX.'Products AS p ON oi.ProductId = p.ProductId
LEFT JOIN '.$poc_table.' poc ON (poc.CombinationCRC = oi.OptionsSalt) AND (oi.ProductId = poc.ProductId)
WHERE (oi.OrderId = '.$ord_id.') AND (p.Type IN (2,3,4,5,6))';
$items = $this->Conn->Query($query);
foreach ($items as $row)
{
$a_item_data = isset($row['ItemData']) ? unserialize($row['ItemData']) : Array();
if (isset($a_item_data['ForcePrice'])) {
$price = $a_item_data['ForcePrice'];
}
else {
$price = $this->GetPlainProductPrice( $row['ProductId'], $row['Quantity'], $row['Type'], $order, $row['OptionsSalt'], $row['ItemData'] );
}
$cost = $this->GetProductCost( $row['ProductId'], $row['Quantity'], $row['Type'], $row['OptionsSalt'], $row['ItemData'] );
$discounted_price = $this->GetDiscountedProductPrice( $row['ProductId'], $price, $discount_id, $order );
$couponed_price = $this->GetCouponDiscountedPrice( $coupon_id, $row['ProductId'], $price );
if($couponed_price < $discounted_price)
{
$discounted_price = $couponed_price;
$coupon_discount += ($price - $couponed_price);
$discount_type = 'coupon';
$discount_id = $coupon_id;
}
else
{
$discount_type = 'discount';
}
$pending_operations[] = Array( $row['ProductId'], 0, $row['Quantity'], $price, $discounted_price, $discount_type, $discount_id, $row['OrderItemId'], 0, $row['ItemData'], $cost );
$sub_total_flat += $price * $row['Quantity'];
$sub_total += $discounted_price * $row['Quantity'];
$cost_total += $cost * $row['Quantity'];
}
// process subscriptions, services and downloadable: end
$flat_discount = $this->GetWholeOrderPlainDiscount($global_discount_id, $order);
$flat_discount = ($flat_discount < $sub_total_flat) ? $flat_discount : $sub_total_flat;
$coupon_flat_discount = $this->GetWholeOrderCouponDiscount($coupon_id);
$coupon_flat_discount = ($coupon_flat_discount < $sub_total_flat) ? $coupon_flat_discount : $sub_total_flat;
if($coupon_flat_discount && $coupon_flat_discount > $flat_discount)
{
$flat_discount = $coupon_flat_discount;
$global_discount_type = 'coupon';
$global_discount_id = $coupon_id;
}
else
{
$global_discount_type = 'discount';
}
if($sub_total_flat - $sub_total < $flat_discount)
{
$coupon_discount = ($flat_discount == $coupon_flat_discount) ? $flat_discount : 0;
$sub_total = $sub_total_flat - $flat_discount;
foreach ($pending_operations as $operation_row)
{
list($product_id, $backorder, $qty, $price, $discounted_price, $dummy, $dummy, $order_item_id, $options_salt, $item_data, $cost) = $operation_row;
$new_price = ($price / $sub_total_flat) * $sub_total;
$result = $this->UpdateOrderItem($event, $product_id, $backorder, $qty, $price, $new_price, $global_discount_type, $global_discount_id, $order_item_id, $options_salt, $item_data, $cost) || $result;
}
}
else
{
foreach ($pending_operations as $operation_row)
{
list($product_id, $backorder, $qty, $price, $discounted_price, $discount_type, $discount_id, $order_item_id, $options_salt, $item_data, $cost) = $operation_row;
$result = $this->UpdateOrderItem($event, $product_id, $backorder, $qty, $price, $discounted_price, $discount_type, $discount_id, $order_item_id, $options_salt, $item_data, $cost) || $result;
}
}
$order->SetDBField('SubTotal', $sub_total);
$order->SetDBField('CostTotal', $cost_total);
// $this->CalculateDiscount($event);
$order->SetDBField('DiscountTotal', $sub_total_flat - $sub_total);
if($coupon_id && $coupon_discount == 0)
{
$this->RemoveCoupon($order);
$event->SetRedirectParam('checkout_error', 8);
}
$order->SetDBField('CouponDiscount', $coupon_discount);
if ($result) $this->UpdateShippingOption($event);
$this->UpdateShippingTotal($event);
$this->RecalculateProcessingFee($event);
$this->RecalculateTax($event);
$this->RecalculateGift($event);
if ($event->Name != 'OnAfterItemUpdate') $order->Update();
$event->setEventParam('RecalculateChangedCart', $result);
if (is_object($event->MasterEvent)) {
$event->MasterEvent->setEventParam('RecalculateChangedCart', $result);
}
if ($result && !getArrayValue($event->redirect_params, 'checkout_error')) {
$event->SetRedirectParam('checkout_error', 1);
}
if ($result && is_object($event->MasterEvent) && $event->MasterEvent->Name == 'OnUserLogin')
{
if( ($shop_cart_template = $this->Application->GetVar('shop_cart_template'))
&& is_object($event->MasterEvent->MasterEvent) )
{
$event->MasterEvent->MasterEvent->SetRedirectParam('checkout_error', 9);
$event->MasterEvent->MasterEvent->redirect = $shop_cart_template;
}
}
return $result;
}
/* function GetShippingCost($user_country_id, $user_state_id, $user_zip, $weight, $items, $amount, $shipping_type)
{
$this->Application->recallObject('ShippingQuoteEngine');
$shipping_h =& $this->Application->recallObject('CustomShippingQuoteEngine');
$query = $shipping_h->QueryShippingCost($user_country_id, $user_state_id, $user_zip, $weight, $items, $amount, $shipping_type);
$cost = $this->Conn->GetRow($query);
return $cost['TotalCost'];
}*/
function GetMinQty($p_id)
{
$query = 'SELECT
MIN(pp.MinQty)
FROM '.TABLE_PREFIX.'ProductsPricing AS pp
WHERE pp.ProductId = '.$p_id;
$min_qty = $this->Conn->GetOne($query);
if (!$min_qty) return 1;
return $min_qty;
}
/**
* Return product cost for given qty, taking no discounts into account
*
* @param int $p_id ProductId
* @param int $qty Quantity
* @return float
*/
function GetProductCost($p_id, $qty, $product_type, $options_salt=null, $item_data=null)
{
$user_groups = $this->Application->RecallVar('UserGroups');
if($product_type == 1)
{
// $where_clause = 'pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty;
// $orderby_clause = 'ORDER BY ('.$qty.' - pp.MinQty) ASC';
$where_clause = 'GroupId IN ('.$user_groups.') AND pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty.' AND ('.$qty.' < pp.MaxQty OR pp.MaxQty=-1)';
$orderby_clause = 'ORDER BY pp.Price ASC';
}
else
{
$price_id = $this->GetPricingId($p_id, $item_data);
$where_clause = 'pp.ProductId = '.$p_id.' AND pp.PriceId = '.$price_id;
$orderby_clause = '';
}
$sql = 'SELECT Cost
FROM '.TABLE_PREFIX.'ProductsPricing AS pp
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = pp.ProductId
WHERE '.$where_clause.'
'.$orderby_clause;
// GROUP BY pp.ProductId - removed, this it qty pricing is caclucated incorrectly !!!
$cost = $this->Conn->GetOne($sql);
if (!$cost) $price = 0;
return $cost;
}
/**
* Return product price for given qty, taking no discounts into account
*
* @param int $p_id ProductId
* @param int $qty Quantity
* @return float
*/
function GetPlainProductPrice($p_id, $qty, $product_type, &$order_object, $options_salt=null, $item_data=null)
{
$user_id = $order_object->GetDBField('PortalUserId');
$user_groups = $this->Application->getUserGroups($user_id);
if($product_type == 1)
{
// $where_clause = 'pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty;
// $orderby_clause = 'ORDER BY ('.$qty.' - pp.MinQty) ASC';
$where_clause = 'GroupId IN ('.$user_groups.') AND pp.ProductId = '.$p_id.' AND pp.MinQty <= '.$qty.' AND ('.$qty.' < pp.MaxQty OR pp.MaxQty=-1)';
// if we have to stick ti primary group this order by clause force its pricing to go first,
// but if there is no pricing for primary group it will take next optimal
if ($this->Application->ConfigValue('Comm_PriceBracketCalculation') == 1){
if ($user_id <= 0) {
$primary_group = $this->Application->ConfigValue('User_LoggedInGroup'); // actually this is Everyone
}
else {
$primary_group = $this->Conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'UserGroup WHERE PortalUserId='.$user_id.' AND PrimaryGroup=1');
}
$orderby_clause = 'ORDER BY (IF(GroupId='.$primary_group.',1,2)) ASC, pp.Price ASC';
}
else {
$orderby_clause = 'ORDER BY pp.Price ASC';
}
}
else
{
$price_id = $this->GetPricingId($p_id, $item_data);
$where_clause = 'pp.ProductId = '.$p_id.' AND pp.PriceId = '.$price_id;
$orderby_clause = '';
}
$sql = 'SELECT Price
FROM '.TABLE_PREFIX.'ProductsPricing AS pp
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = pp.ProductId
WHERE '.$where_clause.'
'.$orderby_clause;
// GROUP BY pp.ProductId - removed, this it qty pricing is caclucated incorrectly !!!
$price = $this->Conn->GetOne($sql);
if (!$price) $price = 0;
if (isset($item_data) && !is_array($item_data)) {
$item_data = unserialize($item_data);
}
if (isset($item_data['Options'])) {
$addtion = 0;
$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
foreach ($item_data['Options'] as $opt => $val) {
$data = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductOptionId = '.$opt);
$parsed = $opt_helper->ExplodeOptionValues($data);
if (!$parsed) continue;
$conv_prices = $parsed['Prices'];
$conv_price_types = $parsed['PriceTypes'];
if (is_array($val)) {
foreach ($val as $a_val) {
if (isset($conv_prices[unhtmlentities($a_val)]) && $conv_prices[unhtmlentities($a_val)]) {
if ($conv_price_types[unhtmlentities($a_val)] == '$') {
$addtion += $conv_prices[unhtmlentities($a_val)];
}
elseif ($conv_price_types[unhtmlentities($a_val)] == '%') {
$addtion += $price * $conv_prices[unhtmlentities($a_val)] / 100;
}
}
}
}
else {
if (isset($conv_prices[unhtmlentities($val)]) && $conv_prices[unhtmlentities($val)]) {
if ($conv_price_types[unhtmlentities($val)] == '$') {
$addtion += $conv_prices[unhtmlentities($val)];
}
elseif ($conv_price_types[unhtmlentities($val)] == '%') {
$addtion += $price * $conv_prices[unhtmlentities($val)] / 100;
}
}
}
}
$price += $addtion;
}
$comb_salt = $this->OptionsSalt( getArrayValue($item_data, 'Options'), 1);
if ($comb_salt) {
$query = 'SELECT * FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationCRC = '.$comb_salt;
$comb = $this->Conn->GetRow($query);
if ($comb) {
switch ($comb['PriceType']) {
case 1: // = override
$price = $comb['Price'];
break;
case 2: // flat
$price = $price + $comb['Price'];
break;
case 3: // percent
$price = $price * (1 + $comb['Price'] / 100);
break;
}
}
}
return max($price, 0);
}
/**
* Return product price for given qty, taking possible discounts into account
*
* @param int $p_id ProductId
* @param int $qty Quantity
* @return float
*/
function GetDiscountedProductPrice($p_id, $price, &$discount_id, &$order_object)
{
$discount_id = 0;
$user_id = $order_object->GetDBField('PortalUserId');
$user_groups = $this->Application->getUserGroups($user_id);
$sql = '
SELECT
IF(pd.Type = 1,
'.$price.' - pd.Amount,
IF(pd.Type = 2,
('.$price.' * (1-pd.Amount/100)),
'.$price.'
)
) AS DiscountedPrice,
pd.DiscountId
FROM '.TABLE_PREFIX.'Products AS p
LEFT JOIN '.TABLE_PREFIX.'ProductsDiscountItems AS pdi ON
pdi.ItemResourceId = p.ResourceId OR pdi.ItemType = 0
LEFT JOIN '.TABLE_PREFIX.'ProductsDiscounts AS pd ON
pd.DiscountId = pdi.DiscountId
AND
(pdi.ItemType = 1 OR (pdi.ItemType = 0 AND pd.Type = 2))
AND
pd.Status = 1
AND
( pd.GroupId IN ('.$user_groups.') AND
( (pd.Start IS NULL OR pd.Start < UNIX_TIMESTAMP())
AND
(pd.End IS NULL OR pd.End > UNIX_TIMESTAMP())
)
)
WHERE p.ProductId = '.$p_id.' AND pd.DiscountId IS NOT NULL
';
$pricing = $this->Conn->GetCol($sql, 'DiscountId');
if (!$pricing) return $price;
$discounted_price = min($pricing);
$pricing = array_flip($pricing);
$discount_id = $pricing[$discounted_price];
$discounted_price = min($discounted_price, $price);
return max($discounted_price, 0);
}
function GetCouponDiscountedPrice($coupon_id, $p_id, $price)
{
if(!$coupon_id) return $price;
$sql = '
SELECT
'.$price.' AS Price,
MIN(IF(pc.Type = 1,
'.$price.' - pc.Amount,
IF(pc.Type = 2,
('.$price.' * (1-pc.Amount/100)),
'.$price.'
)
)) AS DiscountedPrice
FROM '.TABLE_PREFIX.'Products AS p
LEFT JOIN '.TABLE_PREFIX.'ProductsCouponItems AS pci ON
pci.ItemResourceId = p.ResourceId OR pci.ItemType = 0
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons AS pc ON
pc.CouponId = pci.CouponId
AND
(pci.ItemType = 1 OR (pci.ItemType = 0 AND pc.Type = 2))
WHERE p.ProductId = '.$p_id.' AND pci.CouponId = '.$coupon_id.'
GROUP BY p.ProductId
';
$pricing = $this->Conn->GetRow($sql);
if ($pricing === false) return $price;
$price = min($pricing['Price'], $pricing['DiscountedPrice']);
return max($price, 0);
}
function GetWholeOrderPlainDiscount(&$discount_id, &$order_object)
{
$user_id = $order_object->GetDBField('PortalUserId');
$user_groups = $this->Application->getUserGroups($user_id);
$sql = '
SELECT pd.Amount AS Discount, pd.DiscountId
FROM '.TABLE_PREFIX.'ProductsDiscountItems AS pdi
LEFT JOIN '.TABLE_PREFIX.'ProductsDiscounts AS pd
ON
pd.DiscountId = pdi.DiscountId
AND
pdi.ItemType = 0 AND pd.Type = 1
AND
pd.Status = 1
AND
( pd.GroupId IN ('.$user_groups.') AND
( (pd.Start IS NULL OR pd.Start < '.$order_object->GetDBField('OrderDate').')
AND
(pd.End IS NULL OR pd.End > '.$order_object->GetDBField('OrderDate').')
)
)
WHERE pd.DiscountId IS NOT NULL
';
$pricing = $this->Conn->GetCol($sql, 'DiscountId');
if (!$pricing) return 0;
$discounted_price = max($pricing);
$pricing = array_flip($pricing);
$discount_id = $pricing[$discounted_price];
return max($discounted_price, 0);
}
function GetWholeOrderCouponDiscount($coupon_id)
{
if (!$coupon_id) return 0;
$sql = 'SELECT Amount
FROM '.TABLE_PREFIX.'ProductsCouponItems AS pci
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons AS pc
ON pc.CouponId = pci.CouponId
WHERE pci.CouponId = '.$coupon_id.' AND pci.ItemType = 0 AND pc.Type = 1';
return $this->Conn->GetOne($sql);
}
/**
* Return product pricing id for given product, if not passed - return primary pricing ID
*
* @param int $product_id ProductId
* @return float
*/
function GetPricingId($product_id, $item_data) {
if (!is_array($item_data)) {
$item_data = unserialize($item_data);
}
$price_id = getArrayValue($item_data, 'PricingId');
if (!$price_id) {
$price_id = $this->Application->GetVar('pr_id');
}
if (!$price_id){
$price_id = $this->Conn->GetOne('SELECT PriceId FROM '.TABLE_PREFIX.'ProductsPricing WHERE ProductId='.$product_id.' AND IsPrimary=1');
}
return $price_id;
}
function UpdateShippingOption(&$event)
{
$object =& $event->getObject();
$shipping_option = $object->GetDBField('ShippingOption');
if($shipping_option == '') return;
$table_prefix = $this->TablePrefix($event);
if ($shipping_option == 1 || $shipping_option == 0) { // backorder separately
$query = 'UPDATE '.$table_prefix.'OrderItems SET BackOrderFlag = 1 WHERE OrderId = '.$object->GetId().' AND BackOrderFlag > 1';
$this->Conn->Query($query);
}
if ($shipping_option == 2) {
$query = 'SELECT * FROM '.$table_prefix.'OrderItems WHERE OrderId = '.$object->GetId().' AND BackOrderFlag >= 1 ORDER By ProductName asc';
$items = $this->Conn->Query($query);
$backorder_flag = 2;
foreach ($items as $an_item) {
$query = 'UPDATE '.$table_prefix.'OrderItems SET BackOrderFlag = '.$backorder_flag.' WHERE OrderItemId = '.$an_item['OrderItemId'];
$this->Conn->Query($query);
$backorder_flag++;
}
}
}
function UpdateShippingTypes(&$event)
{
$object =& $this->Application->recallObject($event->getPrefixSpecial());
$ord_id = $object->GetId();
$order_info = $this->Application->GetVar('ord');
$shipping_ids = getArrayValue($order_info, $ord_id, 'ShippingTypeId');
if (!$shipping_ids)
{
return;
}
$last_shippings = unserialize($this->Application->RecallVar('LastShippings'));
$shipping_types = Array();
foreach($shipping_ids as $package => $id)
{
$shipping_types[$package] = $last_shippings[$package][$id];
}
$object->SetDBField('ShippingInfo', serialize($shipping_types));
return;
}
/*function shipOrder(&$order_items)
{
$product_object =& $this->Application->recallObject('p', null, Array('skip_autoload' => true));
$order_item =& $this->Application->recallObject('orditems.-item');
while( !$order_items->EOL() )
{
$rec = $order_items->getCurrentRecord();
$order_item->SetDBFieldsFromHash($rec);
$order_item->SetId($rec['OrderItemId']);
$order_item->SetDBField('QuantityReserved', 0);
$order_item->Update();
$order_items->GoNext();
}
return true;
}*/
function RecalculateTax(&$event)
{
$object =& $event->getObject();
if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return;
$object->RecalculateTax();
}
function RecalculateProcessingFee(&$event)
{
$object =& $event->getObject();
// Do not reset processing fee while orders are being split (see SplitOrder)
if (preg_match("/^-sub/", $object->Special)) return;
if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) return; //no changes for orders other than incomple or pending
$pt = $object->GetDBField('PaymentType');
$processing_fee = $this->Conn->GetOne('SELECT ProcessingFee FROM '.$this->Application->getUnitOption('pt', 'TableName').' WHERE PaymentTypeId = '.$pt);
$object->SetDBField( 'ProcessingFee', $processing_fee );
$this->UpdateTotals($event);
}
function UpdateTotals(&$event)
{
$object =& $event->getObject();
$object->UpdateTotals();
}
function CalculateDiscount(&$event)
{
$object =& $event->getObject();
$coupon =& $this->Application->recallObject('coup', null, Array('skip_autoload' => true));
if(!$coupon->Load( $object->GetDBField('CouponId'), 'CouponId' ))
{
return false;
}
$sql = 'SELECT Price * Quantity AS Amount, ProductId FROM '.$this->Application->getUnitOption('orditems', 'TableName').'
WHERE OrderId = '.$object->GetDBField('OrderId');
$orditems = $this->Conn->GetCol($sql, 'ProductId');
$sql = 'SELECT coupi.ItemType, p.ProductId FROM '.$this->Application->getUnitOption('coupi', 'TableName').' coupi
LEFT JOIN '.$this->Application->getUnitOption('p', 'TableName').' p
ON coupi.ItemResourceId = p.ResourceId
WHERE CouponId = '.$object->GetDBField('CouponId');
$discounts = $this->Conn->GetCol($sql, 'ProductId');
$discount_amount = 0;
foreach($orditems as $product_id => $amount)
{
if(isset($discounts[$product_id]) || array_search('0', $discounts, true) !== false)
{
switch($coupon->GetDBField('Type'))
{
case 1:
$discount_amount += $coupon->GetDBField('Amount') < $amount ? $coupon->GetDBField('Amount') : $amount;
break;
case 2:
$discount_amount += $amount * $coupon->GetDBField('Amount') / 100;
break;
default:
}
break;
}
}
$object->SetDBField('CouponDiscount', $discount_amount);
return $discount_amount;
}
/**
* Jumps to selected order in order's list from search tab
*
* @param kEvent $event
*/
function OnGoToOrder(&$event)
{
$id = array_shift( $this->StoreSelectedIDs($event) );
$idfield = $this->Application->getUnitOption($event->Prefix,'IDField');
$table = $this->Application->getUnitOption($event->Prefix,'TableName');
$sql = 'SELECT Status FROM %s WHERE %s = %s';
$order_status = $this->Conn->GetOne( sprintf($sql, $table, $idfield, $id) );
$prefix_special = $event->Prefix.'.'.$this->getSpecialByType($order_status);
$orders_list =& $this->Application->recallObject($prefix_special, $event->Prefix.'_List', Array('per_page'=>-1) );
$orders_list->Query();
foreach($orders_list->Records as $row_num => $record)
{
if( $record[$idfield] == $id ) break;
}
$per_page = $this->getPerPage( new kEvent($prefix_special.':OnDummy') );
$page = ceil( ($row_num+1) / $per_page );
$this->Application->StoreVar($prefix_special.'_Page', $page);
$event->redirect = 'in-commerce/orders/orders_'.$this->getSpecialByType($order_status).'_list';
}
/**
* Reset's any selected order state to pending
*
* @param unknown_type $event
*/
function OnResetToPending(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
foreach($items_info as $id => $field_values)
{
$object->Load($id);
$object->SetDBField('Status', ORDER_STATUS_PENDING);
if( $object->Update() )
{
$event->status=erSUCCESS;
}
else
{
$event->status=erFAIL;
$event->redirect=false;
break;
}
}
}
}
/**
* Creates list from items selected in grid
*
* @param kEvent $event
*/
function OnLoadSelected(&$event)
{
$event->setPseudoClass('_List');
$object =& $event->getObject( Array('selected_only' => true) );
$event->redirect = false;
}
/**
* Return orders list, that will expire in time specified
*
* @param int $pre_expiration timestamp
* @return Array
*/
function getRecurringOrders($pre_expiration)
{
$ord_table = $this->Application->getUnitOption('ord', 'TableName');
$ord_idfield = $this->Application->getUnitOption('ord', 'IDField');
$processing_allowed = Array(ORDER_STATUS_PROCESSED, ORDER_STATUS_ARCHIVED);
$sql = 'SELECT '.$ord_idfield.', PortalUserId, GroupId, NextCharge
FROM '.$ord_table.'
WHERE (IsRecurringBilling = 1) AND (NextCharge < '.$pre_expiration.') AND Status IN ('.implode(',', $processing_allowed).')';
return $this->Conn->Query($sql, $ord_idfield);
}
/**
* Regular event: checks what orders should expire and renew automatically (if such flag set)
*
* @param kEvent $event
*/
function OnCheckRecurringOrders(&$event)
{
$skip_clause = Array();
$ord_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$ord_idfield = $this->Application->getUnitOption($event->Prefix, 'IDField');
$pre_expiration = adodb_mktime() + $this->Application->ConfigValue('Comm_RecurringChargeInverval') * 3600 * 24;
$to_charge = $this->getRecurringOrders($pre_expiration);
if ($to_charge) {
$order_ids = Array();
foreach ($to_charge as $order_id => $record) {
// skip virtual users (e.g. root, guest, etc.) & invalid subscriptions (with no group specified, no next charge, but Recurring flag set)
if (!$record['PortalUserId'] || !$record['GroupId'] || !$record['NextCharge']) continue;
$order_ids[] = $order_id;
// prevent duplicate user+group pairs
$skip_clause[ 'PortalUserId = '.$record['PortalUserId'].' AND GroupId = '.$record['GroupId'] ] = $order_id;
}
// process only valid orders
$temp_handler =& $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler');
$cloned_order_ids = $temp_handler->CloneItems($event->Prefix, 'recurring', $order_ids);
$order =& $this->Application->recallObject($event->Prefix.'.recurring', null, Array('skip_autoload' => true));
foreach ($cloned_order_ids as $order_id) {
$order->Load($order_id);
$this->Application->HandleEvent($complete_event, $event->Prefix.'.recurring:OnCompleteOrder' );
if ($complete_event->status == erSUCCESS) {
//send recurring ok email
$email_event_user =& $this->Application->EmailEventUser('ORDER.RECURRING.PROCESSED', $order->GetDBField('PortalUserId'), $this->OrderEmailParams($order));
$email_event_admin =& $this->Application->EmailEventAdmin('ORDER.RECURRING.PROCESSED');
}
else {
//send Recurring failed event
$order->SetDBField('Status', ORDER_STATUS_DENIED);
$order->Update();
$email_event_user =& $this->Application->EmailEventUser('ORDER.RECURRING.DENIED', $order->GetDBField('PortalUserId'), $this->OrderEmailParams($order));
$email_event_admin =& $this->Application->EmailEventAdmin('ORDER.RECURRING.DENIED');
}
}
// remove recurring flag from all orders found, not to select them next time script runs
$sql = 'UPDATE '.$ord_table.'
SET IsRecurringBilling = 0
WHERE '.$ord_idfield.' IN ('.implode(',', array_keys($to_charge)).')';
$this->Conn->Query($sql);
}
$pre_expiration = adodb_mktime() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24;
$to_charge = $this->getRecurringOrders($pre_expiration);
foreach ($to_charge as $order_id => $record) {
// skip virtual users (e.g. root, guest, etc.) & invalid subscriptions (with no group specified, no next charge, but Recurring flag set)
if (!$record['PortalUserId'] || !$record['GroupId'] || !$record['NextCharge']) continue;
// prevent duplicate user+group pairs
$skip_clause[ 'PortalUserId = '.$record['PortalUserId'].' AND GroupId = '.$record['GroupId'] ] = $order_id;
}
$skip_clause = array_flip($skip_clause);
$event->MasterEvent->setEventParam('skip_clause', $skip_clause);
}
function OnGeneratePDF(&$event)
{
$this->OnLoadSelected($event);
$this->Application->InitParser();
$o = $this->Application->ParseBlock(array('name'=>'in-commerce/orders/orders_pdf'));
$htmlFile = EXPORT_PATH . '/tmp.html';
$fh = fopen($htmlFile, 'w');
fwrite($fh, $o);
fclose($fh);
// return;
// require_once (FULL_PATH.'html2pdf/PDFEncryptor.php');
// Full path to the file to be converted
// $htmlFile = dirname(__FILE__) . '/test.html';
// The default domain for images that use a relative path
// (you'll need to change the paths in the test.html page
// to an image on your server)
$defaultDomain = DOMAIN;
// Full path to the PDF we are creating
$pdfFile = EXPORT_PATH . '/tmp.pdf';
// Remove old one, just to make sure we are making it afresh
@unlink($pdfFile);
$pdf_helper =& $this->Application->recallObject('kPDFHelper');
$pdf_helper->FileToFile($htmlFile, $pdfFile);
return ;
// DOM PDF VERSION
/*require_once(FULL_PATH.'/dompdf/dompdf_config.inc.php');
$dompdf = new DOMPDF();
$dompdf->load_html_file($htmlFile);
if ( isset($base_path) ) {
$dompdf->set_base_path($base_path);
}
$dompdf->set_paper($paper, $orientation);
$dompdf->render();
file_put_contents($pdfFile, $dompdf->output());
return ;*/
// Instnatiate the class with our variables
require_once (FULL_PATH.'/html2pdf/HTML_ToPDF.php');
$pdf = new HTML_ToPDF($htmlFile, $defaultDomain, $pdfFile);
$pdf->setHtml2Ps('/usr/bin/html2ps');
$pdf->setPs2Pdf('/usr/bin/ps2pdf');
$pdf->setGetUrl('/usr/local/bin/curl -i');
// Set headers/footers
$pdf->setHeader('color', 'black');
$pdf->setFooter('left', '');
$pdf->setFooter('right', '$D');
$pdf->setDefaultPath(BASE_PATH.'/kernel/admin_templates/');
$result = $pdf->convert();
// Check if the result was an error
if (PEAR::isError($result)) {
$this->Application->ApplicationDie($result->getMessage());
}
else {
$download_url = rtrim($this->Application->BaseURL(), '/') . EXPORT_BASE_PATH . '/tmp.pdf';
echo "PDF file created successfully: $result";
echo '<br />Click <a href="' . $download_url . '">here</a> to view the PDF file.';
}
}
function OnAfterConfigRead(&$event)
{
$calc_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
foreach ($calc_fields as $special => $fields) {
$calc_fields[$special]['OrderNumber'] = str_replace('6', $this->Application->ConfigValue('Comm_Order_Number_Format_P'), $calc_fields[$special]['OrderNumber']);
$calc_fields[$special]['OrderNumber'] = str_replace('3', $this->Application->ConfigValue('Comm_Order_Number_Format_S'), $calc_fields[$special]['OrderNumber']);
}
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calc_fields);
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
$fields['Number']['format'] = str_replace('%06d', '%0'.$this->Application->ConfigValue('Comm_Order_Number_Format_P').'d', $fields['Number']['format']);
$fields['SubNumber']['format'] = str_replace('%03d', '%0'.$this->Application->ConfigValue('Comm_Order_Number_Format_S').'d', $fields['SubNumber']['format']);
if (!$this->Application->IsAdmin()) {
$user_groups = explode(',', $this->Application->RecallVar('UserGroups'));
$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
if (!in_array($default_group, $user_groups)){
$user_groups[]=$default_group;
}
$fields['PaymentType']['options_sql'] .= ' AND ';
$fields['PaymentType']['options_sql'] .= ' (PortalGroups LIKE "%%,'.implode(',%%" OR PortalGroups LIKE "%%,', $user_groups).',%%")';
}
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
}
/**
* Allows configuring export options
*
* @param kEvent $event
*/
function OnBeforeExportBegin(&$event)
{
$options = $event->getEventParam('options') ;
$items_list =& $this->Application->recallObject($event->Prefix.'.'.$this->Application->RecallVar('export_oroginal_special'), $event->Prefix.'_List');
$items_list->SetPerPage(-1);
if ($options['export_ids'] != '') {
$items_list->AddFilter('export_ids', $items_list->TableName.'.'.$items_list->IDField.' IN ('.implode(',',$options['export_ids']).')');
}
$options['ForceCountSQL'] = $items_list->getCountSQL( $items_list->GetSelectSQL(true,false) );
$options['ForceSelectSQL'] = $items_list->GetSelectSQL();
$event->setEventParam('options',$options);
$object =& $this->Application->recallObject($event->Prefix.'.export');
/* @var $object kDBItem */
$object->SetField('Number', 999999);
$object->SetField('SubNumber', 999);
}
/**
* Returns specific to each item type columns only
*
* @param kEvent $event
* @return Array
*/
function getCustomExportColumns(&$event)
{
$columns = parent::getCustomExportColumns($event);
$new_columns = Array(
'__VIRTUAL__CustomerName' => 'CustomerName',
'__VIRTUAL__TotalAmount' => 'TotalAmount',
'__VIRTUAL__AmountWithoutVAT' => 'AmountWithoutVAT',
'__VIRTUAL__SubtotalWithDiscount' => 'SubtotalWithDiscount',
'__VIRTUAL__SubtotalWithoutDiscount' => 'SubtotalWithoutDiscount',
'__VIRTUAL__OrderNumber' => 'OrderNumber',
);
return array_merge_recursive2($columns, $new_columns);
}
function OnSave(&$event)
{
$res = parent::OnSave($event);
if ($event->status == erSUCCESS) {
$copied_ids = unserialize($this->Application->RecallVar($event->Prefix.'_copied_ids'.$this->Application->GetVar('wid'), serialize(array())));
foreach ($copied_ids as $id) {
$an_event = new kEvent($this->Prefix.':Dummy');
$this->Application->SetVar($this->Prefix.'_id', $id);
$this->Application->SetVar($this->Prefix.'_mode', ''); // this is to fool ReserveItems to use live table
$this->ReserveItems($an_event);
}
}
return $res;
}
/**
* Occures before an item is copied to live table (after all foreign keys have been updated)
* Id of item being copied is passed as event' 'id' param
*
* @param kEvent $event
*/
function OnBeforeCopyToLive(&$event)
{
$id = $event->getEventParam('id');
$copied_ids = unserialize($this->Application->RecallVar($event->Prefix.'_copied_ids'.$this->Application->GetVar('wid'), serialize(array())));
array_push($copied_ids, $id);
$this->Application->StoreVar($event->Prefix.'_copied_ids'.$this->Application->GetVar('wid'), serialize($copied_ids) );
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
*/
function checkItemStatus(&$event)
{
if ($this->Application->IsAdmin()) {
return true;
}
$object =& $event->getObject();
if (!$object->isLoaded()) {
return true;
}
return $object->GetDBField('PortalUserId') == $this->Application->RecallVar('user_id');
}
// ===== Gift Certificates Related =====
function OnRemoveGiftCertificate(&$event)
{
$object =& $event->getObject();
$this->RemoveGiftCertificate($object);
$event->CallSubEvent('OnRecalculateItems');
$event->SetRedirectParam('checkout_error', 107);
}
function RemoveGiftCertificate(&$object)
{
$object->RemoveGiftCertificate();
}
function RecalculateGift(&$event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
if ($object->GetDBField('Status') > ORDER_STATUS_PENDING) {
return ;
}
$object->RecalculateGift($event);
}
function GetWholeOrderGiftCertificateDiscount($gift_certificate_id)
{
if (!$gift_certificate_id) {
return 0;
}
$sql = 'SELECT Debit
FROM '.TABLE_PREFIX.'GiftCertificates
WHERE GiftCertificateId = '.$gift_certificate_id;
return $this->Conn->GetOne($sql);
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/orders/orders_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.150.2.16
\ No newline at end of property
+1.150.2.17
\ No newline at end of property
Index: branches/RC/in-commerce/units/orders/orders_config.php
===================================================================
--- branches/RC/in-commerce/units/orders/orders_config.php (revision 11548)
+++ branches/RC/in-commerce/units/orders/orders_config.php (revision 11549)
@@ -1,464 +1,477 @@
<?php
$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',
'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! (#ord.incomplete_recordcount#)",
+ 'format' => "!la_title_IncompleteOrders!",
),
'orders_pending' => Array( 'prefixes' => Array('ord.pending_List'),
- 'format' => "!la_title_PendingOrders! (#ord.pending_recordcount#)",
+ 'format' => "!la_title_PendingOrders!",
),
'orders_backorders' => Array( 'prefixes' => Array('ord.backorders_List'),
- 'format' => "!la_title_BackOrders! (#ord.backorders_recordcount#)",
+ 'format' => "!la_title_BackOrders!",
),
'orders_toship' => Array( 'prefixes' => Array('ord.toship_List'),
- 'format' => "!la_title_OrdersToShip! (#ord.toship_recordcount#)",
+ 'format' => "!la_title_OrdersToShip!",
),
'orders_processed' => Array( 'prefixes' => Array('ord.processed_List'),
- 'format' => "!la_title_OrdersProcessed! (#ord.processed_recordcount#)",
+ 'format' => "!la_title_OrdersProcessed!",
),
'orders_returns' => Array( 'prefixes' => Array('ord.returns_List'),
- 'format' => "!la_title_OrdersReturns! (#ord.returns_recordcount#)",
+ 'format' => "!la_title_OrdersReturns!",
),
'orders_denied' => Array( 'prefixes' => Array('ord.denied_List'),
- 'format' => "!la_title_OrdersDenied! (#ord.denied_recordcount#)",
+ 'format' => "!la_title_OrdersDenied!",
),
'orders_archived' => Array( 'prefixes' => Array('ord.archived_List'),
- 'format' => "!la_title_OrdersArchived! (#ord.archived_recordcount#)",
+ 'format' => "!la_title_OrdersArchived!",
),
'orders_search' => Array( 'prefixes' => Array('ord.search_List'),
- 'format' => "!la_title_OrdersSearch! (#ord.search_recordcount#)",
+ '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! (#orditems_recordcount#)"),
+ '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',
'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','not_null' => '1','default' => ''),
'AdminComment' => Array('type' => 'string','not_null' => '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'),
'Fields' => Array(
- 'OrderDate_formatted' => Array( 'title'=>'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'sort_field' => 'OrderDate'),
- 'OrderNumber' => Array( 'title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_range_filter'),
- 'CustomerName' => Array( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId'),
+ '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'),
+ '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'),
),
),
'Search' => Array(
'Icons' => Array('default'=>'icon16_orders.gif', 0 => 'icon16_orders.gif', 1 => 'icon16_orders_pending.gif', 5 => 'icon16_orders_disabled.gif'),
'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'),
- 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
- 'OrderDate_formatted' => Array('title' => 'la_col_OrderDate', 'sort_field' => 'OrderDate'),
- 'CustomerName' => Array('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId'),
+ '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'),
+ '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'),
- 'OrderIP' => Array('title' => 'la_col_OrderIP'),
+ '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
Property changes on: branches/RC/in-commerce/units/orders/orders_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.59.2.12
\ No newline at end of property
+1.59.2.13
\ No newline at end of property
Index: branches/RC/in-commerce/units/orders/orders_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/orders/orders_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/orders/orders_tag_processor.php (revision 11549)
@@ -1,1379 +1,1410 @@
<?php
class OrdersTagProcessor extends kDBTagProcessor
{
/**
* Print location using only filled in fields
*
* @param Array $params
* @access public
*/
function PrintLocation($params)
{
$object =& $this->getObject($params);
$type = getArrayValue($params,'type');
if($type == 'Company')
{
return $this->PrintCompanyLocation($params);
}
$fields = Array('City','State','Zip','Country');
$ret = '';
foreach($fields as $field)
{
$value = $object->GetField($type.$field);
if ($field == 'Country' && $value) $ret .= '<br/>';
if($value) $ret .= $value.', ';
}
return rtrim($ret,', ');
}
function PrintCompanyLocation($params)
{
$fields = Array('City','State','ZIP','Country');
$ret = '';
foreach($fields as $field)
{
$value = $this->Application->ConfigValue('Comm_'.$field);
if($field == 'Country')
{
$sql = 'SELECT DestName
FROM '.TABLE_PREFIX.'StdDestinations
WHERE DestAbbr = '.$this->Conn->qstr($value);
$value = $this->Application->Phrase( $this->Conn->GetOne($sql) );
}
if ($field == 'Country' && $value) $ret .= '<br/>';
if($value) $ret .= $value.', ';
}
return rtrim($ret,', ');
}
function Orditems_LinkRemoveFromCart($params)
{
return $this->Application->HREF($this->Application->GetVar('t'), '', Array('pass' => 'm,orditems,ord', 'ord_event' => 'OnRemoveFromCart', 'm_cat_id'=>0));
}
function Orderitems_ProductLink($params)
{
$object =& $this->Application->recallObject('orditems');
$url_params = Array (
'p_id' => $object->GetDBField('ProductId'),
'pass' => 'm,p',
);
return $this->Application->HREF($params['template'], '', $url_params);
}
function Orderitems_ProductExists($params)
{
$object =& $this->Application->recallObject('orditems');
return $object->GetDBField('ProductId') > 0;
}
function PrintCart($params)
{
$o = '';
$params['render_as'] = $params['item_render_as'];
$o_items = $this->Application->ProcessParsedTag(rtrim('orditems.'.$this->Special, '.'), 'PrintList', array_merge($params, Array(
'per_page' => -1
)) );
if ($o_items){
$cart_params = array('name' => $params['header_render_as']);
$o = $this->Application->ParseBlock($cart_params);
$o .= $o_items;
$cart_params = array('name' => $params['footer_render_as']);
$o .= $this->Application->ParseBlock($cart_params);
}else {
$cart_params = array('name' => $params['empty_cart_render_as']);
$o = $this->Application->ParseBlock($cart_params);
}
return $o;
}
function ShopCartForm($params)
{
return $this->Application->ProcessParsedTag('m', 'ParseBlock', array_merge($params, Array(
'name' => 'kernel_form', 'PrefixSpecial'=>'ord'
)) );
}
function BackOrderFlag($params)
{
$object =& $this->Application->recallObject('orditems');
return $object->GetDBField('BackOrderFlag');
}
function OrderIcon($params){
$object =& $this->Application->recallObject('orditems');
if ($object->GetDBField('BackOrderFlag')==0){
return $params['ordericon'];
}else{
return $params['backordericon'];
}
}
function Status($params)
{
$status_map = Array(
'incomplete' => ORDER_STATUS_INCOMPLETE,
'pending' => ORDER_STATUS_PENDING,
'backorder' => ORDER_STATUS_BACKORDERS,
'toship' => ORDER_STATUS_TOSHIP,
'processed' => ORDER_STATUS_PROCESSED,
'denied' => ORDER_STATUS_DENIED,
'archived' => ORDER_STATUS_ARCHIVED,
);
$object =& $this->getObject($params);
$status = $object->GetDBField('Status');
$result = true;
if (isset($params['is'])) {
$result = $result && ($status == $status_map[$params['is']]);
}
if (isset($params['is_not'])) {
$result = $result && ($status != $status_map[$params['is_not']]);
}
return $result;
}
function ItemsInCart($params)
{
$object =& $this->getObject($params);
if ($object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE) {
return 0;
}
$object =& $this->Application->recallObject('orditems', 'orditems_List');
return $object->RecordsCount;
}
function CartNotEmpty($params)
{
$object =& $this->getObject($params);
if ($object->GetDBField('Status') != ORDER_STATUS_INCOMPLETE) {
return 0;
}
$order_id = $this->Application->RecallVar('ord_id');
if ($order_id) {
$sql = 'SELECT COUNT(*)
FROM '.TABLE_PREFIX.'OrderItems
WHERE OrderId = '.$order_id;
return $this->Conn->GetOne($sql);
}
return 0;
}
function CartIsEmpty($params)
{
return $this->CartNotEmpty($params) ? false : true;
}
function CartHasBackorders($params)
{
$object =& $this->getObject($params);
$different_types = $this->Conn->GetCol('SELECT COUNT(*) FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$object->GetID().' GROUP BY BackOrderFlag');
return count($different_types) > 1;
}
function PrintShippings($params)
{
$o = '';
$object =& $this->getObject($params);
$ord_id = $object->GetId();
$shipping_option = $object->GetDBField('ShippingOption');
$backorder_select = $shipping_option == 0 ? '0 As BackOrderFlag' : 'BackOrderFlag';
$order_items =& $this->Application->recallObject('orditems', 'orditems_List', Array('skip_autoload' => true) );
$oi_table = $order_items->TableName;
list($split_shipments, $limit_types) = $this->GetShippingLimitations($ord_id);
foreach ($split_shipments as $group => $data)
{
$query = 'UPDATE '.$oi_table.' SET SplitShippingGroup = '.$group.'
WHERE ProductId IN ('.implode(',', $data['Products']).')';
$this->Conn->Query($query);
$limitations_cache[$group] = $data['Types'];
}
$shipping_group_option = $object->GetDBField('ShippingGroupOption');
$shipping_group_select = $shipping_group_option == 0 ? '0 AS SplitShippingGroup' : 'SplitShippingGroup';
if (count($split_shipments) > 1) {
$this->Application->SetVar('shipping_limitations_apply', 1);
// different shipping limitations apply
if ($limit_types == 'NONE') {
// order can't be shipped with single shipping type
$this->Application->SetVar('shipping_limitations_apply', 2);
$shipping_group_select = 'SplitShippingGroup';
$shipping_group_option = 1;
}
}
else {
$this->Application->SetVar('shipping_limitations_apply', 0);
}
$weight_sql = 'IF(oi.Weight IS NULL, 0, oi.Weight * oi.Quantity)';
$query = 'SELECT
'.$backorder_select.',
oi.ProductName,
oi.ShippingTypeId,
SUM(oi.Quantity) AS TotalItems,
SUM('.$weight_sql.') AS TotalWeight,
SUM(oi.Price * oi.Quantity) AS TotalAmount,'.
// calculate free Totals => SUM(ALL) - SUM(PROMO) '
'SUM(oi.Quantity) - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, oi.Quantity, 0)) AS TotalItemsPromo,
SUM('.$weight_sql.') - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, '.$weight_sql.', 0)) AS TotalWeightPromo,
SUM(oi.Price * oi.Quantity) - SUM(IF(p.MinQtyFreePromoShipping > 0 AND p.MinQtyFreePromoShipping <= oi.Quantity, oi.Price * oi.Quantity, 0)) AS TotalAmountPromo,
'.$shipping_group_select.'
FROM '.$oi_table.' oi
LEFT JOIN '.$this->Application->getUnitOption('p', 'TableName').' p
ON oi.ProductId = p.ProductId
WHERE oi.OrderId = '.$ord_id.' AND p.Type = 1
GROUP BY BackOrderFlag, SplitShippingGroup
ORDER BY BackOrderFlag ASC, SplitShippingGroup ASC';
$shipments = $this->Conn->Query($query);
$block_params = Array();
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['user_country_id'] = $object->GetDBField('ShippingCountry');
$block_params['user_state_id'] = $object->GetDBField('ShippingState');
$block_params['user_zip'] = $object->GetDBField('ShippingZip');
$block_params['user_city'] = $object->GetDBField('ShippingCity');
$block_params['user_addr1'] = $object->GetDBField('ShippingAddress1');
$block_params['user_addr2'] = $object->GetDBField('ShippingAddress2');
$block_params['user_name'] = $object->GetDBField('ShippingTo');
if( ($block_params['user_addr1'] == '' || $block_params['user_city'] == '' ||
$block_params['user_zip'] == '' || $block_params['user_country_id'] == '') &&
getArrayValue($params, 'invalid_address_render_as'))
{
$block_params['name'] = $params['invalid_address_render_as'];
return $this->Application->ParseBlock($block_params);
}
$group = 1;
foreach ($shipments as $shipment) {
$where = array('OrderId = '.$ord_id);
if ($shipping_group_option != 0) {
$where[] = 'SplitShippingGroup = '.$shipment['SplitShippingGroup'];
}
if ($shipping_option > 0) { // not all together
$where[] = 'BackOrderFlag = '.$shipment['BackOrderFlag'];
}
$query = 'UPDATE '.$oi_table.' SET PackageNum = '.$group.'
'.($where ? 'WHERE '.implode(' AND ', $where) : '');
$this->Conn->Query($query);
$group++;
}
$this->Application->RemoveVar('LastShippings');
$group = 1;
$this->Application->SetVar('ShipmentsExists', 1);
foreach ($shipments as $shipment) {
$block_params['package_num'] = $group;
$block_params['limit_types'] = strpos($shipping_group_select, '0 AS') !== false ? $limit_types : $limitations_cache[$shipment['SplitShippingGroup']];
$this->Application->SetVar('ItemShipmentsExists', 1);
switch ($shipment['BackOrderFlag']) {
case 0:
if ( $this->CartHasBackOrders(Array()) && $shipping_option == 0 ) {
$block_params['shipment'] = $this->Application->Phrase('lu_all_available_backordered');
}
else {
$block_params['shipment'] = $this->Application->Phrase('lu_ship_all_available');;
}
break;
case 1:
$block_params['shipment'] = $this->Application->Phrase('lu_ship_all_backordered');;
break;
default:
$block_params['shipment'] = $this->Application->Phrase('lu_ship_backordered');
break;
}
$block_params['promo_weight_metric'] = $shipment['TotalWeightPromo'];
$block_params['promo_amount'] = $shipment['TotalAmountPromo'];
$block_params['promo_items'] = $shipment['TotalItemsPromo'];
$block_params['weight_metric'] = $shipment['TotalWeight'];
$block_params['weight'] = $shipment['TotalWeight'];
$regional =& $this->Application->recallObject('lang.current');
if ($block_params['weight_metric'] == '')
{
$block_params['weight'] = $this->Application->Phrase('lu_NotAvailable');
}
elseif ($regional->GetDBField('UnitSystem') == 1)
{
$block_params['weight'] .= ' '.$this->Application->Phrase('lu_kg');
}
elseif ($regional->GetDBField('UnitSystem') == 2)
{
list($pounds, $ounces) = Kg2Pounds($block_params['weight']);
$block_params['weight'] = $pounds.' '.$this->Application->Phrase('lu_pounds').' '.
$ounces.' '.$this->Application->Phrase('lu_ounces');
}
$block_params['items'] = $shipment['TotalItems'];
$iso = $this->GetISO($params['currency']);
$amount = $this->ConvertCurrency($shipment['TotalAmount'], $iso);
$amount = sprintf("%.2f", $amount);
// $block_params['amount'] = $this->AddCurrencySymbol($amount, $iso);
$block_params['amount'] = $shipment['TotalAmount'];
$block_params['field_name'] = $this->InputName(Array('field' => 'ShippingTypeId')).'['.($group).']';
$parsed_block = $this->Application->ParseBlock($block_params);
if($this->Application->GetVar('ItemShipmentsExists'))
{
$o .= $parsed_block;
}
else
{
$this->Application->SetVar('ShipmentsExists', 0);
if(getArrayValue($params, 'no_shipments_render_as'))
{
$block_params['name'] = $params['no_shipments_render_as'];
return $this->Application->ParseBlock($block_params);
}
}
$group++;
}
if(getArrayValue($params, 'table_header_render_as'))
{
$o = $this->Application->ParseBlock( Array('name' => $params['table_header_render_as']) ).$o;
}
if(getArrayValue($params, 'table_footer_render_as'))
{
$o .= $this->Application->ParseBlock( Array('name' => $params['table_footer_render_as']) );
}
return $o;
}
function GetShippingLimitations($ord_id)
{
/*$query = 'SELECT
c.CachedShippingLimitation
FROM '.TABLE_PREFIX.'OrderItems AS oi
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = oi.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
oi.OrderId = '.$ord_id.'
AND
ci.PrimaryCat = 1
AND
c.CachedShippingMode = 1;';
$cat_limitations = $this->Conn->GetCol($query);*/
$cat_limitations = array();
$query = 'SELECT ShippingLimitation, ShippingMode, oi.ProductId as ProductId
FROM '.TABLE_PREFIX.'Products AS p
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS oi ON
oi.ProductId = p.ProductId
WHERE oi.OrderId = '.$ord_id.' AND p.Type = 1'; // .' AND p.ShippingMode = 1';
$limitations = $this->Conn->Query($query, 'ProductId');
$split_shipments = array();
$limit = false;
$types_index = array();
// group products by shipping type range and caculate intersection of all types available for ALL products
// the intersaction caclulation is needed to determine if the order can be shipped with single type or not
if ($limitations) {
$limit_types = null;
foreach ($limitations as $product_id => $row)
{
// if shipping types are limited - get the types
$types = $row['ShippingLimitation'] != '' ? explode('|', substr($row['ShippingLimitation'], 1, -1)) : array('ANY');
// if shipping is NOT limited to selected types (default - so products with no limitations at all also counts)
if ($row['ShippingMode'] == 0) {
array_push($types, 'ANY'); // can be shipped with ANY (literally) type
$types = array_unique($types);
}
//adding product id to split_shipments group by types range
$i = array_search(serialize($types), $types_index);
if ($i === false) {
$types_index[] = serialize($types);
$i = count($types_index)-1;
}
$split_shipments[$i]['Products'][] = $product_id;
$split_shipments[$i]['Types'] = serialize($types);
if ($limit_types == null) { //it is null only when we process first item with limitations
$limit_types = $types; //initial scope
}
// this is to avoid ANY intersect CUST_1 = (), but allows ANY intersect CUST_1,ANY = (ANY)
if (in_array('ANY', $limit_types) && !in_array('ANY', $types)) {
array_splice($limit_types, array_search('ANY', $limit_types), 1, $types);
}
// this is to avoid CUST_1 intersect ANY = (), but allows CUST_1 intersect CUST_1,ANY = (ANY)
if (!in_array('ANY', $limit_types) && in_array('ANY', $types)) {
array_splice($types, array_search('ANY', $types), 1, $limit_types);
}
$limit_types = array_intersect($limit_types, $types);
}
$limit_types = count($limit_types) > 0 ? serialize(array_unique($limit_types)) : 'NONE';
}
return array($split_shipments, $limit_types);
}
function PaymentTypeForm($params)
{
$object =& $this->getObject($params);
$payment_type_id = $object->GetDBField('PaymentType');
if($payment_type_id)
{
$this->Application->SetVar('pt_id', $payment_type_id);
$block_params['name'] = $this->SelectParam($params, $this->UsingCreditCard($params) ? 'cc_render_as,block_cc' : 'default_render_as,block_default' );
return $this->Application->ParseBlock($block_params);
}
return '';
}
/**
* Returns true in case if credit card was used as payment type for order
*
* @param Array $params
* @return bool
*/
function UsingCreditCard($params)
{
$object =& $this->getObject($params);
$pt = $object->GetDBField('PaymentType');
if (!$pt) {
$pt = $this->Conn->GetOne('SELECT PaymentTypeId FROM '.TABLE_PREFIX.'PaymentTypes WHERE IsPrimary = 1');
$object->SetDBField('PaymentType', $pt);
}
$pt_table = $this->Application->getUnitOption('pt','TableName');
$sql = 'SELECT GatewayId FROM %s WHERE PaymentTypeId = %s';
$gw_id = $this->Conn->GetOne( sprintf( $sql, $pt_table, $pt ) );
$sql = 'SELECT RequireCCFields FROM %s WHERE GatewayId = %s';
return $this->Conn->GetOne( sprintf($sql, TABLE_PREFIX.'Gateways', $gw_id) );
}
function PaymentTypeDescription($params)
{
return $this->Application->ProcessParsedTag('pt', 'Field', array_merge($params, Array(
'field' => 'Description'
)) );
}
function PaymentTypeInstructions($params)
{
return $this->Application->ProcessParsedTag('pt', 'Field', array_merge($params, Array(
'field' => 'Instructions'
)) );
}
function PrintMonthOptions($params)
{
$object =& $this->getObject($params);
$date = explode('/', $object->GetDBField($params['date_field_name']));
if (!$date || sizeof($date) != 2) {
$date=array("", "");
}
$o = '';
$params['name'] = $params['block'];
for ($i = 1; $i <= 12; $i++) {
$month_str = str_pad($i, 2, "0", STR_PAD_LEFT);
if ($date[0] == $month_str) {
$params['selected'] = ' selected';
}else {
$params['selected'] = '';
}
$params['mm'] = $month_str;
$o .= $this->Application->ParseBlock($params);
}
return $o;
}
function PrintYearOptions($params)
{
$object =& $this->getObject($params);
$value = $object->GetDBField( $params['field'] );
$block_params = $this->prepareTagParams($params);
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$o = '';
$this_year = adodb_date('y');
for($i = $this_year; $i <= $this_year + 10; $i++)
{
$year_str = str_pad($i, 2, '0', STR_PAD_LEFT);
$block_params['selected'] = ($value == $year_str) ? $params['selected'] : '';
$block_params['key'] = $year_str;
$block_params['option'] = $year_str;
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
function PrintMyOrders($params)
{
}
+ /**
+ * Checks, that order data can be editied based on it's status
+ *
+ * @param Array $params
+ * @return bool
+ */
function OrderEditable($params)
{
- $order =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params );
- switch( $order->GetDBField('Status') )
- {
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
+ $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+ if ($this->Application->IsTempMode($this->Prefix, $this->Special)) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
+
+ // use direct select here (not $this->getObject) because this tag is used even before "combined_header" block is used
+ $sql = 'SELECT Status, PaymentType
+ FROM ' . $table_name . '
+ WHERE ' . $id_field . ' = ' . $this->Application->GetVar( $this->getPrefixSpecial() . '_id' );
+ $order_data = $this->Conn->GetRow($sql);
+
+ if (!$order_data) {
+ // when order data not found -> really impossible, because this tag is used only on order editing templates
+ return false;
+ }
+
+ switch ( $order_data['Status'] ) {
case ORDER_STATUS_INCOMPLETE:
$ret = true;
break;
case ORDER_STATUS_PENDING:
case ORDER_STATUS_BACKORDERS:
- $pt_table = $this->Application->getUnitOption('pt','TableName');
- $pt_idfield = $this->Application->getUnitOption('pt','IDField');
- $pt_id = $order->GetDBField('PaymentType');
- $ret = $this->Conn->GetOne('SELECT PlacedOrdersEdit FROM '.$pt_table.' WHERE '.$pt_idfield.' = '.$pt_id);
+ $sql = 'SELECT PlacedOrdersEdit
+ FROM ' . $this->Application->getUnitOption('pt', 'TableName') . '
+ WHERE ' . $this->Application->getUnitOption('pt', 'IDField') . ' = ' . $order_data['PaymentType'];
+ $ret = $this->Conn->GetOne($sql);
break;
default:
$ret = false;
break;
}
+
return $ret;
}
function CheckoutSteps($params)
{
$steps = explode(',', $params['steps']);
foreach ($steps as $key => $item)
{
$templates[$key] = trim($item);
}
$templates = explode(',', $params['templates']);
foreach ($templates as $key => $item)
{
$templates[$key] = trim($item);
}
$total_steps = count($templates);
$t = $this->Application->GetVar('t');
$o = '';
$block_params = array();
$i = 0;
$passed_current = preg_match("/".preg_quote($templates[count($templates)-1], '/')."/", $t);
foreach ($steps as $step => $name)
{
if (preg_match("/".preg_quote($templates[$step], '/')."/", $t)) {
$block_params['name'] = $this->SelectParam($params, 'current_step_render_as,block_current_step');
$passed_current = true;
}
else {
$block_params['name'] = $passed_current ? $this->SelectParam($params, 'render_as,block') : $this->SelectParam($params, 'passed_step_render_as,block_passed_step');
}
$block_params['title'] = $this->Application->Phrase($name);
$block_params['template'] = $templates[$i];
$block_params['template_link'] = $this->Application->HREF($templates[$step], '', Array('pass'=>'m'));
$block_params['next_step_template'] = isset($templates[$i + 1]) ? $templates[$i + 1] : '';
$block_params['number'] = $i + 1;
$i++;
$o.= $this->Application->ParseBlock($block_params, 1);
}
return $o;
}
function ShowOrder($params){
$order_params = $this->prepareTagParams($params);
// $order_params['Special'] = 'myorders';
// $order_params['PrefixSpecial'] = 'ord.myorders';
$order_params['name'] = $this->SelectParam($order_params, 'render_as,block');
// $this->Application->SetVar('ord.myorders_id', $this->Application->GetVar('ord_id'));
$object =& $this->getObject($params);
if (!$object->GetDBField('OrderId')) {
return;
}
return $this->Application->ParseBlock($order_params);
}
function BuildListSpecial($params)
{
if ($this->Special != '') {
return $this->Special;
}
$list_unique_key = $this->getUniqueListKey($params);
if ($list_unique_key == '') {
return parent::BuildListSpecial($params);
}
return crc32($list_unique_key);
}
function ListOrders($params){
$o = '';
$params['render_as'] = $params['item_render_as'];
$o_orders = $this->PrintList2($params);
if ($o_orders){
$orders_params = array('name' => $params['header_render_as']);
$o = $this->Application->ParseBlock($orders_params);
$o .= $o_orders;
}else {
$orders_params = array('name' => $params['empty_myorders_render_as']);
$o = $this->Application->ParseBlock($orders_params);
}
return $o;
}
function HasRecentOrders($params)
{
$per_page = $this->SelectParam($params, 'per_page,max_items');
if ($per_page !== false) {
$params['per_page'] = $per_page;
}
return (int)$this->TotalRecords($params) > 0 ? 1 : 0;
}
function ListOrderItems($params)
{
$prefix_special = rtrim('orditems.'.$this->Special, '.');
return $this->Application->ProcessParsedTag($prefix_special, 'PrintList', array_merge($params, Array(
'per_page' => -1
)) );
}
function OrdersLink(){
$params['pass']='m,ord';
$main_processor =& $this->Application->RecallObject('m_TagProcessor');
return $main_processor->Link($params);
}
function PrintAddresses($params)
{
$object =& $this->getObject($params);
$address_list =& $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$address_list->Query();
$address_id = $this->Application->GetVar($params['type'].'_address_id');
if (!$address_id) {
$sql = 'SELECT '.$address_list->IDField.'
FROM '.$address_list->TableName.'
WHERE PortalUserId = '.$object->GetDBField('PortalUserId').' AND LastUsedAs'.ucfirst($params['type']).' = 1';
$address_id = (int)$this->Conn->GetOne($sql);
}
$ret = '';
$block_params = $this->prepareTagParams($params);
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$address_list->GoFirst();
while (!$address_list->EOL()) {
$selected = ($address_list->GetID() == $address_id);
if ($selected && $address_list->GetDBField('IsProfileAddress')) {
$this->Application->SetVar($this->Prefix.'_IsProfileAddress', true);
}
$block_params['key'] = $address_list->GetID();
$block_params['value'] = $address_list->GetDBField('ShortAddress');
$block_params['selected'] = $selected ? ' selected="selected"' : '';
$ret .= $this->Application->ParseBlock($block_params, 1);
$address_list->GoNext();
}
return $ret;
}
function PrefillRegistrationFields($params)
{
if( $this->Application->GetVar('fields_prefilled') ) return false;
$order_prefix = $params['type'] == 'billing' ? 'Billing' : 'Shipping';
$order_fields = Array('To','Company','Phone','Fax','Email','Address1','Address2','City','State','Zip','Country');
$user =& $this->Application->recallObject('u.current');
$order_id = $this->Application->RecallVar('front_order_id');
if($order_id) $this->Application->SetVar( $this->getPrefixSpecial().'_id', $order_id );
$order =& $this->getObject($params);
$names = explode(' ', $order->GetDBField($order_prefix.'To'), 2);
if(!$user->GetDBField('FirstName')) $user->SetDBField('FirstName', getArrayValue($names, 0) );
if(!$user->GetDBField('LastName')) $user->SetDBField('LastName', getArrayValue($names, 1) );
if(!$user->GetDBField('Company')) $user->SetDBField('Company', $order->GetDBField($order_prefix.'Company') );
if(!$user->GetDBField('Phone')) $user->SetDBField('Phone', $order->GetDBField($order_prefix.'Phone') );
if(!$user->GetDBField('Fax')) $user->SetDBField('Fax', $order->GetDBField($order_prefix.'Fax') );
if(!$user->GetDBField('Email')) $user->SetDBField('Email', $order->GetDBField($order_prefix.'Email') );
if(!$user->GetDBField('Street')) $user->SetDBField('Street', $order->GetDBField($order_prefix.'Address1') );
if(!$user->GetDBField('Street2')) $user->SetDBField('Street2', $order->GetDBField($order_prefix.'Address2') );
if(!$user->GetDBField('City')) $user->SetDBField('City', $order->GetDBField($order_prefix.'City') );
if(!$user->GetDBField('State')) $user->SetDBField('State', $order->GetDBField($order_prefix.'State') );
if(!$user->GetDBField('Zip')) $user->SetDBField('Zip', $order->GetDBField($order_prefix.'Zip') );
if(!$user->GetDBField('Country')) $user->SetDBField('Country', $order->GetDBField($order_prefix.'Country') );
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
$cs_helper->PopulateStates( new kEvent('u:OnBuild') , 'State', 'Country');
}
function UserLink($params)
{
$object =& $this->getObject($params);
$user_id = $object->GetDBField( $params['user_field'] );
- if($user_id)
- {
- //return $this->Application->HREF('in-commerce/users/users_edit_general','', Array('u_id' => $user_id) );
- $resource_id = $this->Conn->GetOne('SELECT ResourceId FROM '.TABLE_PREFIX.'PortalUser WHERE PortalUserId = '.$user_id);
- return 'javascript:OpenUserEdit('.$resource_id.');';
+
+ if ($user_id) {
+ $url_params = Array (
+ 'm_opener' => 'd',
+ 'u_mode' => 't',
+ 'u_event' => 'OnEdit',
+ 'u_id' => $user_id,
+ 'pass' => 'all,u'
+ );
+
+ return $this->Application->HREF($params['edit_template'], '', $url_params);
}
}
function UserFound($params)
{
$virtual_users = Array(-1,-2, 0);
$object =& $this->getObject($params);
return !in_array( $object->GetDBField( $params['user_field'] ) , $virtual_users );
}
/**
* Returns a link for editing order
*
* @param Array $params
* @return string
*/
function OrderLink($params)
{
$object =& $this->getObject($params);
- return $this->Application->HREF($params['edit_template'],'', Array(
- 'm_opener' => 'd',
- $this->Prefix.'_mode' => 't',
- $this->Prefix.'_event' => 'OnEdit',
- $this->Prefix.'_id' => $object->GetID(),
- 'pass' => 'all,'.$this->Prefix
- ));
+ $url_params = Array (
+ 'm_opener' => 'd',
+ $this->Prefix.'_mode' => 't',
+ $this->Prefix.'_event' => 'OnEdit',
+ $this->Prefix.'_id' => $object->GetID(),
+ 'pass' => 'all,'.$this->Prefix
+ );
+
+ return $this->Application->HREF($params['edit_template'], '', $url_params);
}
function HasOriginalAmount($params)
{
$object =& $this->getObject($params);
$original_amount = $object->GetDBField('OriginalAmount');
return $original_amount && ($original_amount != $object->GetDBField('TotalAmount') );
}
/**
* Returns true, when order has tangible items
*
* @param Array $params
* @return bool
*
* @todo This is copy from OrdersItem::HasTangibleItems. Copy to helper (and create it) and use here.
*/
function OrderHasTangibleItems($params)
{
$object =& $this->getObject($params);
$sql = 'SELECT COUNT(*)
FROM '.TABLE_PREFIX.'OrderItems orditems
LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = orditems.ProductId
WHERE (orditems.OrderId = '.$object->GetID().') AND (p.Type = '.PRODUCT_TYPE_TANGIBLE.')';
return $this->Conn->GetOne($sql) ? true : false;
}
function ShipmentsExists($params)
{
return $this->Application->GetVar('ShipmentsExists') ? 1 : 0;
}
function Field($params)
{
$value = parent::Field($params);
$field = $this->SelectParam($params,'name,field');
if( ($field == 'PaymentAccount') && getArrayValue($params,'masked') )
{
$value = str_repeat('X',12).substr($value,-4);
}
return $value;
}
function CartHasError($params)
{
return $this->Application->GetVar('checkout_error') > 0;
}
function CheckoutError($params)
{
$error_codes = Array (
1 => 'state_changed',
2 => 'qty_unavailable',
3 => 'outofstock',
4 => 'invalid_code',
5 => 'code_expired',
6 => 'min_qty',
7 => 'code_removed',
8 => 'code_removed_automatically',
9 => 'changed_after_login',
10 => 'coupon_applied',
104 => 'invalid_gc_code',
105 => 'gc_code_expired',
107 => 'gc_code_removed',
108 => 'gc_code_removed_automatically',
110 => 'gift_certificate_applied',
);
$error_param = $error_codes[ $this->Application->GetVar('checkout_error') ];
return $this->Application->Phrase($params[$error_param]);
}
function GetFormAction($params)
{
$object =& $this->getObject($params);
/* @var $object OrdersItem */
$gw_data = $object->getGatewayData($params['payment_type_id']);
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
/* @var $gateway_object kGWBase */
return $gateway_object->getFormAction($gw_data['gw_params']);
}
function GetFormHiddenFields($params)
{
$object =& $this->getObject($params);
/* @var $object OrdersItem */
$gw_data = $object->getGatewayData(array_key_exists('payment_type_id', $params) ? $params['payment_type_id'] : null);
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
$tpl = '<input type="hidden" name="%s" value="%s" />'."\n";
$hidden_fields = $gateway_object->getHiddenFields($object->FieldValues, $params, $gw_data['gw_params']);
$ret = '';
if (!is_array($hidden_fields)) {
return $hidden_fields;
}
foreach($hidden_fields as $hidden_name => $hidden_value)
{
$ret .= sprintf($tpl, $hidden_name, $hidden_value);
}
return $ret;
}
function NeedsPlaceButton($params)
{
$object =& $this->getObject($params);
$gw_data = $object->getGatewayData();
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
return $gateway_object->NeedPlaceButton($object->FieldValues, $params, $gw_data['gw_params']);
}
function HasGatewayError($params)
{
return $this->Application->RecallVar('gw_error');
}
function ShowGatewayError($params)
{
$ret = $this->Application->RecallVar('gw_error');
$this->Application->RemoveVar('gw_error');
return $ret;
}
function ShippingType($params)
{
$object =& $this->getObject($params);
$shipping_info = unserialize( $object->GetDBField('ShippingInfo') );
if (count($shipping_info) > 1) {
return $this->Application->Phrase('lu_MultipleShippingTypes');
}
$shipping_info = array_shift($shipping_info);
return $shipping_info['ShippingName'];
}
function DiscountHelpLink($params)
{
$params['pass'] = 'all,orditems';
$params['m_cat_id'] = 0;
$m_tag_processor =& $this->Application->recallObject('m_TagProcessor');
return $m_tag_processor->Link($params);
}
function DiscountField($params)
{
$orditems =& $this->Application->recallObject( 'orditems' );
$item_data = $orditems->GetDBField('ItemData');
if(!$item_data) return '';
$item_data = unserialize($item_data);
$discount_prefix = ($item_data['DiscountType'] == 'coupon') ? 'coup' : 'd';
$discount =& $this->Application->recallObject($discount_prefix, null, Array('skip_autoload' => true));
if(!$discount->isLoaded())
{
$discount->Load($item_data['DiscountId']);
}
return $discount->GetField( $this->SelectParam($params, 'field,name') );
}
function HasDiscount($params)
{
$object =& $this->getObject($params);
return (float)$object->GetDBField('DiscountTotal') ? 1 : 0;
}
/**
* Allows to check if required product types are present in order
*
* @param Array $params
*/
function HasProductType($params)
{
$product_types = Array('tangible' => 1, 'subscription' => 2, 'service' => 3, 'downloadable' => 4, 'package' => 5, 'gift' => 6);
$object =& $this->getObject($params);
$sql = 'SELECT COUNT(*)
FROM '.TABLE_PREFIX.'OrderItems oi
LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
WHERE (oi.OrderId = '.$object->GetID().') AND (p.Type = '.$product_types[ $params['type'] ].')';
return $this->Conn->GetOne($sql);
}
function PrintSerializedFields($params)
{
$object =& $this->getObject($params);
$field = $this->SelectParam($params, 'field');
if (!$field) $field = $this->Application->GetVar('field');
$data = unserialize($object->GetDBField($field));
$o = '';
$block_params['name'] = $params['render_as'];
foreach ($data as $field => $value) {
$block_params['field'] = $field;
$block_params['value'] = $value;
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
function OrderProductEmail($params)
{
$order =& $this->Application->recallObject('ord');
$orditems =& $this->Application->recallObject('orditems');
$sql = 'SELECT ResourceId
FROM '.TABLE_PREFIX.'Products
WHERE ProductId = '.$orditems->GetDBField('ProductId');
$resource_id = $this->Conn->GetOne($sql);
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
$custom_fields = $this->Application->getUnitOption('p', 'CustomFields');
$custom_name = $ml_formatter->LangFieldName('cust_'.array_search($params['msg_custom_field'], $custom_fields));
$sql = 'SELECT '.$custom_name.'
FROM '.$this->Application->getUnitOption('p-cdata', 'TableName').'
WHERE ResourceId = '.$resource_id;
$message_template = $this->Conn->GetOne($sql);
if (!$message_template || trim($message_template) == '') {
// message template missing
return ;
}
$from_name = strip_tags($this->Application->ConfigValue('Site_Name'));
$from_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
$to_name = $order->GetDBField('BillingTo');
$to_email = $order->GetDBField('BillingEmail');
if (!$to_email) {
// billing email is empty, then use user's email
$sql = 'SELECT Email
FROM '.$this->Application->getUnitOption('u', 'TableName').'
WHERE PortalUserId = '.$order->GetDBField('PortalUserId');
$to_email = $this->Conn->GetOne($sql);
}
$esender =& $application->recallObject('EmailSender.-product');
/* @var $esender kEmailSendingHelper */
$esender->SetFrom($from_email, $from_name);
$esender->AddTo($to_email, $to_name);
$email_events_eh =& $this->Application->recallObject('emailevents_EventHandler');
/* @var $email_events_eh EmailEventsEventsHandler */
list ($message_headers, $message_body) = $email_events_eh->ParseMessageBody($message_template, Array());
if (!trim($message_body)) {
// message body missing
return false;
}
foreach ($message_headers as $header_name => $header_value) {
$esender->SetEncodedHeader($header_name, $header_value);
}
$esender->SetHTML($message_body);
$esender->Deliver();
}
function PrintTotals($params)
{
$order =& $this->getObject($params);
$totals = array();
if (ABS($order->GetDBField('SubTotal') - $order->GetDBField('AmountWithoutVAT')) > 0.01) {
$totals[] = 'products';
}
$has_tangible = $this->OrderHasTangibleItems($params);
if ($has_tangible && $order->GetDBField('ShippingTaxable')) {
$totals[] = 'shipping';
}
if ($order->GetDBField('ProcessingFee') > 0 && $order->GetDBField('ProcessingTaxable')) {
$totals[] = 'processing';
}
if ($order->GetDBField('ReturnTotal') > 0 && $order->GetDBField('ReturnTotal')) {
$totals[] = 'return';
}
$totals[] = 'sub_total';
if ($order->GetDBField('VAT') > 0) {
$totals[] = 'vat';
}
if ($has_tangible && !$order->GetDBField('ShippingTaxable')) {
$totals[] = 'shipping';
}
if ($order->GetDBField('ProcessingFee') > 0 && !$order->GetDBField('ProcessingTaxable')) {
$totals[] = 'processing';
}
$o = '';
foreach ($totals as $type)
{
if ($element = getArrayValue($params, $type.'_render_as')) {
$o .= $this->Application->ParseBlock( array('name' => $element), 1 );
}
}
return $o;
}
function ShowDefaultAddress($params)
{
$address_type = ucfirst($params['type']);
if ($this->Application->GetVar('check_'.strtolower($address_type).'_address')) {
// form type doesn't match check type, e.g. shipping check on billing form
return '';
}
// for required field highlighting on form when no submit made
$this->Application->SetVar('check_'.strtolower($address_type).'_address', 'true');
/*if ((strtolower($address_type) == 'billing') && $this->UsingCreditCard($params)) {
$this->Application->SetVar('check_credit_card', 'true');
}*/
$this->Application->HandleEvent(new kEvent('ord:SetStepRequiredFields'));
$user_id = $this->Application->RecallVar('user_id');
$sql = 'SELECT AddressId
FROM '.TABLE_PREFIX.'Addresses
WHERE PortalUserId = '.$user_id.' AND LastUsedAs'.$address_type.' = 1';
$address_id = $this->Conn->GetOne($sql);
if (!$address_id) {
return '';
}
$addr_list =& $this->Application->recallObject('addr', 'addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$addr_list->Query();
$object =& $this->getObject();
if (!$addr_list->CheckAddress($object->FieldValues, $address_type)) {
$addr_list->CopyAddress($address_id, $address_type);
}
}
function IsProfileAddress($params)
{
$object =& $this->getObject($params);
$address_type = ucfirst($params['type']);
return $object->IsProfileAddress($address_type);
}
function HasPayPalSubscription($params)
{
$object =& $this->getObject($params);
$sql = 'SELECT COUNT(*)
FROM '.TABLE_PREFIX.'OrderItems oi
LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
WHERE (oi.OrderId = '.$object->GetID().') AND (p.PayPalRecurring = 1)';
return $this->Conn->GetOne($sql);
}
function GetPayPalSubscriptionForm($params)
{
$object =& $this->getObject($params);
$gw_data = $object->getGatewayData($params['payment_type_id']);
$this->Application->registerClass( $gw_data['ClassName'], GW_CLASS_PATH.'/'.$gw_data['ClassFile'] );
$gateway_object =& $this->Application->recallObject( $gw_data['ClassName'] );
$sql = 'SELECT oi.*
FROM '.TABLE_PREFIX.'OrderItems oi
LEFT JOIN '.TABLE_PREFIX.'Products p ON p.ProductId = oi.ProductId
WHERE (oi.OrderId = '.$object->GetID().') AND (p.PayPalRecurring = 1)';
$order_item = $this->Conn->GetRow($sql);
$order_item_data = unserialize($order_item['ItemData']);
$cycle = ceil($order_item_data['Duration'] / 86400);
$cycle_units = 'D';
$item_data = $object->FieldValues;
$item_data['item_name'] = $order_item['ProductName'];
$item_data['item_number'] = $order_item['OrderItemId'];
$item_data['custom'] = $order_item['OrderId'];
$item_data['a1'] = '';
$item_data['p1'] = '';
$item_data['t1'] = '';
$item_data['a2'] = '';
$item_data['p2'] = '';
$item_data['t2'] = '';
$item_data['a3'] = $order_item['Price']; //rate
$item_data['p3'] = $cycle; //cycle
$item_data['t3'] = $cycle_units; //cycle units D (days), W (weeks), M (months), Y (years)
$item_data['src'] = '1'; // Recurring payments. If set to 1, the payment will recur unless your customer cancels the subscription before the end of the billing cycle.
$item_data['sra'] = '1'; // Reattempt on failure. If set to 1, and the payment fails, the payment will be reattempted two more times. After the third failure, the subscription will be cancelled.
$item_data['srt'] = ''; // Recurring Times. This is the number of payments which will occur at the regular rate.
$hidden_fields = $gateway_object->getSubscriptionFields($item_data, $params, $gw_data['gw_params']);
$ret = '';
if (!is_array($hidden_fields)) {
return $hidden_fields;
}
$tpl = '<input type="hidden" name="%s" value="%s" />'."\n";
foreach($hidden_fields as $hidden_name => $hidden_value)
{
$ret .= sprintf($tpl, $hidden_name, $hidden_value);
}
return $ret;
}
function UserHasPendingOrders($params)
{
$sql = 'SELECT OrderId FROM '.$this->Application->getUnitOption($this->Prefix, 'TableName').'
WHERE PortalUserId = '.$this->Application->RecallVar('user_id').'
AND Status = '.ORDER_STATUS_PENDING;
return $this->Conn->GetOne($sql) ? 1 : 0;
}
function AllowAddAddress($params)
{
$user =& $this->Application->recallObject('u.current');
if ($user->GetDBField('cust_shipping_addr_block')) return false;
$address_list =& $this->Application->recallObject('addr','addr_List', Array('per_page'=>-1, 'skip_counting'=>true) );
$address_list->Query();
$max = $this->Application->ConfigValue('MaxAddresses');
return $max <= 0 ? true : $address_list->RecordsCount < $max;
}
function FreePromoShippingAvailable($params)
{
$object =& $this->Application->recallObject('orditems');
$free_ship = $object->GetDBField('MinQtyFreePromoShipping');
$tangible = ($object->GetDBField('Type') == 1)? 1 : 0;
return ($tangible && ($free_ship > 0 && $free_ship <= $object->GetDBField('Quantity')))? 1 : 0;
}
/**
* Creates link for removing coupon or gift certificate
*
* @param Array $params
* @return string
*/
function RemoveCouponLink($params)
{
$type = strtolower($params['type']);
$url_params = Array (
'pass' => 'm,ord',
'ord_event' => ($type == 'coupon') ? 'OnRemoveCoupon' : 'OnRemoveGiftCertificate',
'm_cat_id' => 0,
);
return $this->Application->HREF('', '', $url_params);
}
/**
* Calculates total weight of items in shopping cart
*
* @param Array $params
* @return float
*/
function TotalOrderWeight($params)
{
$object =& $this->getObject();
/* @var $object kDBItem */
$sql = 'SELECT SUM( IF(oi.Weight IS NULL, 0, oi.Weight * oi.Quantity) )
FROM '.TABLE_PREFIX.'OrderItems oi
WHERE oi.OrderId = '.$object->GetID();
$total_weight = $this->Conn->GetOne($sql);
if ($total_weight == '') {
// zero weight -> return text about it
return $this->Application->Phrase('lu_NotAvailable');
}
$regional =& $this->Application->recallObject('lang.current');
switch ($regional->GetDBField('UnitSystem')) {
case 1:
// metric system -> add kg sign
$total_weight .= ' '.$this->Application->Phrase('lu_kg');
break;
case 2:
// uk system -> convert to pounds
list($pounds, $ounces) = Kg2Pounds($total_weight);
$total_weight = $pounds.' '.$this->Application->Phrase('lu_pounds').' '.$ounces.' '.$this->Application->Phrase('lu_ounces');
break;
}
return $total_weight;
}
function InitCatalogTab($params)
{
$tab_params['mode'] = $this->Application->GetVar('tm'); // single/multi selection possible
$tab_params['special'] = $this->Application->GetVar('ts'); // use special for this tab
$tab_params['dependant'] = $this->Application->GetVar('td'); // is grid dependant on categories grid
// set default params (same as in catalog)
if ($tab_params['mode'] === false) $tab_params['mode'] = 'multi';
if ($tab_params['special'] === false) $tab_params['special'] = '';
if ($tab_params['dependant'] === false) $tab_params['dependant'] = 'yes';
// pass params to block with tab content
$params['name'] = $params['render_as'];
$params['prefix'] = trim($this->Prefix.'.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.');
$params['cat_prefix'] = trim('c.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.');
$params['tab_mode'] = $tab_params['mode'];
$params['grid_name'] = ($tab_params['mode'] == 'multi') ? $params['default_grid'] : $params['radio_grid'];
$params['tab_dependant'] = $tab_params['dependant'];
$params['show_category'] = $tab_params['special'] == 'showall' ? 1 : 0; // this is advanced view -> show category name
return $this->Application->ParseBlock($params, 1);
}
/**
* Checks if required payment method is available
*
* @param Array $params
* @return bool
*/
function HasPaymentGateway($params)
{
static $payment_types = Array ();
$gw_name = $params['name'];
if (!array_key_exists($gw_name, $payment_types)) {
$sql = 'SELECT pt.PaymentTypeId, pt.PortalGroups
FROM '.TABLE_PREFIX.'PaymentTypes pt
LEFT JOIN '.TABLE_PREFIX.'Gateways g ON pt.GatewayId = g.GatewayId
WHERE (g.Name = '.$this->Conn->qstr($params['name']).') AND (pt.Status = '.STATUS_ACTIVE.')';
$payment_types[$gw_name] = $this->Conn->GetRow($sql);
}
if (!$payment_types[$gw_name]) {
return false;
}
$pt_groups = explode(',', substr($payment_types[$gw_name]['PortalGroups'], 1, -1));
$user_groups = explode(',', $this->Application->RecallVar('UserGroups'));
return array_intersect($user_groups, $pt_groups) ? $payment_types[$gw_name]['PaymentTypeId'] : false;
}
function DisplayPaymentGateway($params)
{
$payment_type_id = $this->HasPaymentGateway($params);
if (!$payment_type_id) {
return '';
}
$object =& $this->getObject($params);
/* @var $object OrdersItem */
$gw_data = $object->getGatewayData($payment_type_id);
$block_params = $gw_data['gw_params'];
$block_params['name'] = $params['render_as'];
$block_params['payment_type_id'] = $payment_type_id;
return $this->Application->ParseBlock($block_params);
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/orders/orders_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.53.2.18
\ No newline at end of property
+1.53.2.19
\ No newline at end of property
Index: branches/RC/in-commerce/units/currencies/currencies_config.php
===================================================================
--- branches/RC/in-commerce/units/currencies/currencies_config.php (revision 11548)
+++ branches/RC/in-commerce/units/currencies/currencies_config.php (revision 11549)
@@ -1,124 +1,124 @@
<?php
$config = Array(
'Prefix' => 'curr',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'CurrenciesEventHandler','file'=>'currencies_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'CurrenciesTagProcessor','file'=>'currencies_tag_processor.php','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
Array('pseudo'=>'BankLVCurrencyRates','class'=>'kBankLVCurrencyRates','file'=>'currency_rates.php','build_event'=>''),
Array('pseudo'=>'ECBCurrencyRates','class'=>'kECBCurrencyRates','file'=>'currency_rates.php','build_event'=>''),
Array('pseudo'=>'FRNYCurrencyRates','class'=>'kFRNYCurrencyRates','file'=>'currency_rates.php','build_event'=>''),
),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
/*'Hooks' => Array(
Array(
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'tax',
'HookToSpecial' => '',
'HookToEvent' => Array( 'onEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnLoadZoneForm',
),
),*/
'IDField' => 'CurrencyId',
'StatusField' => Array('Status', 'IsPrimary'),
'TitleField' => 'ISO',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('curr'=>'!la_title_AddingCurrency!'),
'edit_status_labels' => Array('curr'=>'!la_title_EditingCurrency!'),
'new_titlefield' => Array('curr'=>'!la_title_NewCurrency!'),
),
'currencies_list'=>Array( 'prefixes' => Array('curr_List'),
- 'format' => "!la_title_Currencies! (#curr_recordcount#)",
+ 'format' => "!la_title_Currencies!",
),
'currencies_edit'=>Array( 'prefixes' => Array('curr'),
'new_titlefield' => Array('curr'=>'!la_title_NewCurrency!'),
'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!",
),
),
'PermSection' => Array('main' => 'in-commerce:currencies'),
'Sections' => Array(
'in-commerce:currencies' => Array(
'parent' => 'in-commerce',
'icon' => 'currencies',
'label' => 'la_tab_Currencies',
'url' => Array('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'),
'priority' => 4,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'Currencies',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array(),
'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'),
'CalculatedFields' => Array(
'' => Array(
'Translation' => 'phr.Translation',
),
),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'),
'Sorting' => Array('ISO' => 'asc'),
)
),
'Fields' => Array
(
'CurrencyId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'ISO' => Array('type' => 'string','not_null' => '1','default' => ''),
'Symbol' => Array('type' => 'string','default' => null),
'SymbolPosition' => Array('type' => 'int','default' => null,'formatter' => 'kOptionsFormatter','options' => Array(0 => 'la_Left', 1 => 'la_Right'),'use_phrases' => '1'),
'Name' => Array('type' => 'string','not_null' => '1','default' => ''),
'RateToPrimary' => Array('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1),
'Modified' => Array('type' => 'int','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),
),
'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' ),
- 'ISO' => Array( 'width'=>100, 'title'=>'la_col_ISOCode', 'data_block' => 'currency_caption_td' ),
- 'Translation' => Array( 'width'=>100, 'title'=>'la_col_CurrencyName', 'use_phrases' => 1 ),
- 'RateToPrimary' => Array( 'width'=>100, 'title'=>'la_col_RateToPrimary' ),
- 'Modified' => Array( 'width'=>100, 'title'=>'la_col_LastUpdated' ),
+ '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'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/currencies/currencies_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.15.2.1
\ No newline at end of property
+1.15.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/units/products/products_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/products/products_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/products/products_tag_processor.php (revision 11549)
@@ -1,712 +1,757 @@
<?php
class ProductsTagProcessor extends kCatDBTagProcessor {
function Rating($params)
{
$object =& $this->getObject($params);
$rating = round($object->GetDBField('CachedRating') );
$o = '';
for ($i = 0; $i < $rating; $i++) {
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_on_render_as,block_star_on')) );
}
for ($i = 0; $i < 5 - $rating; $i++) {
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_off_render_as,block_star_off')) );
}
return $o;
}
function NewMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('IsNew'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function HotMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('IsHot'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function TopSellerMark($params)
{
return $this->HotMark($params);
}
function PopMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('IsPop'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function EdPickMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('EditorsPick'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
/**
* Parses block only if item is favorite
*
* @param Array $params
* @return string
* @deprecated used only in default,onlinestore
*/
function FavoriteMark($params)
{
if ($this->IsFavorite($params)) {
return $this->Application->ParseBlock( Array( 'name' => $this->SelectParam($params, 'render_as,block') ) );
}
return '';
}
function CurrentCategory($params){
$conn=$this->Application->GetADODBConnection();
return $conn->GetOne("SELECT Name FROM ".TABLE_PREFIX."Category WHERE CategoryId=".$this->Application->GetVar("m_cat_id"));
}
function RateForm($params)
{
$params['name'] = $this->SelectParam($params, 'render_as,block');
$labels = explode(',', $params['labels']);
$o = '';
$star_block = $this->SelectParam($params, 'star_render_as,star_block');
for($i = 5; $i >= 0; $i--)
{
$params['rating'] = $i;
$params['label'] = $this->Application->Phrase($labels[5 - $i]);
$params['stars'] = '';
for($j = $i; $j > 0; $j--)
{
$params['stars'] .= $this->Application->ParseBlock(Array('name' => $star_block));
}
$o .= $this->Application->ParseBlock($params);
}
return $o;
}
/**
* Parses block for changing favorite status
*
* @param Array $params
* @return string
* @deprecated used only in default,onlinestore
*/
function FavoriteToggle($params)
{
$block_params = Array ();
$block_names = $this->IsFavorite($params) ? 'remove_favorite_render_as,block_remove_favorite' : 'add_favorite_render_as,block_add_favorite';
$block_params['name'] = $this->SelectParam($params, $block_names);
$params['template'] = $params[$this->IsFavorite($params) ? 'template_on_remove' : 'template_on_add'];
$remove_params = Array (
'remove_favorite_render_as', 'block_remove_favorite', 'add_to_wish_list_render_as', 'block_add_to_wish_list',
'add_favorite_render_as', 'block_add_favorite', 'remove_from_wish_list_render_as', 'block_remove_from_wish_list',
'template_on_remove', 'template_on_add'
);
foreach ($params as $param_name => $param_value) {
if (in_array($param_name, $remove_params)) {
unset($params[$param_name]);
}
}
$block_params['wish_list_toggle_link'] = $this->FavoriteToggleLink($params);
return $this->Application->ParseBlock($block_params);
}
function WishListToggleLink($params)
{
$params['block_add_favorite'] = $this->SelectParam($params, 'add_to_wish_list_render_as,block_add_to_wish_list');
$params['block_remove_favorite'] = $this->SelectParam($params, 'remove_from_wish_list_render_as,block_remove_from_wish_list');
return $this->FavoriteToggle($params);
}
function AddReviewLink($params)
{
$o = $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
return $o;
}
function ListProducts($params)
{
return $this->PrintList2($params);
}
function ListRelatedProducts($params)
{
// $related = &$this->Application->recallObject('rel');
return $this->PrintList2($params);
}
function BuildListSpecial($params)
{
if ($this->Special != '') return $this->Special;
if ( isset($params['parent_cat_id']) ) {
$parent_cat_id = $params['parent_cat_id'];
}
else {
$parent_cat_id = $this->Application->GetVar('c_id');
if (!$parent_cat_id) {
$parent_cat_id = $this->Application->GetVar('m_cat_id');
}
}
if ( isset($params['manufacturer']) ) {
$manufacturer = $params['manufacturer'];
}
else {
$manufacturer = $this->Application->GetVar('manuf_id');
}
$recursive = isset($params['recursive']);
$list_unique_key = $this->getUniqueListKey($params).$recursive;
if ($list_unique_key == '') {
return parent::BuildListSpecial($params);
}
return crc32($parent_cat_id.$list_unique_key.$manufacturer);
}
function ProductList($params)
{
if($params['shortlist'])
{
$params['per_page'] = $this->Application->ConfigValue('Comm_Perpage_Products_Short');
}
$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
switch($params['ListType'])
{
case 'favorites':
return $this->PrintList($params);
break;
case 'search':
default:
if(isset($params['block']))
{
return $this->PrintList($params);
}
else
{
$params['block'] = $params['block_main'];
$params['row_start_block'] = $params['block_row_start'];
$params['row_end_block'] = $params['block_row_end'];
return $this->PrintList2($params);
}
}
}
/**
* Adds product to recently viewed list (only in case, when not already there)
*
* @param Array $params
*/
function AddToRecent($params)
{
$recent_products = $this->Application->RecallVar('recent_products');
if (!$recent_products) {
$recent_products = Array();
}
else {
$recent_products = unserialize($recent_products);
}
$product_id = $this->Application->GetVar('p_id');
if (!in_array($product_id, $recent_products)) {
array_push($recent_products, $product_id);
$this->Application->StoreVar('recent_products', serialize($recent_products));
}
}
function SearchMoreLink($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
$o = '';
if($object->PerPage < $this->SearchResultsCount())
{
$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
}
return $o;
}
function AddToCartLink($params)
{
$object =& $this->getObject($params);
if ($object->GetDBField('HasRequiredOptions')) {
$t = $params['product_template'];
if (!$t) {
$theme =& $this->Application->recallObject('theme.current');
if ($theme->GetDBField('Name') == 'onlinestore') {
$t = 'in-commerce/product/details';
}
elseif ($theme->GetDBField('Name') == 'default') {
$t = 'in-commerce/product';
}
}
$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p');
}
else {
$t = $params['template'];
$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p,ord', 'ord_event' => 'OnAddToCart');
}
$this->Application->SetVar('p_id', $this->Application->GetVar($this->getPrefixSpecial().'_id'));
return $this->Application->HREF($t, '', $link_params);
}
function SearchResultsCount($params)
{
$search_results_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$sql = ' SELECT COUNT(ResourceId)
FROM '.$search_results_table.'
WHERE ItemType=11';
return $this->Conn->GetOne($sql);
}
function DetailsLink($params)
{
$this->Application->SetVar( $this->Prefix.'_id', $this->Application->GetVar($this->getPrefixSpecial().'_id') );
$ret = $this->Application->HREF('in-commerce/details', '', Array('pass' => 'all,p'));
return $ret;
}
function ProductLink($params)
{
return $this->ItemLink($params, 'product');
}
function ProductFileLink($params)
{
// 'p_id'=>'0', ??
$params = array_merge($params, Array('pass'=>'all,m,p,file.downl'));
$product_id = getArrayValue($params,'product_id');
if (!$product_id) {
$product_id = $this->Application->GetVar($this->Prefix.'_id');
}
$params['p_id'] = $product_id;
$product =& $this->Application->recallObject($this->getPrefixSpecial());
$params['m_cat_id'] = $product->GetDBField('CategoryId');
$main_processor =& $this->Application->recallObject('m_TagProcessor');
return $main_processor->T($params);
}
/*
function MoreLink($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
$favorites_tag_processor =& $this->Application->recallObject('fav_TagProcessor');
$o = '';
if($object->PerPage < $favorites_tag_processor->FavoriteProductCount( Array('filter' => 'all') ))
{
$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
}
return $o;
}
*/
function GetMarkedVal($params)
{
$list =& $this->GetList($params);
return $this->Application->RecallVar($list->getPrefixSpecial().$params['name']);
}
function SortingOptions($params)
{
$list =& $this->GetList($params);
$sorting_field_selected = $this->Application->RecallVar($list->getPrefixSpecial().$params['sorting_select_name']);
if (!$sorting_field_selected){
$sorting_field_selected = $this->Application->ConfigValue('product_OrderProductsBy');
}
$field_list_plain = $this->Conn->GetOne('SELECT ValueList FROM '.TABLE_PREFIX.'ConfigurationAdmin WHERE VariableName = '.$this->Conn->qstr('product_OrderProductsBy') );
$field_list = explode(',', $field_list_plain);
$o = '';
foreach ($field_list as $key=>$field){
list($fieldname, $fieldlabel) = explode('=', $field);
$option_params = $this->prepareTagParams($params);
$option_params['fieldname'] = $fieldname;
$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
$option_params['name'] = $params['block_options'];
if ($fieldname == $sorting_field_selected){
$option_params['selected'] = 'selected';
}else{
$option_params['selected'] = '';
}
$o .= $this->Application->ParseBlock($option_params);
}
return $o;
}
function SortingDirectionOptions($params)
{
$list =& $this->GetList($params);
$sorting_dir_selected = $this->Application->RecallVar($list->getPrefixSpecial().$params['sorting_select_name']);
if (!$sorting_dir_selected){
$sorting_dir_selected = $this->Application->ConfigValue('product_OrderProductsByDir');
}
$o = '';
$field_list = array('asc' => 'lu_Ascending', 'desc' => 'lu_Descending');
foreach ($field_list as $fieldname=>$fieldlabel){
$option_params = $this->prepareTagParams($params);
$option_params['fieldname'] = $fieldname;
$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
$option_params['name'] = $params['block_options'];
if ($fieldname == $sorting_dir_selected){
$option_params['selected'] = 'selected';
}else{
$option_params['selected'] = '';
}
$o .= $this->Application->ParseBlock($option_params);
}
return $o;
}
function ErrorMessage($params)
{
if( $this->Application->GetVar('keywords_too_short') )
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'keywords_too_short_render_as,block_keywords_too_short')));
}
elseif( $this->Application->GetVar('adv_search_error') )
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'adv_search_error_render_as,block_adv_search_error')));
}
else
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'no_found_render_as,block_no_found')));
}
return $ret;
}
function ListReviews($params)
{
$review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->PrintList($params);
}
function ReviewCount($params)
{
$review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->TotalRecords($params);
}
function InitList($params){
$passed_manuf_id = $this->Application->GetVar('manuf_id');
if ($passed_manuf_id && !isset($params['manufacturer'])){
$params['manufacturer'] = $passed_manuf_id;
}
parent::InitList($params);
}
/**
* Builds link to manufacturer page
*
* @param Array $params
* @return string
*/
function ManufacturerLink($params)
{
if ( array_key_exists('manufacturer_id', $params) ) {
// use direct manufacturer from tag
$params['manuf_id'] = $params['manufacturer_id'];
unset($params['manufacturer_id']);
}
else {
// use product's manufacturer
$object =& $this->getObject($params);
$item_manufacturer_id = $object->GetDBField('ManufacturerId');
if ($item_manufacturer_id){
$params['manuf_id'] = $item_manufacturer_id;
}
}
$params['pass'] = 'm,manuf';
$params['m_cat_id'] = 0;
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function AlreadyReviewed($params)
{
$rev_tag_processor =& $this->Application->recallObject('rev_TagProcessor');
return $rev_tag_processor->AlreadyReviewed($params);
}
function PrepareSearchResults($params)
{
$names_mapping = $this->Application->GetVar('NamesToSpecialMapping');
if($this->Application->GetVar('search_type') == 'advanced' || !getArrayValue($names_mapping, $this->Prefix, 'search_results'))
{
$params = Array('list_name' => 'search_results',
'types' => 'search',
'parent_cat_id' => 'any',
'recursive' => 'true',
'per_page' => 'short_list'
);
$this->InitList($params);
}
return '';
}
function Available($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
if (!$object->GetDBField('InventoryStatus')) return true;
$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
if ($object->GetDBField('InventoryStatus') == 2) {
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$sql = 'SELECT SUM(IF(QtyInStock > '.$object->GetDBField('QtyInStockMin').', 1, 0))
FROM '.$poc_table.'
WHERE (ProductId = '.$object->GetID().') AND (Availability = 1)';
$stock_available = $this->Conn->GetOne($sql) > 0; // at least one option combination present
}
else {
$stock_available = $object->GetDBField('QtyInStock') > $object->GetDBField('QtyInStockMin');
}
$prod_backordering = $object->GetDBField('BackOrder');
if ($stock_available) return true;
// stock is NOT available:
if (!$backordering || $prod_backordering == 0) return false; // if backordering is generaly disabled or disabled for product (Never)
// backordering enabled; (auto or always mode)
return true;
}
function IsSubscription($params)
{
$object = &$this->Application->recallObject($this->getPrefixSpecial());
return ($object->GetDBField('Type') == 2);
}
function IsTangible($params)
{
$object = &$this->Application->recallObject($this->getPrefixSpecial());
return ($object->GetDBField('Type') == 1);
}
function HasFiles($params)
{
$sql = 'SELECT COUNT(FileId) FROM '.$this->Application->getUnitOption('file', 'TableName').'
WHERE ProductId = '.$this->Application->GetVar('p_id').' AND Status = 1';
return $this->Conn->GetOne($sql) ? 1 : 0;
}
function UniqueFileName($params)
{
$file_object =& $this->Application->recallObject('file.downl');
return ($file_object->GetDBField('Name') &&
$file_object->GetDBField('Name') != $file_object->GetDBField('FilePath'))
? 1 : 0;
}
function FileDownload($params)
{
$file_id = $this->Application->GetVar('file.downl_id');
$product_id = $file_id ? $this->Conn->GetOne('SELECT ProductId
FROM '.$this->Application->getUnitOption('file', 'TableName').'
WHERE FileId = '.$file_id) :
$this->Application->GetVar($this->getPrefixSpecial().'_id');
$download_helper_class = $this->Application->getUnitOption($this->Prefix, 'DownloadHelperClass');
if (!$download_helper_class) {
$download_helper_class = 'DownloadHelper';
}
$download_helper =& $this->Application->recallObject($download_helper_class);
if (!$download_helper->CheckAccess($file_id, $product_id)) {
$this->Application->ApplicationDie('File Access permission check failed!');
}
$file_info = $download_helper->SendFile($file_id, $product_id);
$download_helper->LogDownload($product_id, $file_info);
define('DBG_SKIP_REPORTING', 1);
$this->Application->ApplicationDie();
}
function PictureLink($params)
{
if (getArrayValue($params, 'picture_list')) {
$params['img_id'] = $this->Application->GetVar('img_id');
$params['pass'] = 'all,p,img';
unset($params['picture_list']);
}
else {
$params['pass'] = 'all,p';
}
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function ShouldListOptions($params)
{
$object =& $this->getObject($params);
$req_filter = '';
if (getArrayValue($params, 'required_only')) {
$req_filter = ' AND Required = 1';
}
$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID().$req_filter;
$res = $this->Conn->GetOne($query);
return $res > 0;
}
function CountOptions($params)
{
$object =& $this->getObject($params);
$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID();
$res = $this->Conn->GetOne($query);
$max = $this->SelectParam($params, 'greater');
if (!$max) $max = 0;
return $res > $max;
}
function OptionsUpdateMode($params)
{
return $this->Application->GetVar('orditems_id') !== false;
}
function OptionsHaveError($params)
{
return $this->Application->GetVar('opt_error') > 0;
}
function OptionsError($params)
{
switch ($this->Application->GetVar('opt_error')) {
case 1:
return $this->Application->Phrase($params['required']);
case 2:
return $this->Application->Phrase($params['not_available']);
}
}
function ListShippingTypes($params)
{
$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
$types = $quote_engine_collector->GetAvailableShippingTypes();
$object =& $this->getObject($params);
$selected = $object->GetDBField('ShippingLimitation');
$selected = explode('|', substr($selected, 1, -1));
$o = '';
foreach ($types as $a_type)
{
$is_selected = in_array($a_type['_Id'], $selected);
$continue = $params['mode'] == 'selected' ? !$is_selected : $is_selected;
if ($continue) continue;
$block_params = $a_type;
$block_params['name'] = $params['render_as'];
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
function PageLink($params)
{
$manufacturer_id = $this->Application->GetVar('manuf_id');
if ($manufacturer_id) {
$params['pass'] = 'm,'.$this->getPrefixSpecial().',manuf';
}
return parent::PageLink($params);
}
/**
* Calculate savings based on price & market price relationship
*
* @param Array $params
* @return int
*/
function Savings($params)
{
$object =& $this->getObject($params);
/* @var $object kDBItem */
$price = $object->GetDBField('Price');
$msrp = $object->GetDBField('MSRP');
$value = 0;
if (isset($params['type']) && ($params['type'] == 'percent')) {
if ($msrp > 0) {
return 100 - round($price * 100 / $msrp);
}
}
else {
if ($msrp > $price) {
$value = $msrp - $price;
}
}
if (isset($params['currency'])) {
$lang =& $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
$iso = $this->GetISO($params['currency']);
$value = $this->ConvertCurrency($value, $iso);
$value = $lang->formatNumber( sprintf('%.2f', $value) );
$value = $this->AddCurrencySymbol($value, $iso);
}
return $value;
}
+
+ /**
+ * Hides permission tab, when it's not allowed by configuration settings
+ *
+ * @param Array $params
+ */
+ function ModifyUnitConfig($params)
+ {
+ $edit_tab_presets = $this->Application->getUnitOption($this->Prefix, 'EditTabPresets');
+ $edit_tab_preset = $edit_tab_presets['Default'];
+
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $product_type = $object->GetDBField('Type');
+
+ if ($product_type != PRODUCT_TYPE_TANGIBLE) {
+ unset($edit_tab_preset['inventory']);
+ }
+
+ if ($product_type == PRODUCT_TYPE_SUBSCRIPTION) {
+ unset($edit_tab_preset['options']);
+ }
+ else {
+ unset($edit_tab_preset['access_and_pricing']);
+ }
+
+ if ($product_type != PRODUCT_TYPE_TANGIBLE && $product_type != PRODUCT_TYPE_PACKAGE) {
+ unset($edit_tab_preset['pricing']);
+ }
+ else {
+ unset($edit_tab_preset['pricing2']);
+ }
+
+ if ($product_type != PRODUCT_TYPE_DOWNLOADABLE) {
+ unset($edit_tab_preset['files_and_pricing']);
+ }
+
+ if ($product_type != PRODUCT_TYPE_PACKAGE) {
+ unset($edit_tab_preset['package_content']);
+ }
+
+ $edit_tab_presets['Default'] = $edit_tab_preset;
+ $this->Application->setUnitOption($this->Prefix, 'EditTabPresets', $edit_tab_presets);
+ }
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/products/products_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.49.2.10
\ No newline at end of property
+1.49.2.11
\ No newline at end of property
Index: branches/RC/in-commerce/units/products/products_event_handler.php
===================================================================
--- branches/RC/in-commerce/units/products/products_event_handler.php (revision 11548)
+++ branches/RC/in-commerce/units/products/products_event_handler.php (revision 11549)
@@ -1,1216 +1,1216 @@
<?php
class ProductsEventHandler extends kCatDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
// front
'OnCancelAction' => Array('self' => true),
'OnRateProduct' => Array('self' => true),
'OnClearRecent' => Array('self' => true),
'OnRecommendProduct' => Array('self' => true),
// admin
'OnQtyAdd' => Array('self' => 'add|edit'),
'OnQtyRemove' => Array('self' => 'add|edit'),
'OnQtyOrder' => Array('self' => 'add|edit'),
'OnQtyReceiveOrder' => Array('self' => 'add|edit'),
'OnQtyCancelOrder' => Array('self' => 'add|edit'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
function mapEvents()
{
parent::mapEvents(); // ensure auto-adding of approve/decine and so on events
$product_events = Array( 'OnQtyAdd'=>'InventoryAction',
'OnQtyRemove'=>'InventoryAction',
'OnQtyOrder'=>'InventoryAction',
'OnQtyReceiveOrder'=>'InventoryAction',
'OnQtyCancelOrder'=>'InventoryAction',);
$this->eventMethods = array_merge($this->eventMethods, $product_events);
}
/**
* Sets default processing data for subscriptions
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
$object =& $event->getObject();
$product_approve_events = Array(2 => 'p:OnSubscriptionApprove',
4 => 'p:OnDownloadableApprove',
5 => 'p:OnPackageApprove');
$product_type = $object->GetDBField('Type');
$type_found = in_array($product_type, array_keys($product_approve_events) );
if($type_found && !$object->GetDBField('ProcessingData') )
{
$processing_data = Array('ApproveEvent' => $product_approve_events[$product_type] );
$object->SetDBField( 'ProcessingData', serialize($processing_data) );
}
}
/**
* Process product count manipulations
*
* @param kEvent $event
* @access private
*/
function InventoryAction(&$event)
{
$object =& $event->getObject();
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
if ($object->GetDBField('InventoryStatus') == 2) {
// inventory by options (use first selected combination in grid)
$combination_id = array_shift( array_keys( $this->Application->GetVar('poc_grid') ) );
}
else {
// inventory by product
$combination_id = 0;
}
// save id of selected option combination & preselect it in grid
$this->Application->SetVar('combination_id', $combination_id);
$this->ScheduleInventoryAction($event->Name, $object->GetId(), $object->GetDBField('Qty'), $combination_id);
$object->Validate();
if (!isset($object->FieldErrors['Qty']['pseudo'])){
$this->modifyInventory($event->Name, $object, $object->GetDBField('Qty'), $combination_id);
}
$object->SetDBField('Qty', null);
$event->redirect = false;
}
/**
* Perform inventory action on supplied object
*
* @param string $action event name which is actually called by user
* @param ProductsItem $product
* @param int $qty
* @param int $combination_id
*/
function modifyInventory($action, &$product, $qty, $combination_id)
{
if ($product->GetDBField('InventoryStatus') == 2) {
// save inventory changes to option combination instead of product
$object =& $this->Application->recallObject('poc.-item', null, Array('skip_autoload' => true));
$object->Load($combination_id);
}
elseif ($combination_id > 0) {
// combination id present, but not inventory by combinations => skip
return false;
}
elseif ($product->GetDBField('InventoryStatus') == 1) {
// save inventory changes to product
$object =& $product;
}
else {
// product has inventory actions, but don't use inventory => skip
return false;
}
if (!$object->isLoaded()) {
// product/combination in action doesn't exist in database by now
return false;
}
switch ($action) {
case 'OnQtyAdd':
$object->SetDBField('QtyInStock', $object->GetDBField('QtyInStock') + $qty);
break;
case 'OnQtyRemove':
if ($object->GetDBField('QtyInStock') < $qty) {
$qty = $object->GetDBField('QtyInStock');
}
$object->SetDBField('QtyInStock', $object->GetDBField('QtyInStock') - $qty);
break;
case 'OnQtyOrder':
$object->SetDBField('QtyOnOrder', $object->GetDBField('QtyOnOrder') + $qty);
break;
case 'OnQtyReceiveOrder':
$object->SetDBField('QtyOnOrder', $object->GetDBField('QtyOnOrder') - $qty);
$object->SetDBField('QtyInStock', $object->GetDBField('QtyInStock') + $qty);
break;
case 'OnQtyCancelOrder':
$object->SetDBField('QtyOnOrder', $object->GetDBField('QtyOnOrder') - $qty);
break;
}
return $object->Update();
}
function ScheduleInventoryAction($action, $prod_id, $qty, $combination_id = 0)
{
$inv_actions = $this->Application->RecallVar('inventory_actions');
if (!$inv_actions) {
$inv_actions = Array();
}
else {
$inv_actions = unserialize($inv_actions);
}
array_push($inv_actions, Array('action' => $action, 'product_id' => $prod_id, 'combination_id' => $combination_id, 'qty' => $qty));
$this->Application->StoreVar('inventory_actions', serialize($inv_actions));
}
function RealInventoryAction($action, $prod_id, $qty, $combination_id)
{
$product =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
$product->SwitchToLive();
$product->Load($prod_id);
$this->modifyInventory($action, $product, $qty, $combination_id);
}
function RunScheduledInventoryActions(&$event)
{
$inv_actions = $this->Application->GetVar('inventory_actions');
if (!$inv_actions) {
return;
}
$inv_actions = unserialize($inv_actions);
$products = array();
foreach($inv_actions as $an_action) {
$this->RealInventoryAction($an_action['action'], $an_action['product_id'], $an_action['qty'], $an_action['combination_id']);
array_push($products, $an_action['product_id'].'_'.$an_action['combination_id']);
}
$products = array_unique($products);
if ($products) {
$product_obj =& $this->Application->recallObject('p.liveitem', null, Array('skip_autoload' => true));
$product_obj->SwitchToLive();
foreach ($products as $product_key) {
list($prod_id, $combination_id) = explode('_', $product_key);
$product_obj->Load($prod_id);
$this->FullfillBackOrders($product_obj, $combination_id);
}
}
}
/**
* In case if products arrived into inventory and they are required by old (non processed) orders, then use them (products) in that orders
*
* @param ProductsItem $product
* @param int $combination_id
*/
function FullfillBackOrders(&$product, $combination_id)
{
if ( !$this->Application->ConfigValue('Comm_Process_Backorders_Auto') ) return;
if ($combination_id && ($product->GetDBField('InventoryStatus') == 2)) {
// if combination id present and inventory by combinations
$poc_idfield = $this->Application->getUnitOption('poc', 'IDField');
$poc_tablename = $this->Application->getUnitOption('poc', 'TableName');
$sql = 'SELECT QtyInStock
FROM '.$poc_tablename.'
WHERE '.$poc_idfield.' = '.$combination_id;
$stock_qty = $this->Conn->GetOne($sql);
}
else {
// inventory by product
$stock_qty = $product->GetDBField('QtyInStock');
}
$qty = (int) $stock_qty - $product->GetDBField('QtyInStockMin');
$prod_id = $product->GetID();
if ($prod_id <= 0 || !$prod_id || $qty <= 0) return;
//selecting up to $qty backorders with $prod_id where full qty is not reserved
$query = 'SELECT '.TABLE_PREFIX.'Orders.OrderId
FROM '.TABLE_PREFIX.'OrderItems
LEFT JOIN '.TABLE_PREFIX.'Orders ON '.TABLE_PREFIX.'Orders.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId
WHERE (ProductId = '.$prod_id.') AND (Quantity > QuantityReserved) AND (Status = '.ORDER_STATUS_BACKORDERS.')
GROUP BY '.TABLE_PREFIX.'Orders.OrderId
ORDER BY OrderDate ASC
LIMIT 0,'.$qty; //assuming 1 item per order - minimum possible
$orders = $this->Conn->GetCol($query);
if (!$orders) return;
$order =& $this->Application->recallObject('ord.-inv', null, Array('skip_autoload' => true));
foreach ($orders as $ord_id) {
$order->Load($ord_id);
$email_event_admin =& $this->Application->EmailEventAdmin('BACKORDER.FULLFILL');
//reserve what's possible in any case
$this->Application->HandleEvent( $event, 'ord:OnReserveItems' );
if ($event->status == erSUCCESS) { //
//in case the order is ready to process - process it
$this->Application->HandleEvent( $event, 'ord:OnOrderProcess' );
}
}
}
function OnBeforeDeleteFromLive(&$event)
{
$id = $event->getEventParam('id');
$product =& $this->Application->recallObject($event->Prefix.'.itemlive', null, Array('skip_autoload' => true));
$product->SwitchToLive();
if (!$product->Load($id)) return ; // this will make sure New product will not be overwritten with empty data
$temp =& $this->Application->recallObject($event->Prefix.'.itemtemp', null, Array('skip_autoload' => true));
$temp->SwitchToTemp();
$temp->Load($id);
$temp->SetDBFieldsFromHash($product->FieldValues, Array('QtyInStock','QtyReserved','QtyBackOrdered','QtyOnOrder'));
$temp->Update();
}
function clearSelectedIDs(&$event)
{
parent::clearSelectedIDs($event);
$this->Application->SetVar('inventory_actions', $this->Application->RecallVar('inventory_actions'));
$this->Application->RemoveVar('inventory_actions');
}
function OnSave(&$event)
{
$res = parent::OnSave($event);
if ($event->status == erSUCCESS) {
$this->RunScheduledInventoryActions($event);
}
return $res;
}
function OnPreCreate(&$event)
{
parent::onPreCreate($event);
$object =& $event->GetObject();
$object->SetDBField('Type', $this->Application->GetVar( $event->getPrefixSpecial(true).'_new_type' ));
}
function OnPreSaveAndGo(&$event) {
$event->CallSubEvent('OnPreSave');
$this->LoadItem($event);
$object =& $event->getObject();
$from_type = $object->GetDBField('Type');
if ($event->status==erSUCCESS) {
$this->Application->SetVar($event->Prefix_Special.'_id', $this->Application->GetVar($event->getPrefixSpecial(true).'_GoId'));
$this->LoadItem($event);
$to_type = $object->GetDBField('Type');
if ($from_type != $to_type) {
$from_tabs = $this->GetTabs($from_type);
$from_tab_i = array_search($this->Application->GetVar('t'), $from_tabs);
$to_tabs = $this->GetTabs($to_type);
$to_tab = $this->Application->GetVar('t');
$found = false;
while ( !isset($to_tabs[$from_tab_i]) && $from_tab_i < count($to_tabs)) {
$from_tab_i++;
}
if ( !isset($to_tabs[$from_tab_i]) ) $from_tab_i = 0;
$to_tab = $to_tabs[$from_tab_i];
$event->redirect = $to_tab;
}
}
}
function GetTabs($type)
{
switch($type)
{
case 1:
return Array(
0 => 'in-commerce/products/products_edit',
1 => 'in-commerce/products/products_inventory',
2 => 'in-commerce/products/products_pricing',
3 => 'in-commerce/products/products_categories',
4 => 'in-commerce/products/products_images',
5 => 'in-commerce/products/products_reviews',
6 => 'in-commerce/products/products_custom',
);
case 2:
return Array(
0 => 'in-commerce/products/products_edit',
1 => 'in-commerce/products/products_access',
/*2 => 'in-commerce/products/products_access_pricing',*/
3 => 'in-commerce/products/products_categories',
4 => 'in-commerce/products/products_images',
5 => 'in-commerce/products/products_reviews',
6 => 'in-commerce/products/products_custom',
);
case 3:
return Array(
0 => 'in-commerce/products/products_edit',
2 => 'in-commerce/products/products_access_pricing',
3 => 'in-commerce/products/products_categories',
4 => 'in-commerce/products/products_images',
5 => 'in-commerce/products/products_reviews',
6 => 'in-commerce/products/products_custom',
);
case 4:
return Array(
0 => 'in-commerce/products/products_edit',
2 => 'in-commerce/products/products_files',
3 => 'in-commerce/products/products_categories',
4 => 'in-commerce/products/products_images',
5 => 'in-commerce/products/products_reviews',
6 => 'in-commerce/products/products_custom',
);
}
}
/**
* Return type clauses for list bulding on front
*
* @param kEvent $event
* @return Array
*/
function getTypeClauses(&$event)
{
$types=$event->getEventParam('types');
$except_types=$event->getEventParam('except');
$object =& $event->getObject();
$type_clauses = parent::getTypeClauses($event);
$type_clauses['featured']['include']='%1$s.Featured=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['featured']['except']='%1$s.Featured!=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['featured']['having_filter']=false;
$type_clauses['onsale']['include']='%1$s.OnSale=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['onsale']['except']='%1$s.OnSale!=1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['onsale']['having_filter']=false;
// products from selected manufacturer: begin
$manufacturer = $event->getEventParam('manufacturer');
if ( !$manufacturer ) {
$manufacturer = $this->Application->GetVar('manuf_id');
}
if ( $manufacturer ) {
$type_clauses['manufacturer']['include'] = '%1$s.ManufacturerId='.$manufacturer.' AND PrimaryCat = 1';
$type_clauses['manufacturer']['except'] = '%1$s.ManufacturerId!='.$manufacturer.' AND PrimaryCat = 1';
$type_clauses['manufacturer']['having_filter'] = false;
}
// products from selected manufacturer: end
// recent products: begin
$recent = $this->Application->RecallVar('recent_products');
if ($recent) {
$recent = unserialize($recent);
$type_clauses['recent']['include'] = '%1$s.ProductId IN ('.implode(',', $recent).') AND PrimaryCat = 1';
$type_clauses['recent']['except'] = '%1$s.ProductId NOT IN ('.implode(',', $recent).') AND PrimaryCat = 1';
}
else {
$type_clauses['recent']['include']='0';
$type_clauses['recent']['except']='1';
}
$type_clauses['recent']['having_filter']=false;
// recent products: end
// products already in shopping cart: begin
if (strpos($types, 'in_cart') !== false || strpos($except_types, 'in_cart') !== false) {
$order_id = $this->Application->RecallVar('ord_id');
if ($order_id) {
$in_cart = $this->Conn->GetCol('SELECT ProductId FROM '.TABLE_PREFIX.'OrderItems WHERE OrderId = '.$order_id);
if ($in_cart) {
$type_clauses['in_cart']['include'] = '%1$s.ProductId IN ('.implode(',', $in_cart).') AND PrimaryCat = 1';
$type_clauses['in_cart']['except'] = '%1$s.ProductId NOT IN ('.implode(',', $in_cart).') AND PrimaryCat = 1';
}
else {
$type_clauses['in_cart']['include']='0';
$type_clauses['in_cart']['except']='1';
}
}
else {
$type_clauses['in_cart']['include']='0';
$type_clauses['in_cart']['except']='1';
}
$type_clauses['in_cart']['having_filter']=false;
}
// products already in shopping cart: end
// my downloadable products: begin
if (strpos($types, 'my_downloads') !== false || strpos($except_types, 'my_downloads') !== false)
{
$user_id = $this->Application->RecallVar('user_id');
$my_downloads = ($user_id > 0) ? $this->Conn->GetCol('SELECT ProductId FROM '.TABLE_PREFIX.'UserFileAccess WHERE PortalUserId = '.$user_id) : false;
if ($my_downloads)
{
$type_clauses['my_downloads']['include'] = '%1$s.ProductId IN ('.implode(',', $my_downloads).') AND PrimaryCat = 1';
$type_clauses['my_downloads']['except'] = '%1$s.ProductId NOT IN ('.implode(',', $my_downloads).') AND PrimaryCat = 1';
}
else
{
$type_clauses['my_downloads']['include'] = '0';
$type_clauses['my_downloads']['except'] = '1';
}
$type_clauses['my_downloads']['having_filter'] = false;
}
// my downloadable products: end
// my favorite products: begin
if (strpos($types, 'wish_list') !== false || strpos($except_types, 'wish_list') !== false) {
$sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption('fav', 'TableName').'
WHERE PortalUserId = '.(int)$this->Application->RecallVar('user_id');
$wishlist_ids = $this->Conn->GetCol($sql);
if ($wishlist_ids) {
$type_clauses['wish_list']['include'] = '%1$s.ResourceId IN ('.implode(',', $wishlist_ids).') AND PrimaryCat = 1';
$type_clauses['wish_list']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $wishlist_ids).') AND PrimaryCat = 1';
}
else {
$type_clauses['wish_list']['include']='0';
$type_clauses['wish_list']['except']='1';
}
$type_clauses['wish_list']['having_filter']=false;
}
// my favorite products: end
// products from package: begin
if (strpos($types, 'content') !== false) {
$object->removeFilter('category_filter');
$object->AddGroupByField('%1$s.ProductId');
$item_type = $this->Application->getUnitOption('p', 'ItemType');
$object_product = &$this->Application->recallObject($event->Prefix);
$content_ids_array = $object_product->GetPackageContentIds();
if (sizeof($content_ids_array)==0) {
$content_ids_array = array('-1');
}
if (sizeof($content_ids_array)>0) {
$type_clauses['content']['include'] = '%1$s.ProductId IN ('.implode(',', $content_ids_array).')';
}
else {
$type_clauses['content']['include']='0';
}
$type_clauses['related']['having_filter']=false;
}
// products from package: end
$object->addFilter('not_virtual', '%1$s.Virtual = 0');
if ( !$this->Application->IsAdmin() ) {
$object->addFilter('expire_filter', '%1$s.Expire IS NULL OR %1$s.Expire > UNIX_TIMESTAMP()');
}
return $type_clauses;
}
function OnClearRecent(&$event)
{
$this->Application->RemoveVar('recent_products');
}
/**
* Occurs, when user rates a product
*
* @param kEvent $event
*/
function OnRateProduct(&$event)
{
$event->redirect_params = Array('pass' => 'all,p');
$event->redirect = $this->Application->GetVar('success_template');
$object =& $event->getObject();
$user_id = ($this->Application->RecallVar('user_id') == 0) ? -2 : $this->Application->RecallVar('user_id');
$sql = ' SELECT * FROM '.TABLE_PREFIX.'SpamControl
WHERE ItemResourceId='.$object->GetDBField('ResourceId').'
AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
AND PortalUserId='.$user_id.'
AND DataType="Rating"';
$res = $this->Conn->GetRow($sql);
if( $res && $res['Expire'] < adodb_mktime() )
{
$sql = ' DELETE FROM '.TABLE_PREFIX.'SpamControl
WHERE ItemResourceId='.$object->GetDBField('ResourceId').'
AND IPaddress="'.$_SERVER['REMOTE_ADDR'].'"
AND PortalUserId='.$user_id.'
AND DataType="Rating"';
$this->Conn->Query($sql);
unset($res);
}
$new_rating = $this->Application->GetVar('rating');
if($new_rating !== false && !$res)
{
$rating = $object->GetDBField('CachedRating');
$votes = $object->GetDBField('CachedVotesQty');
$new_votes = $votes + 1;
$rating = (($rating * $votes) + $new_rating) / $new_votes;
$object->SetDBField('CachedRating', $rating);
$object->SetDBField('CachedVotesQty', $new_votes);
$object->Update();
$expire = adodb_mktime() + $this->Application->ConfigValue('product_ReviewDelay_Value') * $this->Application->ConfigValue('product_ReviewDelay_Interval');
$sql = ' INSERT INTO '.TABLE_PREFIX.'SpamControl
(ItemResourceId, IPaddress, PortalUserId, DataType, Expire)
VALUES ('.$object->GetDBField('ResourceId').',
"'.$_SERVER['REMOTE_ADDR'].'",
'.$user_id.',
"Rating",
'.$expire.')';
$this->Conn->Query($sql);
}
else
{
$event->status == erFAIL;
$event->redirect=false;
$object->FieldErrors['CachedRating']['pseudo'] = 'too_frequent';
$object->ErrorMsgs['too_frequent'] = $this->Application->Phrase('lu_ferror_rate_duplicate');
}
}
function OnCancelAction(&$event)
{
$event->redirect_params = Array('pass' => 'all,p');
$event->redirect = $this->Application->GetVar('cancel_template');
}
function OnRecommendProduct(&$event)
{
// used for error reporting only -> rewrite code + theme (by Alex)
$object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too
$friend_email = $this->Application->GetVar('friend_email');
$friend_name = $this->Application->GetVar('friend_name');
$my_email = $this->Application->GetVar('your_email');
$my_name = $this->Application->GetVar('your_name');
$my_message = $this->Application->GetVar('your_message');
$send_params = array();
$send_params['to_email']=$friend_email;
$send_params['to_name']=$friend_name;
$send_params['from_email']=$my_email;
$send_params['from_name']=$my_name;
$send_params['message']=$my_message;
if (eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}", $friend_email))
{
$user_id = $this->Application->RecallVar('user_id');
$email_event = &$this->Application->EmailEventUser('PRODUCT.SUGGEST', $user_id, $send_params);
if ($email_event->status == erSUCCESS){
$event->redirect_params = array('opener' => 's', 'pass' => 'all');
$event->redirect = $this->Application->GetVar('template_success');
}
else {
// $event->redirect_params = array('opener' => 's', 'pass' => 'all');
// $event->redirect = $this->Application->GetVar('template_fail');
$object->ErrorMsgs['send_error'] = $this->Application->Phrase('lu_email_send_error');
$object->FieldErrors['Email']['pseudo'] = 'send_error';
$event->status = erFAIL;
}
}
else {
$object->ErrorMsgs['invalid_email'] = $this->Application->Phrase('lu_InvalidEmail');
$object->FieldErrors['Email']['pseudo'] = 'invalid_email';
$event->status = erFAIL;
}
}
/**
* Creates/updates virtual product based on listing type data
*
* @param kEvent $event
*/
function OnSaveVirtualProduct(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$listing_type =& $this->Application->recallObject('lst', null, Array('skip_autoload' => true));
$listing_type->Load($event->MasterEvent->getEventParam('id'));
$product_id = $listing_type->GetDBField('VirtualProductId');
if ($product_id) {
$object->Load($product_id);
}
if (!$listing_type->GetDBField('EnableBuying')) {
if ($product_id) {
// delete virtual product here
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array($product_id));
$listing_type->SetDBField('VirtualProductId', 0);
$listing_type->Update();
}
return true;
}
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
$object->SetDBField($ml_formatter->LangFieldName('Name'), $listing_type->GetDBField('ShopCartName') );
$object->SetDBField($ml_formatter->LangFieldName('Description'), $listing_type->GetDBField('Description'));
$object->SetDBField('SKU', 'ENHANCE_LINK_'.abs( crc32( $listing_type->GetDBField('Name') ) ) );
if ($product_id) {
$object->Update();
}
else {
$object->SetDBField('Type', 2);
$object->SetDBField('Status', 1);
$object->SetDBField('HotItem', 0);
$object->SetDBField('PopItem', 0);
$object->SetDBField('NewItem', 0);
$object->SetDBField('Virtual', 1);
// $processing_data = Array('ApproveEvent' => 'ls:EnhanceLinkAfterOrderApprove', 'ExpireEvent' => 'ls:ExpireLink');
$processing_data = Array( 'ApproveEvent' => 'ls:EnhanceLinkAfterOrderApprove',
'DenyEvent' => 'ls:EnhanceLinkAfterOrderDeny',
'CompleteOrderEvent' => 'ls:EnhancedLinkOnCompleteOrder',
'ExpireEvent' => 'ls:ExpireLink',
'HasNewProcessing' => 1);
$object->SetDBField('ProcessingData', serialize($processing_data));
$object->Create();
$listing_type->SetDBField('VirtualProductId', $object->GetID());
$listing_type->Update();
}
$additiona_fields = Array( 'AccessDuration' => $listing_type->GetDBField('Duration'),
'AccessUnit' => $listing_type->GetDBField('DurationType'),
);
$this->setPrimaryPrice($object->GetID(), (double)$listing_type->GetDBField('Price'), $additiona_fields);
}
/**
* [HOOK] Deletes virtual product when listing type is deleted
*
* @param kEvent $event
*/
function OnDeleteListingType(&$event)
{
$listing_type = $event->MasterEvent->getObject();
$product_id = $listing_type->GetDBField('VirtualProductId');
if ($product_id) {
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array($product_id));
}
}
/**
* Extends user membership in group when his order is approved
*
* @param kEvent $event
*/
function OnSubscriptionApprove(&$event)
{
$field_values = $event->getEventParam('field_values');
$item_data = unserialize($field_values['ItemData']);
if (!getArrayValue($item_data,'PortalGroupId')) {
// is subscription product, but no group defined in it's properties
trigger_error('Invalid product <b>'.$field_values['ProductName'].'</b> (id: '.$field_values['ProductId'].')');
return false;
}
$order_table = $this->Application->getUnitOption('ord', 'TableName');
$order_idfield = $this->Application->getUnitOption('ord', 'IDField');
$sql = 'SELECT PortalUserId FROM %s WHERE %s = %s';
$user_id = $this->Conn->GetOne( sprintf($sql, $order_table, $order_idfield, $field_values['OrderId']) );
$group_id = $item_data['PortalGroupId'];
$duration = $item_data['Duration'];
$sql = 'SELECT * FROM '.TABLE_PREFIX.'UserGroup WHERE PortalUserId = %s';
$user_groups = $this->Conn->Query( sprintf($sql, $user_id), 'GroupId' );
$sql = 'REPLACE INTO '.TABLE_PREFIX.'UserGroup (PortalUserId,GroupId,MembershipExpires,PrimaryGroup) VALUES (%s,%s,%s,%s)';
if( !isset($user_groups[$group_id]) )
{
$primary_group = count($user_groups) == 0 ? 1 : 0;
$expire = adodb_mktime() + $duration;
}
else {
$primary_group = $user_groups[$group_id]['PrimaryGroup'];
$expire = $user_groups[$group_id]['MembershipExpires'];
$expire = $expire < adodb_mktime() ? adodb_mktime() + $duration : $expire + $duration;
}
/*
// Customization healtheconomics.org
if ($item_data['DurationType'] == 2) {
$expire = $item_data['AccessExpiration'];
}
// Customization healtheconomics.org --
*/
$this->Conn->Query( sprintf($sql, $user_id, $group_id, $expire, $primary_group) );
$sub_order =& $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord');
$sub_order->SetDBField('IsRecurringBilling', getArrayValue($item_data, 'IsRecurringBilling') ? 1 : 0);
$sub_order->SetDBField('GroupId', $group_id);
$sub_order->SetDBField('NextCharge_date', $expire);
$sub_order->SetDBField('NextCharge_time', $expire);
}
function OnDownloadableApprove(&$event)
{
$field_values = $event->getEventParam('field_values');
$product_id = $field_values['ProductId'];
$sql = 'SELECT PortalUserId FROM '.$this->Application->getUnitOption('ord', 'TableName').'
WHERE OrderId = '.$field_values['OrderId'];
$user_id = $this->Conn->GetOne($sql);
$sql = 'INSERT INTO '.TABLE_PREFIX.'UserFileAccess VALUES("", '.$product_id.', '.$user_id.')';
$this->Conn->Query($sql);
}
function OnPackageApprove(&$event){
$field_values = $event->getEventParam('field_values');
$item_data = unserialize($field_values['ItemData']);
$package_content_ids = $item_data['PackageContent'];
$object_item = &$this->Application->recallObject('p.packageitem', null, array('skip_autoload'=>true));
foreach ($package_content_ids as $package_item_id) {
$object_field_values = array();
// query processing data from product and run approve event
$sql = 'SELECT ProcessingData FROM '.TABLE_PREFIX.'Products WHERE ProductId = '.$package_item_id;
$processing_data = $this->Conn->GetOne($sql);
if($processing_data)
{
$processing_data = unserialize($processing_data);
$approve_event = new kEvent($processing_data['ApproveEvent']);
//$order_item_fields = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'OrderItems WHERE OrderItemId = '.$grouping_data[1]);
$object_item->Load($package_item_id);
$object_field_values['OrderId'] = $field_values['OrderId'];
$object_field_values['ProductId'] = $package_item_id;
$object_field_values['ItemData'] = serialize($item_data['PackageItemsItemData'][$package_item_id]);
$approve_event->setEventParam('field_values', $object_field_values);
$this->Application->HandleEvent($approve_event);
}
}
}
function OnPreSave(&$event)
{
$this->CheckRequiredOptions($event);
parent::OnPreSave($event);
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
foreach ($items_info as $id => $field_values) {
$primary_price = getArrayValue($field_values, 'Price');
$this->setPrimaryPrice($id, $primary_price);
}
}
}
function CheckRequiredOptions(&$event)
{
$object =& $event->getObject();
if ($object->GetDBField('ProductId') == '') return ; // if product does not have ID - it's not yet created
$opt_object =& $this->Application->recallObject('po', null, Array('skip_autoload' => true) );
$has_required = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$opt_object->TableName.' WHERE Required = 1 AND ProductId = '.$object->GetDBField('ProductId'));
//we need to imitate data sumbit, as parent' PreSave sets object values from $items_info
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
$items_info[$object->GetDBField('ProductId')]['HasRequiredOptions'] = $has_required ? 1:0;
$this->Application->SetVar($event->getPrefixSpecial(true), $items_info);
$object->SetDBField('HasRequiredOptions', $has_required ? 1:0);
}
/**
* Sets required price in primary price backed, if it's missing, then create it
*
* @param int $product_id
* @param double $price
* @param Array $additional_fields
* @return bool
*/
function setPrimaryPrice($product_id, $price, $additional_fields = Array())
{
$pr_object =& $this->Application->recallObject('pr.-item', null, Array('skip_autoload' => true) );
/* @var $pr_object kDBItem */
$pr_object->Load( Array('ProductId' => $product_id, 'IsPrimary' => 1) );
$sql = 'SELECT COUNT(*) FROM '.$pr_object->TableName.' WHERE ProductId = '.$product_id;
$has_pricings = $this->Conn->GetOne($sql);
if ($additional_fields) {
$pr_object->SetDBFieldsFromHash($additional_fields);
}
if( ($price === false) && $has_pricings ) return false;
if( $pr_object->isLoaded() )
{
$pr_object->SetField('Price', $price);
return $pr_object->Update();
}
else
{
$group_id = $this->Application->ConfigValue('User_LoggedInGroup');
$field_values = Array('ProductId' => $product_id, 'IsPrimary' => 1, 'MinQty' => 1, 'MaxQty' => -1, 'GroupId'=>$group_id);
$pr_object->SetDBFieldsFromHash($field_values);
$pr_object->SetField('Price', $price);
$ret = $pr_object->Create();
if ($pr_object->mode == 't') {
$pr_object->setTempID();
}
return $ret;
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnAfterItemDelete(&$event)
{
$product_id = $event->getEventParam('id');
if(!$product_id)
{
return;
}
$sql = 'DELETE FROM '.TABLE_PREFIX.'UserFileAccess
WHERE ProductId = '.$product_id;
$this->Conn->Query($sql);
}
/**
* Load price from temp table if product mode is temp table
*
* @param kEvent $event
*/
function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
$object =& $event->getObject();
$a_pricing = $object->getPrimaryPricing();
$object->SetDBField('Price', floatval($a_pricing['Price']));
$object->SetDBField('Cost', floatval($a_pricing['Cost']));
}
/**
* Allows to add products to package besides all that parent method does
*
* @param kEvent $event
*/
function OnProcessSelected(&$event)
{
$dst_field = $this->Application->RecallVar('dst_field');
if ($dst_field == 'PackageContent') {
$this->OnAddToPackage($event);
}
elseif ($dst_field == 'AssignedCoupon') {
$coupon_id = $this->Application->GetVar('selected_ids');
$object =& $event->getObject();
$object->SetDBField('AssignedCoupon', $coupon_id);
$this->RemoveRequiredFields($object);
$object->Update();
}
else {
parent::OnProcessSelected($event);
}
$this->finalizePopup($event);
}
/**
* Called when some products are selected in products selector for this prefix
*
* @param kEvent $event
*/
function OnAddToPackage(&$event)
{
$selected_ids = $this->Application->GetVar('selected_ids');
// update current package content with selected products
- $this->Application->SetVar($event->Prefix.'_mode', 't');
$object =& $event->getObject();
/* @var $object ProductsItem */
$product_ids = $selected_ids['p'] ? explode(',', $selected_ids['p']) : Array();
if ($product_ids) {
$current_ids = $object->GetPackageContentIds();
$current_ids = array_unique(array_merge($current_ids, $product_ids));
// remove package product from selected list
$this_product = array_search($object->GetID(), $current_ids);
if ($this_product !== false) {
unset($current_ids[$this_product]);
}
$dst_field = $this->Application->RecallVar('dst_field');
$object->SetDBField($dst_field, '|'.implode('|', $current_ids).'|');
$object->Update();
$this->ProcessPackageItems($event);
}
$this->finalizePopup($event);
}
function ProcessPackageItems(&$event)
{
//$this->Application->SetVar('p_mode', 't');
$object =& $event->getObject();
/* @var $object ProductsItem */
$content_ids = $object->GetPackageContentIds();
if (sizeof($content_ids) > 0) {
$total_weight = $this->Conn->GetOne('SELECT SUM(Weight) FROM '.TABLE_PREFIX.'Products WHERE ProductId IN ('.implode(', ', $content_ids).') AND Type=1');
if (!$total_weight) $total_weight = 0;
$this->Conn->Query('UPDATE '.$object->TableName.' SET Weight='.$total_weight.' WHERE ProductId='.$object->GetID());
}
/*
$this->Application->SetVar('p_mode', false);
$list = &$this->Application->recallObject('p.content', 'p_List', array('types'=>'content'));
$this->Application->SetVar('p_mode', 't');
$list->Query();
$total_weight_a = 0;
$total_weight_b = 0;
$list->GoFirst();
while (!$list->EOL())
{
if ($list->GetDBField('Type')==1){
$total_weight_a += $list->GetField('Weight_a');
$total_weight_b += $list->GetField('Weight_b');
}
$list->GoNext();
}
$object->SetField('Weight_a', $total_weight_a);
$object->SetField('Weight_b', $total_weight_b);
*/
//$object->Update();
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnSaveItems(&$event)
{
//$event->CallSubEvent('OnUpdate');
$event->redirect = false;
//$event->redirect_params = Array('opener'=>'s','pass'=>'all,p');
}
/**
* Removes product from package
*
* @param kEvent $event
*/
function OnRemovePackageItem(&$event) {
$this->Application->SetVar('p_mode', 't');
$object =& $event->getObject();
$items_info = $this->Application->GetVar('p_content');
if($items_info)
{
$product_ids = array_keys($items_info);
$current_ids = $object->GetPackageContentIds();
$current_ids_flip = array_flip($current_ids);
foreach($product_ids as $key=>$val){
unset($current_ids_flip[$val]);
}
$current_ids = array_keys($current_ids_flip);
$current_ids_str = '|'.implode('|', array_unique($current_ids)).'|';
$object->SetDBField('PackageContent', $current_ids_str);
}
$object->Update();
$this->ProcessPackageItems($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemDelete(&$event){
$object = &$event->getObject();
$product_includes_in = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Products WHERE PackageContent LIKE "%|'.$object->GetID().'%"');
if ($product_includes_in > 0){
$event->status=erFAIL;
}
}
/**
* Returns specific to each item type columns only
*
* @param kEvent $event
* @return Array
*/
function getCustomExportColumns(&$event)
{
$columns = parent::getCustomExportColumns($event);
$new_columns = Array(
'__VIRTUAL__Price' => 'Price',
'__VIRTUAL__Cost' => 'Cost',
);
return array_merge_recursive2($columns, $new_columns);
}
/**
* Sets non standart virtual fields (e.g. to other tables)
*
* @param kEvent $event
*/
function setCustomExportColumns(&$event)
{
parent::setCustomExportColumns($event);
$object =& $event->getObject();
$this->setPrimaryPrice($object->GetID(), (double)$object->GetDBField('Price'), Array('Cost' => (double)$object->GetDBField('Cost')) );
}
function OnPreSaveAndOpenPopup(&$event)
{
$object =& $event->getObject();
$this->RemoveRequiredFields($object);
$event->CallSubEvent('OnPreSave');
$event->redirect = $this->Application->GetVar('t');
// pass ID too, in case if product is created by OnPreSave call to ensure proper editing
$event->redirect_params = Array(
'pass' => 'all',
$event->getPrefixSpecial(true).'_id' => $object->GetID(),
);
}
function getPassedId(&$event)
{
-// $event->setEventParam('raise_warnings', 0);
+ $event->setEventParam('raise_warnings', 0);
$passed = parent::getPassedID($event);
- if ($passed) return $passed;
+ if ($passed) {
+ return $passed;
+ }
if ($this->Application->IsAdmin()) {
// we may get product id out of OrderItem, if it exists
-// if ($this->Application->GetVar('orditems_id')) {
- $ord_item =& $this->Application->recallObject('orditems');
- if ($ord_item->GetDBField('ProductId')) {
- $passed = $ord_item->GetDBField('ProductId');
- }
-// }
+ $ord_item =& $this->Application->recallObject('orditems', null, Array ('raise_warnings' => 0));
+ if ($ord_item->GetDBField('ProductId')) {
+ $passed = $ord_item->GetDBField('ProductId');
+ }
}
+
return $passed;
}
function OnAfterConfigRead(&$event)
{
parent::OnAfterConfigRead($event);
$user_id = $this->Application->RecallVar('user_id');
if (!is_numeric($user_id)) {
return ;
}
$calculated_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
$sql = 'SELECT GroupId
FROM '.TABLE_PREFIX.'UserGroup
WHERE PrimaryGroup = 1 AND PortalUserId = '.$user_id;
$primary_group = $this->Conn->GetOne($sql);
if (!$primary_group) return;
$calculated_fields['']['Price'] = '
( IFNULL(
( SELECT pp.Price FROM '.TABLE_PREFIX.'ProductsPricing AS pp
WHERE pp.ProductId = %1$s.ProductId AND GroupId = '.$primary_group.' ORDER BY MinQty LIMIT 0,1
), pricing.Price
)
)';
$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
}
/**
* Starts product editing, remove any pending inventory actions
*
* @param kEvent $event
*/
function OnEdit(&$event)
{
$this->Application->RemoveVar('inventory_actions');
parent::OnEdit($event);
}
/**
* Adds "Shop Cart" tab on paid listing type editing tab
*
* @param kEvent $event
*/
function OnModifyPaidListingConfig(&$event)
{
$edit_tab_presets = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'EditTabPresets');
$edit_tab_presets['Default']['shopping_cart'] = Array ('title' => 'la_tab_ShopCartEntry', 't' => 'in-commerce/paid_listings/paid_listing_type_shopcart', 'priority' => 2);
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'EditTabPresets', $edit_tab_presets);
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/products/products_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.84.2.5
\ No newline at end of property
+1.84.2.6
\ No newline at end of property
Index: branches/RC/in-commerce/units/products/products_config.php
===================================================================
--- branches/RC/in-commerce/units/products/products_config.php (revision 11548)
+++ branches/RC/in-commerce/units/products/products_config.php (revision 11549)
@@ -1,551 +1,569 @@
<?php
$config = Array(
'Prefix' => 'p',
'ItemClass' => Array('class'=>'ProductsItem','file'=>'products_item.php', 'require_classes' => Array('kCatDBItem'), 'build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kCatDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ProductsEventHandler','file'=>'products_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'ProductsTagProcessor','file'=>'products_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'Reviews_Page',
4 => 'event',
5 => 'mode',
),
'CatalogItem' => true,
'AdminTemplatePath' => 'products',
'AdminTemplatePrefix' => 'products_',
'SearchConfigPostfix' => 'products',
'ConfigPriority' => 0,
'Hooks' => Array (
// for subscription products: access group is saved before changing pricings
Array (
'Mode' => hAFTER,
'Conditional' => true,
'HookToPrefix' => 'pr',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnNew', 'OnAfterItemLoad'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPreSave',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnBeforeCopyToLive' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnSaveVirtualProduct',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteListingType',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'lst',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnModifyPaidListingConfig',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'file',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnNew', 'OnEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPreSave',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
),
'IDField' => 'ProductId',
'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'ItemType' => 11, // this is used when relation to product is added from in-portal and via-versa
'ViewMenuPhrase' => 'la_text_Products',
'CatalogTabIcon' => 'in-commerce:icon16_product.gif',
'ItemPropertyMappings' => Array(
'NewDays' => 'Product_NewDays', // number of days item to be NEW
'MinPopVotes' => 'Product_MinPopVotes', // minimum number of votes for an item to be POP
'MinPopRating' => 'Product_MinPopRating', // minimum rating for an item to be POP
'MaxHotNumber' => 'Product_MaxHotNumber', // maximum number of HOT (top seller) items
'HotLimit' => 'Product_HotLimit', // variable name in inp_Cache table
'ClickField' => 'Hits', // item click count is stored here (in item table)
),
'TitlePhrase' => 'la_text_Product',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('p'=>'!la_title_Adding_Product!'),
'edit_status_labels' => Array('p'=>'!la_title_Editing_Product!'),
'new_titlefield' => Array('p'=>'!la_title_NewProduct!'),
),
'product_list'=>Array( 'prefixes' => Array('c_List','p_List'),
'tag_params' => Array('c'=> Array('per_page'=>-1)),
'format' => "!la_title_Categories! (#c_recordcount#) - !la_title_Products! (#p_recordcount#)",
),
'products_edit'=>Array( 'prefixes' => Array('p'),
'new_titlefield' => Array('p'=>'!la_title_NewProduct!'),
'format' => "#p_status# '#p_titlefield#' - !la_title_General!",
),
'inventory' => Array('prefixes' => Array('p'), 'format' => "#p_status# - '#p_titlefield#' - !la_title_Product_Inventory!"),
'pricing' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Pricing!"),
'access_pricing' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_AccessPricing!"),
'access' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Access!"),
'files' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Files!"),
'options'=> Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_Options!"),
'categories'=> Array('prefixes' => Array('p','p-ci_List'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Categories!"),
'relations' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Relations!"),
'content' => Array('prefixes' => Array('p','p.content_List'), 'tag_params' => Array('p.content' => Array('types'=>'content', 'live_table'=>true)), 'format' => "#p_status# '#p_titlefield#' - !la_title_Product_PackageContent!"),
'images' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Images!"),
'reviews' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Reviews!"),
'products_custom' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_Custom!"),
'images_edit' => Array( 'prefixes' => Array('p', 'img'),
'new_status_labels' => Array('img'=>'!la_title_Adding_Image!'),
'edit_status_labels' => Array('img'=>'!la_title_Editing_Image!'),
'new_titlefield' => Array('img'=>'!la_title_New_Image!'),
'format' => "#p_status# '#p_titlefield#' - #img_status# '#img_titlefield#'",
),
'pricing_edit' => Array( 'prefixes' => Array('p', 'pr'),
'new_status_labels' => Array('pr'=>"!la_title_Adding_PriceBracket! '!la_title_New_PriceBracket!'"),
'edit_status_labels' => Array('pr'=>'!la_title_Editing_PriceBracket!'),
'format' => "#p_status# '#p_titlefield#' - #pr_status#",
),
'options_edit' => Array( 'prefixes' => Array('p', 'po'),
'new_status_labels' => Array('po'=>"!la_title_Adding_Option!"),
'edit_status_labels' => Array('po'=>'!la_title_Editing_Option!'),
'new_titlefield' => Array('po'=>'!la_title_New_Option!'),
'format' => "#p_status# '#p_titlefield#' - #po_status# '#po_titlefield#'",
),
'options_combinations' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingOptionCombinations!"),
'shipping_options' => Array('prefixes' => Array('p'), 'format' => "#p_status# '#p_titlefield#' - !la_title_ManagingShippingOptions!"),
'file_edit' => Array( 'prefixes' => Array('p', 'file'),
'new_status_labels' => Array('file'=>"!la_title_Adding_File!"),
'edit_status_labels' => Array('file'=>'!la_title_Editing_File!'),
'new_titlefield' => Array('file'=>'!la_title_New_File!'),
'format' => "#p_status# '#p_titlefield#' - #file_status# '#file_titlefield#'",
),
'relations_edit' => Array( 'prefixes' => Array('p', 'rel'),
'new_status_labels' => Array('rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
'edit_status_labels' => Array('rel'=>'!la_title_Editing_Relationship!'),
'format' => "#p_status# '#p_titlefield#' - #rel_status#",
),
'reviews_edit' => Array( 'prefixes' => Array('p', 'rev'),
'new_status_labels' => Array('rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"),
'edit_status_labels' => Array('rev'=>'!la_title_Editing_Review!'),
'format' => "#p_status# '#p_titlefield#' - #rev_status#",
),
- 'coupon_selector' => Array('format' => '!la_title_CouponSelector!'),
-
'products_export' => Array('format' => '!la_title_ProductsExport!'),
'products_import' => Array('format' => '!la_title_ImportProducts!'),
'tree_in-commerce' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Commerce', 'Version')),
),
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/products/products_edit', 'priority' => 1),
+ 'inventory' => Array ('title' => 'la_tab_Inventory', 't' => 'in-commerce/products/products_inventory', 'priority' => 2),
+ 'access_and_pricing' => Array ('title' => 'la_tab_AccessAndPricing', 't' => 'in-commerce/products/products_access', 'priority' => 3),
+ 'pricing' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_pricing', 'priority' => 4),
+
+// 'pricing2' => Array ('title' => 'la_tab_Pricing', 't' => 'in-commerce/products/products_access_pricing', 'priority' => 5),
+
+ 'files_and_pricing' => Array ('title' => 'la_tab_FilesAndPricing', 't' => 'in-commerce/products/products_files', 'priority' => 6),
+ 'options' => Array ('title' => 'la_tab_Options', 't' => 'in-commerce/products/products_options', 'priority' => 7),
+ 'categories' => Array ('title' => 'la_tab_Categories', 't' => 'in-commerce/products/products_categories', 'priority' => 8),
+ 'relations' => Array ('title' => 'la_tab_Relations', 't' => 'in-commerce/products/products_relations', 'priority' => 9),
+ 'package_content' => Array ('title' => 'la_tab_PackageContent', 't' => 'in-commerce/products/products_packagecontent', 'priority' => 10),
+ 'images' => Array ('title' => 'la_tab_Images', 't' => 'in-commerce/products/products_images', 'priority' => 11),
+ 'reviews' => Array ('title' => 'la_tab_Reviews', 't' => 'in-commerce/products/products_reviews', 'priority' => 12),
+ 'custom' => Array ('title' => 'la_tab_Custom', 't' => 'in-commerce/products/products_custom', 'priority' => 13),
+ ),
+ ),
+
'PermItemPrefix' => 'PRODUCT',
'PermTabText' => 'In-Commerce',
'PermSection' => Array('main' => 'CATEGORY:in-commerce:products_list', 'search' => 'in-commerce:search', 'email' => 'in-commerce:incommerce_configemail', 'custom' => 'in-commerce:configuration_custom'),
'Sections' => Array(
'in-commerce' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-commerce:in-commerce',
'label' => 'la_title_In-Commerce',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 3.4,
'type' => stTREE,
),
'in-commerce:products' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_general',
'label' => 'la_tab_Products',
'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'p.showall\')',
'permissions' => Array('view'),
'priority' => 0.1,
'type' => stTREE,
),
'in-commerce:general' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 9,
'type' => stTREE,
),
'in-commerce:output' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 10,
'type' => stTREE,
),
'in-commerce:search' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 11,
'type' => stTREE,
),
'in-commerce:incommerce_configemail' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 12,
'type' => stTREE,
),
'in-commerce:contacts' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_contacts',
'label' => 'la_tab_ConfigContacts',
'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 13,
'type' => stTREE,
),
'in-commerce:configuration_custom' => Array(
'parent' => 'in-commerce',
'icon' => 'settings_custom',
'label' => 'la_tab_ConfigCustom',
'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 14,
'type' => stTREE,
),
),
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array('show_active','show_pending','show_disabled'), 'type' => WHERE_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_tang','show_sub','show_serv','show_download','show_package'), 'type' => WHERE_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_new'), 'type' => HAVING_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_hot'), 'type' => HAVING_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER),
Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER),
),
'Filters' => Array(
'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
's1' => Array(),
'show_tang' => Array('label' => 'la_product_tangible', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
'show_sub' => Array('label' => 'la_product_subscription', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
'show_serv' => Array('label' => 'la_product_service', 'on_sql' => '', 'off_sql' => '%1$s.Type != 3' ),
'show_download' => Array('label' => 'la_product_downloadable', 'on_sql' => '', 'off_sql' => '%1$s.Type != 4' ),
'show_package' => Array('label' => 'la_product_package', 'on_sql' => '', 'off_sql' => '%1$s.Type != 5' ),
's2' => Array(),
'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ),
'show_hot' => Array('label' => 'la_Text_TopSellers', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ),
'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ),
'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ),
)
),
'TableName' => TABLE_PREFIX.'Products',
'CalculatedFields' => Array (
'' => Array (
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
'Price' => 'pricing.Price',
'Cost' => 'pricing.Cost',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'ParentPath' => TABLE_PREFIX.'Category.ParentPath',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
),
'showall' => Array (
'Price' => 'pricing.Price',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
),
),
'ListSQLs' => Array(
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup ON '.TABLE_PREFIX.'PortalGroup.GroupId = %1$s.AccessGroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
'showall'=> 'SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'PermCache perm ON perm.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
), // key - special, value - list select sql
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('Name' => 'asc'),
)
),
'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup pg ON pg.GroupId = %1$s.AccessGroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId
LEFT JOIN '.TABLE_PREFIX.'Images img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'ProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'ProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'Manufacturers ON '.TABLE_PREFIX.'Manufacturers.ManufacturerId = %1$s.ManufacturerId
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsCustomData cust ON %1$s.ResourceId = cust.ResourceId',
),
'SubItems' => Array('pr', 'rev', 'img', 'po', 'poc', 'p-ci', 'rel', 'file', 'p-cdata', 'p-fav'),
'Fields' => Array(
'ProductId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'required'=>true, 'max_len'=>255, 'default' => ''),
'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
'SKU' => Array('type' => 'string', 'required'=>true, 'max_len'=>255, 'error_msgs' => Array('required' => 'Please fill in'), 'default' => NULL),
'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => NULL),
'DescriptionExcerpt' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => NULL),
'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL),
'MSRP' => Array('type'=>'float', 'min_value_inc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
'ManufacturerId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0 => ''), 'options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field'=>'ManufacturerId', 'option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'BackOrder' => Array('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ),
'BackOrderDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL),
'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => true, 'default' => 2 ),
'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => true, 'default' => 2 ),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => true, 'default' => 2 ),
'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'Featured' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'OnSale' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'Priority' => Array('type'=>'int', 'not_null' => true, 'default' => 0),
'CachedRating' => Array('not_null' => true, 'default' => 0, 'type' => 'float', 'formatter' => 'kFormatter', 'format' => '%0.2f'),
'CachedVotesQty' => Array('type'=>'int', 'not_null' => true, 'default' => 0),
'Hits' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => true, 'default' => 0),
'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#'),
'Expire' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>null),
- 'Type' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_product_tangible', 2=>'la_product_subscription', 4=>'la_product_downloadable', 3=>'la_product_service', /*6=>'la_gift_certificate', 5=>'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
+ 'Type' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1=>'la_product_tangible', 2=>'la_product_subscription', 4=>'la_product_downloadable', 3=>'la_product_service'/*, 6=>'la_gift_certificate', 5=>'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default'=>'#NOW#'),
'ModifiedById' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'CreatedById' => Array('type' => 'int', 'not_null' => true, 'default' => 0),
'ResourceId' => Array('type' => 'int', 'default' => 0),
'CachedReviewsQty' => Array('type' => 'int', 'formatter'=>'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'InventoryStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'QtyInStock' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyInStockMin' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyReserved' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyBackOrdered' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyOnOrder' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'InventoryComment' => Array('type' => 'string', 'default' => null),
'Qty' => Array('type'=>'int', 'formatter'=>'kFormatter', 'regexp'=>'/^[\d]+$/', 'error_msgs' => Array('invalid_format'=>'!la_invalid_integer!')),
'AccessGroupId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field'=>'GroupId', 'option_title_field'=>'Name', 'default' => NULL),
'AccessDuration' => Array('type' => 'int', 'default' => NULL),
'AccessDurationType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year' ), 'default' => NULL,),
'AccessStart' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'AccessEnd' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,),
'OptionsSelectionMode' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0),
'HasRequiredOptions' => Array('type' => 'int', 'default' => 0, 'not_null' => 1),
'Virtual' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'ProcessingData' => Array('type' => 'string', 'default' => ''),
'PackageContent' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'IsRecurringBilling' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
// 'PayPalRecurring' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
'ShippingMode' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options'=>Array(0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default'=>0),
'ProcessingData' => Array('type' => 'string', 'default' => null),
'ShippingLimitation' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'AssignedCoupon' =>
Array('type' => 'int', 'not_null' => 1, 'default' => 0,
'formatter'=>'kLEFTFormatter',
'options' => array(0 => 'None'),
'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'ProductsCoupons WHERE `%s` = \'%s\'',
'left_key_field'=>'CouponId',
'left_title_field'=>'Name'),
'MinQtyFreePromoShipping' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'MetaKeywords' => Array('type' => 'string', 'default' => null),
'MetaDescription' => Array('type' => 'string', 'default' => null),
),
'VirtualFields' => Array(
'Qty' => 1,
'Price' => Array('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
'Cost' => Array('type' => 'float', 'formatter' => 'kFormatter', 'not_null' => 1, 'format' => '%.2f', 'default' => 0),
'IsHot' => Array('type'=>'int'),
'IsNew' => Array('type'=>'int'),
'IsPop' => Array('type'=>'int'),
'Manufacturer' => Array(),
// export related fields: begin
'CategoryId' => Array('type' => 'int', 'default' => 0),
'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array('type' => 'string', 'default' => ''),
'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
'CategoryFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array('type' => 'string', 'default' => ':'),
'IsBaseCategory' => Array('type' => 'int', 'default' => 0),
// export related fields: end
// import related fields: begin
'FieldTitles' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1),
'ImportSource' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2),
'ImportFilename' => Array('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'),
'ImportLocalFilename' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''),
'CheckDuplicatesMethod' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1),
'ReplaceDuplicates' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0),
'DuplicateCheckFields' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array('Name' => 'NAME'), 'default' => '|Name|'),
'SkipFirstRow' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 1),
// import related fields: end
'ThumbnailImage' => Array('type' => 'string', 'default' => ''),
'FullImage' => Array('type' => 'string', 'default' => ''),
'ImageAlt' => Array('type' => 'string', 'default' => ''),
'Filename' => Array('type' => 'string','not_null' => '1','default' => ''),
'CachedNavbar' => Array('type' => 'string', 'default' => ''),
'ParentPath' => Array('type' => 'string', 'default' => ''),
'FileSize' => Array('type' => 'int','formatter' => 'kFilesizeFormatter','not_null' => 1, 'default' => 0),
'FilePath' => Array(),
'FileVersion' => Array(),
// for primary image
'SameImages' => Array('type' => 'string', 'default' => ''),
'LocalThumb' => Array('type' => 'string', 'default' => ''),
'ThumbPath' => Array('type' => 'string', 'default' => ''),
'ThumbUrl' => Array('type' => 'string', 'default' => ''),
'LocalImage' => Array('type' => 'string', 'default' => ''),
'LocalPath' => Array('type' => 'string', 'default' => ''),
'FullUrl' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_product.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter' ),
'SKU' => Array( 'title'=>'la_col_ProductSKU' ),
'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter'),
'Manufacturer' => Array('title' => 'la_col_Manufacturer'),
'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td' ),
'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter'),
'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter'),
'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
'OnSale' => Array('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter'),
/*
'Weight' => Array( 'title'=>'la_col_ProductWeight' ),
'CreatedOn_formatted' => Array( 'title'=>'la_col_ProductCreatedOn', 'sort_field' => 'CreatedOn' ),
'BackOrderDate_formatted' => Array( 'title'=>'la_col_ProductBackOrderDate', 'sort_field' => 'BackOrderDate' ),*/
),
),
'Radio' => Array(
'Icons' => Array('default'=>'icon16_product.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
'Selector' => 'radio',
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_radio_td' ),
'SKU' => Array( 'title'=>'la_col_ProductSKU' ),
'Type' => Array('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter'),
'Manufacturer' => Array('title' => 'la_col_Manufacturer'),
'Name' => Array( 'title'=>'la_col_ProductName', 'data_block'=>'grid_catitem_td' ),
'Price' => Array('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter'),
'QtyInStock' => Array('title' => 'la_col_Qty', 'data_block'=>'qty_td', 'filter_block' => 'grid_range_filter'),
'QtyBackOrdered' => Array('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter'),
),
),
),
'ConfigMapping' => Array(
'PerPage' => 'Comm_Perpage_Products',
'ShortListPerPage' => 'Comm_Perpage_Products_Short',
'ForceEditorPick' => 'products_EditorPicksAboveRegular',
'DefaultSorting1Field' => 'product_OrderProductsBy',
'DefaultSorting2Field' => 'product_OrderProductsThenBy',
'DefaultSorting1Dir' => 'product_OrderProductsByDir',
'DefaultSorting2Dir' => 'product_OrderProductsThenByDir',
'RatingDelayValue' => 'product_RatingDelay_Value',
'RatingDelayInterval' => 'product_RatingDelay_Interval',
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/products/products_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.99.2.23
\ No newline at end of property
+1.99.2.24
\ No newline at end of property
Index: branches/RC/in-commerce/units/coupon_items/coupon_items_config.php
===================================================================
--- branches/RC/in-commerce/units/coupon_items/coupon_items_config.php (revision 11548)
+++ branches/RC/in-commerce/units/coupon_items/coupon_items_config.php (revision 11549)
@@ -1,105 +1,105 @@
<?php
-
+
$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(
+ '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',
+ 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(
+
+ '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' ),
+ 'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter'),
),
-
+
),
'CouponItems' => Array(
'Icons' => Array('default'=>'icon16_custom.gif',1=>'icon16_product.gif',2=>'icon16_product_pending.gif',0=>'icon16_product_disabled.gif'),
'Fields' => Array(
- 'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_checkbox_td' ),
- 'ItemName' => Array( 'title'=>'la_col_ItemName' ),
- 'ItemType' => Array( 'title'=>'la_col_CouponItemType' ),
+ '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'),
),
-
+
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/coupon_items/coupon_items_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/coupon_items/coupon_items_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/coupon_items/coupon_items_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/coupon_items/coupon_items_tag_processor.php (revision 11549)
@@ -1,30 +1,37 @@
<?php
class CouponItemsTagProcessor extends kDBTagProcessor {
function IsEntireOrder($params)
{
- $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List',$params);
- $sql = 'SELECT COUNT(*) FROM '.$object->TableName.' WHERE ItemType=0 AND CouponId='.$this->Application->GetVar('coup_id');
+ $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+ if ($this->Application->IsTempMode($this->Prefix)) {
+ $table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
+ }
+
+ $sql = 'SELECT COUNT(*)
+ FROM ' . $table_name . '
+ WHERE (ItemType = 0) AND (CouponId = ' . $this->Application->GetVar('coup_id') . ')';
return $this->Conn->GetOne($sql);
}
-
+
function ItemIcon($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params);
if($object->GetDBField('ItemType') == 2)
{
$cat_object =& $this->Application->recallObject('c');
$cat_object->Load( $object->GetDBField('CategoryId') );
$cat_tag_processor =& $this->Application->recallObject('c_TagProcessor');
return $cat_tag_processor->ItemIcon();
}
else
{
return parent::ItemIcon($params);
- }
+ }
}
-
+
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/coupon_items/coupon_items_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.8.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/affiliates/affiliates_config.php
===================================================================
--- branches/RC/in-commerce/units/affiliates/affiliates_config.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliates/affiliates_config.php (revision 11549)
@@ -1,180 +1,188 @@
<?php
$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! (#affil_recordcount#)"),
+ '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! (#apayments_recordcount#)"),
+ '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',
'permissions' => Array(),
'priority' => 8,
'type' => stTREE,
),
'in-commerce:affiliates' => Array(
'parent' => 'in-commerce:affiliates_folder',
'icon' => 'affiliates',
'label' => 'la_tab_Affiliates',
'url' => Array('t' => 'in-commerce/affiliate_plans/affiliates_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 8.1,
'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','not_null' => '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(
- 'UserName' => Array( 'title' => 'la_col_UserName', 'data_block' => 'grid_userlink_checkbox_td'),
- 'PlanName' => Array( 'title'=>'la_col_PlanName'),
- 'Status' => Array( 'title' => 'la_col_Status'),
- 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType'),
- 'CreatedOn' => Array( 'title' => 'la_col_RegisteredOn', 'format' => '_regional_DateFormat'),
+ 'AffiliateId' => Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'UserName' => Array( 'title' => 'la_col_UserName', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
+ 'PlanName' => Array( 'title'=>'la_col_PlanName', 'filter_block' => 'grid_like_filter'),
+ 'Status' => Array( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
+ 'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
+ 'CreatedOn' => Array( 'title' => 'la_col_RegisteredOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliates/affiliates_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.27
\ No newline at end of property
+1.27.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/units/affiliates/affiliates_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/affiliates/affiliates_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/affiliates/affiliates_tag_processor.php (revision 11549)
@@ -1,128 +1,134 @@
<?php
class AffiliatesTagProcessor extends kDBTagProcessor {
/**
* Returns link to be placed on other sites
*
* @param Array $params
* @return string
*/
function GetAffiliateLink($params)
{
$object =& $this->getObject($params);
$params['affiliate'] = $object->GetDBField('AffiliateCode');
$params['prefix'] = '_FRONT_END_';
$params['index_file'] = 'index.php';
$params['no_pass'] = 1; // don't work
$params['__SSL__'] = 0;
$params['__NO_SID__'] = 1; // don't work
$link = $this->Application->ProcessParsedTag('m', 'Link', $params);
// remove env manually (because no_pass parameter don't work)
return preg_replace('/(.*)\/index.php\?env=(.*)&amp;(.*)/', '\\1/index.php?\\3', $link);
}
/**
* Returns link to be placed on other sites (for current user)
*
* @param Array $params
* @return string
*/
function GetUserAffiliateLink($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, array_merge($params, array('skip_autoload'=>true)) );
$object->Load(array('PortalUserId' => $this->Application->RecallVar('user_id')));
// return $this->GetAffiliateLink($params);
$params['no_pass'] = 1; // don't work
$params['index_file'] = 'index.php';
$params['affiliate'] = $object->GetDBField('AffiliateCode');
$params['__SSL__'] = 0;
$params['__NO_SID__'] = 1; // don't work
$link = $this->Application->ProcessParsedTag('m', 'Link', $params);
// remove env manually (because no_pass parameter don't work)
return preg_replace('/(.*)\/index.php\?env=(.*)&amp;(.*)/', '\\1/index.php?\\3', $link);
}
/**
* Returns true if user is affiliate
*
* @param Array $params
* @return bool
*/
function User_IsAffiliate($params)
{
$object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
$object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
return $object->isLoaded();
}
function User_AffiliateIsNotActive($params)
{
$object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
$object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
return $object->isLoaded() && ($object->GetDBField('Status') != 1);
}
/**
* Returns url for editing user from current record
*
* @param Array $params
* @return string
*/
function UserLink($params)
{
$object =& $this->getObject($params);
$user_id = $object->GetDBField('PortalUserId');
- if($user_id)
- {
- //return $this->Application->HREF('in-commerce/users/users_edit_general','', Array('u_id' => $user_id) );
- $resource_id = $this->Conn->GetOne('SELECT ResourceId FROM '.TABLE_PREFIX.'PortalUser WHERE PortalUserId = '.$user_id);
- return 'javascript:OpenUserEdit('.$resource_id.');';
+
+ if ($user_id) {
+ $url_params = Array (
+ 'm_opener' => 'd',
+ 'u_mode' => 't',
+ 'u_event' => 'OnEdit',
+ 'u_id' => $user_id,
+ 'pass' => 'all,u'
+ );
+
+ return $this->Application->HREF($params['edit_template'], '', $url_params);
}
}
function CurrentUserAffiliateField($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, array_merge($params, Array('skip_autoload' => true)) );
$object->Load( Array('PortalUserId'=>$this->Application->RecallVar('user_id')) );
return $object->GetField($this->SelectParam($params, 'field,name'));
}
function IsAffiliateOrRegisterAsAffiliateAllowed($params)
{
$object =& $this->Application->recallObject($this->Prefix.'.user', $this->Prefix, Array('skip_autoload'=>true) );
$object->Load( $this->Application->RecallVar('user_id'), 'PortalUserId' );
return ($this->Application->ConfigValue('Comm_RegisterAsAffiliate') || $object->isLoaded()) ? 1 : 0;
}
/**
* [AGGREGATED TAG] Checks if affilite registration is allowed
*
* @param Array $params
* @return int
*/
function AllowAffiliateRegistration($params)
{
return $this->Application->ConfigValue('Comm_RegisterAsAffiliate') ? 1 : 0;
}
function Main_RequireAffiliate($params)
{
$t = $params['registration_template'];
if( !$this->User_IsAffiliate($params) )
{
$redirect_params = Array( 'next_template' => $this->Application->GetVar('t') );
$this->Application->Redirect($t, $redirect_params);
}
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/affiliates/affiliates_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12.2.1
\ No newline at end of property
+1.12.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/units/discounts/discounts_config.php
===================================================================
--- branches/RC/in-commerce/units/discounts/discounts_config.php (revision 11548)
+++ branches/RC/in-commerce/units/discounts/discounts_config.php (revision 11549)
@@ -1,120 +1,129 @@
<?php
$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! (#d_recordcount#)",
+ '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! (#di_recordcount#)",
+ 'format' => "#d_status# '#d_titlefield#' - !la_title_DiscountItems!",
),
),
+ 'EditTabPresets' => Array (
+ 'Default' => Array (
+ 'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/discount_edit', 'priority' => 1),
+ 'items' => Array ('title' => 'la_tab_DiscountItems', 't' => 'in-commerce/discounts/discount_items', 'priority' => 2),
+ ),
+ ),
+
'PermSection' => Array('main' => 'in-commerce:discounts'),
'Sections' => Array(
'in-commerce:discounts_folder' => Array(
'parent' => 'in-commerce',
+ 'use_parent_header' => 1,
'icon' => 'discounts',
'label' => 'la_tab_DiscountsAndCoupons',
'permissions' => Array(),
'priority' => 2,
'type' => stTREE,
),
'in-commerce:discounts' => Array(
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts',
'label' => 'la_tab_Discounts',
'url' => Array('t' => 'in-commerce/discounts/discounts_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 2.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'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_custom.gif',1=>'icon16_discount.gif',2=>'icon16_discount_pending.gif',0=>'icon16_discount_disabled.gif'),
'Fields' => Array(
- 'Name' => Array( 'title'=>'la_col_Name', 'data_block' => 'grid_checkbox_td' ),
- 'Start_formatted' => Array( 'title'=>'la_col_Start', 'sort_field' => 'Start' ),
- 'End_formatted' => Array( 'title'=>'la_col_End', 'sort_field' => 'End' ),
- 'GroupId' => Array( 'title'=>'la_col_Group' ),
- 'Type' => Array( 'title'=>'la_col_Type' ),
- 'Amount' => Array( 'title'=>'la_col_Amount' ),
+ 'DiscountId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter'),
+ 'Start' => Array( 'title'=>'la_col_Start', 'filter_block' => 'grid_date_range_filter'),
+ 'End' => Array( 'title'=>'la_col_End', 'filter_block' => 'grid_date_range_filter'),
+ 'GroupId' => Array( 'title'=>'la_col_Group', 'filter_block' => 'grid_options_filter'),
+ 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter'),
+ 'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/discounts/discounts_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.18.2.1
\ No newline at end of property
+1.18.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/units/order_items/order_items_config.php
===================================================================
--- branches/RC/in-commerce/units/order_items/order_items_config.php (revision 11548)
+++ branches/RC/in-commerce/units/order_items/order_items_config.php (revision 11549)
@@ -1,151 +1,151 @@
<?php
$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'),
'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'),
+ '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'),
'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'),
+ 'ReturnedOn' => Array ('title' => 'la_col_ReturnedOn', 'data_block' => 'grid_date_td', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
Property changes on: branches/RC/in-commerce/units/order_items/order_items_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.22.2.4
\ No newline at end of property
+1.22.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/units/order_items/order_items_tag_processor.php
===================================================================
--- branches/RC/in-commerce/units/order_items/order_items_tag_processor.php (revision 11548)
+++ branches/RC/in-commerce/units/order_items/order_items_tag_processor.php (revision 11549)
@@ -1,235 +1,238 @@
<?php
class OrderItemsTagProcessor extends kDBTagProcessor
{
function PrintGrid($params)
{
$order =& $this->Application->recallObject('ord');
if ($order->GetDBField('Status') != ORDER_STATUS_INCOMPLETE) {
$params['grid'] = $params['NotEditable'];
}
else {
$params['grid'] = $params['Editable'];
}
return $this->Application->ProcessParsedTag('m', 'ParseBlock', $params);
}
function IsTangible($params){
$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
if ($object->GetDBField('Type') == 1)
return true;
else
return false;
}
function HasQty($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
$type = $object->GetDBField('Type');
return in_array($type, array(1,6));
}
function HasDiscount($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial() );
return (float)$object->GetDBField('ItemDiscount') ? 1 : 0;
}
function HasOptions($params)
{
$object =& $this->getObject($params);
$item_data = @unserialize($object->GetDBField('ItemData'));
return isset($item_data['Options']);
}
function PrintOptions($params)
{
$object =& $this->getObject($params);
$item_data = @unserialize($object->GetDBField('ItemData'));
$render_as = $this->SelectParam($params, 'render_as');
$block_params['name'] = $render_as;
$opt_helper =& $this->Application->recallObject('kProductOptionsHelper');
$o = '';
$options = $item_data['Options'];
foreach ($options as $opt => $val) {
if (!is_array($val)) {
$val = unhtmlentities($val);
}
$key_data = $opt_helper->ConvertKey($opt, $object->GetDBField('ProductId'));
$parsed = $opt_helper->ExplodeOptionValues($key_data);
if ($parsed) {
$values = $parsed['Values'];
$prices = $parsed['Prices'];
$price_types = $parsed['PriceTypes'];
}
else {
$values = array();
$prices = array();
$price_types = array();
}
$key = $key_data['Name'];
/*if (is_array($val)) {
$val = join(',', $val);
}*/
$lang =& $this->Application->recallObject('lang.current');
if ($render_as) {
$block_params['option'] = $key;
if (is_array($val)) {
$block_params['value'] = $val;
$block_params['type'] = $key_data['OptionType'];
$block_params['price'] = $prices;
$block_params['price_type'] = $price_types;
}
else {
- if ($price_types[$val] == '$') {
+ $price_type = array_key_exists($val, $price_types) ? $price_types[$val] : '';
+ $price = array_key_exists($val, $prices) ? $prices[$val] : '';
+
+ if ($price_type == '$') {
$iso = $this->GetISO($params['currency']);
- $value = $this->AddCurrencySymbol($lang->formatNumber($this->ConvertCurrency($prices[$val], $iso),2), $iso, true); // true to force sign
+ $value = $this->AddCurrencySymbol($lang->formatNumber($this->ConvertCurrency($price_type, $iso),2), $iso, true); // true to force sign
$block_params['price'] = $value;
$block_params['price_type'] = '';
$block_params['sign'] = ''; // sign is included in the formatted value
}
else {
- $block_params['price'] = $prices[$val];
- $block_params['price_type'] = $price_types[$val];
- $block_params['sign'] = $prices[$val] >= 0 ? '+' : '-';
+ $block_params['price'] = $price;
+ $block_params['price_type'] = $price_type;
+ $block_params['sign'] = $price >= 0 ? '+' : '-';
}
$block_params['value'] = htmlspecialchars($val);
$block_params['type'] = $key_data['OptionType'];
}
$o.= $this->Application->ParseBlock($block_params, 1);
}
else {
$o .= $key.': '.$val.'<br>';
}
}
return $o;
}
function ProductsInStock($params)
{
$object =& $this->getObject($params);
if (!$object->GetDBField('InventoryStatus')) {
// unlimited count available
return false;
}
if ($object->GetDBField('InventoryStatus') == 2) {
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$sql = 'SELECT QtyInStock
FROM '.$poc_table.'
WHERE (ProductId = '.$object->GetDBField('ProductId').') AND (Availability = 1) AND (CombinationCRC = '.$object->GetDBField('OptionsSalt').')';
$ret = $this->Conn->GetOne($sql);
}
else {
$ret = $object->GetDBField('QtyInStock');
}
return $ret;
}
function PrintOptionValues($params)
{
$block_params['name'] = $params['render_as'];
$values = $this->Application->Parser->GetParam('value');
$prices = $this->Application->Parser->GetParam('price');
$price_types = $this->Application->Parser->GetParam('price_type');
$o = '';
$i = 0;
foreach ($values as $val) {
$i++;
$val = unhtmlentities($val);
$block_params['value'] = htmlspecialchars($val);
if ($price_types[$val] == '$') {
$iso = $this->GetISO($params['currency']);
$value = $this->AddCurrencySymbol(sprintf("%.2f", $this->ConvertCurrency($prices[$val], $iso)), $iso, true); // true to force sign
$block_params['price'] = $value;
$block_params['price_type'] = '';
$block_params['sign'] = ''; // sign is included in the formatted value
}
else {
$block_params['price'] = $prices[$val];
$block_params['price_type'] = $price_types[$val];
$block_params['sign'] = $prices[$val] >= 0 ? '+' : '-';
}
$block_params['is_last'] = $i == count($values);
$o.= $this->Application->ParseBlock($block_params, 1);
}
return $o;
}
/*function ConvertKey($key, &$object)
{
static $mapping = null;
if (is_null($mapping) || !isset($mapping[$object->GetDBField('ProductId')])) {
$table = TABLE_PREFIX.'ProductOptions';
$sql = 'SELECT * FROM '.$table.' WHERE ProductId = '.$object->GetDBField('ProductId');
$mapping[$object->GetDBField('ProductId')] = $this->Conn->Query($sql, 'ProductOptionId');
}
return $mapping[$object->GetDBField('ProductId')][$key];
}*/
function PrintList($params)
{
$list =& $this->GetList($params);
$id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
$list->Query();
$o = '';
$list->GoFirst();
$block_params=$this->prepareTagParams($params);
$block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['pass_params'] = 'true';
$product_object =& $this->Application->recallObject('p', 'p', Array('skip_autoload' => true));
/* @var $product_object kCatDBItem */
$product_id = $product_object->GetID();
while (!$list->EOL()) {
// load product used in orderitem
$this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET
$product_object->Load( $list->GetDBField('ProductId') ); // correct product load
$this->Application->SetVar('m_cat_id', $product_object->GetDBField('CategoryId'));
$o.= $this->Application->ParseBlock($block_params, 1);
$list->GoNext();
}
// restore IDs used in cycle
$this->Application->DeleteVar($this->getPrefixSpecial().'_id');
$product_object->Load($product_id);
return $o;
}
function DisplayOptionsPricing($params)
{
$object =& $this->getObject($params);
if ($object->GetDBField('OptionsSelectionMode') == 1) {
return false;
}
$item_data = unserialize($object->GetDBField('ItemData'));
if (!is_array($item_data)) return false;
$options = getArrayValue($item_data, 'Options');
$helper =& $this->Application->recallObject('kProductOptionsHelper');
$crc = $helper->OptionsSalt($options, true);
$combs = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptionCombinations WHERE CombinationCRC = '.$crc.' AND ProductId = '.$object->GetDBField('ProductId').' AND (Price != 0 OR (PriceType = 1 AND Price = 0))');
return $combs == 0; // no overriding combinations found
}
}
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/order_items/order_items_tag_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12.2.4
\ No newline at end of property
+1.12.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/units/gift_certificates/gift_certificates_config.php
===================================================================
--- branches/RC/in-commerce/units/gift_certificates/gift_certificates_config.php (revision 11548)
+++ branches/RC/in-commerce/units/gift_certificates/gift_certificates_config.php (revision 11549)
@@ -1,134 +1,134 @@
<?php
$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! (#gc_recordcount#)",),
+ 'gift_certificates_list' => Array ('prefixes' => Array ('gc_List'), 'format' => "!la_title_GiftCertificates!",),
'gift_certificates_edit' => Array ('prefixes' => Array ('gc'), 'format' => "#gc_status# '#gc_titlefield#' - !la_title_General!",),
),
'PermSection' => Array ('main' => 'in-commerce:gift-certificates'),
'Sections' => Array (
'in-commerce:gift-certificates' => Array (
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts',
'label' => 'la_tab_GiftCertificates',
'url' => Array('t' => 'in-commerce/discounts/gift_certificate_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 2.3,
'type' => stTAB,
),
),
'FilterMenu' => Array (
'Groups' => Array(
Array ('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
1 => Array('label' => 'la_Used', 'on_sql' => '', 'off_sql' => 'Status != 2' ),
2 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0' ),
)
),
'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s',),
'ItemSQLs' => Array ('' => 'SELECT * FROM %1$s',),
'ListSortings' => Array (
'' => Array(
'Sorting' => Array('Recipient' => 'asc'),
)
),
'Fields' => Array (
'GiftCertificateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'OrderId' => Array ('type' => 'int', 'default' => 0),
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1 ),
'SendVia' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 0 => 'la_opt_Email', 1 => 'la_opt_PostalMail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ),
'Purchaser' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'Recipient' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientEmail' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
'RecipientFirstname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientLastname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientAddress1' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientAddress2' => Array('type'=>'string', 'default'=>null, 'max_len'=>255),
'RecipientCity' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientState' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientZipcode' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
'options_sql'=>'SELECT %1$s
FROM '.TABLE_PREFIX.'StdDestinations
LEFT JOIN '.TABLE_PREFIX.'Phrase
ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
WHERE
DestType=1
AND
LanguageId = %2$s
ORDER BY Translation',
'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
'not_null' => '1','default' => 'USA', 'required'=>1
),
'RecipientPhone' => Array('type'=>'string','required'=>0,'default'=>null, 'max_len'=>255),
'Message' => Array('type'=>'string','required'=>0,'default'=>null),
'Code' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array('Code')),
'AddDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#',),
'Expiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
'Amount' => Array('type'=>'double', 'default' => null, 'required' => 1, 'min_value_exc' => 0),
'Debit' => Array('type'=>'double', 'default' => null),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array('default' => 'icon16_custom.gif', 1 => 'icon16_discount.gif', 2 => 'icon16_discount_pending.gif', 0 => 'icon16_discount_disabled.gif'),
'Fields' => Array (
- 'GiftCertificateId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td' ),
- 'Code' => Array ('title' => 'la_col_Code'),
- 'Status' => Array ('title' => 'la_col_Status'),
- 'Debit' => Array ('title' => 'la_col_RemainingAmount'),
- 'Amount' => Array ('title' => 'la_col_Amount'),
- 'Expiration_formatted' => Array ('title'=>'la_col_Expiration', 'sort_field' => 'Expiration'),
+ 'GiftCertificateId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
+ 'Code' => Array ('title' => 'la_col_Code', 'filter_block' => 'grid_like_filter'),
+ 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'),
+ 'Debit' => Array ('title' => 'la_col_RemainingAmount', 'filter_block' => 'grid_float_range_filter'),
+ 'Amount' => Array ('title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
+ 'Expiration' => Array ('title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/units/gift_certificates/gift_certificates_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/review_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/review_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/review_edit.tpl (nonexistent)
@@ -1,88 +0,0 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" icon="icon46_products" title="!la_Text_Reviews!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="rev" title_preset="reviews_edit" module="in-commerce" icon="icon46_products"/>
-
-<!-- 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('rev','<inp2:rev_SaveEvent/>');
- }
- ) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('rev','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('rev', '<inp2:rev_PrevId/>');
- }
- ) );
- a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
- go_to_id('rev', '<inp2:rev_NextId/>');
- }
- ) );
-
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
- a_toolbar.Render();
-
- <inp2:m_if check="rev_IsSingle" >
- a_toolbar.HideButton('prev');
- a_toolbar.HideButton('next');
- a_toolbar.HideButton('sep1');
- a_toolbar.HideButton('sep2');
- <inp2:m_else/>
- <inp2:m_if check="rev_IsLast" >
- a_toolbar.DisableButton('next');
- </inp2:m_if>
- <inp2:m_if check="rev_IsFirst" >
- a_toolbar.DisableButton('prev');
- </inp2:m_if>
- </inp2:m_if>
- </script>
- </td>
- </tr>
-</tbody>
-</table>
-
-<inp2:m_DefineElement name="inp_edit_checkbox_allow_html">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td colspan="2">
- <label for="_cb_<inp2:m_param name="field"/>"><inp2:m_phrase label="la_enable_html"/></label>
- <input type="hidden" id="<inp2:{$prefix}_InputName field="$field"/>" name="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>">
- <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:m_param name="field"/>" <inp2:{$prefix}_Field field="$field" checked="checked"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:{$prefix}_InputName field="$field"/>'))">
- <br>
- <span class="hint"><img src="img/smicon7.gif" width="14" height="14" align="absmiddle"><inp2:m_phrase label="la_Warning_Enable_HTML"/></span>
-
- </td>
- <td>&nbsp;</td>
- </tr>
-</inp2:m_DefineElement>
-
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Review!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="rev" field="ItemId"/>
- <inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="rev" field="TextFormat"/>
- <inp2:m_RenderElement name="inp_label" prefix="rev" field="ReviewId" title="!la_fld_ReviewId!"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="rev" field="CreatedById" title="!la_fld_CreatedById!" class="text"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="rev" field="ReviewText" title="!la_fld_ReviewText!" cols="70" rows="8"/>
- <inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="rev" field="Status" title="!la_fld_Status!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="rev" field="Priority" title="!la_fld_Priority!" size="3" class="text"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="rev" field="CreatedOn" title="!la_fld_CreatedOn!" size="20" class="text"/>
-
-
-
-</table>
-<inp2:m_include t="incs/footer"/>
Property changes on: branches/RC/in-commerce/admin_templates/review_edit.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.9
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/tag_test.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/tag_test.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/tag_test.tpl (nonexistent)
@@ -1,18 +0,0 @@
-Test
-<a href="<inp2:m_t/>">Test</a><br>
-<br>
-
-<inp2:m_DefineElement name="test_block" args="passed,prefix">
-
- <tr>
- <td><inp2:{$prefix}_DoSomething what="$passed"/>|<inp2:m_param name="$passed"/></td>
- <td>b<inp2:m_param name="param2"/></td>
- <td>c<inp2:m_param name="param3"/></td>
- <td>d<inp2:m_param name="param4"/></td>
- </tr>
-
-</inp2:m_DefineElement>
-
-<table>
- <inp2:m_MassParse block="test_block" qty="100" passed="param1" />
-</table>
Property changes on: branches/RC/in-commerce/admin_templates/tag_test.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/export.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/export.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/export.tpl (revision 11549)
@@ -1,126 +1,128 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_tool_export" module="in-portal" title="!la_title_ProductsExport!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p.export" title_preset="products_export" module="in-portal" icon="icon46_tool_export"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" title_preset="products_export"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
document.getElementById('hidden_export_columns').value = select_to_string('<inp2:p.export_InputName field="ExportColumns"/>');
submit_event('p.export','OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('p.export','OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
-
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.export" field="ExportColumns" title="la_fld_ExportColumns"/>
- <td>
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:p.export_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:p.export_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.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:p.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="hidden_export_columns" name="<inp2:p.export_InputName field="ExportColumns"/>" value="<inp2:p.export_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:p.export_InputName field="AvailableColumns"/>', '<inp2:p.export_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;" onclick="move_selected('<inp2:p.export_InputName field="ExportColumns"/>', '<inp2:p.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.export_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:p.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:p.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- <td class="error"><inp2:p.export_Error field="ExportColumns"/>&nbsp;</td>
- </tr>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.export" field="CategoryFormat" title="la_fld_CategoryFormat"/>
- <td>
- <table cellspacing="0" cellpadding="0">
- <tr>
- <td rowspan="2" valign="top">
- <input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="1"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_1" value="1" />
- </td>
- <td>
- <label for="<inp2:p.export_InputName field="CategoryFormat"/>_1"><inp2:m_phrase label="la_MixedCategoryPath"/></label>
- </td>
- </tr>
- <tr>
- <td>
- <span class="<inp2:m_if check="p.export_HasError" field="CategorySeparator">error</inp2:m_if>"><inp2:m_phrase name="la_fld_CategorySeparator"/></span><inp2:m_if check="p.export_IsRequired" field="CategorySeparator"><span class="error"> *</span></inp2:m_if>:
- <input type="text" name="<inp2:p.export_InputName field="CategorySeparator"/>" id="<inp2:p.export_InputName field="CategorySeparator"/>" value="<inp2:p.export_Field field="CategorySeparator"/>" size="2" maxlength="1" /><br />
- (will look like "Category:Sub-category:Sub-sub-category")
-
- </td>
- </tr>
-
- <tr>
- <td rowspan="2" valign="top">
- <input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="2"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_2" value="2" />
- </td>
- <td>
- <label for="<inp2:p.export_InputName field="CategoryFormat"/>_2"><inp2:m_phrase label="la_SeparatedCategoryPath"/></label><br />
- (the fields will be titled Category1..CategoryN accordingly)
- </td>
- </tr>
- </table>
- </td>
- <td class="error"><inp2:p.export_Error field="CategorySeparator"/>&nbsp;</td>
- </tr>
-
- <inp2:m_if check="m_GetEquals" name="m_cat_id" value="0" inverse="inverse">
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" />
- </inp2:m_if>
+<inp2:p.export_SaveWarning name="grid_save_warning"/>
+<inp2:p.export_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
+
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.export" field="ExportColumns" title="la_fld_ExportColumns"/>
+ <td class="control-cell">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:p.export_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:p.export_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.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:p.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="hidden_export_columns" name="<inp2:p.export_InputName field="ExportColumns"/>" value="<inp2:p.export_Field field="ExportColumns"/>" />
+ </td>
+ <td align="center">
+ <input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:p.export_InputName field="AvailableColumns"/>', '<inp2:p.export_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;" onclick="move_selected('<inp2:p.export_InputName field="ExportColumns"/>', '<inp2:p.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:p.export_InputName field="AvailableColumns"/>');" class="button">
+ </td>
+ <td>
+ <select multiple id="<inp2:p.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:p.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="p.export" field="ExportColumns"/>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.export" field="CategoryFormat" title="la_fld_CategoryFormat"/>
+ <td class="control-cell">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <td rowspan="2" valign="top">
+ <input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="1"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_1" value="1" />
+ </td>
+ <td>
+ <label for="<inp2:p.export_InputName field="CategoryFormat"/>_1"><inp2:m_phrase label="la_MixedCategoryPath"/></label>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="<inp2:m_if check="p.export_HasError" field="CategorySeparator">error</inp2:m_if>"><inp2:m_phrase name="la_fld_CategorySeparator"/></span><inp2:m_if check="p.export_IsRequired" field="CategorySeparator"><span class="error"> *</span></inp2:m_if>:
+ <input type="text" name="<inp2:p.export_InputName field="CategorySeparator"/>" id="<inp2:p.export_InputName field="CategorySeparator"/>" value="<inp2:p.export_Field field="CategorySeparator"/>" size="2" maxlength="1" /><br />
+ (will look like "Category:Sub-category:Sub-sub-category")
+
+ </td>
+ </tr>
+
+ <tr>
+ <td rowspan="2" valign="top">
+ <input type="radio"<inp2:m_if check="p.export_FieldEquals" field="CategoryFormat" value="2"> checked</inp2:m_if> name="<inp2:p.export_InputName field="CategoryFormat"/>" id="<inp2:p.export_InputName field="CategoryFormat"/>_2" value="2" />
+ </td>
+ <td>
+ <label for="<inp2:p.export_InputName field="CategoryFormat"/>_2"><inp2:m_phrase label="la_SeparatedCategoryPath"/></label><br />
+ (the fields will be titled Category1..CategoryN accordingly)
+ </td>
+ </tr>
+ </table>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="p.export" field="CategoryFormat"/>
+ </tr>
+
+ <inp2:m_if check="m_GetEquals" name="m_cat_id" value="0" inverse="inverse">
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p.export" field="IsBaseCategory" title="la_fld_IsBaseCategory" />
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/export.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/export_finish.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/export_finish.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/export_finish.tpl (revision 11549)
@@ -1,33 +1,45 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" icon="icon46_conf_regional" title="!la_title_ProductsExport!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p.export" title_preset="products_export" module="in-commerce" icon="icon46_conf_regional"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" title_preset="products_export"/>
<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <inp2:m_phrase label="la_DownloadExportFile"/>
- <td>
- <a href="<inp2:p.export_ExportPath as_url="1"/>"><inp2:p.export_ExportPath /></a>
- </td>
- <td class="error">&nbsp;</td>
- </tr>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td colspan="3" align="left">
- <a href="javascript:submit_event('p.export','OnGoBack');"><inp2:m_phrase label="la_Continue"/></a>
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+ submit_event('p.export', 'OnGoBack');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
</td>
</tr>
-
-
-</table>
+</tbody>
+</table>
+
+<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_inc param="tab_index" by="1"/>
+ <td class="label-cell">
+ <inp2:m_phrase label="la_DownloadExportFile"/>
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <a href="<inp2:p.export_ExportPath as_url="1"/>"><inp2:p.export_ExportPath /></a>
+ </td>
+ </tr>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/export_finish.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl (revision 11549)
@@ -1,79 +1,83 @@
-<inp2:m_include t="incs/header" body_properties="" />
+<inp2:adm_SetPopupSize width="780" height="580"/>
+<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-commerce:manufacturers" prefix="manuf" title_preset="manuf_edit"/>
-<!-- ToolBar --->
+<!-- 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('manuf','<inp2:manuf_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('manuf','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('manuf', '<inp2:manuf_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('manuf', '<inp2:manuf_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="manuf_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="manuf_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="manuf_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
<script src="js/swfobject.js" type="text/javascript"></script>
<script type="text/javascript" src="js/uploader.js"></script>
</td>
</tr>
</tbody>
</table>
<inp2:manuf_SaveWarning name="grid_save_warning"/>
<inp2:manuf_ErrorWarning name="form_error_warning"/>
+
<div id="scroll_container">
- <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-collapse: separate;">
+ <table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_title_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="manuf" field="ManufacturerId" title="!la_fld_ManufacturerId!"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Name" title="!la_fld_Name!" size="40"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="manuf" field="Description" title="!la_fld_Description!" cols="40" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="manuf" field="Description" title="!la_fld_Description!" control_options="{min_height: 100}" cols="40" rows="5"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="URL" title="!la_fld_URL!" size="40"/>
<inp2:m_RenderElement name="inp_edit_swf_upload" prefix="manuf" field="Logo" thumbnail="120x120" title="la_fld_Logo"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="manuf" field="IsPopular" title="la_fld_Popular"/>
<inp2:m_RenderElement name="subsection" title="la_title_ContactInformation"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Address1" title="!la_fld_Address1!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Address2" title="!la_fld_Address2!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="City" title="!la_fld_City!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="State" title="!la_fld_State!" size="40"/>
<inp2:m_RenderElement name="inp_edit_options" has_empty="1" prefix="manuf" field="Country" title="!la_fld_Country!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Zip" title="!la_fld_Zip!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Phone" title="!la_fld_Phone!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Fax" title="!la_fld_Fax!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="manuf" field="Email" title="!la_fld_Email!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
+
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7.2.7
\ No newline at end of property
+1.7.2.8
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl (revision 11549)
@@ -1,43 +1,50 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" prefix="manuf" section="in-commerce:manufacturers" title_preset="manuf_list"/>
+<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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/manufacturers/manufacturers_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8.2.1
\ No newline at end of property
+1.8.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/visits/visits_list_incommerce.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/visits/visits_list_incommerce.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/visits/visits_list_incommerce.tpl (revision 11549)
@@ -1,68 +1,68 @@
<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() {
std_delete_items('visits.incommerce');
}
) );
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 user_field="$user_field"/>" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
+ <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:adm_SaveReturnScript/>
-<inp2:m_RenderElement name="grid" PrefixSpecial="visits.incommerce" IdField="VisitId" grid="visitsincommerce" header_block="grid_column_title" data_block="grid_data_td" search="on" grid_filters="1"/>
+<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') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/visits/visits_list_incommerce.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.18.2.2
\ No newline at end of property
+1.18.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_edit_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_edit_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_edit_tabs.tpl (nonexistent)
@@ -1,15 +0,0 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/shipping/shipping_edit" main_prefix="s"/>
- <inp2:m_RenderElement name="tab" title="la_tab_ShippingZones" t="in-commerce/shipping/shipping_zones" main_prefix="s"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Brackets" t="in-commerce/shipping/shipping_brackets" main_prefix="s"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Costs" t="in-commerce/shipping/shipping_costs" main_prefix="s"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Groups" t="in-commerce/shipping/shipping_type_groups" main_prefix="s"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_edit_tabs.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_type_groups.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_type_groups.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_type_groups.tpl (revision 11549)
@@ -1,121 +1,118 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="850" height="610"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="s" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="s" title_preset="shipping_type_edit" module="in-commerce" icon="icon46_shipping"/>
+<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"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="inp_label" prefix="s" field="ShippingID" title="!la_fld_ShippingId!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="s" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
- <tr class="table-color2">
- <td style="width: 250px">
- <inp2:m_phrase label="la_fld_Groups"/>:
- </td>
- <td>
- <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">
- <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"/>
-
-<select id="available_groups" name="available_groups[]" multiple="multiple" size="20" style="width: 200px">
- <inp2:s_ListGroups render_as="group_option"/>
-</select>
- </td>
- </tr>
- </table>
-
- </td>
- <td>&nbsp;</td>
- </tr>
+<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_ShippingId!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="s" field="PortalGroups" title="!la_fld_Groups!" 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"/>:
+ </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">
+ <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">
+ <inp2:s_ListGroups render_as="group_option"/>
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-</table>
-
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_type_groups.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_custom_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_custom_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_custom_list.tpl (revision 11549)
@@ -1,75 +1,69 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="s" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="s" title_preset="shipping_list" module="in-commerce" icon="icon46_shipping"/>
+<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"/>',
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');
}
-
+
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();
-
+
+ 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
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_custom_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_edit.tpl (revision 11549)
@@ -1,87 +1,80 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="850" height="610"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="s" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="s" title_preset="shipping_type_edit" module="in-commerce" icon="icon46_shipping"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="shipping_type_edit" 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.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>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:s_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Shipping_Type!"/>
- <inp2:m_RenderElement name="inp_label" prefix="s" field="ShippingID" title="!la_fld_ShippingId!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="Code" title="!la_fld_ShippingCode!" size="20"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="Name" title="!la_fld_ShippingName!" size="40"/>
+<inp2:s_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="SpeedCode" title="!la_fld_SpeedCode!" size="20"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="Status" title="!la_fld_Status!"/>
-
- <inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="Type" title="!la_fld_ShippingType!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="BaseFee" title="!la_fld_BaseFee!"/>
-
- <inp2:m_RenderElement name="inp_edit_options" use_phrases="1" prefix="s" field="InsuranceType" title="!la_fld_Insurance_Type!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="InsuranceFee" title="!la_fld_Insurance_Fee!" size="4"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="FreeShippingMinAmount" title="!la_fld_FreeShippingMinAmount!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="s" field="IsFreePromoShipping" title="!la_fld_IsFreePromoShipping!"/>
-
- <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="CODFlatSurcharge" title="!la_fld_CODFlatSurcharge!" size="10" /> -->
- <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="CODPercentSurcharge" title="!la_fld_CODPercentSurcharge!" size="10" /> -->
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Shipping_Type!"/>
+ <inp2:m_RenderElement name="inp_id_label" prefix="s" field="ShippingID" title="!la_fld_ShippingId!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="Code" title="!la_fld_ShippingCode!" size="20"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="Name" title="!la_fld_ShippingName!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="SpeedCode" title="!la_fld_SpeedCode!" size="20"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="Status" title="!la_fld_Status!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="s" field="Type" title="!la_fld_ShippingType!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="BaseFee" title="!la_fld_BaseFee!"/>
+ <inp2:m_RenderElement name="inp_edit_options" use_phrases="1" prefix="s" field="InsuranceType" title="!la_fld_Insurance_Type!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="InsuranceFee" title="!la_fld_Insurance_Fee!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="FreeShippingMinAmount" title="!la_fld_FreeShippingMinAmount!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="s" field="IsFreePromoShipping" title="!la_fld_IsFreePromoShipping!"/>
+
+ <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="CODFlatSurcharge" title="!la_fld_CODFlatSurcharge!" size="10" /> -->
+ <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="s" field="CODPercentSurcharge" title="!la_fld_CODPercentSurcharge!" size="10" /> -->
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9.2.2
\ No newline at end of property
+1.9.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/modify_selector.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/modify_selector.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/modify_selector.tpl (revision 11549)
@@ -1,79 +1,73 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="400" height="180"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<!-- non-standard BlueBar --->
-<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">
- <tr>
- <td class="header_left_bg" nowrap width="80%" valign="middle">
- <span class="tablenav_link" id="blue_bar"><inp2:s_SectionTitle title_preset="select_modifier" title="Invalid OR Missing title preset" cut_first="100"/></span>
- </td>
- <td align="right" class="tablenav" width="20%" valign="middle">
- <script>
- var $help_url='<inp2:m_t t="help" h_prefix="s" h_icon="" h_module="in-commerce" h_title_preset="select_modifier" pass="all,m,h" escape="escape" front="1" />';
- set_window_title( document.getElementById('blue_bar').innerHTML );
- </script>
- <a href="javascript: OpenHelp($help_url);">
- <img src="img/blue_bar_help.gif" border="0">
- </a>
- </td>
- </tr>
-</table>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="select_modifier"/>
<!-- 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','OnApplyModifier');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <label for="operation"><inp2:m_phrase label="la_ModifyOperation"/>:</label>
- </td>
- <td>
- <select name="operation" id="operation">
- <option value="*">&nbsp;*&nbsp;</option>
- <option value="/">&nbsp;/&nbsp;</option>
- <option value="+">&nbsp;+&nbsp;</option>
- <option value="-">&nbsp;-&nbsp;</option>
- </select>
- </td>
- </tr>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <label for="modify_by"><inp2:m_phrase label="la_ModifyByValue"/>:</label>
- </td>
- <td>
- <input name="modify_by" id="modify_by" value="" size="5">
- </td>
- </tr>
-</table>
+<inp2:sc_SaveWarning name="grid_save_warning"/>
+<inp2:sc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="label-cell">
+ <label for="operation"><inp2:m_phrase label="la_ModifyOperation"/>:</label>
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <select name="operation" id="operation">
+ <option value="*">&nbsp;*&nbsp;</option>
+ <option value="/">&nbsp;/&nbsp;</option>
+ <option value="+">&nbsp;+&nbsp;</option>
+ <option value="-">&nbsp;-&nbsp;</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+ <inp2:m_inc param="tab_index" by="1"/>
+ <td class="label-cell">
+ <label for="modify_by"><inp2:m_phrase label="la_ModifyByValue"/>:</label>
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <input name="modify_by" id="modify_by" value="" size="5">
+ </td>
+ </tr>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<inp2:s_HiddenSelection/>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_event('sc', '');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/modify_selector.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9.2.1
\ No newline at end of property
+1.9.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl (revision 11549)
@@ -1,112 +1,112 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping_quote_engines.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="580"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="sqe" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingQuoteEngines!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="sqe" title_preset="engine_edit" module="in-commerce" icon="icon46_shipping"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="sqe" section="in-commerce:shipping_quote_engines" title_preset="engine_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() {
submit_event('sqe','<inp2:sqe_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('sqe','OnCancelEdit');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="carrier" >
-<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <input type="hidden" id="<inp2:sqe_InputName field="{$carrier}Enabled"/>" name="<inp2:sqe_InputName field="{$carrier}Enabled"/>" value="<inp2:sqe_Field field="{$carrier}Enabled" db="db"/>">
- <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>" name="_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>" <inp2:sqe_Field field="{$carrier}Enabled" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:sqe_InputName field="{$carrier}Enabled"/>'))" onchange="check_carrier('_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>', '<inp2:sqe_InputName field="{$carrier}Account" />', '_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>')">
-
- <inp2:m_param name="title" />
- </td>
- <td colspan="2">
- <inp2:m_phrase label="la_AccountLogin" />:
- <input type="text" name="<inp2:sqe_InputName field="{$carrier}Account" />" id="<inp2:sqe_InputName field="{$carrier}Account" />" value="<inp2:sqe_Field field="{$carrier}Account" />" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_param name="onblur"/>">
-
- <inp2:m_phrase label="la_Invoiced" />:
- <input type="hidden" id="<inp2:sqe_InputName field="{$carrier}Invoiced"/>" name="<inp2:sqe_InputName field="{$carrier}Invoiced"/>" value="<inp2:sqe_Field field="{$carrier}Invoiced" db="db"/>">
- <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>" name="_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>" <inp2:sqe_Field field="{$carrier}Invoiced" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:sqe_InputName field="{$carrier}Invoiced"/>'))">
- </td>
-</tr>
-<script type="text/javascript">
- check_carrier('_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>', '<inp2:sqe_InputName field="{$carrier}Account" />', '_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>');
-</script>
+<inp2:m_DefineElement name="carrier">
+ <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">
+ <input type="hidden" id="<inp2:sqe_InputName field="{$carrier}Enabled"/>" name="<inp2:sqe_InputName field="{$carrier}Enabled"/>" value="<inp2:sqe_Field field="{$carrier}Enabled" db="db"/>">
+ <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>" name="_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>" <inp2:sqe_Field field="{$carrier}Enabled" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:sqe_InputName field="{$carrier}Enabled"/>'))" onchange="check_carrier('_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>', '<inp2:sqe_InputName field="{$carrier}Account" />', '_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>')">
+
+ <inp2:m_param name="title" />
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <inp2:m_phrase label="la_AccountLogin" />:
+ <input type="text" name="<inp2:sqe_InputName field="{$carrier}Account" />" id="<inp2:sqe_InputName field="{$carrier}Account" />" value="<inp2:sqe_Field field="{$carrier}Account" />" tabindex="<inp2:m_get param="tab_index"/>">
+
+ <inp2:m_phrase label="la_Invoiced" />:
+ <input type="hidden" id="<inp2:sqe_InputName field="{$carrier}Invoiced"/>" name="<inp2:sqe_InputName field="{$carrier}Invoiced"/>" value="<inp2:sqe_Field field="{$carrier}Invoiced" db="db"/>">
+ <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>" name="_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>" <inp2:sqe_Field field="{$carrier}Invoiced" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:sqe_InputName field="{$carrier}Invoiced"/>'))">
+ </td>
+ </tr>
+ <script type="text/javascript">
+ check_carrier('_cb_<inp2:sqe_InputName field="{$carrier}Enabled"/>', '<inp2:sqe_InputName field="{$carrier}Account" />', '_cb_<inp2:sqe_InputName field="{$carrier}Invoiced"/>');
+ </script>
</inp2:m_DefineElement>
<script type="text/javascript">
function check_carrier(carrier_checkbox, account_field, invoiced_checkbox)
{
if(document.getElementById(carrier_checkbox).checked)
{
document.getElementById(account_field).disabled = false;
document.getElementById(invoiced_checkbox).disabled = false;
}
else
{
document.getElementById(account_field).disabled = true;
document.getElementById(invoiced_checkbox).disabled = true;
}
}
</script>
-<inp2:s_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
- <inp2:m_RenderElement name="inp_label" prefix="sqe" field="EngineId" title="!la_fld_EngineId!"/>
-
- <inp2:m_RenderElement name="inp_label" prefix="sqe" field="Name" title="!la_fld_ShippingQuoteEngineName!"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="Status" title="!la_fld_Enabled!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="AccountLogin" title="!la_fld_Login!" />
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="sqe" field="AccountPassword" title="!la_fld_Password!" />
- <td>
- <input type="password" name="<inp2:sqe_InputName field="AccountPassword" />" id="<inp2:sqe_InputName field="AccountPassword" />" value="">
- </td>
- <td class="error"><inp2:sqe_Error field="AccountPassword"/>&nbsp;</td>
- </tr>
-
- <inp2:m_RenderElement name="subsection" title="!la_Text_Carriers!"/>
- <inp2:m_RenderElement name="carrier" carrier="UPS" title="UPS" />
- <inp2:m_RenderElement name="carrier" carrier="FDX" title="FedEx" />
- <inp2:m_RenderElement name="carrier" carrier="DHL" title="DHL" />
- <inp2:m_RenderElement name="carrier" carrier="USP" title="USPS" />
- <inp2:m_RenderElement name="carrier" carrier="ARB" title="Airborne" />
-
- <inp2:m_RenderElement name="subsection" title="!la_Text_Delivery!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="1DYEnabled" title="!la_fld_FirstDayDelivery!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="2DYEnabled" title="!la_fld_SecondDayDelivery!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="3DYEnabled" title="!la_fld_ThirdDayDelivery!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="GNDEnabled" title="!la_fld_GroundDelivery!"/>
+<inp2:sqe_SaveWarning name="grid_save_warning"/>
+<inp2:sqe_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="subsection" title="!la_Text_Other!"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="sqe" field="ShipMethod" title="!la_fld_ShipMethod!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="FlatSurcharge" title="!la_fld_FlatSurcharge!" size="10"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="PercentSurcharge" title="!la_fld_PercentSurcharge!" size="10"/>
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="sqe" field="EngineId" title="!la_fld_EngineId!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="sqe" field="Name" title="!la_fld_ShippingQuoteEngineName!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="Status" title="!la_fld_Enabled!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="AccountLogin" title="!la_fld_Login!" />
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="sqe" field="AccountPassword" title="!la_fld_Password!" />
+ <td class="control-cell">
+ <input type="password" name="<inp2:sqe_InputName field="AccountPassword" />" id="<inp2:sqe_InputName field="AccountPassword" />" value="">
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="sqe" field="AccountPassword"/>
+ </tr>
+
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Carriers!"/>
+ <inp2:m_RenderElement name="carrier" carrier="UPS" title="UPS" />
+ <inp2:m_RenderElement name="carrier" carrier="FDX" title="FedEx" />
+ <inp2:m_RenderElement name="carrier" carrier="DHL" title="DHL" />
+ <inp2:m_RenderElement name="carrier" carrier="USP" title="USPS" />
+ <inp2:m_RenderElement name="carrier" carrier="ARB" title="Airborne" />
+
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Delivery!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="1DYEnabled" title="!la_fld_FirstDayDelivery!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="2DYEnabled" title="!la_fld_SecondDayDelivery!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="3DYEnabled" title="!la_fld_ThirdDayDelivery!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="sqe" field="GNDEnabled" title="!la_fld_GroundDelivery!"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Other!"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="sqe" field="ShipMethod" title="!la_fld_ShipMethod!"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="FlatSurcharge" title="!la_fld_FlatSurcharge!" size="10"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="sqe" field="PercentSurcharge" title="!la_fld_PercentSurcharge!" size="10"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_quote_engine_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_tabs.tpl (revision 11549)
@@ -1,11 +1,5 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:shipping_folder"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
+<inp2:m_DefineElement name="shipping_tabs">
+ <inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:shipping_folder"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="tabs_container" tabs_render_as="shipping_tabs"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_tabs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_costs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_costs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_costs.tpl (revision 11549)
@@ -1,209 +1,220 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="850" height="610"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="s" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="s" title_preset="costs" module="in-commerce" icon="icon46_shipping"/>
+<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"/>',
function() {
submit_event('s','OnFlip');
} ) );
a_toolbar.AddButton( new ToolBarButton('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"/>',
function() {
- set_event('sc', 'OnSaveCreated');
- openSelector('s', '<inp2:m_t t="in-commerce/shipping/modify_selector" pass="all"/>', '', '400x140');
+ 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="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field_name="$field" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
- <td>
- <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>" id="<inp2:{$prefix}_InputName field="PrecisionBeforeSep"/>" onchange="<inp2:m_Param name="onchange"/>">
+ <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"/>" onchange="<inp2:m_Param name="onchange"/>">
+ </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>
- <td>&nbsp;</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"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-bottom:none">
- <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: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>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-top:none">
- <inp2:s_ShowCostsTable/>
-</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
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_costs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13.2.3
\ No newline at end of property
+1.13.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_list.tpl (revision 11549)
@@ -1,52 +1,53 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping_quote_engines.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="sqe" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingQuoteEngines!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="sqe" title_preset="engine_list" module="in-commerce" icon="icon46_shipping"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="sqe" section="in-commerce:shipping_quote_engines" pagination="1" title_preset="engine_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();
-
+
function edit()
{
std_edit_item('sqe', 'in-commerce/shipping/shipping_quote_engine_edit');
}
-
+
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('sqe','OnMassApprove');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
submit_event('sqe','OnMassDecline');
}
- ) );
-
- a_toolbar.Render();
-
+ ) );
+
+ 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="sqe" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="sqe" IdField="EngineId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['sqe'].SetDependantToolbarButtons( new Array('edit','approve','decline') );
</script>
-
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_brackets.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_brackets.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_brackets.tpl (revision 11549)
@@ -1,270 +1,267 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="850" height="610"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="s" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="s" title_preset="brackets" module="in-commerce" icon="icon46_shipping"/>
+<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) );
function infinity()
{
submit_event('br', 'OnInfinity');
}
a_toolbar.AddButton( new ToolBarButton('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.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" no_toolbar="$no_toolbar"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
-<tr nowrap="nowrap">
- <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>
+<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">
+ <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
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_brackets.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12
\ No newline at end of property
+1.12.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/shipping_zones.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/shipping_zones.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/shipping_zones.tpl (revision 11549)
@@ -1,97 +1,93 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="850" height="610"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="s" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_include t="in-commerce/shipping/shipping_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="s" title_preset="zones" module="in-commerce" icon="icon46_shipping"/>
+<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"/>',
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" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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
Property changes on: branches/RC/in-commerce/admin_templates/shipping/shipping_zones.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/shipping/zone_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/shipping/zone_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/shipping/zone_edit.tpl (revision 11549)
@@ -1,392 +1,384 @@
-<inp2:m_RequireLogin permissions="in-commerce:shipping.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="650" height="480"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="z" icon="icon46_shipping" module="in-commerce" title="!la_title_ShippingTypes!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="z" title_preset="zones_edit" module="in-commerce" icon="icon46_shipping"/>
+<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="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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>
- <td>
- &nbsp;
- </td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="states_multiple">
- <tr class="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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>
- <td>
- &nbsp;
- </td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="zips_multiple">
- <tr class="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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>
- <td>
- &nbsp;
- </td>
</tr>
</inp2:m_DefineElement>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_ShippingZone!"/>
- <inp2:m_RenderElement name="inp_id_label" prefix="z" field="ZoneID" title="!la_fld_ZoneId!"/>
- <inp2:m_RenderElement name="inp_label" prefix="z" field="ShippingTypeID" title="!la_fld_ShippingTypeId!"/>
+<inp2:z_SaveWarning name="grid_save_warning"/>
+<inp2:z_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="z" field="Name" title="!la_fld_Zone_Name!" 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!"/>
+<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_ZoneId!"/>
- <!-- <inp2:z_ShowDestinations block="destination_block" /> -->
+ <inp2:m_RenderElement name="inp_label" prefix="z" field="ShippingTypeID" title="!la_fld_ShippingTypeId!"/>
- <inp2:m_if check="z_fieldequals" field="Type" value="1" >
- <inp2:m_RenderElement name="countries_multiple" prefix="z" />
- </inp2:m_if>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="z" field="Name" title="!la_fld_Zone_Name!" 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:m_if check="z_fieldequals" field="Type" value="2" >
- <inp2:m_RenderElement name="states_multiple" prefix="z" />
- </inp2:m_if>
+ <!-- <inp2:z_ShowDestinations block="destination_block" /> -->
- <inp2:m_if check="z_fieldequals" field="Type" value="3" >
- <inp2:m_RenderElement name="zips_multiple" prefix="z" />
- </inp2:m_if>
+ <inp2:m_if check="z_fieldequals" field="Type" value="1" >
+ <inp2:m_RenderElement name="countries_multiple" prefix="z" />
+ </inp2:m_if>
-</table>
+ <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"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/shipping/zone_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12.2.1
\ No newline at end of property
+1.12.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit_tabs.tpl (nonexistent)
@@ -1,15 +0,0 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/affiliate_plans/affiliate_plans_edit" main_prefix="ap"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Brackets" t="in-commerce/affiliate_plans/affiliate_plans_brackets" main_prefix="ap"/>
- <!--
- <inp2:m_RenderElement name="tab" title="la_tab_Items" t="in-commerce/affiliate_plans/affiliate_plans_items" main_prefix="ap"/>
- -->
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit_tabs.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit_tabs.tpl (nonexistent)
@@ -1,12 +0,0 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/affiliate_plans/affiliates_edit" main_prefix="affil"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Payments" t="in-commerce/affiliate_plans/affiliate_edit_payments" main_prefix="affil"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit_tabs.tpl
___________________________________________________________________
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
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl (revision 11549)
@@ -1,122 +1,114 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliate_plans.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="ap" icon="icon46_affiliate_plans" module="in-commerce" title="!la_title_AffiliatePlans!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliate_plans_edit_tabs"/>
+<inp2:m_if check="api_IsEntireOrder">
+ <inp2:m_SetParam grid="Default"/>
+<inp2:m_else/>
+ <inp2:m_SetParam grid="AffiliatePlansItems"/>
+</inp2:m_if>
-<inp2:m_RenderElement name="blue_bar" prefix="ap" title_preset="affiliate_plans_items" module="in-commerce" icon="icon46_affiliate_plans"/>
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" grid="$grid" title_preset="affiliate_plans_items" pagination="1" 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('ap','<inp2:ap_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ap','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('ap', '<inp2:ap_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ap', '<inp2:ap_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
function() {
openSelector('api', '<inp2:adm_SelectorLink prefix="api" 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('api')
} ) );
a_toolbar.AddButton( new ToolBarButton('entire_order', '<inp2:m_phrase label="la_ToolTip_EntireOrder" escape="1"/>',
function() {
if (inpConfirm('<inp2:m_phrase label="la_EntireOrderConfirmation"/>'))
{
submit_event('api', '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="ap_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ap_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ap_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="api" grid="$grid"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_item_checkbox_td">
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">&nbsp;
- <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>
- </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_if check="api_IsEntireOrder" >
- <inp2:m_RenderElement name="grid" PrefixSpecial="api" IdField="AffiliateItemId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
-<inp2:m_else/>
- <inp2:m_RenderElement name="grid" PrefixSpecial="api" IdField="AffiliateItemId" grid="AffiliatePlansItems" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
-</inp2:m_if>
-
-
+<inp2:m_RenderElement name="grid" PrefixSpecial="api" IdField="AffiliateItemId" grid="$grid"/>
<script type="text/javascript">
<inp2:m_if check="api_IsEntireOrder" >
a_toolbar.DisableButton('new_item');
</inp2:m_if>
Grids['api'].SetDependantToolbarButtons( new Array('delete') );
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="api">
-<inp2:m_include t="incs/footer"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_items.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.2
\ No newline at end of property
+1.10.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl (revision 11549)
@@ -1,82 +1,66 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliates.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="affil" icon="icon46_affiliates" module="in-commerce" title="!la_title_Affiliates!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliate_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="affil" title_preset="affiliates_list" module="in-commerce" icon="icon46_affiliates"/>
+<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"/>',
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();
-
+
+ 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_checkbox_td" format="">
- <td valign="top" class="text">
- <table border="0" cellpadding="0" cellspacing="0" class="grid_id_cell">
- <tr>
- <td><input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>"></td>
- <td><img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>"></td>
- <td><a href="<inp2:UserLink/>" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" no_special="no_special" grid="$grid" format="$format"/></a></td>
- </tr>
- </table>
- </td>
+<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:adm_SaveReturnScript/>
-
-<inp2:m_RenderElement name="grid" PrefixSpecial="affil" IdField="AffiliateId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl (revision 11549)
@@ -1,113 +1,106 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliate_plans.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="ap" icon="icon46_affiliate_plans" module="in-commerce" title="!la_title_AffiliatePlans!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliate_plans_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ap" title_preset="affiliate_plans_edit" module="in-commerce" icon="icon46_affiliate_plans"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" title_preset="affiliate_plans_edit" 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('ap','<inp2:ap_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ap','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('ap', '<inp2:ap_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ap', '<inp2:ap_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="ap_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ap_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ap_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:ap_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
- <inp2:m_RenderElement name="inp_label" prefix="ap" field="AffiliatePlanId" title="!la_fld_AffiliatePlanId!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="ap" field="Name" title="!la_fld_Name!" size="40"/>
+<inp2:ap_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="ap" field="PlanType" title="!la_fld_PlanType!"/>
-
- <inp2:m_RenderElement name="inp_edit_options" prefix="ap" field="ResetInterval" title="!la_fld_Period!"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ap" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()" />
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ap" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()"/>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ap" field="MinPaymentAmount" title="la_fld_MinimumPaymentAmount" />
- <td>
- <input type="text" name="<inp2:ap_InputName field="MinPaymentAmount" />" id="<inp2:ap_InputName field="MinPaymentAmount" />" value="<inp2:ap_Field name="MinPaymentAmount" />" tabindex="<inp2:m_get param="tab_index"/>" size="8">
- <span class="small">(<inp2:curr_PrimaryCurrencyISO />)</span>
- </td>
- <td class="error"><inp2:ap_Error field="MinPaymentAmount"/>&nbsp;</td>
- </tr>
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ap" field="AffiliatePlanId" title="!la_fld_AffiliatePlanId!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="ap" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="ap" field="PlanType" title="!la_fld_PlanType!"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="ap" field="ResetInterval" title="!la_fld_Period!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ap" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()" />
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ap" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()"/>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ap" field="MinPaymentAmount" title="la_fld_MinimumPaymentAmount" />
+ <td class="control-cell">
+ <input type="text" name="<inp2:ap_InputName field="MinPaymentAmount" />" id="<inp2:ap_InputName field="MinPaymentAmount" />" value="<inp2:ap_Field name="MinPaymentAmount" />" tabindex="<inp2:m_get param="tab_index"/>" size="8">
+ <span class="small">(<inp2:curr_PrimaryCurrencyISO />)</span>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="ap" field="MinPaymentAmount"/>
+ </tr>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script type="text/javascript">
if(document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').checked)
{
document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').disabled = true;
document.getElementById('_cb_<inp2:ap_InputName field="Enabled"/>').disabled = true;
}
function check_status()
{
if(document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').checked)
{
document.getElementById('_cb_<inp2:ap_InputName field="Enabled"/>').checked = true;
document.getElementById('<inp2:ap_InputName field="Enabled"/>').value = 1;
}
}
function check_primary()
{
if(!document.getElementById('_cb_<inp2:ap_InputName field="Enabled"/>').checked)
{
document.getElementById('_cb_<inp2:ap_InputName field="IsPrimary"/>').checked = false;
document.getElementById('<inp2:ap_InputName field="IsPrimary"/>').value = 0;
}
}
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.16.2.1
\ No newline at end of property
+1.16.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl (revision 11549)
@@ -1,11 +1,5 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:affiliates_folder"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
+<inp2:m_DefineElement name="affiliate_tabs">
+ <inp2:adm_ListTabs render_as="tab_direct" section_name="in-commerce:affiliates_folder"/>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="tabs_container" tabs_render_as="affiliate_tabs"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_list_tabs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl (revision 11549)
@@ -1,47 +1,45 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliates.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="affil" icon="icon46_affiliates" module="in-commerce" title="!la_title_Affiliates!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="affil" title_preset="affiliates_payout" module="in-commerce" icon="icon46_affiliates"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_payout"/>
<!-- 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_PayOut" escape="1"/>', function() {
submit_event('apayments','OnCreate');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('apayments','OnGoBack');
}
) );
-
+
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<inp2:affil_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="apayments" field="AffiliateId"/>
- <inp2:m_RenderElement name="inp_label" prefix="apayments" field="AffiliateId" title="!la_fld_Username!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="apayments" field="Amount" title="la_fld_Amount"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="apayments" field="PaymentTypeId" title="la_fld_PaymentTypeId"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="apayments" field="PaymentDate" title="la_fld_PaymentDate"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="apayments" field="PaymentReference" title="la_fld_PaymentReference"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="apayments" field="Comment" title="la_fld_Comment" rows="10" cols="40"/>
-</table>
+<inp2:apayments_SaveWarning name="grid_save_warning"/>
+<inp2:apayments_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="apayments" field="AffiliateId"/>
+ <inp2:m_RenderElement name="inp_label" prefix="apayments" field="AffiliateId" title="!la_fld_Username!"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="apayments" field="Amount" title="la_fld_Amount"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="apayments" field="PaymentTypeId" title="la_fld_PaymentTypeId"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="apayments" field="PaymentDate" title="la_fld_PaymentDate"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="apayments" field="PaymentReference" title="la_fld_PaymentReference"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="apayments" field="Comment" title="la_fld_Comment" rows="10" cols="40"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_payout.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl (revision 11549)
@@ -1,81 +1,69 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliates.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="affil" icon="icon46_affiliates" module="in-commerce" title="!la_title_Affiliates!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliates_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="affil" title_preset="affiliate_payments" module="in-commerce" icon="icon46_affiliates"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliate_payments" pagination="1" pagination_prefix="apayments" 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('affil','<inp2:affil_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('affil','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('affil', '<inp2:affil_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('affil', '<inp2:affil_NextId/>');
}
) );
-
+
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();
-
+
<inp2:m_if check="affil_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
- <inp2:m_else/>
+ <inp2:m_else/>
<inp2:m_if check="affil_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="affil_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="apayments" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="grid_cutted_box_td">
- <td valign="top" class="text">
- <inp2:{$PrefixSpecial}_field field="$field" cut_first="50"/>
- </td>
-</inp2:m_DefineElement>
-
-<inp2:m_RenderElement name="grid" PrefixSpecial="apayments" IdField="AffiliatePaymentId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="apayments" IdField="AffiliatePaymentId" grid="Default"/>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_edit_payments.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl (revision 11549)
@@ -1,95 +1,95 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliate_payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="apt" icon="icon46_affiliate_payment_types" module="in-commerce" title="!la_title_AffiliatePaymentTypes!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="apt" title_preset="affiliate_payment_types_edit" module="in-commerce" icon="icon46_affiliate_payment_types"/>
+<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_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() {
submit_event('apt','<inp2:apt_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('apt','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('apt', '<inp2:apt_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('apt', '<inp2:apt_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="apt_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="apt_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="apt_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:apt_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="inp_label" prefix="apt" field="PaymentTypeId" title="!la_fld_PaymentTypeId!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="apt" field="Name" title="!la_fld_Name!" size="40"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="apt" field="IsPrimary" title="!la_fld_IsPrimary!" onchange="check_status()"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="apt" field="Status" title="!la_fld_Enabled!" onchange="check_primary()"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="apt" field="Priority" title="!la_fld_Priority!" size="5"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="apt" field="Description" title="!la_fld_Description!" cols="40" rows="5"/>
-</table>
+<inp2:apt_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_id_label" prefix="apt" field="PaymentTypeId" title="!la_fld_PaymentTypeId!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="apt" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="apt" field="IsPrimary" title="!la_fld_IsPrimary!" onchange="check_status()"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="apt" field="Status" title="!la_fld_Enabled!" onchange="check_primary()"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="apt" field="Priority" title="!la_fld_Priority!" size="5"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="apt" field="Description" title="!la_fld_Description!" cols="40" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script type="text/javascript">
if(document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').checked)
{
document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').disabled = true;
document.getElementById('_cb_<inp2:apt_InputName field="Status"/>').disabled = true;
}
function check_status()
{
if(document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').checked)
{
document.getElementById('_cb_<inp2:apt_InputName field="Status"/>').checked = true;
document.getElementById('<inp2:apt_InputName field="Status"/>').value = 1;
}
}
function check_primary()
{
if(!document.getElementById('_cb_<inp2:apt_InputName field="Status"/>').checked)
{
document.getElementById('_cb_<inp2:apt_InputName field="IsPrimary"/>').checked = false;
document.getElementById('<inp2:apt_InputName field="IsPrimary"/>').value = 0;
}
}
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl (revision 11549)
@@ -1,80 +1,74 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliate_plans.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ap" icon="icon46_affiliate_plans" module="in-commerce" title="!la_title_AffiliatePlans!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliate_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ap" title_preset="affiliate_plans_list" module="in-commerce" icon="icon46_affiliate_plans"/>
+<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"/>',
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() {
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();
-
+
+ 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" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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') );
</script>
-
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl (revision 11549)
@@ -1,111 +1,100 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliates.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="affil" icon="icon46_affiliates" module="in-commerce" title="!la_title_Affiliates!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliates_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="affil" title_preset="affiliates_edit" module="in-commerce" icon="icon46_affiliates"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="affil" section="in-commerce:affiliates" title_preset="affiliates_edit" 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('affil','<inp2:affil_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('affil','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('affil', '<inp2:affil_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('affil', '<inp2:affil_NextId/>');
}
) );
<inp2:m_if check="affil_IsNewMode" inverse="inverse">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('in-commerce:pay_out', '<inp2:m_phrase label="la_ToolTip_PayOut" escape="1"/>', function() {
- redirect('<inp2:m_t t="in-commerce/affiliate_plans/affiliates_payout" m_opener="d" apayments_event="OnNew" pass="all,apayments"/>');
+ direct_edit('affil', '<inp2:m_t t="in-commerce/affiliate_plans/affiliates_payout" m_opener="d" apayments_event="OnNew" pass="all,apayments"/>');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="affil_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="affil_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="affil_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:affil_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
- <inp2:m_RenderElement name="inp_id_label" prefix="affil" field="AffiliateId" title="!la_fld_AffiliateId!"/>
-
- <inp2:m_RenderElement name="inp_edit_user" prefix="affil" field="PortalUserId" title="!la_fld_Username!"/>
-
- <inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="AffiliatePlanId" title="!la_fld_AffiliatePlan!"/>
-
- <inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="PaymentTypeId" title="!la_fld_PaymentType!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="affil" field="SSN" title="!la_fld_SSN!" />
+<inp2:affil_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="affil" field="Status" title="!la_fld_Status!"/>
-
- <inp2:m_RenderElement name="inp_edit_date" prefix="affil" field="CreatedOn" title="!la_fld_RegisteredOn!" />
-
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="affil" field="Comments" title="!la_fld_Comments!" cols="40" rows="5"/>
-
- <inp2:m_if check="affil_IsNewMode" inverse="inverse">
- <inp2:m_RenderElement name="subsection" title="!la_section_AdvertisingMaterials!"/>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <td class="text">
- <inp2:m_phrase label="la_fld_AffiliateLink"/>:
- </td>
- <td valign="top" class="text"><a href="<inp2:affil_GetAffiliateLink template="index"/>" target="_blank"><inp2:affil_GetAffiliateLink template="index" prefix="_FRONT_"/></a></td>
- <td class="error">&nbsp;</td>
- </tr>
- <inp2:m_RenderElement name="inp_label" prefix="affil" field="AffiliateCode" title="la_fld_AffiliateCode"/>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_Statistics!"/>
- <inp2:m_RenderElement name="inp_label" prefix="affil" field="AccumulatedAmount" title="la_fld_AccumulatedAmount" currency="selected"/>
- <inp2:m_RenderElement name="inp_label" prefix="affil" field="ItemsSold" title="la_fld_ItemsSold"/>
-
- <inp2:m_RenderElement name="inp_label" prefix="affil" field="AmountToPay" title="la_fld_AmountToPay" currency="selected"/>
- <inp2:m_RenderElement name="inp_label" prefix="affil" field="LastPaymentDate_date" title="la_fld_LastPaymentDate"/>
-
- </inp2:m_if>
-
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_id_label" prefix="affil" field="AffiliateId" title="!la_fld_AffiliateId!"/>
+ <inp2:m_RenderElement name="inp_edit_user" prefix="affil" field="PortalUserId" title="!la_fld_Username!"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="AffiliatePlanId" title="!la_fld_AffiliatePlan!"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="affil" field="PaymentTypeId" title="!la_fld_PaymentType!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="affil" field="SSN" title="!la_fld_SSN!" />
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="affil" field="Status" title="!la_fld_Status!"/>
+ <inp2:m_RenderElement name="inp_edit_date" prefix="affil" field="CreatedOn" title="!la_fld_RegisteredOn!" />
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="affil" field="Comments" title="!la_fld_Comments!" cols="40" rows="5"/>
+
+ <inp2:m_if check="affil_IsNewMode" inverse="inverse">
+ <inp2:m_RenderElement name="subsection" title="!la_section_AdvertisingMaterials!"/>
+ <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_AffiliateLink"/>:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <a href="<inp2:affil_GetAffiliateLink template="index"/>" target="_blank"><inp2:affil_GetAffiliateLink template="index" prefix="_FRONT_"/></a>
+ </td>
+ </tr>
+ <inp2:m_RenderElement name="inp_label" prefix="affil" field="AffiliateCode" title="la_fld_AffiliateCode"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Statistics!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="affil" field="AccumulatedAmount" title="la_fld_AccumulatedAmount" currency="selected"/>
+ <inp2:m_RenderElement name="inp_label" prefix="affil" field="ItemsSold" title="la_fld_ItemsSold"/>
+ <inp2:m_RenderElement name="inp_label" prefix="affil" field="AmountToPay" title="la_fld_AmountToPay" currency="selected"/>
+ <inp2:m_RenderElement name="inp_label" prefix="affil" field="LastPaymentDate_date" title="la_fld_LastPaymentDate"/>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliates_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.22.2.1
\ No newline at end of property
+1.22.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl (revision 11549)
@@ -1,184 +1,176 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliate_plans.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="ap" icon="icon46_affiliate_plans" module="in-commerce" title="!la_title_AffiliatePlans!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliate_plans_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ap" title_preset="affiliate_plans_brackets" module="in-commerce" icon="icon46_affiliate_plans"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ap" section="in-commerce:affiliate_plans" title_preset="affiliate_plans_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('ap','<inp2:ap_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ap','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('ap', '<inp2:ap_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ap', '<inp2:ap_NextId/>');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
function add_brackets()
{
submit_event('apbrackets', 'OnMoreBrackets')
- }
+ }
a_toolbar.AddButton( new ToolBarButton('more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
-
+
function infinity()
{
submit_event('apbrackets', 'OnInfinity');
- }
- a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
+ }
+ a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
function arrange_brackets()
{
submit_event('apbrackets', 'OnArrange')
- }
- a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
-
+ }
+ a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
+
a_toolbar.Render();
-
+
<inp2:m_if check="ap_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
- <inp2:m_else/>
+ <inp2:m_else/>
<inp2:m_if check="ap_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ap_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="pr_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"/>]"
+ <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="pr_edit_max" >
<td>
- <input type="text" size="10" 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"/>]"
+ <input type="text" size="10" 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="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"/>')"
</inp2:m_if>
-
+
>
-</td>
+</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="pr_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"/>">
- <input type="text" size="10"
+ <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>
>
-</td>
+</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="prbracket">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
-
+
<inp2:m_RenderElement name="pr_edit_min" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="FromAmount" size="40" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_max" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="ToAmount" size="40" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="$PrefixSpecial" field="Percent" size="4" pass_params="true"/>
</tr>
</inp2:m_DefineElement>
<script>
function set_start(id, next_id, prefix_special)
{
//var next_id = id - 1;
var input_id = prefix_special + '[' + next_id + '][FromAmount]';
//var orig_id = prefix_special + '[' + id + '][FromAmount]';
if(document.getElementById(input_id) != null)
{
var new_value = parseInt(document.getElementById(prefix_special + '[' + id + '][ToAmount]').value);
if( isNaN(new_value) ) new_value = 0;
document.getElementById(prefix_special + '[' + id + '][ToAmount]').value = new_value;
document.getElementById(input_id).value = 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="pr_grid_th" >
<td class="columntitle_small"><inp2:m_phrase label="$phrase" /></td>
</inp2:m_DefineElement>
-
-<inp2:apbrackets_SaveWarning name="grid_save_warning" no_toolbar="$no_toolbar"/>
+
+<inp2:apbrackets_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr nowrap="nowrap">
<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_FromAmount!"/>
<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_ToAmount!"/>
<inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_Percent!"/>
</tr>
<inp2:apbrackets_ShowPricingForm block="prbracket" IdField="AffiliateBracketId"/>
</table>
<inp2:m_include t="incs/footer"/>
-
+
<script>
document.forms.kernel_form.onsubmit = enableKernelFormFields;
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_plans_brackets.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl (revision 11549)
@@ -1,82 +1,77 @@
-<inp2:m_RequireLogin permissions="in-commerce:affiliate_payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="apt" icon="icon46_affiliate_payment_types" module="in-commerce" title="!la_title_AffiliatePaymentTypes!"/>
-
-<inp2:m_include t="in-commerce/affiliate_plans/affiliate_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="apt" title_preset="affiliate_payment_types_list" module="in-commerce" icon="icon46_affiliate_payment_types"/>
+<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"/>',
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() {
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" >
- <td valign="top" class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>
- <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span></td>
+<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" menu_filters="yes"/>
+<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') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/affiliate_plans/affiliate_payment_types_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6.2.1
\ No newline at end of property
+1.6.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/taxes/taxes_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/taxes/taxes_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/taxes/taxes_edit.tpl (revision 11549)
@@ -1,395 +1,384 @@
-<inp2:m_RequireLogin permissions="in-commerce:taxes.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="850" height="610"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="tax" icon="icon46_taxes" module="in-commerce" title="!la_title_Taxes!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="tax" title_preset="taxes_edit" module="in-commerce" icon="icon46_taxes"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="tax" section="in-commerce:taxes" title_preset="taxes_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('tax','<inp2:tax_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('tax','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('tax', '<inp2:tax_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('tax', '<inp2:tax_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="tax_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="tax_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="tax_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="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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:tax_ShowCountries block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.TaxZoneIdChooser)" value="&gt;"><br>
<input class="button" type=button onclick="MoveSelected(this.form.TaxZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableCountries"/>:<br/>
<select name="TaxZoneIdChooser" multiple size="10" size="10" style="width: 200px">
<inp2:tax_ShowCountries block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
<!-- <select name="<inp2:tax_InputName field="TaxZoneId" />" multiple> -->
</td>
- <td>
- &nbsp;
- </td>
-
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="states_multiple">
- <tr class="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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">
<select name="CountrySelector" onChange="change_country()">
<inp2:tax_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:tax_ShowStates block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.TaxZoneIdChooser)" value="&gt;"><br>
<input class="button" type=button onclick="MoveSelected(this.form.TaxZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableStates"/>:<br/>
<select name="TaxZoneIdChooser" multiple size="10" style="width: 200px">
<inp2:tax_ShowStates block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
</td>
- <td>
- &nbsp;
- </td>
-
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="zips_multiple">
- <tr class="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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">
<select name="CountrySelector" onChange="change_country()">
<inp2:tax_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:tax_ShowZips block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.TaxZoneIdChooser)" value="&gt;"><br>
<input class="button" type=button onclick="MoveSelected(this.form.TaxZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableZips"/>:<br/>
<select name="TaxZoneIdChooser" multiple size="10" style="width: 200px">
<inp2:tax_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>
- <td>
- &nbsp;
- </td>
</tr>
</inp2:m_DefineElement>
<inp2:tax_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+<inp2:tax_ErrorWarning name="form_error_warning"/>
+<div id="scroll_container">
+ <table class="edit-form">
<inp2:m_RenderElement name="subsection" title="!la_section_TaxZone!"/>
<inp2:m_RenderElement name="inp_id_label" prefix="tax" field="TaxZoneId" title="!la_fld_ZoneId!"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="tax" field="Name" title="!la_fld_ZoneName!" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="tax" field="TaxValue" title="!la_fld_TaxValue!" size="40"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="tax" field="ApplyToShipping" title="!la_fld_TaxApplyToShipping!"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="tax" field="ApplyToProcessing" title="!la_fld_TaxApplyToProcessing!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="tax" field="Type" title="!la_fld_ZoneType!"/>
<!-- <inp2:tax_ShowDestinations block="destination_block" /> -->
<inp2:m_if check="tax_fieldequals" field="Type" value="1" >
<inp2:m_RenderElement name="countries_multiple" prefix="tax" />
</inp2:m_if>
<inp2:m_if check="tax_fieldequals" field="Type" value="2" >
<inp2:m_RenderElement name="states_multiple" prefix="tax" />
</inp2:m_if>
<inp2:m_if check="tax_fieldequals" field="Type" value="3" >
<inp2:m_RenderElement name="zips_multiple" prefix="tax" />
</inp2:m_if>
-</table>
+ <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="tax_OriginalSaveEvent" id="tax_OriginalSaveEvent" value="<inp2:tax_SaveEvent/>">
<script>
document.getElementById('tax[<inp2:tax_field field="TaxZoneId"/>][Type]_1').onchange = change_type;
document.getElementById('tax[<inp2:tax_field field="TaxZoneId"/>][Type]_2').onchange = change_type;
document.getElementById('tax[<inp2:tax_field field="TaxZoneId"/>][Type]_3').onchange = change_type;
function change_type()
{
submit_event('tax','OnTypeChange');
}
function change_country()
{
submit_event('tax','OnCountryChange');
}
function remove_location(location_id)
{
document.getElementById('location_id').value = location_id;
submit_event('tax', '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"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/taxes/taxes_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13
\ No newline at end of property
+1.13.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/taxes/taxes_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/taxes/taxes_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/taxes/taxes_list.tpl (revision 11549)
@@ -1,86 +1,57 @@
-<inp2:m_RequireLogin permissions="in-commerce:taxes.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="tax" icon="icon46_taxes" module="in-commerce" title="!la_title_Taxes!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="tax" title_preset="taxes_list" module="in-commerce" icon="icon46_taxes"/>
+<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('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
- go_to_id('tax', '<inp2:tax_PrevId/>');
- }
- ) );
- a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
- go_to_id('tax', '<inp2:tax_NextId/>');
- }
- ) );
-
- a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
+
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Zone" 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();
-
- <inp2:m_if check="tax_IsSingle" >
- a_toolbar.HideButton('prev');
- a_toolbar.HideButton('next');
- a_toolbar.HideButton('sep1');
- <inp2:m_else/>
- <inp2:m_if check="tax_IsLast" >
- a_toolbar.DisableButton('next');
- </inp2:m_if>
- <inp2:m_if check="tax_IsFirst" >
- a_toolbar.DisableButton('prev');
- </inp2:m_if>
- </inp2:m_if>
</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" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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
Property changes on: branches/RC/in-commerce/admin_templates/taxes/taxes_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/downloads/downloads_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/downloads/downloads_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/downloads/downloads_list.tpl (revision 11549)
@@ -1,54 +1,50 @@
-<inp2:m_RequireLogin permissions="in-commerce:downloadlog.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="down" icon="icon46_download_log" module="in-commerce" title="!la_title_DownloadLog!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="down" title_preset="downloads_list" module="in-commerce" icon="icon46_downloads"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="down" section="in-commerce:downloadlog" title_preset="downloads_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() {
std_delete_items('down');
}
) );
-
+
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="down" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="down" IdField="DownloadId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="down" IdField="DownloadId" grid="Default"/>
<script type="text/javascript">
Grids['down'].SetDependantToolbarButtons( new Array('reset') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/downloads/downloads_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/import_progress.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/import_progress.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/import_progress.tpl (revision 11549)
@@ -1,20 +1,16 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<script language="javascript" src="incs/ajax.js"></script>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.import" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" title_preset="products_import"/>
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_tool_import" module="in-portal" title="!la_title_ImportProducts!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p.import" title_preset="products_import" module="in-portal" icon="icon46_tool_import"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('p.import', 'OnExportCancel');
}
$ProductImport = new AjaxProgressBar('<inp2:m_t t="dummy" p.import_event="OnExportProgress" pass="m,p.import" js_escape="1"/>');
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/import_progress.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/reports/chart.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/reports/chart.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/reports/chart.tpl (revision 11549)
@@ -1,63 +1,62 @@
-<inp2:m_RequireLogin permissions="in-commerce:reports.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1124" height="700"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_chart"/>
-<inp2:m_RenderElement name="blue_bar" prefix="rep" title_preset="report_chart" module="in-commerce" icon="icon46_summary_logs"/>
<inp2:rep.params_CalculateChart/>
+
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
// do nothing
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
getWindowOpener(window).focus();
window_close();
return true;
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
window.print();
}
) );
a_toolbar.Render();
</script>
</td>
<td align="center">
<inp2:m_if check="rep.metric_ReportTypeEquals" value="2">
<inp2:m_else/>
<inp2:m_Phrase label="la_Metric"/>: <select name="metric" id="metric" onchange="submit_event('rep','OnChangeStatistics')">
<inp2:rep.params_PredefinedOptions field="Metric" block="inp_option_phrase" selected="selected"/>
</select>
</inp2:m_if>
</td>
<td width="150">
&nbsp;
</td>
</tr>
</tbody>
</table>
<center>
<inp2:m_if check="rep.metric_ReportTypeEquals" value="12">
<img src="<inp2:m_Link template='dummy' pass='m,rep' rep_event='OnPrintChart'/>&rand=<inp2:rep_GetRandom/>&width=1024&height=600" />
<inp2:m_else/>
<img src="<inp2:m_Link template='dummy' pass='m,rep' rep_event='OnPieChart' />&rand=<inp2:rep_GetRandom/>&width=1024&height=600" />
</inp2:m_if>
<br/>
<!--inp2:m_RenderElement name="graph" width="600" height="450" template="ebay/listings/statistics_graph"/-->
<center/>
-
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/reports/chart.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.4
\ No newline at end of property
+1.1.4.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/reports/results.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/reports/results.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/reports/results.tpl (revision 11549)
@@ -1,81 +1,68 @@
-<inp2:m_RequireLogin permissions="in-commerce:reports.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="rep" module="in-commerce" icon="icon46_summary_logs" title="!la_title_SalesReports!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="rep" title_preset="report_results" module="in-commerce" icon="icon46_summary_logs"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" pagination="1" title_preset="report_results"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
// do nothing
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Back" escape="1"/>', function() {
// window.location = '<inp2:m_t t="../../plugins/reports/admin_templates/reports" "pass"="m,rep" "rep_event="OnNew"/>'
window.location = '<inp2:m_Link template="in-commerce/reports/reports" pass="m,rep" rep_event="OnNew" no_amp="1" />';
return true;
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
window.print();
}
) );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.AddButton( new ToolBarButton('export', '<inp2:m_phrase label="la_ToolTip_Export" escape="1"/>', function() {
submit_event('rep','OnExportReport');
}
) );
- <inp2:m_if check="rep.metric_ReportTypeEquals" value="2">
- // By Users report have no chart
- <inp2:m_else/>
- // Only PHP5 have chart
- <inp2:m_if check="rep_IsPHPxOrGreater" version="5">
- // Chart window open button
- a_toolbar.AddButton( new ToolBarButton('in-commerce:view_chart', '<inp2:m_phrase label="la_ToolTip_View_Chart" escape="1"/>', function() {
- openwin('<inp2:m_Link template="in-commerce/reports/chart" pass="all" escape="1"/>', 'chart', 1124, 700);
- }
- ) );
+ <inp2:m_if check="rep.metric_ReportTypeEquals" value="2">
+ // By Users report have no chart
+ <inp2:m_else/>
+ // Only PHP5 have chart
+ <inp2:m_if check="rep_IsPHPxOrGreater" version="5">
+ // Chart window open button
+ a_toolbar.AddButton( new ToolBarButton('in-commerce:view_chart', '<inp2:m_phrase label="la_ToolTip_View_Chart" escape="1"/>', function() {
+ openSelector('rep', '<inp2:m_Link template="in-commerce/reports/chart" pass="all" js_escape="1"/>');
+ }
+ ) );
+ </inp2:m_if>
+
</inp2:m_if>
- </inp2:m_if>
a_toolbar.Render();
</script>
</td>
- <td align="center">
- </td>
- <td width="150">
- &nbsp;
- </td>
+
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="rep" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="grid_column_title" td_style="" use_phrases="1" ajax="0">
- <td nowrap="nowrap" style="<inp2:m_param name="td_style"/>">
- <a href="javascript:resort_grid('<inp2:m_param name="PrefixSpecial"/>','<inp2:m_param name="sort_field"/>', <inp2:m_param name="ajax"/>);"><IMG alt="" src="img/list_arrow_<inp2:{$PrefixSpecial}_order field="$sort_field"/>.gif" border="0" align="absmiddle"><inp2:m_if check="m_ParamEquals" name="use_phrases" value="1"><inp2:m_phrase name="$title"/><inp2:m_else/><inp2:m_param name="title"/></inp2:m_if></a>
- </td>
-</inp2:m_DefineElement>
-
-<inp2:m_RenderElement name="grid" PrefixSpecial="rep" IdField="CategoryId" grid="Default" totals="1"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="rep" IdField="CategoryId" grid="Default" totals_render_as="grid_total_row"/>
<script type="text/javascript">
Grids['rep'].SetDependantToolbarButtons( new Array() );
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/reports/results.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.4
\ No newline at end of property
+1.1.4.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/reports/progress.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/reports/progress.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/reports/progress.tpl (revision 11549)
@@ -1,20 +1,15 @@
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_progress"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<script language="javascript" src="js/ajax.js"></script>
-
-<inp2:m_RenderElement name="section_header" prefix="rep" module="in-commerce" icon="icon46_summary_logs" title="!la_title_SalesReports!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="rep" title_preset="report_progress" module="in-commerce" icon="icon46_summary_logs"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('rep', 'OnGoBack');
}
// $ProductExport = new AjaxProgressBar('<inp2:m_t t="../../plugins/reports/admin_templates/status_xml" no_amp="1"/>');
$ProductExport = new AjaxProgressBar('<inp2:m_Link template="in-commerce/reports/status_xml" no_amp="1"/>');
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/reports/progress.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.2
\ No newline at end of property
+1.1.4.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/reports/reports.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/reports/reports.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/reports/reports.tpl (revision 11549)
@@ -1,97 +1,97 @@
-<inp2:m_RequireLogin permissions="in-commerce:reports.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_options"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="rep" module="in-commerce" icon="icon46_summary_logs" title="!la_title_SalesReports!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="rep" title_preset="report_options" module="in-commerce" icon="icon46_summary_logs"/>
<!-- 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_RunReport" escape="1"/>', function() {
// set_hidden_field('progress_t', '../../plugins/reports/admin_templates/progress');
set_hidden_field('progress_t', 'in-commerce/reports/progress');
// set_hidden_field('reports_finish_t', '../../plugins/reports/admin_templates/results');
set_hidden_field('reports_finish_t', 'in-commerce/reports/results');
submit_event('rep','OnRunReport');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<script src="js/calendar.js"></script>
+
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="rep" field="ReportType" title="la_fld_ReportType" use_phrases="1"/>
<inp2:m_RenderElement name="inp_edit_date" prefix="rep" field="FromDateTime" title="!la_fld_FromDateTime!"/>
<inp2:m_RenderElement name="inp_edit_date" prefix="rep" field="ToDateTime" title="!la_fld_ToDateTime!"/>
<script type="text/javascript">
function updateTimeFrame(option) {
from_date = '';
to_date = '';
if (option == 'last_week') {
from_date = '<inp2:adm_TimeFrame type="last_week_start" format="_regional_InputDateFormat"/>';
to_date = '<inp2:adm_TimeFrame type="last_week_end" format="_regional_InputDateFormat"/>';
}
if (option == 'last_month') {
from_date = '<inp2:adm_TimeFrame type="last_month_start" format="_regional_InputDateFormat"/>';
to_date = '<inp2:adm_TimeFrame type="last_month_end" format="_regional_InputDateFormat"/>';
}
if (option == 'last_quater') {
from_date = '<inp2:adm_TimeFrame type="last_quater_start" format="_regional_InputDateFormat"/>';
to_date = '<inp2:adm_TimeFrame type="last_quater_end" format="_regional_InputDateFormat"/>';
}
if (option == 'last_6months') {
from_date = '<inp2:adm_TimeFrame type="last_6_months_start" format="_regional_InputDateFormat"/>';
to_date = '<inp2:adm_TimeFrame type="last_month_end" format="_regional_InputDateFormat"/>';
}
if (option == 'last_year') {
from_date = '<inp2:adm_TimeFrame type="last_year_start" format="_regional_InputDateFormat"/>';
to_date = '<inp2:adm_TimeFrame type="last_year_end" format="_regional_InputDateFormat"/>';
}
document.getElementById('<inp2:rep_InputName field="FromDateTime_date"/>').value = from_date;
document.getElementById('<inp2:rep_InputName field="ToDateTime_date"/>').value = to_date;
}
</script>
- <tr class="<inp2:m_odd_even odd="table_color1" even="table_color2"/>">
- <td class="text"><inp2:m_Phrase label="la_comm_Timeframe"/></td>
- <td>
+ <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_comm_Timeframe"/>:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
<select id="timeframe" onchange="updateTimeFrame(this.value)">
<option value=""></option>
<option value="last_week"><inp2:m_Phrase label="lu_comm_LastWeek"/></option>
<option value="last_month"><inp2:m_Phrase label="lu_comm_LastMonth"/></option>
<option value="last_quater"><inp2:m_Phrase label="lu_comm_LastQuater"/></option>
<option value="last_6months"><inp2:m_Phrase label="lu_comm_Last6Months"/></option>
<option value="last_year"><inp2:m_Phrase label="lu_comm_LastYear"/></option>
</select>
</td>
- <td>&nbsp;</td>
</tr>
<!--<inp2:m_RenderElement name="inp_edit_checkbox" prefix="rep" field="Recursive" title="la_fld_Recursive"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="rep" field="SkipEmpty" title="la_fld_SkipEmpty"/>-->
+ <inp2:m_RenderElement name="inp_edit_filler"/>
</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/reports/reports.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.4.2
\ No newline at end of property
+1.1.4.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_edit_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_edit_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_edit_tabs.tpl (nonexistent)
@@ -1,9 +0,0 @@
-<inp2:m_DefineElement name="orders_edit_tabs">
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/orders/orders_edit" main_prefix="ord"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Items" t="in-commerce/orders/orders_edit_items" main_prefix="ord"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Shipping" t="in-commerce/orders/orders_edit_shipping" main_prefix="ord"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Billing" t="in-commerce/orders/orders_edit_billing" main_prefix="ord"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Preview" t="in-commerce/orders/orders_edit_preview" main_prefix="ord"/>
-</inp2:m_DefineElement>
-
-<inp2:m_RenderElement name="tabs_container" tabs_render_as="orders_edit_tabs"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_edit_tabs.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3.2.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/export/export.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/export/export.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/export/export.tpl (revision 11549)
@@ -1,175 +1,173 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" icon="icon46_tool_export" title="!la_title_OrdersExport!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord.export" title_preset="orders_export" module="in-commerce" icon="icon46_tool_export"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
document.getElementById('hidden_export_columns').value = select_to_string('<inp2:ord.export_InputName field="ExportColumns"/>');
- submit_event('ord.export','OnExportBegin');
+ submit_event('ord.export', 'OnExportBegin');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('ord.export','OnGoBack');
+ submit_event('ord.export', 'OnGoBack');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
+<inp2:ord.export_SaveWarning name="grid_save_warning"/>
+<inp2:ord.export_ErrorWarning name="form_error_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
-
- <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportPresets" title="la_fld_ExportPresets"/>
- <td>
- <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:ord.export_InputName field="ExportPresets"/>" id="<inp2:ord.export_InputName field="ExportPresets"/>" onchange="update_fields(this.value)">
- <inp2:ord.export_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
- </select>
- &nbsp;&nbsp;
- <input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()">
- </td>
- <td class="error">&nbsp;</td>
- </tr>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportColumns" title="la_fld_ExportColumns"/>
- <td>
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td>
- <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button">
- <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
- <img src="img/s.gif" width="1" height="5" alt=""><br />
- </td>
- <td><img src="img/s.gif" width="45" height="1" alt=""><br></td>
- <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
- </tr>
- <tr>
- <td>
- <select multiple id="<inp2:ord.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
- <inp2:ord.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
- </select>
- <input type="hidden" id="hidden_export_columns" name="<inp2:ord.export_InputName field="ExportColumns"/>" value="<inp2:ord.export_Field field="ExportColumns"/>" />
- </td>
- <td align="center">
- <input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>')" class="button"><br>
- <img src="img/s.gif" width="1" height="4" alt=""><br>
- <input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:ord.export_InputName field="AvailableColumns"/>');" class="button">
- </td>
- <td>
- <select multiple id="<inp2:ord.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
- <inp2:ord.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
- </select>
- </td>
- </tr>
- </table>
- </td>
- <td class="error"><inp2:ord.export_Error field="ExportColumns"/>&nbsp;</td>
- </tr>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" />
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="ExportFormat" title="la_fld_ExportFormat" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsSeparatedBy" title="la_fld_FieldsSeparatedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="FieldsEnclosedBy" title="la_fld_FieldsEnclosedBy" size="2" maxlength="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndings" title="la_fld_LineEndings" use_phrases="0"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="ord.export" field="LineEndingsInside" title="la_fld_LineEndingsInside" use_phrases="0"/>
+
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="IncludeFieldTitles" title="la_fld_IncludeFieldTitles"/>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportPresets" title="la_fld_ExportPresets"/>
+ <td class="control-cell">
+ <select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:ord.export_InputName field="ExportPresets"/>" id="<inp2:ord.export_InputName field="ExportPresets"/>" onchange="update_fields(this.value)">
+ <inp2:ord.export_PredefinedOptions field="ExportPresets" block="inp_option_item" selected="selected" has_empty="$has_empty" empty_value="$empty_value"/>
+ </select>
+ &nbsp;&nbsp;
+ <input class="button" type="button" value="<inp2:m_Phrase label="la_Text_Delete"/>" onclick="delete_preset()">
+ </td>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord.export" field="ExportColumns" title="la_fld_ExportColumns"/>
+ <td class="control-cell">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td>
+ <input type="button" value="<inp2:m_phrase name="la_btn_Up"/>" onclick="move_options_up('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button">
+ <input type="button" value="<inp2:m_phrase name="la_btn_Down"/>" onclick="move_options_down('<inp2:ord.export_InputName field="ExportColumns"/>', 1)" class="button"><br />
+ <img src="img/s.gif" width="1" height="5" alt=""><br />
+ </td>
+ <td><img src="img/s.gif" width="45" height="1" alt=""><br></td>
+ <td><inp2:m_phrase name="la_fld_AvailableColumns"/>:</td>
+ </tr>
+ <tr>
+ <td>
+ <select multiple id="<inp2:ord.export_InputName field="ExportColumns"/>" size="15" style="width: 225px;">
+ <inp2:ord.export_PredefinedOptions field="ExportColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ <input type="hidden" id="hidden_export_columns" name="<inp2:ord.export_InputName field="ExportColumns"/>" value="<inp2:ord.export_Field field="ExportColumns"/>" />
+ </td>
+ <td align="center">
+ <input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>')" class="button"><br>
+ <img src="img/s.gif" width="1" height="4" alt=""><br>
+ <input type="button" value="&nbsp;&raquo;&raquo;&nbsp;" onclick="move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>'); select_sort('<inp2:ord.export_InputName field="AvailableColumns"/>');" class="button">
+ </td>
+ <td>
+ <select multiple id="<inp2:ord.export_InputName field="AvailableColumns"/>" size="15" style="width: 225px;">
+ <inp2:ord.export_PredefinedOptions field="AvailableColumns" block="inp_option_item" selected="selected"/>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="ord.export" field="ExportColumns"/>
+ </tr>
+
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord.export" field="ExportSavePreset" title="la_fld_ExportSavePreset" size="2" maxlength="1" onclick="update_preset_field(this.checked)"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportPresetName" title="la_fld_ExportPresetName" size="20" />
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="ord.export" field="ExportFilename" title="la_fld_ExportFilename" size="20" />
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script type="text/javascript" src="incs/ajax.js"></script>
<script type="text/javascript">
var delete_busy = false;
function delete_preset()
{
if (!confirm('<inp2:m_Phrase label="la_ConfirmDeleteExportPreset" js_escape="1"/>')) return;
var $kf = document.getElementById('kernel_form');
tmp = $kf.elements['events[ord.export]'].value;
$kf.elements['events[ord.export]'].value = 'OnDeleteExportPreset';
Request.method = 'POST';
Request.params = Request.serializeForm($kf);
$kf.elements['events[ord.export]'].value = tmp;
Request.makeRequest('<inp2:m_t ajax="1" ord.export_event="OnDeleteExportPreset" js_escape="1" no_amp="1"/>', delete_busy, '', function() {
presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
for (i=0; i< presets.options.length; i++) {
if (presets.options(i).selected) {
presets.options.remove(i);
}
}
presets.options[0].selected = true;
}, function() {alert('error')} );
}
function update_preset_field(status)
{
if (status) {
presets = document.getElementById('<inp2:ord.export_InputName field="ExportPresets"/>');
if ( presets.value != '' ) {
for (i=0; i< presets.options.length; i++) {
if (presets.options(i).selected) {
preset_name = presets.options(i).text
}
}
document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').value = preset_name;
}
}
document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').disabled = !status;
}
function update_fields(preset)
{
$export = select_to_string(document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
if ($export != '') {
string_to_selected($export, document.getElementById('<inp2:ord.export_InputName field="ExportColumns"/>'));
move_selected('<inp2:ord.export_InputName field="ExportColumns"/>', '<inp2:ord.export_InputName field="AvailableColumns"/>');
}
av = document.getElementById('<inp2:ord.export_InputName field="AvailableColumns"/>');
fields = preset.split('|');
for (var i=0; i<fields.length; i++) {
fld = fields[i];
var $cur = null;
for (var $i = 0; $i < av.length; $i++)
{
cur = av.options[$i];
if (cur.value == fld) {
av.options[$i].selected = true;
move_selected('<inp2:ord.export_InputName field="AvailableColumns"/>', '<inp2:ord.export_InputName field="ExportColumns"/>');
}
else {
av.options[$i].selected = false;
}
}
}
}
update_preset_field(document.getElementById('<inp2:ord.export_InputName field="ExportPresetName"/>').checked)
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/export/export.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/export/export_finish.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/export/export_finish.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/export/export_finish.tpl (revision 11549)
@@ -1,32 +1,45 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" icon="icon46_tool_export" title="!la_title_OrdersExport!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord.export" title_preset="orders_export" module="in-commerce" icon="icon46_tool_export"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
+ submit_event('ord.export', 'OnGoBack');
+ }
+ ) );
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <inp2:m_phrase label="la_DownloadExportFile"/>
- <td>
- <a href="<inp2:ord.export_ExportPath as_url="1"/>"><inp2:ord.export_ExportPath /></a>
- </td>
- <td class="error">&nbsp;</td>
- </tr>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td colspan="3" align="left">
- <a href="javascript:submit_event('ord.export','OnGoBack');"><inp2:m_phrase label="la_Continue"/></a>
+ a_toolbar.Render();
+ </script>
</td>
</tr>
-
-
+</tbody>
</table>
-<inp2:m_include t="incs/footer"/>
+<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_inc param="tab_index" by="1"/>
+ <td class="label-cell">
+ <inp2:m_phrase label="la_DownloadExportFile"/>
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <a href="<inp2:ord.export_ExportPath as_url="1"/>"><inp2:ord.export_ExportPath /></a>
+ </td>
+ </tr>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/export/export_finish.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/export/export_progress.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/export/export_progress.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/export/export_progress.tpl (revision 11549)
@@ -1,20 +1,16 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<script language="javascript" src="incs/ajax.js"></script>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.export" section="in-commerce:orders" title_preset="orders_export"/>
-<inp2:m_RenderElement name="section_header" icon="icon46_tool_export" title="!la_title_OrdersExport!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord.export" title_preset="orders_export" module="in-commerce" icon="icon46_tool_export"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('ord.export', 'OnExportCancel');
}
$ProductExport = new AjaxProgressBar('<inp2:m_t t="in-commerce/orders/export/export_status_xml" no_amp="1"/>');
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/export/export_progress.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_backorders_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_backorders_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_backorders_list.tpl (revision 11549)
@@ -1,77 +1,72 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" module="in-commerce" title_preset="orders_backorders" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.backorders" section="in-commerce:orders" title_preset="orders_backorders" 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.backorders]',1);
std_edit_item('ord.backorders', 'in-commerce/orders/orders_edit');
}
-
+
var a_toolbar = new ToolBar();
-
+
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.backorders]',1);
submit_event('ord.backorders','OnMassClone');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('process', '<inp2:m_phrase label="la_ToolTip_Process" escape="1"/>', function() {
submit_event('ord.backorders','OnMassOrderProcess');
}
- ) );
-
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
submit_event('ord.backorders','OnMassOrderDeny');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
submit_event('ord.backorders','OnMassOrderArchive');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
-
+
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.backorders', '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.backorders" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.backorders" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.backorders" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.backorders'].SetDependantToolbarButtons( new Array('edit','delete','clone','process','deny','archive','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','backorders');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_backorders_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_pending_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_pending_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_pending_list.tpl (revision 11549)
@@ -1,72 +1,74 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_pending" tabs="in-commerce/orders/orders_list_tabs"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.pending" section="in-commerce:orders" title_preset="orders_pending" 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.pending]',1);
std_edit_item('ord.pending', 'in-commerce/orders/orders_edit');
}
var a_toolbar = new ToolBar();
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.pending]',1);
submit_event('ord.pending','OnMassClone');
}
) );
a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
submit_event('ord.pending','OnMassOrderApprove');
}
) );
a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
submit_event('ord.pending','OnMassOrderDeny');
}
) );
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.pending', 'in-commerce/orders/orders_print');
}
) );
// a_toolbar.AddButton( new ToolBarButton('pdf', '<inp2:m_phrase label="la_ToolTip_Pdf" escape="1"/>', function() {
// submit_event('ord.pending','OnGeneratePDF');
// }
// ) );
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.pending" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.pending" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.pending" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.pending'].SetDependantToolbarButtons( new Array('edit','delete','clone','approve','deny','archive','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','pending');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_pending_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.1
\ No newline at end of property
+1.10.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/gw_results.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/gw_results.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/gw_results.tpl (revision 11549)
@@ -1,62 +1,49 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<!-- non-standard BlueBar --->
-<table border="0" cellpadding="2" cellspacing="0" class="tableborder_full" width="100%" height="30">
- <tr>
- <td class="header_left_bg" nowrap width="80%" valign="middle">
- <span class="tablenav_link" id="blue_bar"><inp2:ord_SectionTitle title_preset="orders_gw_result" title="Invalid OR Missing title preset" cut_first="100"/></span>
- </td>
- <td align="right" class="tablenav" width="20%" valign="middle">
- <script>
- var $help_url='<inp2:m_t t="help" h_prefix="s" h_icon="" h_module="in-commerce" h_title_preset="select_modifier" pass="all,m,h" escape="escape" front="1" />';
- set_window_title( document.getElementById('blue_bar').innerHTML );
- </script>
- <a href="javascript: OpenHelp($help_url);">
- <img src="img/blue_bar_help.gif" border="0">
- </a>
- </td>
- </tr>
-</table>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_gw_result"/>
<!-- 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('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
-<inp2:m_DefineElement name="a_field">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <inp2:m_Param name="field"/>
- </td>
- <td>
- <inp2:m_Param name="value"/>
- </td>
- </tr>
-</inp2:m_DefineElement>
-<inp2:ord_PrintSerializedFields render_as="a_field"/>
-</table>
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_DefineElement name="a_field">
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <td class="label-cell">
+ <inp2:m_Param name="field"/>:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <inp2:m_Param name="value"/>
+ </td>
+ </tr>
+ </inp2:m_DefineElement>
+
+ <inp2:ord_PrintSerializedFields render_as="a_field"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:s_HiddenSelection/>
+<!--<inp2:s_HiddenSelection/>-->
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/gw_results.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4.2.1
\ No newline at end of property
+1.4.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_archived_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_archived_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_archived_list.tpl (revision 11549)
@@ -1,66 +1,60 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" module="in-commerce" title_preset="orders_archived" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.archived" section="in-commerce:orders" title_preset="orders_archived" 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.archived]',1);
std_edit_item('ord.archived', 'in-commerce/orders/orders_edit');
}
-
+
var a_toolbar = new ToolBar();
-
+
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('ord.archived')
} ) );
-
+
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.archived]',1);
submit_event('ord.archived','OnMassClone');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.archived', '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.archived" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.archived" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.archived" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.archived'].SetDependantToolbarButtons( new Array('edit','delete','clone','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','archived');
-</script>
-
\ No newline at end of file
+</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_archived_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_processed_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_processed_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_processed_list.tpl (revision 11549)
@@ -1,72 +1,67 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" module="in-commerce" title_preset="orders_processed" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.processed" section="in-commerce:orders" title_preset="orders_processed" 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.processed]',1);
std_edit_item('ord.processed', 'in-commerce/orders/orders_edit');
}
-
+
var a_toolbar = new ToolBar();
-
+
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.processed]',1);
submit_event('ord.processed','OnMassClone');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
submit_event('ord.processed','OnMassOrderArchive');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
submit_event('ord.processed','OnMassOrderDeny');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
-
+
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.processed', '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.processed" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.processed" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.processed" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.processed'].SetDependantToolbarButtons( new Array('edit','delete', 'deny', 'clone','archive','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','processed');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_processed_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8
\ No newline at end of property
+1.8.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_denied_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_denied_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_denied_list.tpl (revision 11549)
@@ -1,78 +1,73 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" module="in-commerce" title_preset="orders_denied" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.denied" section="in-commerce:orders" title_preset="orders_denied" 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.denied]',1);
std_edit_item('ord.denied', '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"/>',
// function() {
// set_hidden_field('remove_specials[ord.denied]',1);
// std_precreate_item('ord.denied', '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 ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('ord.denied')
} ) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
-
+
a_toolbar.AddButton( new ToolBarButton('reset_to_pending', '<inp2:m_phrase label="la_ToolTip_ResetToPending" escape="1"/>', function() {
set_hidden_field('remove_specials[ord.denied]',1);
submit_event('ord.denied','OnResetToPending');
}
- ) );
-
+ ) );
+
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
-
+
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>', function() {
set_hidden_field('remove_specials[ord.denied]',1);
submit_event('ord.denied','OnMassClone');
}
- ) );
-
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.denied', '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.denied" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.denied" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.denied" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.denied'].SetDependantToolbarButtons( new Array('edit','delete','reset_to_pending', 'clone','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','denied');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_denied_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_list_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_list_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_list_tabs.tpl (revision 11549)
@@ -1,34 +1,28 @@
<inp2:m_include template="in-commerce/orders/order_blocks"/>
-<inp2:adm_SaveReturnScript/>
-
<inp2:m_DefineElement name="orders_tabs">
<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 language="javascript" type="text/javascript">
+<script type="text/javascript">
- function print_orders($prefix_special, $t)
- {
- if ($prefix_special.match(/(.*)\.(.*)/))
- {
+ function print_orders($prefix_special, $t) {
+ if ($prefix_special.match(/(.*)\.(.*)/)) {
set_hidden_field('order_type', RegExp.$2);
}
- openwin('', 'order_preview', 750, 700);
- document.getElementById('kernel_form').target = 'order_preview';
set_hidden_field('remove_specials[' + $prefix_special + ']', 1);
- submit_event($prefix_special, 'OnLoadSelected', $t);
- }
+ open_popup($prefix_special, 'OnLoadSelected', $t, '750x700');
+ }
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_list_tabs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8.2.4
\ No newline at end of property
+1.8.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_edit.tpl (revision 11549)
@@ -1,132 +1,133 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="820" height="570"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" title_preset="orders_edit_general" module="in-commerce" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_general" 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') );
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"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
-
- <inp2:m_RenderElement name="inp_id_label" prefix="ord" field="OrderId" title="!la_fld_OrderId!"/>
-
- <inp2:m_if check="ord_OrderEditable">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="Number" title="!la_fld_OrderNumber!"/>
- <td>
- <input type="text" name="<inp2:ord_InputName field="Number"/>" id="<inp2:ord_InputName field="Number"/>" value="<inp2:ord_Field field="Number"/>" tabindex="<inp2:m_get param="tab_index"/>" size="6" maxlength="6" class="text">
- -<inp2:m_inc param="tab_index" by="1"/>
- <input type="text" name="<inp2:ord_InputName field="SubNumber"/>" id="<inp2:ord_InputName field="SubNumber"/>" value="<inp2:ord_Field field="SubNumber"/>" tabindex="<inp2:m_get param="tab_index"/>" size="2" maxlength="3" class="text">
- </td>
- <td><span class="error"><inp2:ord_Error field="OrderNumber"/></span>&nbsp;</td>
- </tr>
- <inp2:m_if check="m_IsDebugMode" >
- <inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="Status" title="!la_fld_Status!"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="Status" title="!la_fld_Status!"/>
- </inp2:m_if>
+<inp2:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="OrderDate" title="!la_fld_Date!"/>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+
+ <inp2:m_RenderElement name="inp_id_label" prefix="ord" field="OrderId" title="!la_fld_OrderId!"/>
+
+ <inp2:m_if check="ord_OrderEditable">
+ <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="Number" title="!la_fld_OrderNumber!"/>
+ <td class="control-cell">
+ <input type="text" name="<inp2:ord_InputName field="Number"/>" id="<inp2:ord_InputName field="Number"/>" value="<inp2:ord_Field field="Number"/>" tabindex="<inp2:m_get param="tab_index"/>" size="6" maxlength="6" class="text">
+ -<inp2:m_inc param="tab_index" by="1"/>
+ <input type="text" name="<inp2:ord_InputName field="SubNumber"/>" id="<inp2:ord_InputName field="SubNumber"/>" value="<inp2:ord_Field field="SubNumber"/>" tabindex="<inp2:m_get param="tab_index"/>" size="2" maxlength="3" class="text">
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="OrderNumber"/>
+ </tr>
- <inp2:m_RenderElement name="inp_edit_user" prefix="ord" field="PortalUserId" title="!la_fld_Username!" size="15"/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderIP" title="!la_fld_OrderIP!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="OnHold" title="la_fld_OnHold"/>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_Affiliate!"/>
- <inp2:m_if check="ord_FieldEquals" field="AffiliateId" value="0">
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!" as_label="1"/>
+ <inp2:m_if check="m_IsDebugMode" >
+ <inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="Status" title="!la_fld_Status!"/>
<inp2:m_else/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="Status" title="!la_fld_Status!"/>
</inp2:m_if>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateCommission" title="!la_fld_AffiliateCommission!" currency="selected"/>
- <inp2:m_RenderElement name="subsection" title="!la_section_Comments!"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="UserComment" title="!la_fld_UserComment!" rows="10" cols="40"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="AdminComment" title="!la_fld_AdminComment!" rows="10" cols="40"/>
- <inp2:m_else/>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="Number" title="!la_fld_OrderNumber!"/>
- <td>
- <inp2:ord_Field field="Number"/>-<inp2:ord_Field field="SubNumber"/>
- </td>
- <td><span class="error"><inp2:ord_Error field="OrderNumber"/></span>&nbsp;</td>
- </tr>
-
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="Status" title="!la_fld_Status!"/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderDate" title="!la_fld_Date!"/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="PortalUserId" title="!la_fld_Username!" size="15"/>
-
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderIP" title="!la_fld_OrderIP!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="OnHold" title="la_fld_OnHold"/>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_Affiliate!"/>
- <inp2:m_if check="ord_FieldEquals" field="AffiliateId" value="0">
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!" as_label="1"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!"/>
- </inp2:m_if>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateCommission" title="!la_fld_AffiliateCommission!" currency="selected"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="OrderDate" title="!la_fld_Date!"/>
- <inp2:m_RenderElement name="subsection" title="!la_section_Comments!"/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="UserComment" title="!la_fld_UserComment!" rows="10" cols="40"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="AdminComment" title="!la_fld_AdminComment!" rows="10" cols="40"/>
- </inp2:m_if>
-</table>
+ <inp2:m_RenderElement name="inp_edit_user" prefix="ord" field="PortalUserId" title="!la_fld_Username!" size="15"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderIP" title="!la_fld_OrderIP!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="OnHold" title="la_fld_OnHold"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Affiliate!"/>
+ <inp2:m_if check="ord_FieldEquals" field="AffiliateId" value="0">
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!" as_label="1"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!"/>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateCommission" title="!la_fld_AffiliateCommission!" currency="selected"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Comments!"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="UserComment" title="!la_fld_UserComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="AdminComment" title="!la_fld_AdminComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+ <inp2:m_else/>
+ <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="Number" title="!la_fld_OrderNumber!"/>
+ <td class="control-cell">
+ <inp2:ord_Field field="Number"/>-<inp2:ord_Field field="SubNumber"/>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="ord" field="OrderNumber"/>
+ </tr>
+
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="Status" title="!la_fld_Status!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderDate" title="!la_fld_Date!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="PortalUserId" title="!la_fld_Username!" size="15"/>
+
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="OrderIP" title="!la_fld_OrderIP!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="OnHold" title="la_fld_OnHold"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Affiliate!"/>
+ <inp2:m_if check="ord_FieldEquals" field="AffiliateId" value="0">
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!" as_label="1"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateId" title="!la_fld_AffiliateUser!"/>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="AffiliateCommission" title="!la_fld_AffiliateCommission!" currency="selected"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Comments!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="UserComment" title="!la_fld_UserComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="ord" field="AdminComment" title="!la_fld_AdminComment!" control_options="{min_height: 100}" rows="10" cols="40"/>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.17.2.2
\ No newline at end of property
+1.17.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_edit_billing.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_edit_billing.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_edit_billing.tpl (revision 11549)
@@ -1,221 +1,220 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="820" height="570"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" title_preset="orders_edit_billing" module="in-commerce" icon="icon46_orders"/>
+<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() {
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)
-{
- openwin('<inp2:m_Link t="in-commerce/orders/gw_results" pass="m,ord" ord_mode="t"/>&field='+field,'gwresults',500,400);
-}
-
+ function OpenGWResults(field) {
+ openwin('<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord"/>&field=' + field, 'gwresults', 500, 400);
+ }
</script>
<inp2:m_DefineElement name="inp_gwresults" is_last="" as_label="" currency="" is_last="">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+ <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">
+ <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>
- <td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;</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"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <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"/>
- <tr>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="!la_fld_PaymentCCExpDate!"/>
- <td>
- <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>
- <td class="error"><inp2:ord_Error field="PaymentCCExpDate"/></td>
- </tr>
- <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: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"/>
+ <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_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_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_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!"/>
+ <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_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="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 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_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!"/>
- <tr>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="ord" field="PaymentCCExpDate" title="!la_fld_PaymentCCExpDate!"/>
- <td class="text">
- <inp2:ord_Field field="PaymentCCExpMonth"/> / <inp2:ord_Field field="PaymentCCExpYear"/>
- </td>
- <td class="error"><inp2:ord_Error field="PaymentCCExpDate"/></td>
- </tr>
- <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 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_Field" name="GWResult1" db="db">
- <inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="!la_fld_AuthorizationResult!" />
+ <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="GWResult2" db="db">
- <inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="!la_fld_CaptureResult!" />
+ <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_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>
-</table>
+
+ <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"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_edit_billing.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.18.2.4
\ No newline at end of property
+1.18.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_edit_items.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_edit_items.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_edit_items.tpl (revision 11549)
@@ -1,259 +1,251 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="820" height="570"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
+<inp2:m_include t="incs/header"/>
-<inp2:m_include t="in-commerce/orders/orders_edit_tabs"/>
+<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="blue_bar" prefix="ord" title_preset="orders_edit_items" module="in-commerce" icon="icon46_orders"/>
+<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"/>',
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" >
+ <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="">
- <td valign="top" class="text">
- <table border="0" cellpadding="0" cellspacing="0" class="grid_id_cell">
- <tr>
- <td valign="top"><input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>"></td>
-
- <inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
- <td valign="top" width="120">
- <inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="../../in-commerce/admin_templates/img/itemicons/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
- </td>
- <inp2:m_else/>
- <td valign="top"><img src="<inp2:ModulePath module="$module"/>img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>"></td>
- </inp2:m_if>
-
- <td valign="top">
- <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>
- </td>
- </tr>
- </table>
- </td>
+ <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" >
- <td valign="top" class="text">
- <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">
- </td>
+<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" >
- <td valign="top" class="text">
- <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>
- </td>
+<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">
- <td valign="top" class="text">
- $ <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">
- </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" >
- <td valign="top" class="text">$ <span id="<inp2:InputName field="$field"/>"><inp2:Field field="$field" grid="$grid" format="%.2f"/></span></td>
+<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_if check="ord_OrderEditable">
- <inp2:m_RenderElement name="grid" grid="Default" PrefixSpecial="orditems" IdField="OrderItemId" header_block="grid_column_title" data_block="grid_data_td" />
-<inp2:m_else/>
- <inp2:m_RenderElement name="grid" grid="NotEditable" PrefixSpecial="orditems" IdField="OrderItemId" header_block="grid_column_title" data_block="grid_data_td" />
-</inp2:m_if>
+<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') );
-</script>
-<img src="img/spacer.gif" border="0" height="5" width="1"><br>
+ <inp2:m_if check="ord_OrderEditable">
+ CalculateSubtotal('orditems', 'ExtendedPrice', 'order_subtotal');
+ </inp2:m_if>
-<table width="100%" cellpadding="7" cellspacing="0" class="tableborder" style="border-top: 1px solid #000000;" border="0">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td class="text" style="text-align: right; font-weight: bold;">
- <inp2:m_phrase name="la_OrderReturnTotal"/>: $ <span id="order_returntotal">0.00</span><br />
- <inp2:m_if check="ord_OrderEditable">
- <inp2:m_phrase name="la_OrderSubtotal"/>: $ <span id="order_subtotal">0.00</span><br /
- <script type="text/javascript">
- CalculateSubtotal('orditems', 'ExtendedPrice', 'order_subtotal');
- </script>
- <inp2:m_else/>
- <inp2:m_phrase name="la_OrderSubtotal"/>: $ <span id="order_subtotal"><inp2:ord_Field name="SubTotal"/></span><br />
- </inp2:m_if>
+ CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
+</script>
- <script type="text/javascript">
- CalculateSubtotal('orditems', 'ReturnAmount', 'order_returntotal');
- </script>
- </td>
- </tr>
-</table>
<input type="hidden" name="main_prefix" id="main_prefix" value="ord">
-<inp2:m_include t="incs/footer"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_edit_items.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.18.2.3
\ No newline at end of property
+1.18.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_edit_preview.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_edit_preview.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_edit_preview.tpl (revision 11549)
@@ -1,394 +1,390 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="820" height="570"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" title_preset="orders_edit_preview" module="in-commerce" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_preview" 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') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
openwin('<inp2:m_Link template="in-commerce/orders/orders_edit_print" pass="all"/>', 'order_preview', 750, 700);
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('place_order', '<inp2:m_phrase label="la_ToolTip_PlaceOrder" escape="1"/>', function() {
submit_event('ord','OnCompleteOrder');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<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:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:m_phrase label="la_fld_OrderNumber"/>:
</td>
<td>
<inp2:ord_Field field="OrderNumber"/> (<inp2:ord_Field field="Status"/>)
</td>
<td>&nbsp;</td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:m_phrase label="la_fld_Date"/>:
</td>
<td>
<inp2:ord_Field field="OrderDate"/>
</td>
<td>&nbsp;</td>
</tr>
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<td class="text">
<inp2:m_phrase label="la_fld_Username"/>:
</td>
<td>
<inp2:ord_Field field="PortalUserId"/> (<inp2:ord_Field field="CustomerName"/>)
</td>
<td>&nbsp;</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" class="tableborder">
<tr>
<td>
<table cellspacing="0" cellpadding="2" width="100%" border="0">
<tr class="subsectiontitle">
<td colspan="2">
<inp2:m_Phrase label="la_comm_ShippingBillingInfo"/>
</td>
</tr>
<tr>
<inp2:m_if check="ord_Field" name="ShippingTo">
<td width="50%" class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" style="vertical-align: top">
<!-- shipping -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_ShippingTo"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingTo"/></td>
</tr>
<inp2:m_if check="ord_Field" name="ShippingEmail">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_field_email"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingEmail"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingPhone">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_PhoneNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingPhone"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingFax">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_FaxNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingFax"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingCompany">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_shipping_Company"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="ShippingCompany"/></td>
</tr>
</inp2:m_if>
<tr>
<td class="order_preview_field_name" style="vertical-align: top;">Address:</td>
<td class="order_preview_field_value">
<inp2:m_if check="ord_FieldEquals" field="ShippingAddress1" value="" inverse="inverse" >
<inp2:ord_Field field="ShippingAddress1"/><br>
</inp2:m_if>
<inp2:m_if check="ord_FieldEquals" field="ShippingAddress2" value="" inverse="inverse" >
<inp2:ord_Field field="ShippingAddress2"/><br>
</inp2:m_if>
<inp2:ord_PrintLocation type="Shipping"/>
</td>
</tr>
</table>
</td>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingTo">
<td width="50%" class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" style="vertical-align: top">
<!-- billing -->
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_BillingTo"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingTo"/></td>
</tr>
<inp2:m_if check="ord_Field" name="BillingEmail">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_billing_Email"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingEmail"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingPhone">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_PhoneNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingPhone"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingFax">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_comm_FaxNumber"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingFax"/></td>
</tr>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingCompany">
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="lu_billing_Company"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="BillingCompany"/></td>
</tr>
</inp2:m_if>
<tr>
<td class="order_preview_field_name" style="vertical-align: top;"><inp2:m_phrase label="lu_billing_Address"/>:</td>
<td class="order_preview_field_value">
<inp2:m_if check="ord_FieldEquals" field="BillingAddress1" value="" inverse="inverse" >
<inp2:ord_Field field="BillingAddress1"/><br>
</inp2:m_if>
<inp2:m_if check="ord_FieldEquals" field="BillingAddress2" value="" inverse="inverse" >
<inp2:ord_Field field="BillingAddress2"/><br>
</inp2:m_if>
<inp2:ord_PrintLocation type="Billing"/>
</td>
</tr>
<tr>
<td class="order_preview_field_name"><inp2:m_phrase label="la_fld_PaymentType"/>:</td>
<td class="order_preview_field_value"><inp2:ord_Field field="PaymentType"/></td>
</tr>
</table>
</td>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="ShippingTo" inverse="inverse"><td width="50%" valign="top">&nbsp;</td></inp2:m_if>
<inp2:m_if check="ord_Field" name="BillingTo" inverse="inverse"><td width="50%" valign="top">&nbsp;</td></inp2:m_if>
</tr>
<tr class="subsectiontitle">
<td colspan="2">
<inp2:m_Phrase label="la_comm_OrderContents"/>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" border="0" class="orders_flat_table">
<tr class="subsectiontitle">
<td width="70%"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if> nowrap><inp2:m_Phrase label="la_col_Product"/></td>
<td width="10%" nowrap style="text-align: center"><inp2:m_Phrase label="la_col_Quantity"/></td>
<td width="10%" nowrap style="text-align: right"><inp2:m_Phrase label="la_col_Price"/></td>
<td width="10%" nowrap style="text-align: right"><inp2:m_Phrase label="la_col_ExtendedPrice"/></td>
</tr>
<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" />
</inp2:m_DefineElement>
<inp2:m_DefineElement name="order_detail_row">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">
<td valign="top" width="120">
<inp2:p_Image render_as="product_image" thumbnail="1" DefaultImage="../../in-commerce/admin_templates/img/itemicons/no_picture_list.gif" MaxWidth="120" MaxHeight="120" DefaultWidth="120" />
</td>
</inp2:m_if>
<td align="left" valign="top" width="100%">
<strong><inp2:{$PrefixSpecial}_Field field="ProductName"/></strong><br/>
<small><strong>SKU: </strong><inp2:Field field="SKU"/></small>
<inp2:m_if check="HasOptions">
<br/>
<small>
<inp2:m_if check="DisplayOptionsPricing"> <!-- selectable options or overriding combination -->
<inp2:PrintOptions render_as="option_element"/>
<inp2:m_else/> <!-- listed combinations -->
<inp2:PrintOptions render_as="option_element_no_price"/>
</inp2:m_if>
</small>
<br/>
</inp2:m_if>
<inp2:m_if check="HasDiscount">
<br />
<inp2:m_Phrase label="lu_comm_RegularPrice" />: <inp2:Field name="FlatPrice" /><br />
<inp2:m_Phrase label="lu_comm_Discount" />: - <inp2:Field name="ItemDiscount" />
</inp2:m_if>
</td>
<td align="right" nowrap style="text-align: center"><inp2:{$PrefixSpecial}_Field field="Quantity"/></td>
<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="Price"/></td>
<td align="right" nowrap><inp2:{$PrefixSpecial}_Field field="ExtendedPrice"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:orditems_PrintList block="order_detail_row" per_page="-1"/>
<tr style="border-top: 2px solid black">
<td align="left"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>
<inp2:m_if check="ord_Field" name="CouponId">
<span class="order_preview_field_name"><inp2:m_Phrase label="la_CouponCode"/>:</span> <inp2:ord_Field field="CouponCode"/><br />
</inp2:m_if>
<inp2:m_if check="ord_FieldEquals" field="DiscountTotal" value="0.00" inverse="inverse">
<span class="order_preview_field_name"><inp2:m_Phrase label="la_TotalSavings"/>:</span> <inp2:ord_Field field="DiscountTotal"/><br />
</inp2:m_if>
</td>
<td align="right" nowrap colspan="2" class="order-totals-name"><inp2:m_Phrase label="la_SubTotal"/>:</td>
<td align="right" nowrap class="arial2">
<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
<inp2:ord_Field field="AmountWithoutVAT"/>
<inp2:m_else />
<inp2:ord_Field field="SubTotal"/>
</inp2:m_if>
</td>
</tr>
<inp2:m_DefineElement name="shipping_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ShippingHandling"/><inp2:m_if check="ord_ShippingType"> (<inp2:ord_ShippingType />):</inp2:m_if></td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="ShippingCost"/></td>
</tr>
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_Insurance_Fee"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="InsuranceFee"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="vat_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_VAT"/> <inp2:ord_Field field="VATPercent"/>%:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="VAT"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="processing_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_ProcessingFee"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="ProcessingFee"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="return_total">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="la_fld_TotalReturns"/>:</td>
<td align="right" nowrap class="arial2">-<inp2:ord_Field field="ReturnTotal"/></td>
</tr>
</inp2:m_DefineElement>
<inp2:ord_PrintTotals
shipping_render_as="shipping_total"
processing_render_as="processing_total"
vat_render_as="vat_total"
return_render_as="return_total"/>
<inp2:m_if check="ord_Field" field="GiftCertificateId">
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="!la_fld_Gift_Certificate_Number!"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateCode"/></td>
</tr>
<tr>
<td align="right" nowrap colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">4<inp2:m_else/>3</inp2:m_if>" class="order-totals-name"><inp2:m_Phrase label="!la_fld_Gift_Certificate_Amount_Applied!"/>:</td>
<td align="right" nowrap class="arial2"><inp2:ord_Field field="GiftCertificateDiscount"/></td>
</tr>
</inp2:m_if>
<tr>
<td align="right" colspan="<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders">3<inp2:m_else/>2</inp2:m_if>">&nbsp;</td>
<td align="right"><span class="order_preview_field_name">Total:</span></td>
<td align="right" nowrap><span class="order_preview_field_name"><inp2:ord_Field field="TotalAmount"/></span></td>
</tr>
<inp2:m_if check="ord_HasOriginalAmount" >
<tr>
<td align="right"<inp2:m_if check="m_GetConfig" name="ShowProductImagesInOrders"> colspan="2"</inp2:m_if>>&nbsp;</td>
<td align="right" colspan="2" nowrap><span class="order_preview_field_name"><inp2:m_Phrase label="la_fld_OriginalAmount"/>:</span></td>
<td align="right" nowrap <span class="order_preview_field_name"><inp2:ord_Field field="OriginalAmount"/></span></td>
</tr>
</inp2:m_if>
</table>
</td>
</tr>
</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_edit_preview.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.20.2.4
\ No newline at end of property
+1.20.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_edit_shipping.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_edit_shipping.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_edit_shipping.tpl (revision 11549)
@@ -1,214 +1,222 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="820" height="570"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_edit_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" title_preset="orders_edit_shipping" module="in-commerce" icon="icon46_orders"/>
+<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() {
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"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <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:ord_SaveWarning name="grid_save_warning"/>
+<inp2:ord_ErrorWarning name="form_error_warning"/>
- <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>
+<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>
- </inp2:m_DefineElement>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td class="text" valign="top">
- <inp2:m_Phrase label="la_fld_ShippingOptions"/>
- </td>
- <td colspan="2">
- <inp2:ord_PredefinedOptions field="ShippingOption" block="order_option" selected="checked" />
- </td>
- </tr>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td class="text" valign="top">
- <inp2:m_Phrase label="la_fld_ShippingType"/>
- </td>
- <td colspan="2">
- <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="table-color1" even="table-color2"/>">
- <td class="text" valign="top">
- <inp2:m_Phrase label="la_fld_ShippingType"/>:
- </td>
- <td colspan="2">
- <inp2:ord_PrintShippings block="order_shipment_label"/>
- </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:m_RenderElement name="inp_label" prefix="ord" field="ShippingCost" title="!la_fld_ShippingCost!" size="10" format="$ %.2f"/>
+ <inp2:ord_PrintShippings block="order_shipment"/>
+ </table>
+ </td>
+ </tr>
- <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_RenderElement name="inp_edit_box" 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_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCost" title="!la_fld_ShippingCost!" size="10"/>
- </inp2:m_if>
+ <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_RenderElement name="inp_edit_box" 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>
-</table>
<input type="hidden" name="to_tab" value="Shipping">
<input type="hidden" name="check_shipping_address" value="true" />
-<inp2:m_include t="incs/footer"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_edit_shipping.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13.2.2
\ No newline at end of property
+1.13.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/order_blocks.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/order_blocks.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/order_blocks.tpl (revision 11549)
@@ -1,48 +1,19 @@
-<inp2:m_if check="m_ModuleEnabled" module="proj-base">
- <inp2:m_Set design="grid_block_platform"/>
-<inp2:m_else/>
- <inp2:m_Set design="grid_block"/>
-</inp2:m_if>
-
-<inp2:m_DefineElement name="grid_block">
- <td valign="top" class="text">
- <inp2:m_Param name="content"/>
- </td>
-</inp2:m_DefineElement>
-
-<inp2:m_DefineElement name="grid_block_platform">
- <inp2:m_Param name="content"/>
-</inp2:m_DefineElement>
-
<inp2:m_DefineElement name="grid_ordernumber_td">
- <inp2:m_Get name="design" result_to_var="design"/>
- <inp2:m_RenderElement design="{$design}" pass_params="1">
- <a href="javascript:edit();"><inp2:Field field="$field" grid="$grid"/></a>
- </inp2:m_RenderElement>
+ <a href="javascript:edit();"><inp2:Field field="$field" grid="$grid"/></a>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_userlink_td">
- <inp2:m_Get name="design" result_to_var="design"/>
- <inp2:m_RenderElement design="$design" pass_params="1">
- <inp2:m_if check="UserFound" user_field="$user_field">
- <a href="<inp2:UserLink user_field="$user_field"/>" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" grid="$grid"/></a>
- <inp2:m_else/>
- <inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/>
- </inp2:m_if>
- </inp2:m_RenderElement>
+ <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_previewlink_td">
- <inp2:m_Get name="design" result_to_var="design"/>
- <inp2:m_RenderElement design="$design" pass_params="1">
- <a href="<inp2:OrderLink edit_template="in-commerce/orders/orders_edit_preview"/>" title="<inp2:m_phrase name="la_Order_Preview"/>"><inp2:Field field="$field" grid="$grid"/></a>
- </inp2:m_RenderElement>
+ <a href="<inp2:OrderLink edit_template="in-commerce/orders/orders_edit_preview"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Order_Preview"/>"><inp2:Field field="$field" grid="$grid"/></a>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_billinglink_td">
- <inp2:m_Get name="design" result_to_var="design"/>
- <inp2:m_RenderElement design="$design" pass_params="1">
- <a href="<inp2:OrderLink edit_template="in-commerce/orders/orders_edit_billing"/>" title="<inp2:m_phrase name="la_Order_Billing_Information"/>"><inp2:Field field="$field" grid="$grid"/></a>
- </inp2:m_RenderElement>
-</inp2:m_DefineElement>
-
+ <a href="<inp2:OrderLink edit_template="in-commerce/orders/orders_edit_billing"/>" onclick="return direct_edit('<inp2:m_Param name="PrefixSpecial"/>', this.href);" title="<inp2:m_phrase name="la_Order_Billing_Information"/>"><inp2:Field field="$field" grid="$grid"/></a>
+</inp2:m_DefineElement>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/order_blocks.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_incomplete_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_incomplete_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_incomplete_list.tpl (revision 11549)
@@ -1,79 +1,80 @@
<inp2:m_include t="incs/header"/>
-
-<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_incomplete" tabs="in-commerce/orders/orders_list_tabs"/>
+<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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_incomplete_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.15.2.2
\ No newline at end of property
+1.15.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_print.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_print.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_print.tpl (revision 11549)
@@ -1,10 +1,17 @@
<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="window.print();">
+ <script type="text/javascript">
+ $(document).ready(
+ function() {
+ set_window_title('Orders Print');
+ }
+ )
+ </script>
+
<inp2:m_include t="in-commerce/orders/orders_blocks"/>
-
+
<inp2:ord_PrintList block="order_print_element"/>
-
-<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_print.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.2.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_returns_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_returns_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_returns_list.tpl (revision 11549)
@@ -1,61 +1,56 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" module="in-commerce" title_preset="orders_returns" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.returns" section="in-commerce:orders" title_preset="orders_returns" 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.returns]',1);
std_edit_item('ord.returns', 'in-commerce/orders/orders_edit');
}
var a_toolbar = new ToolBar();
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 ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
submit_event('ord.returns','OnMassOrderArchive');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.returns', '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.returns" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.returns" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.returns" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.returns'].SetDependantToolbarButtons( new Array('edit','delete', 'deny', 'clone','archive','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','processed');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_returns_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.2
\ No newline at end of property
+1.1.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_search_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_search_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_search_list.tpl (revision 11549)
@@ -1,195 +1,71 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_search" tabs="in-commerce/orders/orders_list_tabs"/>
+<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('search', '<inp2:m_phrase label="la_ToolTip_Search" escape="1"/>',
- function() {
- submit_event('ord.sitem','OnSearch');
- } ) );
-
- a_toolbar.AddButton( new ToolBarButton('search_reset', '<inp2:m_phrase label="la_ToolTip_SearchReset" escape="1"/>',
- function() {
- submit_event('ord.search','OnSearchReset');
- } ) );
-
-
- a_toolbar.AddButton( new ToolBarSeparator('sep1') );
-
a_toolbar.AddButton( new ToolBarButton('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_template', 'in-commerce/orders/export/export');
set_hidden_field('export_finish_t', 'in-commerce/orders/export/export_finish');
set_hidden_field('export_progress_t', 'in-commerce/orders/export/export_progress');
- submit_event('ord.search', 'OnExport');
+ 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();
-
- function toggle_filters() {
- var $div = document.getElementById('order_search_filters');
- var $show = $div.style.display == 'none';
-
- $div.style.display = $show ? '' : 'none';
- var $filters_header = document.getElementById('search_filters');
- if ($show) {
- $filters_header.innerHTML = $filters_header.title = '<inp2:m_Phrase name="la_Hide" js_escape="1"/>';
- }
- else {
- $filters_header.innerHTML = $filters_header.title = '<inp2:m_Phrase name="la_Show" js_escape="1"/>';
- }
-
- if (GridScrollers['ord.search']) {
- GridScrollers['ord.search'].RefreshPos();
- GridScrollers['ord.search'].Resize( GridScrollers['ord.search'].GetAutoSize('auto') );
- }
- }
</script>
</td>
+
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="ord.search" grid="Search"/>
</tr>
</tbody>
</table>
-<!--<a href="javascript:show_hide();">show/hide</a>-->
-<table class="edit-form">
- <tr class="subsectiontitle">
- <td colspan="3">
- <inp2:m_phrase label="la_section_SearchFields"/> (<a class="config-header" href="#" onclick="toggle_filters(); return false;" id="search_filters" title="<inp2:m_Phrase name='la_Hide'/>"><inp2:m_Phrase name="la_Hide"/></a>)
- </td>
- </tr>
-</table>
-
-<div id="order_search_filters" style="overflow: auto; height: 200px;">
- <div>
- <table class="edit-form">
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="OrderSearchId" title="!la_fld_OrderId!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="OrderNumber" title="!la_fld_OrderNumber!"/>
-
- <inp2:m_RenderElement name="inp_edit_options" prefix="ord.sitem" field="Status" title="!la_fld_Status!" has_empty="1" empty_value="-1"/>
-
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="ord.sitem" field="FromDateTime" title="!la_fld_FromDateTime!"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="ord.sitem" field="ToDateTime" title="!la_fld_ToDateTime!"/>
-
- <script type="text/javascript">
- function updateTimeFrame(option) {
- from_date = '';
- to_date = '';
- if (option == 'last_week') {
- from_date = '<inp2:adm_TimeFrame type="last_week_start" format="_regional_InputDateFormat"/>';
- to_date = '<inp2:adm_TimeFrame type="last_week_end" format="_regional_InputDateFormat"/>';
- }
-
- if (option == 'last_month') {
- from_date = '<inp2:adm_TimeFrame type="last_month_start" format="_regional_InputDateFormat"/>';
- to_date = '<inp2:adm_TimeFrame type="last_month_end" format="_regional_InputDateFormat"/>';
- }
-
- if (option == 'last_quater') {
- from_date = '<inp2:adm_TimeFrame type="last_quater_start" format="_regional_InputDateFormat"/>';
- to_date = '<inp2:adm_TimeFrame type="last_quater_end" format="_regional_InputDateFormat"/>';
- }
-
- if (option == 'last_6months') {
- from_date = '<inp2:adm_TimeFrame type="last_6_months_start" format="_regional_InputDateFormat"/>';
- to_date = '<inp2:adm_TimeFrame type="last_month_end" format="_regional_InputDateFormat"/>';
- }
-
- if (option == 'last_year') {
- from_date = '<inp2:adm_TimeFrame type="last_year_start" format="_regional_InputDateFormat"/>';
- to_date = '<inp2:adm_TimeFrame type="last_year_end" format="_regional_InputDateFormat"/>';
- }
-
-
- document.getElementById('<inp2:ord.sitem_InputName field="FromDateTime_date"/>').value = from_date;
- document.getElementById('<inp2:ord.sitem_InputName field="ToDateTime_date"/>').value = to_date;
- }
- </script>
-
- <inp2:m_DefineElement name="timeframe_element">
- <select id="timeframe" onchange="updateTimeFrame(this.value)">
- <option value=""></option>
- <option value="last_week"><inp2:m_Phrase label="lu_comm_LastWeek"/></option>
- <option value="last_month"><inp2:m_Phrase label="lu_comm_LastMonth"/></option>
- <option value="last_quater"><inp2:m_Phrase label="lu_comm_LastQuater"/></option>
- <option value="last_6months"><inp2:m_Phrase label="lu_comm_Last6Months"/></option>
- <option value="last_year"><inp2:m_Phrase label="lu_comm_LastYear"/></option>
- </select>
- </inp2:m_DefineElement>
-
- <inp2:m_if check="m_ModuleEnabled" module="proj-base">
- <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>" style="height: auto">
- <td class="label-cell" valign="top">
- <inp2:m_Phrase label="la_comm_Timeframe"/>
- </td>
- <td class="control-mid">&nbsp;</td>
- <td class="control-cell">
- <inp2:m_RenderElement name="timeframe_element"/>
- </td>
- </tr>
- <inp2:m_else/>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td class="text"><inp2:m_Phrase label="la_comm_Timeframe"/></td>
- <td>
- <inp2:m_RenderElement name="timeframe_element"/>
- </td>
- <td>&nbsp;</td>
- </tr>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="inp_edit_user" prefix="ord.sitem" field="Username" title="!la_fld_Username!" old_style="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="CustomerName" title="!la_fld_CustomerName!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="FromAmount" title="!la_fld_FromAmount!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="ToAmount" title="!la_fld_ToAmount!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="PaymentAccount" title="!la_fld_CreditCardNumber!"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="ord.sitem" field="AffiliateUser" title="!la_fld_AffiliateUser!" old_style="1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="ord.sitem" field="OrderIP" title="!la_fld_OrderIP!"/>
- <inp2:m_RenderElement name="inp_edit_filler"/>
- </table>
- </div>
-</div>
-<table class="edit-form">
- <inp2:m_RenderElement name="subsection" title="!la_section_SearchResults!"/>
-</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="ord.search" IdField="OrderId" grid="Search" no_toolbar="no_toolbar" 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
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_search_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.18.2.4
\ No newline at end of property
+1.18.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/orders_toship_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/orders_toship_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/orders_toship_list.tpl (revision 11549)
@@ -1,77 +1,72 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-
-<inp2:m_include t="in-commerce/orders/orders_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="ord" module="in-commerce" title_preset="orders_toship" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord.toship" section="in-commerce:orders" title_preset="orders_toship" 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.toship]',1);
std_edit_item('ord.toship', 'in-commerce/orders/orders_edit');
}
-
+
var a_toolbar = new ToolBar();
-
+
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.toship]',1);
submit_event('ord.toship','OnMassClone');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('ship', '<inp2:m_phrase label="la_ToolTip_Ship" escape="1"/>', function() {
submit_event('ord.toship','OnMassOrderShip');
}
- ) );
-
+ ) );
+
a_toolbar.AddButton( new ToolBarButton('deny', '<inp2:m_phrase label="la_ToolTip_Deny" escape="1"/>', function() {
submit_event('ord.toship','OnMassOrderDeny');
}
) );
-
+
a_toolbar.AddButton( new ToolBarButton('archive', '<inp2:m_phrase label="la_ToolTip_Archive" escape="1"/>', function() {
submit_event('ord.toship','OnMassOrderArchive');
}
) );
-
+
a_toolbar.AddButton( new ToolBarSeparator('sep4') );
-
+
a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
print_orders('ord.toship', '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.toship" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_RenderElement name="grid" PrefixSpecial="ord.toship" IdField="OrderId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="ord.toship" IdField="OrderId" grid="Default"/>
<script type="text/javascript">
Grids['ord.toship'].SetDependantToolbarButtons( new Array('edit','delete','clone','ship','deny','archive','print') );
</script>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_hidden_field('order_type','toship');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/orders_toship_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/orders/order_product_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/orders/order_product_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/orders/order_product_edit.tpl (revision 11549)
@@ -1,150 +1,159 @@
-<inp2:m_RequireLogin permissions="in-commerce:orders.view" system="1"/>
-<inp2:m_include t="incs/header" body_properties=" style='margin: 0px 8px 0px 8px' "/>
+<inp2:adm_SetPopupSize width="820" height="570"/>
-<inp2:m_RenderElement name="section_header" prefix="ord" icon="icon46_orders" module="in-commerce" title="!la_title_Orders!"/>
-<inp2:m_RenderElement name="blue_bar" prefix="ord" title_preset="orders_product_edit" module="in-commerce" icon="icon46_orders"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_product_edit"/>
+
+<inp2:m_SetParam use_grid="0"/>
+<inp2:m_if check="p_ShouldListOptions">
+ <inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
+ <inp2:m_SetParam use_grid="1"/>
+ </inp2:m_if>
+</inp2:m_if>
<!-- 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() {
if (Grids['poc']) {
if (Grids['poc'].SelectedCount == 0) {
return;
}
set_hidden_field('qty[<inp2:p_Field name="ProductId"/>]['+Grids['poc'].GetSelected()[0]+']',1)
}
submit_event('ord','<inp2:m_if check="orditems_IsNewItem">OnAddToCart<inp2:m_else/>OnUpdateItemOptions</inp2:m_if>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('orditems','OnCancel');
}
) );
- a_toolbar.Render();
+
+ <inp2:m_if check="m_Param" name="use_grid">
+ 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');
+ }
+ ) );
+ </inp2:m_if>
+
+ a_toolbar.Render();
</script>
</td>
+
+ <inp2:m_if check="m_Param" name="use_grid">
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="poc" grid="Radio"/>
+ </inp2:m_if>
</tr>
</tbody>
</table>
<inp2:m_if check="p_ShouldListOptions">
- <input type="hidden" name="p_id" value="<inp2:p_Field name="ProductId"/>">
+ <input type="hidden" name="p_id" value="<inp2:p_Field name='ProductId'/>">
<inp2:m_if check="p_OptionsHaveError">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="table_border_<inp2:m_if check="m_ParamEquals" name="no_toolbar" value="no_toolbar" >nobottom<inp2:m_else/>notop</inp2:m_if>">
<tr>
<td valign="top" class="hint_red">
<inp2:p_OptionsError required="lu_comm_OptionsRequired" not_available="lu_comm_OptionsNotAvailable"/>
</td>
</tr>
</table>
</inp2:m_if>
<inp2:m_if check="p_FieldEquals" field="OptionsSelectionMode" value="1"> <!-- Listable options (combinations) -->
-
<script type="text/javascript">
- function edit()
- {
+ function edit() {
set_hidden_field('qty[<inp2:p_Field name="ProductId"/>]['+Grids['poc'].GetSelected()[0]+']',1)
submit_event('ord','<inp2:m_if check="orditems_IsNewItem">OnAddToCart<inp2:m_else/>OnUpdateItemOptions</inp2:m_if>');
}
</script>
<inp2:m_DefineElement name="combination_option_element">
<strong><inp2:m_Param name="option_name" />: </strong>
<inp2:m_Param name="option_value" /><inp2:m_if check="m_ParamEquals" param="is_last" value="1"><inp2:m_else/>, </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_combination_td">
- <td>
- <table border="0" cellpadding="0" cellspacing="0" class="grid_id_cell">
- <tr>
- <td>
- <input type="radio" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- </td>
- <td><inp2:ShowCombination render_as="combination_option_element"/></td>
- </tr>
- </table>
- </td>
+ <inp2:ShowCombination render_as="combination_option_element"/>
</inp2:m_DefineElement>
- <inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc" IdField="CombinationId" grid="Radio" menu_filters="yes"/>
- <script type="text/javascript">
- Grids['poc'].SetDependantToolbarButtons( new Array('delete') );
- </script>
-
- <br/>
+ <inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc" IdField="CombinationId" grid="Radio"/>
<inp2:m_else/> <!-- Selectable options -->
<inp2:m_DefineElement name="option_select_element">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><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></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_cb_element">
<input type="checkbox" <inp2:m_param name="selected"/>
name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>][]"
id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
value="<inp2:m_param name="id"/>" />
<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
<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>&nbsp;&nbsp;
</label>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_radio_element">
<input type="radio" <inp2:m_param name="selected"/>
name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"
id="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
value="<inp2:m_param name="id"/>" />
<label for="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>">
<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>&nbsp;&nbsp;
</label>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_element">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <inp2:Field name="Name"/><inp2:m_if check="FieldEquals" field="Required" value="1"><span class="error">*</span></inp2:m_if> :
+ <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:Field name="Name"/><inp2:m_if check="FieldEquals" field="Required" value="1"><span class="error">*</span></inp2:m_if>:
</td>
- <td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
<inp2:m_if check="FieldEquals" field="OptionType" value="1"> <!-- drop-down -->
<select name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]">
<option value=""></option>
<inp2:ShowOptions render_as="option_select_element" currency="selected" preselect_first="1"/>
</select>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="5"> <!-- editbox -->
<input type="text" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]" value="<inp2:OptionData/>"/>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="4"> <!-- textarea -->
<textarea cols="50" rows="5" name="options[<inp2:p_Field name="ProductId"/>][<inp2:Field name="ProductOptionId"/>]"><inp2:OptionData/></textarea>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="6"> <!-- checkboxeS -->
<inp2:ShowOptions render_as="option_cb_element" currency="selected"/>
</inp2:m_if>
<inp2:m_if check="FieldEquals" field="OptionType" value="3"> <!-- radio buttons -->
<inp2:ShowOptions render_as="option_radio_element" currency="selected" preselect_first="1"/>
</inp2:m_if>
</td>
- <td class="error">&nbsp;</td>
</tr>
</inp2:m_DefineElement>
- <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!lu_comm_SelectOptions!"/>
-
- <inp2:p_ListOptions no_table="1" per_page="-1" render_as="option_element" row_start_render_as="html:" row_end_render_as="html:"/>
- </table>
- <br/>
+ <div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!lu_comm_SelectOptions!"/>
+
+ <inp2:p_ListOptions no_table="1" per_page="-1" render_as="option_element" row_start_render_as="html:" row_end_render_as="html:"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+ </div>
</inp2:m_if>
+<inp2:m_else/>
+ Product Doesn't Use Options.
</inp2:m_if>
-
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/orders/order_product_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5.2.2
\ No newline at end of property
+1.5.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payments/payments_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payments/payments_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payments/payments_list.tpl (revision 11549)
@@ -1,69 +1,48 @@
-<inp2:m_RequireLogin permissions="in-commerce:paymentlog.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="apayments" icon="icon46_payment_log" module="in-commerce" title="!la_title_PaymentLog!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="apayments" title_preset="payments_log" module="in-commerce" icon="icon46_payment_log"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="apayments.log" section="in-commerce:paymentlog" title_preset="payments_log"/>
<!-- 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('refresh', '<inp2:m_phrase label="la_ToolTip_Refresh" escape="1"/>', function() {
window.location.href = window.location.href;
}
) );
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();
-
+
function edit()
{
// required for correct row selection
- }
-
+ }
</script>
</td>
+
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="apayments.log" grid="Log"/>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="grid_userlink_checkbox_td" format="">
- <td valign="top" class="text">
- <table border="0" cellpadding="0" cellspacing="0" class="grid_id_cell">
- <tr>
- <td><input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>"></td>
- <td><img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>"></td>
- <td><a href="<inp2:UserLink/>" title="<inp2:m_phrase name="la_Edit_User"/>"><inp2:Field field="$field" no_special="no_special" grid="$grid" format="$format"/></a></td>
- </tr>
- </table>
- </td>
-</inp2:m_DefineElement>
-
-<inp2:adm_SaveReturnScript/>
-
-<inp2:m_DefineElement name="grid_cutted_box_td">
- <td valign="top" class="text">
- <inp2:{$PrefixSpecial}_field field="$field" cut_first="50"/>
- </td>
+<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_DefineElement name="grid_currency_td" format="" no_special="" >
- <td valign="top" class="text"><inp2:{$PrefixSpecial}_field field="$field" grid="$grid" no_special="$no_special" format="$format" currency="selected" /></td>
+<inp2:m_DefineElement name="grid_currency_td" format="" no_special="">
+ <inp2:Field field="$field" grid="$grid" no_special="$no_special" format="$format" currency="selected" />
</inp2:m_DefineElement>
-<inp2:m_RenderElement name="grid" PrefixSpecial="apayments.log" IdField="AffiliatePaymentId" grid="Log" header_block="grid_column_title" data_block="grid_data_td" search="on" main_special=""/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="apayments.log" IdField="AffiliatePaymentId" grid="Log" main_special=""/>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/payments/payments_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/currencies/currencies_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/currencies/currencies_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/currencies/currencies_edit.tpl (revision 11549)
@@ -1,117 +1,117 @@
-<inp2:m_RequireLogin permissions="in-commerce:currencies.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="curr" icon="icon46_currencies" module="in-commerce" title="!la_title_Currencies!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="curr" title_preset="currencies_edit" module="in-commerce" icon="icon46_currencies"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="curr" section="in-commerce:currencies" title_preset="currencies_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() {
submit_event('curr','<inp2:curr_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('curr','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('curr', '<inp2:curr_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('curr', '<inp2:curr_NextId/>');
}
) );
-
+
a_toolbar.Render();
-
+
<inp2:m_if check="curr_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
- <inp2:m_else/>
+ <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>
+ </inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:curr_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_Currency!"/>
- <inp2:m_RenderElement name="inp_label" prefix="curr" field="CurrencyId" title="!la_fld_CurrencyId!"/>
- <inp2:m_RenderElement name="inp_label" prefix="curr" field="ISO" title="!la_fld_ISOCode!"/>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="curr" field="RateToPrimary" title="!la_fld_RateToPrimary!" />
- <td>
- <input type="text" name="<inp2:curr_InputName field="RateToPrimary"/>" id="<inp2:curr_InputName field="RateToPrimary"/>" value="<inp2:curr_Field field="RateToPrimary"/>" size="10">
- <input type="button" class="button" onclick="submit_event('curr', 'OnUpdateRate')" value="<inp2:m_phrase label="la_UpdateRate"/>">
- <span class="small">1 <inp2:curr_Field field="ISO"/> = ? <inp2:curr_PrimaryCurrencyISO /></span>
- </td>
- <td class="error"><inp2:curr_Error field="RateToPrimary"/>&nbsp;</td>
- </tr>
-
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="curr" field="Symbol" title="!la_fld_CurrencySymbol!"/>
- <td>
- <input type="text" name="<inp2:curr_InputName field="Symbol"/>" id="<inp2:curr_InputName field="Symbol"/>" value="<inp2:curr_Field field="Symbol"/>" tabindex="<inp2:m_get param="tab_index"/>" size="10">
- <span class="small"><inp2:m_phrase label="la_ISOUsedIfBlank" /></span>
- </td>
- <td class="error"><inp2:curr_Error field="Symbol"/>&nbsp;</td>
- </tr>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="curr" field="SymbolPosition" title="!la_fld_CurrencySymbolPosition!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="curr" field="Name" title="!la_fld_CurrencyName!" size="40"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="curr" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="curr" field="Status" title="!la_fld_Enabled!" onchange="check_primary()"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="curr" field="Priority" title="!la_fld_Priority!" size="5"/>
-</table>
+<inp2:curr_ErrorWarning name="form_error_warning"/>
-<script type="text/javascript">
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_Currency!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="curr" field="CurrencyId" title="!la_fld_CurrencyId!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="curr" field="ISO" title="!la_fld_ISOCode!"/>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="curr" field="RateToPrimary" title="!la_fld_RateToPrimary!" />
+ <td class="control-cell">
+ <input type="text" name="<inp2:curr_InputName field="RateToPrimary"/>" id="<inp2:curr_InputName field="RateToPrimary"/>" value="<inp2:curr_Field field="RateToPrimary"/>" size="10">
+ <input type="button" class="button" onclick="submit_event('curr', 'OnUpdateRate')" value="<inp2:m_phrase label="la_UpdateRate"/>">
+ <span class="small">1 <inp2:curr_Field field="ISO"/> = ? <inp2:curr_PrimaryCurrencyISO /></span>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="curr" field="RateToPrimary"/>
+ </tr>
+
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <inp2:m_RenderElement name="inp_edit_field_caption" prefix="curr" field="Symbol" title="!la_fld_CurrencySymbol!"/>
+ <td class="control-cell">
+ <input type="text" name="<inp2:curr_InputName field="Symbol"/>" id="<inp2:curr_InputName field="Symbol"/>" value="<inp2:curr_Field field="Symbol"/>" tabindex="<inp2:m_get param="tab_index"/>" size="10">
+ <span class="small"><inp2:m_phrase label="la_ISOUsedIfBlank" /></span>
+ <inp2:curr_Error field="Symbol"/>
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="curr" field="Symbol"/>
+ </tr>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="curr" field="SymbolPosition" title="!la_fld_CurrencySymbolPosition!"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="curr" field="Name" title="!la_fld_CurrencyName!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="curr" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="curr" field="Status" title="!la_fld_Enabled!" onchange="check_primary()"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="curr" field="Priority" title="!la_fld_Priority!" size="5"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<script type="text/javascript">
if(document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').checked)
{
document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').disabled = true;
document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][Status]').disabled = true;
}
function check_status()
{
if(document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').checked)
{
document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][Status]').checked = true;
document.getElementById('<inp2:curr_InputName field="Status"/>').value = 1;
}
}
-
+
function check_primary()
{
if(!document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][Status]').checked)
{
document.getElementById('_cb_curr[<inp2:curr_field field="CurrencyId" />][IsPrimary]').checked = false;
document.getElementById('<inp2:curr_InputName field="IsPrimary"/>').value = 0;
}
}
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/currencies/currencies_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl (revision 11549)
@@ -1,124 +1,118 @@
-<inp2:m_RequireLogin permissions="in-commerce:currencies.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="section_header" prefix="curr" icon="icon46_currencies" module="in-commerce" title="!la_title_Currencies!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="curr" title_preset="currencies_list" module="in-commerce" icon="icon46_currencies"/>
+<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() {
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() {
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:{$PrefixSpecial}_field field="$field" grid="$grid"/>
- <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
+ <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" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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') );
</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
Property changes on: branches/RC/in-commerce/admin_templates/currencies/currencies_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6.2.1
\ No newline at end of property
+1.6.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/export_progress.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/export_progress.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/export_progress.tpl (revision 11549)
@@ -1,21 +1,16 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<script language="javascript" src="incs/ajax.js"></script>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.export" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" title_preset="products_export"/>
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_tool_export" module="in-portal" title="!la_title_ProductsExport!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p.export" title_preset="products_export" module="in-portal" icon="icon46_tool_export"/>
<inp2:m_RenderElement name="ajax_progress_bar" cancel_action="cancel_action();"/>
<script type="text/javascript">
function cancel_action() {
submit_event('p.export', 'OnExportCancel');
}
$ProductExport = new AjaxProgressBar('<inp2:m_t t="dummy" p.export_event="OnExportProgress" pass="m,p.export" js_escape="1"/>');
</script>
-<inp2:m_include t="incs/footer"/>
-
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/export_progress.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_tabs.tpl (nonexistent)
@@ -1,44 +0,0 @@
-<inp2:m_include template="incs/grid_blocks"/>
-
-<inp2:m_DefineElement name="product_tabs">
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/products/products_edit" main_prefix="p"/>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
- <inp2:m_RenderElement name="tab" title="la_tab_Inventory" t="in-commerce/products/products_inventory" main_prefix="p"/>
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="2" >
- <inp2:m_RenderElement name="tab" title="la_tab_AccessAndPricing" t="in-commerce/products/products_access" main_prefix="p"/>
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
- <inp2:m_RenderElement name="tab" title="la_tab_Pricing" t="in-commerce/products/products_pricing" main_prefix="p"/>
- <inp2:m_else/>
- <!-- <inp2:m_RenderElement name="tab" title="la_tab_Pricing" t="in-commerce/products/products_access_pricing" main_prefix="p" /> -->
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="5" >
- <inp2:m_RenderElement name="tab" title="la_tab_Pricing" t="in-commerce/products/products_pricing" main_prefix="p"/>
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="4" >
- <inp2:m_RenderElement name="tab" title="la_tab_FilesAndPricing" t="in-commerce/products/products_files" main_prefix="p"/>
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="2" ><inp2:m_else/>
- <inp2:m_RenderElement name="tab" title="la_tab_Options" t="in-commerce/products/products_options" main_prefix="p"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="tab" title="la_tab_Categories" t="in-commerce/products/products_categories" main_prefix="p"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Relations" t="in-commerce/products/products_relations" main_prefix="p"/>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="5" >
- <inp2:m_RenderElement name="tab" title="la_tab_PackageContent" t="in-commerce/products/products_packagecontent" main_prefix="p"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="tab" title="la_tab_Images" t="in-commerce/products/products_images" main_prefix="p"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Reviews" t="in-commerce/products/products_reviews" main_prefix="p"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Custom" t="in-commerce/products/products_custom" main_prefix="p"/>
-</inp2:m_DefineElement>
-
-<inp2:m_RenderElement name="tabs_container" tabs_render_as="product_tabs"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_tabs.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.11.2.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/access_pricing_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/access_pricing_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/access_pricing_edit.tpl (revision 11549)
@@ -1,61 +1,62 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="pricing_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="pricing_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() {
submit_event('pr','<inp2:pr_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('pr','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_PriceBracket!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="pr" field="ProductId"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessDuration" title="!la_fld_AccessDuration!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="pr" field="AccessUnit" title="!la_fld_AccessDurationUnit!" size="20"/>
-
-<!-- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessRebillDate" title="!la_fld_AccessRebillDate!" size="5"/> -->
-
- <!-- Customization healtheconomics.org -->
-
-<!--
- <inp2:m_RenderElement name="inp_edit_radio" prefix="pr" field="DurationType" title="!la_fld_DurationType!"/>
- <inp2:m_RenderElement name="inp_edit_date" prefix="pr" field="AccessExpiration" title="!la_fld_AccessExpiration!"/>
--->
-
- <!-- //Customization healtheconomics.org -->
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Description" title="!la_fld_Description!" size="30"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Price" title="!la_fld_Price!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pr" field="IsPrimary" title="!la_fld_Primary!"/>
+<inp2:pr_SaveWarning name="grid_save_warning"/>
+<inp2:pr_ErrorWarning name="form_error_warning"/>
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_PriceBracket!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="pr" field="ProductId"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessDuration" title="!la_fld_AccessDuration!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="pr" field="AccessUnit" title="!la_fld_AccessDurationUnit!" size="20"/>
+
+ <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessRebillDate" title="!la_fld_AccessRebillDate!" size="5"/> -->
+
+ <!-- Customization healtheconomics.org -->
+
+ <!--
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="pr" field="DurationType" title="!la_fld_DurationType!"/>
+ <inp2:m_RenderElement name="inp_edit_date" prefix="pr" field="AccessExpiration" title="!la_fld_AccessExpiration!"/>
+ -->
+
+ <!-- //Customization healtheconomics.org -->
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Description" title="!la_fld_Description!" size="30"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Price" title="!la_fld_Price!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pr" field="IsPrimary" title="!la_fld_Primary!"/>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<inp2:m_if check="pr_Field" name="IsPrimary">
-<script type="text/javascript">
- document.getElementById('_cb_<inp2:pr_InputName field="IsPrimary"/>').disabled = true;
-</script>
+ <script type="text/javascript">
+ document.getElementById('_cb_<inp2:pr_InputName field="IsPrimary"/>').disabled = true;
+ </script>
</inp2:m_if>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/access_pricing_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.1
\ No newline at end of property
+1.10.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_relations.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_relations.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_relations.tpl (revision 11549)
@@ -1,108 +1,105 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="relations" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="rel" system_permission="0" 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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/products/products_relations.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_pricing_grid.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_pricing_grid.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_pricing_grid.tpl (revision 11549)
@@ -1,99 +1,100 @@
<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1"></div>
<script type="text/javascript">$BracketManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
<inp2:m_else/>
<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
if ($request_visible) {
document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
+ maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
}
<inp2:m_if check="c_SaveWarning">
document.getElementById('save_warning').style.display = 'block';
$edit_mode = true;
</inp2:m_if>
#separator#
<inp2:m_DefineElement name="pr_edit_box" >
<td>
<input type="text" size="<inp2:m_param name="size"/>" name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="pr.tang[<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="pr_edit_checkbox" >
<td>
<input type="hidden" name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]" id="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]" tabindex="<inp2:m_get param="tab_index"/>" value="<inp2:m_param name="$field"/>">
<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:m_param name="field"/>"
<inp2:m_if check="m_paramequals" param="$field" value="1" >
checked
</inp2:m_if> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]'))">
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="pr_edit_max" >
<td>
<input type="text" size="10" name="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
tabindex="<inp2:m_get param="tab_index"/>"
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_if>
>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="pr_edit_min" >
<td>
<input type="hidden" name="pr.tang[<inp2:m_param name="id"/>][PriceId]" id="pr.tang[<inp2:m_param name="id"/>][PriceId]" value="<inp2:m_param name="id"/>">
<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="pr.tang[<inp2:m_param name="id"/>][<inp2:m_param name="field"/>]"
id="pr.tang[<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>
>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="prbracket">
<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
<inp2:m_RenderElement name="pr_edit_min" IdField="$IdField" PrefixSpecial="pr.tang" field="MinQty" title="!la_fld_Title!" size="40" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_max" IdField="$IdField" PrefixSpecial="pr.tang" field="MaxQty" title="!la_fld_Title!" size="40" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="pr.tang" field="Cost" title="!la_fld_Title!" size="4" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="pr.tang" field="Price" title="!la_fld_Title!" size="4" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_box" IdField="$IdField" PrefixSpecial="pr.tang" field="Points" title="!la_fld_Title!" size="4" pass_params="true"/>
<inp2:m_RenderElement name="pr_edit_checkbox" IdField="$IdField" PrefixSpecial="pr.tang" field="Negotiated" title="!la_fld_Title!" pass_params="true"/>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="pr_grid_th" >
<td class="columntitle_small"><inp2:m_phrase label="$phrase" /></td>
</inp2:m_DefineElement>
+
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <tr nowrap="nowrap">
- <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_minqty!"/>
- <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_maxqty!"/>
- <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_cost!"/>
- <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_price!"/>
- <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_points!"/>
- <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_negotiated!"/>
- </tr>
- <inp2:pr.tang_ShowPricingForm block="prbracket" IdField="PriceId"/>
+ <tr nowrap="nowrap">
+ <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_minqty!"/>
+ <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_maxqty!"/>
+ <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_cost!"/>
+ <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_price!"/>
+ <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_points!"/>
+ <inp2:m_RenderElement name="pr_grid_th" phrase="!la_col_negotiated!"/>
+ </tr>
+ <inp2:pr.tang_ShowPricingForm block="prbracket" IdField="PriceId"/>
</table>
-
</inp2:m_if>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_pricing_grid.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/file_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/file_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/file_edit.tpl (revision 11549)
@@ -1,69 +1,70 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="file_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="file_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() {
submit_event('file','<inp2:file_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('file','OnCancel');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_File!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="file" field="ProductId"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Name" title="!la_fld_Name!" size="50" />
- <inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Version" title="!la_fld_Version!" size="10" />
- <inp2:m_RenderElement name="inp_edit_upload" prefix="file" field="RealPath" title="!la_fld_FilePath!" />
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="file" field="Status" title="!la_fld_Enabled!" onchange="check_primary()" />
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="file" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()" />
- <inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Priority" title="!la_fld_Priority!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_date" prefix="file" field="AddedOn" title="!la_fld_AddedOn!" />
-</table>
+<inp2:file_SaveWarning name="grid_save_warning"/>
+<inp2:file_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_File!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="file" field="ProductId"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Name" title="!la_fld_Name!" size="50" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Version" title="!la_fld_Version!" size="10" />
+ <inp2:m_RenderElement name="inp_edit_upload" prefix="file" field="RealPath" title="!la_fld_FilePath!" />
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="file" field="Status" title="!la_fld_Enabled!" onchange="check_primary()" />
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="file" field="IsPrimary" title="!la_fld_Primary!" onchange="check_status()" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="file" field="Priority" title="!la_fld_Priority!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_date" prefix="file" field="AddedOn" title="!la_fld_AddedOn!" />
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script type="text/javascript">
<inp2:m_if check="file_Field" name="IsPrimary">
document.getElementById('_cb_<inp2:file_InputName field="IsPrimary" />').disabled = true;
document.getElementById('_cb_<inp2:file_InputName field="Status" />').disabled = true;
</inp2:m_if>
function check_status()
{
if(document.getElementById('_cb_<inp2:file_InputName field="IsPrimary" />').checked)
{
document.getElementById('_cb_<inp2:file_InputName field="Status" />').checked = true;
document.getElementById('<inp2:file_InputName field="Status"/>').value = 1;
}
}
function check_primary()
{
if(!document.getElementById('_cb_<inp2:file_InputName field="Status" />').checked)
{
document.getElementById('_cb_<inp2:file_InputName field="IsPrimary" />').checked = false;
document.getElementById('<inp2:file_InputName field="IsPrimary"/>').value = 0;
}
}
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/file_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_access.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_access.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_access.tpl (revision 11549)
@@ -1,104 +1,104 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="access" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="rel" grid="Access" system_permission="0" title_preset="pr" 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 ToolBarSeparator('sep3') );
//Pricing related:
a_toolbar.AddButton( new ToolBarButton('in-commerce:new_pricing', '<inp2:m_phrase label="la_ToolTip_NewPricing" 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.AddButton( new ToolBarButton('in-commerce:primary_pricing', '<inp2:m_phrase label="la_ToolTip_SetPrimary" escape="1"/>', function() {
submit_event('pr','OnSetPrimary');
}
) );
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>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+<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_options" prefix="p" field="AccessGroupId" title="la_fld_AccessGroup" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
+ <!-- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="PayPalRecurring" title="la_fld_IsPayPalRecurring"/> -->
+
+ <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="AccessDuration" title="!la_fld_AccessDuration!" size="4" /> -->
+ <!-- <inp2:m_RenderElement name="inp_edit_options" prefix="p" field="AccessDurationType" title="!la_fld_AccessDurationType!" size="20"/> -->
+ <!-- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="AccessStart" title="!la_fld_AccessStart!" size="10" /> -->
+ <!-- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="AccessEnd" title="!la_fld_AccessEnd!" size="10" /> -->
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
- <inp2:m_RenderElement name="inp_edit_options" prefix="p" field="AccessGroupId" title="la_fld_AccessGroup" size="4"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
- <!-- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="PayPalRecurring" title="la_fld_IsPayPalRecurring"/> -->
-
- <inp2:m_RenderElement name="grid" PrefixSpecial="pr" IdField="PriceId" grid="Access" />
-
- <!-- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="AccessDuration" title="!la_fld_AccessDuration!" size="4" /> -->
- <!-- <inp2:m_RenderElement name="inp_edit_options" prefix="p" field="AccessDurationType" title="!la_fld_AccessDurationType!" size="20"/> -->
- <!-- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="AccessStart" title="!la_fld_AccessStart!" size="10" /> -->
- <!-- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="AccessEnd" title="!la_fld_AccessEnd!" size="10" /> -->
-</table>
+<inp2:m_RenderElement name="grid" PrefixSpecial="pr" IdField="PriceId" grid="Access" />
<script type="text/javascript">
Grids['pr'].SetDependantToolbarButtons( new Array('edit','delete', 'primary_pricing') );
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_access.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.16.2.1
\ No newline at end of property
+1.16.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_files.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_files.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_files.tpl (revision 11549)
@@ -1,133 +1,129 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="files" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="po" system_permission="0" 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"/>',
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>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <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="subsection" title="!la_section_Files!"/>
-</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="">
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath module="$module"/>img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">
- <inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/><span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
- </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="file" IdField="FileId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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
Property changes on: branches/RC/in-commerce/admin_templates/products/products_files.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.14.2.4
\ No newline at end of property
+1.14.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_images.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_images.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_images.tpl (revision 11549)
@@ -1,110 +1,107 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<inp2:m_include t="incs/image_blocks"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="rel" system_permission="0" title_preset="images" tab_preset="Default"/>
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="images" module="in-commerce" icon="icon46_products"/>
+<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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/products/products_images.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11.2.1
\ No newline at end of property
+1.11.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/shipping_options.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/shipping_options.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/shipping_options.tpl (revision 11549)
@@ -1,78 +1,78 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="shipping_options" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="shipping_options"/>
<!-- 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:p_InputName field="ShippingLimitation"/>').value = select_to_string('selected_types');
submit_event('p','OnPreSavePopup');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.Render();
-
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Properties!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="p" field="ShippingLimitation"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="ShippingMode" title="!la_fld_ShippingMode!"/>
-
- <tr class="table-color2">
- <td style="width: 250px">
- <inp2:m_phrase label="la_fld_ShippingTypes"/>:
- </td>
- <td>
+<inp2:p_SaveWarning name="grid_save_warning"/>
+<inp2:p_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Properties!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="p" field="ShippingLimitation"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="ShippingMode" title="!la_fld_ShippingMode!"/>
+
+ <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_ShippingTypes"/>:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
<table>
<tr>
<td>
<inp2:m_DefineElement name="shipping_type">
<option value="<inp2:m_param name="_Id"/>"><inp2:m_param name="_Name"/></option>
</inp2:m_DefineElement>
- <inp2:m_phrase label="la_fld_AllowedShippingTypes"/>
+ <inp2:m_phrase label="la_fld_AllowedShippingTypes"/><br />
<select id="selected_types" multiple="multiple" size="20" style="width: 200px">
<inp2:p_ListShippingTypes mode="selected" render_as="shipping_type"/>
</select>
</td>
<td align="center">
<input type="button" value="&nbsp;&laquo;&laquo;&nbsp;" onclick="move_selected('available_types', 'selected_types'); select_sort('selected_types')" 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_types', 'available_types'); select_sort('available_types');" class="button">
</td>
<td>
- <inp2:m_phrase label="la_fld_AvailableShippingTypes"/>
-
+ <inp2:m_phrase label="la_fld_AvailableShippingTypes"/><br />
<select id="available_types" multiple="multiple" size="20" style="width: 200px">
<inp2:p_ListShippingTypes render_as="shipping_type"/>
</select>
</td>
</tr>
</table>
+ </td>
+ </tr>
- </td>
- <td>&nbsp;</td>
- </tr>
-
-</table>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/shipping_options.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7.2.2
\ No newline at end of property
+1.7.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_custom.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_custom.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_custom.tpl (revision 11549)
@@ -1,67 +1,66 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="products_custom" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" grid="SeparateTab" permission_type="VIEW" pagination="1" pagination_prefix="rel" system_permission="0" title_preset="products_custom" 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') );
function edit(){ }
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="cf" grid="SeparateTab"/>
</tr>
</tbody>
</table>
<inp2:m_include t="incs/custom_blocks"/>
-<inp2:m_RenderElement name="grid" PrefixSpecial="cf" IdField="CustomFieldId" SourcePrefix="p" value_field="Value" per_page="-1" grid="SeparateTab" header_block="grid_column_title_no_sorting" data_block="grid_data_td" no_init="no_init"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="cf" IdField="CustomFieldId" SourcePrefix="p" value_field="Value" per_page="-1" grid="SeparateTab" header_block="grid_column_title_no_sorting" no_init="no_init"/>
+
+<input type="hidden" name="cf_type" value="<inp2:p_UnitOption name='ItemType'/>"/>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_custom.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13.2.1
\ No newline at end of property
+1.13.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_list.tpl (revision 11549)
@@ -1,73 +1,70 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="product_list" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" pagination="1" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" 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"/>',
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_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" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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
Property changes on: branches/RC/in-commerce/admin_templates/products/products_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7
\ No newline at end of property
+1.7.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_access_pricing.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_access_pricing.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_access_pricing.tpl (revision 11549)
@@ -1,90 +1,85 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="access_pricing" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="pr" grid="Access" system_permission="0" 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"/>',
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">
- <td valign="top" class="text" align="center">
- <input disabled type="checkbox" <inp2:{$PrefixSpecial}_field field="$field" checked="checked"/> >
- </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" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<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"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_access_pricing.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/pricing_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/pricing_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/pricing_edit.tpl (revision 11549)
@@ -1,71 +1,44 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="pricing_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="pricing_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() {
submit_event('pr','<inp2:pr_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('pr','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('pr', '<inp2:pr_PrevId/>');
- }
- ) );
- a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
- go_to_id('pr', '<inp2:pr_NextId/>');
- }
- ) );
- */
- //a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
-
- <inp2:m_if check="pr_IsSingle" >
- a_toolbar.HideButton('prev');
- a_toolbar.HideButton('next');
- a_toolbar.HideButton('sep1');
- //a_toolbar.HideButton('sep2');
- <inp2:m_else/>
- <inp2:m_if check="pr_IsLast" >
- a_toolbar.DisableButton('next');
- </inp2:m_if>
- <inp2:m_if check="pr_IsFirst" >
- a_toolbar.DisableButton('prev');
- </inp2:m_if>
- </inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_PriceBracket!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="pr" field="ProductId"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="MinQty" title="!la_fld_MinQty!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="MaxQty" title="!la_fld_MaxQty!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Price" title="!la_fld_Price!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Points" title="!la_fld_Points!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Cost" title="!la_fld_Cost!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pr" field="Negotiated" title="!la_fld_Negotiated!" size="4"/>
+<inp2:pr_SaveWarning name="grid_save_warning"/>
+<inp2:pr_ErrorWarning name="form_error_warning"/>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_PriceBracket!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="pr" field="ProductId"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="MinQty" title="!la_fld_MinQty!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="MaxQty" title="!la_fld_MaxQty!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Price" title="!la_fld_Price!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Points" title="!la_fld_Points!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="Cost" title="!la_fld_Cost!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pr" field="Negotiated" title="!la_fld_Negotiated!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/pricing_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/relations_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/relations_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/relations_edit.tpl (revision 11549)
@@ -1,63 +1,65 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="relations_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="relations_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() {
submit_event('rel','<inp2:rel_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('rel','OnCancel');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="rel_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="rel_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="rel_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_include t="categories/ci_blocks"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_Relation!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="SourceId"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="SourceType"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="TargetId"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="TargetType"/>
-
- <inp2:m_RenderElement name="inp_id_label" prefix="rel" field="RelationshipId" title="!la_fld_RelationshipId!"/>
- <inp2:m_RenderElement name="inp_edit_relation" prefix="rel" field="TargetId" title="!la_fld_TargetId!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="rel" field="Type" title="!la_fld_RelationshipType!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="rel" field="Enabled" title="!la_fld_Enabled!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="rel" field="Priority" title="!la_fld_Priority!" size="4"/>
-</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:rel_SaveWarning name="grid_save_warning"/>
+<inp2:rel_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_Relation!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="SourceId"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="SourceType"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="TargetId"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="rel" field="TargetType"/>
+
+ <inp2:m_RenderElement name="inp_id_label" prefix="rel" field="RelationshipId" title="!la_fld_RelationshipId!"/>
+ <inp2:m_RenderElement name="inp_edit_relation" prefix="rel" field="TargetId" title="!la_fld_TargetId!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="rel" field="Type" title="!la_fld_RelationshipType!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="rel" field="Enabled" title="!la_fld_Enabled!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="rel" field="Priority" title="!la_fld_Priority!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/relations_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.1
\ No newline at end of property
+1.10.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/review_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/review_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/review_edit.tpl (revision 11549)
@@ -1,57 +1,59 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_Text_Reviews!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="reviews_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="reviews_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() {
submit_event('rev','<inp2:rev_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('rev','OnCancel');
}
) );
a_toolbar.Render();
<inp2:m_if check="rev_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="rev_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="rev_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Review!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="rev" field="ItemId"/>
- <inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="rev" field="TextFormat"/>
- <inp2:m_RenderElement name="inp_label" prefix="rev" field="ReviewId" title="!la_fld_ReviewId!"/>
- <inp2:m_RenderElement name="inp_edit_user" prefix="rev" field="CreatedById" title="!la_fld_CreatedById!" class="text"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="rev" field="ReviewText" title="!la_fld_ReviewText!" cols="70" rows="8"/>
- <inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="rev" field="Status" title="!la_fld_Status!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="rev" field="Priority" title="!la_fld_Priority!" size="3" class="text"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="rev" field="CreatedOn" title="!la_fld_CreatedOn!" size="20" class="text"/>
-</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:rev_SaveWarning name="grid_save_warning"/>
+<inp2:rev_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Review!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="rev" field="ItemId"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox_allow_html" prefix="rev" field="TextFormat"/>
+ <inp2:m_RenderElement name="inp_label" prefix="rev" field="ReviewId" title="!la_fld_ReviewId!"/>
+ <inp2:m_RenderElement name="inp_edit_user" prefix="rev" field="CreatedById" title="!la_fld_CreatedById!" class="text"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="rev" field="ReviewText" title="!la_fld_ReviewText!" cols="70" rows="8"/>
+ <inp2:m_RenderElement name="subsection" title="!la_Text_General!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="rev" field="Status" title="!la_fld_Status!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="rev" field="Priority" title="!la_fld_Priority!" size="3" class="text"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="rev" field="CreatedOn" title="!la_fld_CreatedOn!" size="20" class="text"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/review_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_reviews.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_reviews.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_reviews.tpl (revision 11549)
@@ -1,122 +1,115 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="reviews" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="rel" system_permission="0" 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"/>',
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">
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath module="In-Portal"/>img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">&nbsp;
- <inp2:{$PrefixSpecial}_field field="$field" no_special="no_special" cut_first="100"/>
- </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"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_reviews.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_edit.tpl (revision 11549)
@@ -1,177 +1,176 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="products_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="products_edit" 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.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>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="p" field="Type" db="db"/>
-<inp2:p_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
-
- <inp2:m_RenderElement name="inp_label" prefix="p" field="ProductId" title="!la_fld_ProductId!"/>
-
- <inp2:m_if check="m_IsDebugMode" >
- <inp2:m_RenderElement name="inp_label" prefix="p" field="Type" title="!la_fld_ProductType!"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="inp_edit_box_ml" prefix="p" field="Name" title="!la_fld_Title!" size="70"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="SKU" title="!la_fld_SKU!" size="70"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="Description" title="!la_fld_Description!" cols="70" rows="5"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="DescriptionExcerpt" title="!la_fld_DescriptionExcerpt!" cols="70" rows="3"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="AutomaticFilename" title="la_fld_AutomaticFilename" onchange="reflect_filename()"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Filename" title="la_fld_Filename" size="70"/>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_Properties!"/>
+<inp2:p_SaveWarning name="grid_save_warning"/>
+<inp2:p_ErrorWarning name="form_error_warning"/>
- <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MinQtyFreePromoShipping" title="!la_fld_ProductFreeShipping!" size="5"/>
- </inp2:m_if>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="p" field="ProductId" title="!la_fld_ProductId!"/>
+
+ <inp2:m_if check="m_IsDebugMode" >
+ <inp2:m_RenderElement name="inp_label" prefix="p" field="Type" title="!la_fld_ProductType!"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_box_ml" prefix="p" field="Name" title="!la_fld_Title!" size="70"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="SKU" title="!la_fld_SKU!" size="70"/>
+
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="Description" title="!la_fld_Description!" cols="70" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="p" field="DescriptionExcerpt" title="!la_fld_DescriptionExcerpt!" cols="70" rows="3"/>
+
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="AutomaticFilename" title="la_fld_AutomaticFilename" onchange="reflect_filename()"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Filename" title="la_fld_Filename" size="70"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Properties!"/>
+
+ <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MinQtyFreePromoShipping" title="!la_fld_ProductFreeShipping!" size="5"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="p_FieldEquals" field="Type" value="1">
+ <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
+ <td class="label-cell">
+ <inp2:m_phrase label="la_fld_ManageShipping"/>:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <a href="javascript:openShipping()">Open</a>
+ </td>
+ </tr>
+ </inp2:m_if>
- <inp2:m_if check="p_FieldEquals" field="Type" value="1">
<tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
<td class="label-cell">
- <inp2:m_phrase label="la_fld_ManageShipping"/>:
+ <inp2:m_phrase label="la_fld_AssignedCoupon"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
- <a href="javascript:openShipping()">Open</a>
+ <inp2:p_Field name="AssignedCoupon" />&nbsp;<a href="javascript:openCouponSelector()">Open</a>
</td>
</tr>
- </inp2:m_if>
- <tr class="<inp2:m_odd_even odd="edit-form-odd" even="edit-form-even"/>">
- <td class="label-cell">
- <inp2:m_phrase label="la_fld_AssignedCoupon"/>:
- </td>
- <td class="control-mid">&nbsp;</td>
- <td class="control-cell">
- <inp2:p_Field name="AssignedCoupon" />&nbsp;<a href="javascript:openCouponSelector()">Open</a>
- </td>
- </tr>
-
- <inp2:m_RenderElement name="inp_edit_options" prefix="p" field="ManufacturerId" title="!la_fld_Manufacturer!" size="4"/>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="3">
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="5"/>
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="6">
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="5"/>
- </inp2:m_if>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
- <inp2:m_RenderElement name="inp_edit_weight" prefix="p" field="Weight" title="!la_fld_Weight!" size="5"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MSRP" title="!la_fld_MSRP!" size="5"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="Status" title="!la_fld_Status!"/>
-
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="NewItem" title="!la_fld_New!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="HotItem" title="!la_fld_TopSeller!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="PopItem" title="!la_fld_Pop!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="EditorsPick" title="!la_fld_EditorsPick!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="Featured" title="!la_fld_Featured!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="OnSale" title="!la_fld_OnSale!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Priority" title="!la_fld_Priority!" size="4"/>
-
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="CreatedOn" title="!la_fld_CreatedOn!" size="12"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="Expire" title="!la_fld_Expire!" size="12"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MetaKeywords" title="!la_fld_MetaKeywords!" size="70"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="MetaDescription" title="!la_fld_MetaDescription!" cols="70" rows="5"/>
-
- <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
- <inp2:m_RenderElement name="subsection" title="!la_section_Backordering!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="BackOrder" title="!la_fld_BackOrder!"/>
- <inp2:m_RenderElement name="inp_edit_date_time" format="mm/dd/y" prefix="p" field="BackOrderDate" title="!la_fld_BackOrderDate!" size="12"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="QtyInStockMin" title="!la_fld_QtyInStockMin!" size="4"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_Counters!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedRating" title="!la_fld_Rating!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedVotesQty" title="!la_fld_Votes!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Hits" title="!la_fld_QtySold!" size="4"/>
- <input type="hidden" name="Hits_original" id="Hits_original" value="<inp2:p_Field name="Hits" db="db" />" />
-
-<!-- custom fields: begin -->
- <inp2:m_include t="incs/custom_blocks"/>
- <inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="p" value_field="Value" per_page="-1" grid="Default" />
-<!-- custom fields: end -->
+ <inp2:m_RenderElement name="inp_edit_options" prefix="p" field="ManufacturerId" title="!la_fld_Manufacturer!" size="4"/>
+
+ <inp2:m_if check="p_FieldEquals" field="Type" value="3">
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="5"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="p_FieldEquals" field="Type" value="6">
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Price" title="!la_fld_Price!" size="5"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
+ <inp2:m_RenderElement name="inp_edit_weight" prefix="p" field="Weight" title="!la_fld_Weight!" size="5"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MSRP" title="!la_fld_MSRP!" size="5"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="Status" title="!la_fld_Status!"/>
+
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="NewItem" title="!la_fld_New!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="HotItem" title="!la_fld_TopSeller!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="PopItem" title="!la_fld_Pop!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="EditorsPick" title="!la_fld_EditorsPick!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="Featured" title="!la_fld_Featured!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="OnSale" title="!la_fld_OnSale!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Priority" title="!la_fld_Priority!" size="4"/>
+
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="CreatedOn" title="!la_fld_CreatedOn!" size="12"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="p" field="Expire" title="!la_fld_Expire!" size="12"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="MetaKeywords" title="!la_fld_MetaKeywords!" size="70"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="MetaDescription" title="!la_fld_MetaDescription!" cols="70" rows="5"/>
+
+ <inp2:m_if check="p_FieldEquals" field="Type" value="1" >
+ <inp2:m_RenderElement name="subsection" title="!la_section_Backordering!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="BackOrder" title="!la_fld_BackOrder!"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" format="mm/dd/y" prefix="p" field="BackOrderDate" title="!la_fld_BackOrderDate!" size="12"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="QtyInStockMin" title="!la_fld_QtyInStockMin!" size="4"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_Counters!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedRating" title="!la_fld_Rating!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="CachedVotesQty" title="!la_fld_Votes!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="p" field="Hits" title="!la_fld_QtySold!" size="4"/>
+ <input type="hidden" name="Hits_original" id="Hits_original" value="<inp2:p_Field name="Hits" db="db" />" />
+
+ <!-- custom fields: begin -->
+ <inp2:m_include t="incs/custom_blocks"/>
+ <inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="p" value_field="Value" per_page="-1" grid="Default" />
+ <!-- custom fields: end -->
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-</table>
<script language="javascript" type="text/javascript">
- function reflect_filename()
- {
+ function reflect_filename() {
var $checked = document.getElementById('_cb_<inp2:p_InputName field="AutomaticFilename"/>').checked;
document.getElementById('<inp2:p_InputName field="Filename"/>').readOnly = $checked;
}
reflect_filename();
- function openShipping()
- {
+ function openShipping() {
openSelector('p','<inp2:m_link t="in-commerce/products/shipping_options" pass="all"/>', 'ShippingOption', '800x600', 'OnPreSaveAndOpenPopup');
}
- function openCouponSelector()
- {
+ function openCouponSelector() {
openSelector('p','<inp2:m_link t="in-commerce/discounts/coupon_selector" pass="all"/>', 'AssignedCoupon', '800x400', 'OnPreSaveAndOpenPopup');
}
</script>
-<inp2:m_include t="incs/footer"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.28.2.6
\ No newline at end of property
+1.28.2.7
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_categories.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_categories.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_categories.tpl (revision 11549)
@@ -1,91 +1,84 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="categories" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="p-ci" system_permission="0" title_preset="categories" tab_preset="Default"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function 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') );
//Category related:
a_toolbar.AddButton( new ToolBarButton('new_cat', '<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>',
function() {
openSelector('p', '<inp2:adm_SelectorLink prefix="p" selection_mode="multi" tab_prefixes="none"/>', 'ItemCategory');
} ) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('p-ci')
} ) );
a_toolbar.AddButton( new ToolBarButton('primary_cat', '<inp2:m_phrase label="la_ToolTip_SetPrimaryCategory" escape="1"/>', function() {
submit_event('p-ci','OnSetPrimary');
}
) );
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="p-ci" grid="Default"/>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="grid_checkbox_category_td" >
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">&nbsp;
- <inp2:{$PrefixSpecial}_CategoryName field="$field" primary_title="!la_PrimaryCategory!" no_special="1"/>
- </td>
+<inp2:m_DefineElement name="grid_checkbox_category_td">
+ <inp2:CategoryName field="$field" primary_title="!la_PrimaryCategory!" no_special="1"/>
</inp2:m_DefineElement>
-<inp2:m_RenderElement name="grid" PrefixSpecial="p-ci" IdField="CategoryId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="p-ci" IdField="CategoryId" grid="Default"/>
<script type="text/javascript">
Grids['p-ci'].SetDependantToolbarButtons( new Array('delete','primary_cat') );
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_categories.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_packagecontent.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_packagecontent.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_packagecontent.tpl (revision 11549)
@@ -1,99 +1,95 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="content" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="p.content" system_permission="0" 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"/>',
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" >
- <td valign="top" class="text"><inp2:{$PrefixSpecial}_field field="QtyInStock" grid="$grid"/>/<inp2:{$PrefixSpecial}_field field="QtyReserved" grid="$grid"/>
- </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
Property changes on: branches/RC/in-commerce/admin_templates/products/products_packagecontent.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12.2.1
\ No newline at end of property
+1.12.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/images_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/images_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/images_edit.tpl (revision 11549)
@@ -1,76 +1,77 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="images_edit"/>
<inp2:m_include t="incs/image_blocks"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_Text_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="images_edit" module="in-commerce" icon="icon46_products"/>
-
<!-- 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('img','<inp2:img_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('img','OnCancel');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="img_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="img_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="img_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_Image!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="img" field="ResourceId"/>
- <inp2:m_RenderElement name="inp_label" prefix="img" field="ImageId" title="!la_fld_ImageId!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="img" field="Name" title="!la_fld_Name!" size="40"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="img" field="AltName" title="!la_fld_AltValue!" size="40"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()" />
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="DefaultImg" title="!la_fld_Primary!" onchange="check_status()" />
- <inp2:m_RenderElement name="inp_edit_box" prefix="img" field="Priority" title="!la_fld_Priority!" size="5"/>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_ThumbnailImage!"/>
- <inp2:m_RenderElement name="thumbnail_section" prefix="img"/>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_FullSizeImage!"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="SameImages" title="!la_fld_SameAsThumb!" onchange="toggle_fullsize()"/>
- <inp2:m_RenderElement name="fullsize_section" prefix="img"/>
+<inp2:img_SaveWarning name="grid_save_warning"/>
+<inp2:img_ErrorWarning name="form_error_warning"/>
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_Image!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="img" field="ResourceId"/>
+ <inp2:m_RenderElement name="inp_id_label" prefix="img" field="ImageId" title="!la_fld_ImageId!"/>
+
+ <inp2:m_RenderElement name="inp_edit_box" prefix="img" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="img" field="AltName" title="!la_fld_AltValue!" size="40"/>
+
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="Enabled" title="!la_fld_Enabled!" onchange="check_primary()" />
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="DefaultImg" title="!la_fld_Primary!" onchange="check_status()" />
+ <inp2:m_RenderElement name="inp_edit_box" prefix="img" field="Priority" title="!la_fld_Priority!" size="5"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_ThumbnailImage!"/>
+ <inp2:m_RenderElement name="thumbnail_section" prefix="img"/>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_FullSizeImage!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="img" field="SameImages" title="!la_fld_SameAsThumb!" onchange="toggle_fullsize()"/>
+ <inp2:m_RenderElement name="fullsize_section" prefix="img"/>
+
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script type="text/javascript">
<inp2:m_RenderElement name="images_edit_js" prefix="img"/>
toggle_fullsize();
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/images_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.1
\ No newline at end of property
+1.10.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/option_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/option_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/option_edit.tpl (revision 11549)
@@ -1,360 +1,323 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="590"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_Text_Products!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="options_edit" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="options_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() {
PrepareData();
submit_event('po','<inp2:po_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('po','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('rev', '<inp2:rev_PrevId/>');
- }
- ) );
- a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
- go_to_id('rev', '<inp2:rev_NextId/>');
- }
- ) );
- */
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
a_toolbar.Render();
-
- <inp2:m_if check="po_IsSingle" >
- a_toolbar.HideButton('prev');
- a_toolbar.HideButton('next');
- a_toolbar.HideButton('sep1');
- a_toolbar.HideButton('sep2');
- <inp2:m_else/>
- <inp2:m_if check="po_IsLast" >
- a_toolbar.DisableButton('next');
- </inp2:m_if>
- <inp2:m_if check="po_IsFirst" >
- a_toolbar.DisableButton('prev');
- </inp2:m_if>
- </inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
-
var edit_id = null;
var prices = new Array();
var price_types = new Array();
NumberFormatter.ThousandsSep = '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>';
NumberFormatter.DecimalSep = '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>';
// var formatter = new NumberFormat();
// formatter.setInputDecimal('<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>');
// formatter.setSeparators(true, '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>', '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>');
- function PrepareData()
- {
+ function PrepareData() {
SelectToString('options_list[]', '<inp2:po_InputName field="Values"/>');
prices_str = '';
for (var i in prices) {
if (prices[i] == null) continue;
// formatter.setNumber(prices[i]);
// prices[i] = formatter.pars
prices_str += i.replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '=' + prices[i] + '|'; // .replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '|'
}
if(prices_str.length > 0) prices_str = prices_str.substring(0,prices_str.length-1);
// alert('prices str: '+prices_str)
document.getElementById('<inp2:po_InputName field="Prices"/>').value = prices_str;
price_types_str = '';
for (var i in price_types) {
if (price_types[i] == null) continue;
price_types_str += i.replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '=' + price_types[i].replace(/\|/g, '\\|').replace(/\=/g, '\\=') + '|'
}
if(price_types_str.length > 0) price_types_str = price_types_str.substring(0,price_types_str.length-1);
document.getElementById('<inp2:po_InputName field="PriceTypes"/>').value = price_types_str;
}
- function SelectToString(aSelectId, aStringId)
- {
+ function SelectToString(aSelectId, aStringId) {
aSelect = document.getElementById(aSelectId);
// written by Slava, patched by Alex, modified by SergeyG
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
result += cur.value+',';
}
if(result.length > 0) result = result.substring(0,result.length-1);
document.getElementById(aStringId).value = result;
return result;
}
- function add_option(aSelectId){
+ function add_option(aSelectId) {
aSelect = document.getElementById(aSelectId);
var el = document.getElementById('option_value');
price = document.getElementById('option_price');
price_val = NumberFormatter.Parse(price.value);
price_type = document.getElementById('kernel_form').elements['option_price_type'];
price_mod = '';
if (price_type[0].checked) {
price_mod = '$'
}
if (price_type[1].checked) {
price_mod = '%'
}
if (price_val < 0) {
sign = '-';
}
else {
sign = '+';
}
if (price.value != '') {
option_text = el.value + ': ' + sign + price_val + ' ' + price_mod;
}
else {
option_text = el.value;
}
if (el)
{
if (el.value=='') return;
var found = false;
var valueArray;
for (i = 0; i < aSelect.options.length; i++){
if (aSelect.options[i].value == edit_id){
found = true;
break;
}
}
if (!found){
aSelect.options[aSelect.length] = new Option(option_text, el.value);
}
else {
aSelect.options[i].text = option_text;
aSelect.options[i].value = el.value;
}
//alert('set '+price.value+' unformatted is '+price_val)
prices[el.value] = price_val
price_types[el.value] = price_mod;
el.value='';
price.value = '';
price_type[0].checked = false;
price_type[1].checked = false;
edit_id = null;
document.getElementById('option_save').value = '<inp2:m_phrase label="la_button_add"/>';
}
}
- function cancel_edit()
- {
+ function cancel_edit() {
var el = document.getElementById('option_value');
document.getElementById('option_save').value = '<inp2:m_phrase label="la_button_add"/>';
el.value = '';
document.getElementById('option_price').value = '';
document.getElementById('kernel_form').elements['option_price_type'][0].checked = false;
document.getElementById('kernel_form').elements['option_price_type'][1].checked = false;
edit_id = null;
}
- function htmlspecialchars(str)
- {
+ function htmlspecialchars(str) {
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
}
- function edit_option(aSelectId)
- {
+ function edit_option(aSelectId) {
aSelect = document.getElementById(aSelectId);
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if(aSelect.options[i].selected == true) {
edit_id = aSelect.options[i].value;
document.getElementById('option_value').value = aSelect.options[i].value;
// alert('setting: '+prices[edit_id]+' formatted is '+NumberFormatter.Format(prices[edit_id]))
var formatted = NumberFormatter.Format(prices[edit_id]) ;
document.getElementById('option_price').value = formatted == 0 ? '' : formatted;
if (price_types[edit_id] == '$') {
document.getElementById('kernel_form').elements['option_price_type'][0].checked = true;
}
if (price_types[edit_id] == '%') {
document.getElementById('kernel_form').elements['option_price_type'][1].checked = true;
}
}
}
document.getElementById('option_save').value = '<inp2:m_phrase label="la_Text_Save"/>';
}
- function delete_option(aSelectId)
- {
+ function delete_option(aSelectId) {
aSelect = document.getElementById(aSelectId);
if (!confirm('<inp2:m_phrase label="la_Delete_Confirm"/>')) return;
for (var i=aSelect.length-1; i >= 0; i--)
{
cur = aSelect.options[i];
if(aSelect.options[i].selected == true) {
prices[aSelect.options[i].value] = null;
price_types[aSelect.options[i].value] = null;
aSelect.remove(i);
}
}
}
- function catchEnter(e)
- {
+ function catchEnter(e) {
if (!e) return;
//enter
if (e.keyCode == 13) {
add_option('options_list[]')
}
}
- function update_type(type)
- {
+ function update_type(type) {
switch (type) {
case '1': //drop-down
switch_option_values(1);
break;
case '5': //edit-box
switch_option_values(0);
break;
case '4': //text-area
switch_option_values(0);
break;
case '6': //checkboxes
switch_option_values(1);
break;
case '3': //radio-buttons
switch_option_values(1);
break;
default:
switch_option_values(0);
}
}
- function switch_option_values(mode)
- {
+ function switch_option_values(mode) {
var elems = new Array('option_value', 'option_price', 'option_price_type_$','option_price_type_%','options_list[]', 'option_save', 'option_cancel', 'opt_edit_but', 'opt_del_but', 'opt_moveup_but', 'opt_movedown_but');
for (var an_elem in elems) {
the_elem = document.getElementById(elems[an_elem])
the_elem.disabled = !mode;
if (the_elem.tagName == 'INPUT' && the_elem.getAttribute('type') == 'button') {
the_elem.className = mode ? 'button':'button-disabled';
}
}
}
</script>
<inp2:m_DefineElement name="option_block">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/>: <inp2:m_param name="sign"/><inp2:m_param name="price"/> <inp2:m_param name="price_type"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_block_js">
prices['<inp2:m_param name="id"/>'] = '<inp2:m_param name="price"/>';
price_types['<inp2:m_param name="id"/>'] = '<inp2:m_param name="price_type"/>';
</inp2:m_DefineElement>
<inp2:m_DefineElement name="options_list">
- <tr class="table-color1">
- <td>
+ <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_OptionValue"/>:
</td>
- <td>
- <input type="text" name="option_value" id="option_value" value="" style="width: 300px" onkeydown="catchEnter(event)">&nbsp;<br/>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <input type="text" name="option_value" id="option_value" value="" style="width: 300px" onkeydown="catchEnter(event)">&nbsp;<br/>
</td>
- <td>&nbsp;</td>
</tr>
- <tr class="table-color2">
- <td>
+ <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_OptionPrice"/>:
</td>
- <td>
- <input type="text" name="option_price" id="option_price" value="" style="width: 40px">&nbsp;
- <input type="radio" name="option_price_type" value="$" id="option_price_type_$">&nbsp;<label for="option_price_type_$">$</label>&nbsp;&nbsp;
- <input type="radio" name="option_price_type" value="%" id="option_price_type_%">&nbsp;<label for="option_price_type_%">%</label>&nbsp;&nbsp;
- <br/>
- <input type="button" id="option_save" class="button" style="width: 80px" value="<inp2:m_phrase label="la_button_add"/>" onclick="add_option('options_list[]')">&nbsp;
- <input type="button" id="option_cancel" class="button" value="<inp2:m_phrase label="la_Cancel"/>" onclick="cancel_edit()">&nbsp;
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <input type="text" name="option_price" id="option_price" value="" style="width: 40px">&nbsp;
+ <input type="radio" name="option_price_type" value="$" id="option_price_type_$">&nbsp;<label for="option_price_type_$">$</label>&nbsp;&nbsp;
+ <input type="radio" name="option_price_type" value="%" id="option_price_type_%">&nbsp;<label for="option_price_type_%">%</label>&nbsp;&nbsp;
+ <br/>
+ <input type="button" id="option_save" class="button" style="width: 80px" value="<inp2:m_phrase label="la_button_add"/>" onclick="add_option('options_list[]')">&nbsp;
+ <input type="button" id="option_cancel" class="button" value="<inp2:m_phrase label="la_Cancel"/>" onclick="cancel_edit()">&nbsp;
</td>
- <td>&nbsp;</td>
</tr>
-
-
- <tr class="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
- <input type="hidden" value="" name="<inp2:po_InputName field="Values"/>" id="<inp2:po_InputName field="Values"/>">
- <input type="hidden" value="" name="<inp2:po_InputName field="Prices"/>" id="<inp2:po_InputName field="Prices"/>">
- <input type="hidden" value="" name="<inp2:po_InputName field="PriceTypes"/>" id="<inp2:po_InputName field="PriceTypes"/>">
- <table style="padding: 0px; margin: 0px">
- <tr>
- <td style="padding: 0px; margin: 0px">
- <select style="padding-left: 0px; width: 300px" name="options_list[]" id="options_list[]" multiple onchange="PrepareData()" ondblclick="edit_option('options_list[]')" size="10" style="width: 200px">
- <inp2:po_ShowOptions render_as="option_block" show="current" no_currency="1"/>
- </select>
- <script type="text/javascript">
- <inp2:po_ShowOptions render_as="option_block_js" show="current" js="1"/>
- </script>
- </td>
- <td style="padding-left: 5px; vertical-align: top">
- <input type="button" id="opt_edit_but" class="button" style="width: 90px" onclick="edit_option('options_list[]')" value="<inp2:m_phrase label="la_Text_Edit"/>"><br/>
- <input type="button" id="opt_del_but" class="button" style="width: 90px" onclick="delete_option('options_list[]')" value="<inp2:m_phrase label="la_Text_Delete"/>"><br/>
- <br/><br/><br/>
- <input type="button" id="opt_moveup_but" class="button" style="width: 90px" onclick="move_options_up('options_list[]', 1)" value="<inp2:m_phrase label="la_prompt_moveup"/>"><br/>
- <input type="button" id="opt_movedown_but" class="button" style="width: 90px" onclick="move_options_down('options_list[]', 1)" value="<inp2:m_phrase label="la_prompt_movedown"/>"><br/>
- </td>
- </tr>
- </table>
+ <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">
+ <input type="hidden" value="" name="<inp2:po_InputName field="Values"/>" id="<inp2:po_InputName field="Values"/>">
+ <input type="hidden" value="" name="<inp2:po_InputName field="Prices"/>" id="<inp2:po_InputName field="Prices"/>">
+ <input type="hidden" value="" name="<inp2:po_InputName field="PriceTypes"/>" id="<inp2:po_InputName field="PriceTypes"/>">
+ <table style="padding: 0px; margin: 0px">
+ <tr>
+ <td style="padding: 0px; margin: 0px">
+ <select style="padding-left: 0px; width: 300px" name="options_list[]" id="options_list[]" multiple onchange="PrepareData()" ondblclick="edit_option('options_list[]')" size="10" style="width: 200px">
+ <inp2:po_ShowOptions render_as="option_block" show="current" no_currency="1"/>
+ </select>
+ <script type="text/javascript">
+ <inp2:po_ShowOptions render_as="option_block_js" show="current" js="1"/>
+ </script>
+ </td>
+ <td style="padding-left: 5px; vertical-align: top">
+ <input type="button" id="opt_edit_but" class="button" style="width: 90px" onclick="edit_option('options_list[]')" value="<inp2:m_phrase label="la_Text_Edit"/>"><br/>
+ <input type="button" id="opt_del_but" class="button" style="width: 90px" onclick="delete_option('options_list[]')" value="<inp2:m_phrase label="la_Text_Delete"/>"><br/>
+ <br/><br/><br/>
+ <input type="button" id="opt_moveup_but" class="button" style="width: 90px" onclick="move_options_up('options_list[]', 1)" value="<inp2:m_phrase label="la_prompt_moveup"/>"><br/>
+ <input type="button" id="opt_movedown_but" class="button" style="width: 90px" onclick="move_options_down('options_list[]', 1)" value="<inp2:m_phrase label="la_prompt_movedown"/>"><br/>
+ </td>
+ </tr>
+ </table>
</td>
- <td>&nbsp;</td>
</tr>
</inp2:m_DefineElement>
+<inp2:po_SaveWarning name="grid_save_warning"/>
+<inp2:po_ErrorWarning name="form_error_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Option!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="po" field="ProductId"/>
- <inp2:m_RenderElement name="inp_label" prefix="po" field="ProductOptionId" title="!la_fld_OptionId!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="po" field="Name" title="!la_fld_Name!" size="40"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="po" field="Required" title="!la_fld_Required!"/>
- <!--<inp2:m_RenderElement name="inp_edit_checkbox" prefix="po" field="Listable" title="!la_fld_Listable!"/>-->
- <inp2:m_RenderElement name="inp_edit_options" prefix="po" field="OptionType" title="!la_fld_OptionType!" onchange="update_type(this.value)"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="po" field="Priority" title="!la_fld_Priority!" size="2"/>
- <inp2:m_RenderElement name="options_list" prefix="po" field="Values" title="!la_fld_Values!" size="2"/>
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Option!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="po" field="ProductId"/>
+ <inp2:m_RenderElement name="inp_label" prefix="po" field="ProductOptionId" title="!la_fld_OptionId!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="po" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="po" field="Required" title="!la_fld_Required!"/>
+ <!--<inp2:m_RenderElement name="inp_edit_checkbox" prefix="po" field="Listable" title="!la_fld_Listable!"/>-->
+ <inp2:m_RenderElement name="inp_edit_options" prefix="po" field="OptionType" title="!la_fld_OptionType!" onchange="update_type(this.value)"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="po" field="Priority" title="!la_fld_Priority!" size="2"/>
+ <inp2:m_RenderElement name="options_list" prefix="po" field="Values" title="!la_fld_Values!" size="2"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script type="text/javascript">
update_type(document.getElementById('<inp2:po_InputName field="OptionType"/>').value);
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/option_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.15.2.1
\ No newline at end of property
+1.15.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/option_combinations.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/option_combinations.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/option_combinations.tpl (revision 11549)
@@ -1,168 +1,161 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-<inp2:m_include template="incs/grid_blocks"/>
+<inp2:adm_SetPopupSize width="830" height="720"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="options_combinations" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="poc.grid" system_permission="0" title_preset="options_combinations"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
set_hidden_field('remove_specials[poc.grid]', 1);
set_hidden_field('poc_id', '');
submit_event('poc','')
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('poc.grid')
} ) );
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('poc.grid','OnMassMoveUp');
}
) );
a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
submit_event('poc.grid','OnMassMoveDown');
}
) );
a_toolbar.Render();
</script>
</td>
+
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="poc.grid" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="option_value_block">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="value"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_value_cb_block">
<input type="checkbox"
name="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>][]"
id="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"
value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>>
<label for="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]_<inp2:m_param name="id"/>"><inp2:m_param name="value"/></label>&nbsp;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="option_block">
- <tr class="table-color1">
- <td>
+ <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:Field name="Name"/>:
</td>
- <td>
+ <td class="control-mid">&nbsp;</td>
+ <script type="text/javascript">
+ if (typeof(fields['poc']) == 'undefined') {
+ fields['poc'] = new Object();
+ }
+ fields['poc']['Combination[<inp2:Field name="ProductOptionId"/>]'] = '<inp2:Field name="Name" js_escape="1"/>';
+ </script>
+ <td class="control-cell">
<inp2:m_if check="FieldEquals" field="OptionType" value="6">
<inp2:ShowOptions render_as="option_value_cb_block" mode="selected" combination_prefix="poc" combination_field="Combination"/>
+ <span class="error"><inp2:poc_Error field="Combination"/></span>
<inp2:m_else/>
- <select style="padding-left: 0px; width: 300px" name="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]" style="width: 200px">
+ <select style="padding-left: 0px; width: 300px" name="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]" id="poc[<inp2:poc_Field name="CombinationId"/>][Combination][<inp2:Field name="ProductOptionId"/>]" style="width: 200px">
<option value=""></option>
<option value="_ANY_"><inp2:m_phrase label="la_comm_Any"/></option>
<inp2:ShowOptions render_as="option_value_block" mode="selected" combination_prefix="poc" combination_field="Combination"/>
</select>
</inp2:m_if>
</td>
- <td><span class="error"><inp2:poc_Error field="Combination"/></span></td>
+ <script type="text/javascript">
+ add_form_error('poc', 'Combination[<inp2:Field name="ProductOptionId"/>]', '<inp2:poc_InputName field="Combination"/>[<inp2:Field name="ProductOptionId"/>]', '<inp2:poc_Error field="Combination" js_escape="1"/>');
+ </script>
</tr>
</inp2:m_DefineElement>
-<inp2:m_DefineElement name="combination_form">
-
- <inp2:po.edit_PrintList2 per_page="-1" selectable_only="1" render_as="option_block" main_special=""/>
-
-</inp2:m_DefineElement>
-
<inp2:m_DefineElement name="combination_buttons">
- <tr class="table-color1">
- <td>
- &nbsp;
- </td>
- <td>
+ <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">
<input class="button" style="width: 80px" type="button" onclick="submit_event('poc', '<inp2:poc_SaveEvent/>')" value="<inp2:m_if check="m_GetEquals" var="poc_SaveEvent" value="OnCreate"><inp2:m_Phrase label="la_Button_Add"/><inp2:m_else/><inp2:m_Phrase label="la_Button_Save"/></inp2:m_if>">&nbsp
<input class="button" style="width: 80px" type="button" onclick="submit_event('poc', 'OnNew')" value="<inp2:m_Phrase label="la_Cancel"/>">&nbsp;&nbsp;
</td>
- <td>&nbsp;</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="grid_combination_td">
- <td valign="top" class="text">
- <table>
- <tr>
- <td style="vertical-align: top">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">
- <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
- </td>
- <td style="vertical-align: top">
- <inp2:{$PrefixSpecial}_field field="$field" grid="$grid" no_special="1"/>
- </td>
- </tr>
- </table>
- </td>
+ <inp2:Field field="$field" grid="$grid" no_special="1"/>
+ <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_DefineElement name="price_td" >
- <td valign="top" class="text">
- <inp2:m_if check="FieldEquals" field="PriceType" value="1">
- =
- <inp2:Field field="$field" grid="$grid" format="%.2f"/>&nbsp;
- $
- </inp2:m_if>
- <inp2:m_if check="FieldEquals" field="PriceType" value="2">
- <inp2:Field field="$field" grid="$grid" format="%+.2f"/>&nbsp;
- $
- </inp2:m_if>
- <inp2:m_if check="FieldEquals" field="PriceType" value="3">
- <inp2:Field field="$field" grid="$grid" format="%+ 6.2f"/>&nbsp;
- %
- </inp2:m_if>
- </td>
+ <inp2:m_if check="FieldEquals" field="PriceType" value="1">
+ =
+ <inp2:Field field="$field" grid="$grid" format="%.2f"/>&nbsp;
+ $
+ </inp2:m_if>
+ <inp2:m_if check="FieldEquals" field="PriceType" value="2">
+ <inp2:Field field="$field" grid="$grid" format="%+.2f"/>&nbsp;
+ $
+ </inp2:m_if>
+ <inp2:m_if check="FieldEquals" field="PriceType" value="3">
+ <inp2:Field field="$field" grid="$grid" format="%+ 6.2f"/>&nbsp;
+ %
+ </inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="weight_td" >
- <td valign="top" class="text">
- <inp2:Field field="$field" grid="$grid"/>
- </td>
-</inp2:m_DefineElement>
-
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_Text_Combination!"/>
- <inp2:m_RenderElement name="combination_form" prefix="poc"/>
- <inp2:m_RenderElement name="subsection" title="!la_Text_Properties!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="poc" field="ProductId"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="poc" field="Availability" title="!la_fld_Availability!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="poc" field="PriceType" title="!la_fld_PriceType!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="Price" title="!la_fld_Price!" size="4"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="SKU" title="!la_fld_SKU!" size="40"/>
- <!--<inp2:m_RenderElement name="inp_edit_radio" prefix="poc" field="WeightType" title="!la_fld_WeightType!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="Weight" title="!la_fld_Weight!" size="4"/>-->
- <inp2:m_RenderElement name="combination_buttons"/>
-</table>
+ <inp2:Field field="$field" grid="$grid"/>
+</inp2:m_DefineElement>
+
+<!--<inp2:poc_SaveWarning name="grid_save_warning"/>-->
+<inp2:poc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container" style="height: 250px;">
+ <table class="edit-form" style="border-bottom: 1px solid black;">
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Combination!"/>
+ <inp2:po.edit_PrintList2 per_page="-1" selectable_only="1" render_as="option_block" main_special=""/>
+ <inp2:m_RenderElement name="subsection" title="!la_Text_Properties!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="poc" field="ProductId"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="poc" field="Availability" title="!la_fld_Availability!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="poc" field="PriceType" title="!la_fld_PriceType!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="Price" title="!la_fld_Price!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="SKU" title="!la_fld_SKU!" size="40"/>
+ <!--<inp2:m_RenderElement name="inp_edit_radio" prefix="poc" field="WeightType" title="!la_fld_WeightType!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="poc" field="Weight" title="!la_fld_Weight!" size="4"/>-->
+ <inp2:m_RenderElement name="combination_buttons"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc.grid" IdField="CombinationId" grid="Default" menu_filters="yes"/>
<script type="text/javascript">
Grids['poc.grid'].SetDependantToolbarButtons( new Array('delete') );
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/option_combinations.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.16.2.3
\ No newline at end of property
+1.16.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_options.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_options.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_options.tpl (revision 11549)
@@ -1,133 +1,128 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="options" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="po" system_permission="0" 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"/>',
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" >
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">
- <inp2:{$PrefixSpecial}_field field="$field" grid="$grid"/><span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
- </td>
+<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()
- {
- //openwin('<inp2:m_link t="in-commerce/products/option_combinations" pass="all,poc.edit" poc.edit_event="OnNew"/>', 'combinations', 800, 600);
+ 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>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <tr class="table-color2">
- <td style="width: 250px">
- <inp2:m_phrase label="la_fld_ManageCombinations"/>:
- </td>
- <td>
- <a href="javascript:openCombinations()">Open</a>
- </td>
- <td>&nbsp;</td>
- </tr>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="OptionsSelectionMode" title="!la_fld_OptionsSelectionMode!"/>
+<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>
-</table>
<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"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_options.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11.2.1
\ No newline at end of property
+1.11.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_pricing.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_pricing.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_pricing.tpl (revision 11549)
@@ -1,224 +1,222 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="$BracketManager.Init();">
-
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
-
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="pricing" module="in-commerce" icon="icon46_products"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="g" grid="Radio" system_permission="0" title_preset="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" src="js/ajax.js"></script>
<script type="text/javascript" src='js/catalog.js'></script>
<script type="text/javascript">
Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
var defaultGroup = <inp2:conf_ConfigValue name="User_LoggedInGroup"/>;
Catalog.prototype.AfterInit = function () {
Grids['g'].SelectDefault(defaultGroup);
}
Catalog.prototype.go_to_group = function($group_id) {
if (!isset($group_id)) {
$group_id = 0; // gets current group
}
else {
set_hidden_field('current_group_id', $group_id);
}
this.refreshTab('pr.tang', 'pr.tang_div');
}
Catalog.prototype.refreshTab = function($prefix, $div_id, $force) {
var $group_id = get_hidden_field('current_group_id');
var $tab_group_id = document.getElementById($div_id).getAttribute('group_id');
if ($group_id != $tab_group_id || $force) {
// query tab content only in case if not queried or category don't match
var $url = this.URLMask.replace('#ITEM_PREFIX#', $prefix).replace('#GROUP_ID#', $group_id);
this.BusyRequest[$prefix] = false;
Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this);
}
}
// adds information about tab to tab_registry
Catalog.prototype.registerTab = function($tab_id) {
var $tab = document.getElementById($tab_id + '_div');
var $index = this.TabRegistry.length;
this.TabRegistry[$index] = new Array();
this.TabRegistry[$index]['tab_id'] = $tab_id;
this.TabRegistry[$index]['prefix'] = $tab.getAttribute('prefix');
this.TabRegistry[$index]['dep_buttons'] = new Array();
this.TabRegistry[$index]['index'] = $index;
}
+ Catalog.prototype.displaySearch = function ($prefix) {
+
+ }
+
Catalog.prototype.submit_event = function($prefix_special, $event, $t, $return_result) {
var $prev_template = get_hidden_field('t');
if (isset($event)) set_hidden_field('events[' + $prefix_special + ']', $event);
if (isset($t)) set_hidden_field('t', $t);
var $tab_id = this.queryTabRegistry('prefix', this.ActivePrefix, 'tab_id');
if ($return_result)
this.submit_kernel_form($tab_id);
else
this.submit_kernel_form();
set_hidden_field('t', $prev_template);
}
var $BracketManager = new Catalog('<inp2:m_Link template="in-commerce/products/products_pricing_grid" item_prefix="#ITEM_PREFIX#" group_id="#GROUP_ID#" no_amp="1" pass="m,p,pr.tang"/>', 'permmanager_', 0);
</script>
<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') );
function add_brackets()
{
//submit_event('pr.tang', 'OnMoreBrackets')
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnMoreBrackets', 'in-commerce/products/products_pricing_grid', true);
}
a_toolbar.AddButton( new ToolBarButton('more_brackets', '<inp2:m_phrase label="la_ToolTip_MoreBrackets" escape="1"/>', add_brackets) );
function infinity()
{
//submit_event('pr.tang', 'OnInfinity');
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnInfinity', 'in-commerce/products/products_pricing_grid', true);
}
a_toolbar.AddButton( new ToolBarButton('infinity', '<inp2:m_phrase label="la_ToolTip_Infinity" escape="1"/>', infinity) );
function arrange_brackets()
{
//submit_event('pr.tang', 'OnArrange')
set_hidden_field('group_id', get_hidden_field('current_group_id'));
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', true);
//$BracketManager.refreshTab('pr.tang', 'pr.tang_div', true);
}
a_toolbar.AddButton( new ToolBarButton('arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
function edit(){ }
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="g" grid="Radio"/>
</tr>
</tbody>
</table>
-
-
-<script>
-
+<script type="text/javascript">
function set_start(id, next_id)
{
//var next_id = id - 1;
var input_id = ('pr.tang[' + next_id) + '][MinQty]';
var orig_id = ('pr.tang[' + id) + '][MinQty]';
if(document.getElementById(input_id) != null)
{
var new_value = parseInt(document.getElementById('pr.tang[' + id + '][MaxQty]').value);
if( isNaN(new_value) ) new_value = 0;
document.getElementById('pr.tang[' + id + '][MaxQty]').value = new_value;
document.getElementById(input_id).value = 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:pr.tang_SaveWarning name="grid_save_warning"/>
-
-<inp2:pr.tang_SaveWarning name="grid_save_warning" no_toolbar="$no_toolbar"/>
-
-<inp2:m_RenderElement name="grid" PrefixSpecial="g" IdField="GroupId" per_page="-1" grid="Radio" header_block="grid_column_title_no_sorting"/>
+<inp2:m_RenderElement name="grid" PrefixSpecial="g" IdField="GroupId" per_page="-1" grid="Radio" header_block="grid_column_title_no_sorting" grid_height="220" grid_status="0"/>
<inp2:m_include t="in-commerce/products/products_pricing_grid" tab_init="1" item_prefix="pr.tang"/>
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
Grids['g'].OnSelect = function ($id) {
set_hidden_field('group_id', $id);
$BracketManager.go_to_group($id);
}
Grids['g'].OnUnSelect = function ($id) {
set_hidden_field('group_id', $id);
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', false);
}
Grids['g'].SelectDefault = function (group_id) {
for (var $i in this.Items) {
if (this.Items[$i].ItemId == group_id){
this.Items[$i].Select();
break;
}
}
}
-</script>
-<script>
+
+ $(document).ready(
+ function() {
+ $BracketManager.Init();
+ }
+ );
+
document.forms.kernel_form.onsubmit = enableKernelFormFields;
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_pricing.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11.2.2
\ No newline at end of property
+1.11.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/products/products_inventory.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/products/products_inventory.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/products/products_inventory.tpl (revision 11549)
@@ -1,243 +1,201 @@
-<inp2:m_RequireLogin permissions="PRODUCT.VIEW" perm_prefix="p"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="1000" height="680"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_products" module="in-commerce" title="!la_title_Products!"/>
+<inp2:m_include t="incs/header"/>
-<inp2:m_include t="in-commerce/products/products_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="inventory" module="in-commerce" icon="icon46_products"/>
+<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+ <inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" pagination="1" pagination_prefix="poc.grid" grid="Inventory" system_permission="0" title_preset="inventory" tab_preset="Default"/>
+<inp2:m_else/>
+ <inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" perm_prefix="p" perm_section="PRODUCT" permission_type="VIEW" system_permission="0" title_preset="inventory" tab_preset="Default"/>
+</inp2:m_if>
<!-- 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('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/>');
}
) );
+ <inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+ 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');
+ }
+ ) );
+ </inp2:m_if>
+
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>
-
- <style type="text/css">
- .tableborder_full_kernel {
- border-left-width: 0px;
- border-right-width: 0px;
- }
-
- </style>
</td>
+
+ <inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+ <inp2:m_RenderElement name="search_main_toolbar" prefix="poc.grid" grid="Inventory"/>
+ </inp2:m_if>
</tr>
</tbody>
</table>
<!-- block definitions: begin -->
<inp2:m_DefineElement name="inp_edit_inventory">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+ <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"/>
- <td>
+ <td class="control-cell">
<input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" />&nbsp;
<input type="button" class="button" id="Add" value="<inp2:m_phrase label="la_btn_Add"/>" onclick="processButton('p', 'OnQtyAdd')">&nbsp;
<input type="button" class="button" id="Remove" value="<inp2:m_phrase label="la_btn_Remove"/>" onclick="processButton('p', 'OnQtyRemove')">&nbsp;
<input type="button" class="button" id="Order" value="<inp2:m_phrase label="la_btn_Order"/>" onclick="processButton('p', 'OnQtyOrder')">&nbsp;
<input type="button" class="button" id="ReceiveOrder" value="<inp2:m_phrase label="la_btn_ReceiveOrder"/>" onclick="processButton('p', 'OnQtyReceiveOrder')">&nbsp;
<input type="button" class="button" id="CancelOrder" value="<inp2:m_phrase label="la_btn_CancelOrder"/>" onclick="processButton('p', 'OnQtyCancelOrder')">&nbsp;
- </td>
- <td><span class="error"><inp2:{$prefix}_Error field="$field"/></span>&nbsp;</td>
- </tr>
-</inp2:m_DefineElement>
-
-<inp2:m_DefineElement name="inventory_grid" main_prefix="" per_page="" main_special="" no_toolbar="no_toolbar" has_filters="" grid_filters="" search="on" header_block="grid_column_title" filter_block="grid_column_filter" data_block="grid_data_td" row_block="_row" ajax="0">
- <inp2:m_if check="m_RecallEquals" var="{$PrefixSpecial}_search_keyword" value="" inverse="inverse">
- <table width="100%" border="0" cellspacing="0" cellpadding="4" class="table_border_<inp2:m_if check="m_ParamEquals" name="no_toolbar" value="no_toolbar">nobottom<inp2:m_else/>notop</inp2:m_if>">
- <tr>
- <td valign="top" class="hint_red">
- <inp2:m_phrase name="la_Warning_Filter"/>
- </td>
- </tr>
- </table>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="grid_pagination" grid="$grid" PrefixSpecial="$PrefixSpecial" main_special="$main_special" search="$search" no_toolbar="$no_toolbar"/>
-
- <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" style="border-width: 0px 0px 1px 0px;">
- <tr class="subsectiontitle">
- <inp2:{$PrefixSpecial}_IterateGridFields grid="$grid" mode="header" block="$header_block"/>
- </tr>
-
- <inp2:m_DefineElement name="_row">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:{$PrefixSpecial}_field field="$IdField"/>" sequence="<inp2:m_get param="{$PrefixSpecial}_sequence"/>"><inp2:m_inc param="{$PrefixSpecial}_sequence" by="1"/>
- <inp2:{$PrefixSpecial}_IterateGridFields grid="$grid" mode="data" block="$data_block"/>
- </tr>
- </inp2:m_DefineElement>
- <inp2:m_Set {$PrefixSpecial}_sequence="1" odd_even="table-color1"/>
- <inp2:{$PrefixSpecial}_PrintList block="$row_block" per_page="$per_page" main_special="$main_special"/>
-
- </table>
-
- <script type="text/javascript">
- <inp2:m_RenderElement name="grid_js" selected_class="selected_div" tag_name="tr" view_menu="0" pass_params="true"/>
-
- Grids['<inp2:m_param name="PrefixSpecial"/>'].RadioMode = true;
- Grids['<inp2:m_param name="PrefixSpecial"/>'].DblClick = function() { };
- <inp2:m_if check="m_GetEquals" name="combination_id" value="0" inverse="inverse">
- Grids['<inp2:m_param name="PrefixSpecial"/>'].SetSelected('<inp2:m_get name="combination_id"/>');
- </inp2:m_if>
- </script>
- <input type="hidden" id="<inp2:m_param name="PrefixSpecial"/>_Sort1" name="<inp2:m_param name="PrefixSpecial"/>_Sort1" value="">
- <input type="hidden" id="<inp2:m_param name="PrefixSpecial"/>_Sort1_Dir" name="<inp2:m_param name="PrefixSpecial"/>_Sort1_Dir" value="asc">
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
+ </tr>
</inp2:m_DefineElement>
<!-- block definitions: end -->
+<inp2:m_ifnot check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+ <inp2:p_SaveWarning name="grid_save_warning"/>
+</inp2:m_ifnot>
+
+<inp2:p_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container"<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db"> style="height: 142px;"</inp2:m_if>>
+ <table class="edit-form"<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db"> style="border-bottom: 1px solid black;"</inp2:m_if>>
+ <inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="InventoryStatus" title="la_fld_InventoryStatus" onchange="change_inventory_status()"/>
+
+ <inp2:m_ifnot check="p_Field" name="InventoryStatus" db="db" equals_to="2">
+ <!-- inventory by product / inventory disabled -->
+ <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyInStock" title="!la_fld_QtyInStock!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyReserved" title="!la_fld_QtyReserved!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyBackOrdered" title="!la_fld_QtyBackOrdered!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyOnOrder" title="!la_fld_QtyOnOrder!"/>
+ </inp2:m_ifnot>
+
+ <inp2:m_RenderElement name="inp_edit_inventory" prefix="p" field="Qty" title="!la_fld_Qty!" size="3"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="InventoryComment" title="!la_fld_Comment!" cols="40" rows="3"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:p_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_Product!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="p" field="InventoryStatus" title="la_fld_InventoryStatus" onchange="change_inventory_status()"/>
-
- <inp2:m_if check="p_FieldEquals" name="InventoryStatus" db="db" value="2">
- <!-- inventory by product options -->
- <inp2:m_DefineElement name="grid_combination_td">
- <td valign="top" class="text">
- <table>
- <tr>
- <td style="vertical-align: top">
- <input type="radio" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">
- <span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
- </td>
- <td style="vertical-align: top">
- <inp2:{$PrefixSpecial}_field field="$field" grid="$grid" no_special="1"/>
- </td>
- </tr>
- </table>
- </td>
- </inp2:m_DefineElement>
- <tr>
- <td colspan="3" style="padding: 0px">
- <inp2:m_RenderElement name="inventory_grid" main_special="" PrefixSpecial="poc.grid" IdField="CombinationId" grid="Inventory"/>
- </td>
- </tr>
- <inp2:m_else/>
- <!-- inventory by product / inventory disabled -->
- <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyInStock" title="!la_fld_QtyInStock!"/>
- <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyReserved" title="!la_fld_QtyReserved!"/>
- <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyBackOrdered" title="!la_fld_QtyBackOrdered!"/>
- <inp2:m_RenderElement name="inp_label" prefix="p" field="QtyOnOrder" title="!la_fld_QtyOnOrder!"/>
- </inp2:m_if>
+<inp2:m_if check="p_Field" name="InventoryStatus" equals_to="2" db="db">
+ <!-- inventory by product options -->
+ <inp2:m_DefineElement name="grid_combination_td">
+ <inp2:Field field="$field" grid="$grid" no_special="1"/>
+ <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="inp_edit_inventory" prefix="p" field="Qty" title="!la_fld_Qty!" size="3"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="p" field="InventoryComment" title="!la_fld_Comment!" cols="40" rows="3"/>
-</table>
+ <inp2:m_RenderElement name="grid" main_special="" PrefixSpecial="poc.grid" IdField="CombinationId" grid="Inventory"/>
+</inp2:m_if>
<script type="text/javascript">
var $inventory_status = <inp2:p_Field name="InventoryStatus" db="db"/>;
function getInventoryStatus() {
var $i = 0;
var $status_id = '<inp2:p_InputName field="InventoryStatus"/>';
while ($i <= 2) {
if (document.getElementById($status_id + '_' + $i).checked) {
return $i;
}
$i++;
}
return 0;
}
function change_inventory_status()
{
var $new_inventory_status = getInventoryStatus();
if (confirm('<inp2:m_phrase label="la_warning_ChangeInventoryStatus" />')) {
$inventory_status = $new_inventory_status;
affect_dependent_elements();
go_to_tab('p', t);
}
else {
var $status_id = '<inp2:p_InputName field="InventoryStatus"/>';
document.getElementById($status_id + '_' + $new_inventory_status).checked = false;
document.getElementById($status_id + '_' + $inventory_status).checked = true;
document.getElementById($status_id + '_' + $inventory_status).focus();
}
}
function iterateButtons($disabled, $class_name) {
var $i = 0;
var $buttons = Array('Add', 'Remove', 'Order', 'ReceiveOrder', 'CancelOrder');
while ($i < $buttons.length) {
document.getElementById($buttons[$i]).disabled = $disabled;
document.getElementById($buttons[$i]).className = $class_name;
$i++;
}
}
function processButton($prefix, $event) {
if ($inventory_status == 2) {
if (Grids['poc.grid'].GetSelected().length == 0) {
alert('<inp2:m_phrase name="la_warning_SelectOptionCombination" escape="1"/>')
}
else {
// go next if option combination is selected
submit_event($prefix, $event);
}
}
else {
// go next if not using option combination inventory
submit_event($prefix, $event);
}
}
function affect_dependent_elements()
{
var $inventory_disabled = document.getElementById('<inp2:p_InputName field="InventoryStatus"/>_0').checked;
iterateButtons($inventory_disabled, $inventory_disabled ? 'button-disabled' : 'button');
document.getElementById('<inp2:p_InputName field="Qty"/>').disabled = $inventory_disabled;
document.getElementById('<inp2:p_InputName field="InventoryComment"/>').disabled = $inventory_disabled;
document.getElementById('<inp2:p_InputName field="InventoryStatus"/>_2').disabled = <inp2:poc.grid_TotalRecords/> > 0 ? false : true;
}
affect_dependent_elements();
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/products/products_inventory.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.15.2.3
\ No newline at end of property
+1.15.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/import.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/import.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/import.tpl (revision 11549)
@@ -1,226 +1,225 @@
-<inp2:m_RequireLogin />
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="670"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="p" icon="icon46_tool_import" module="in-portal" title="!la_title_ImportProducts!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="p.import" title_preset="products_import" module="in-portal" icon="icon46_tool_import"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="p.import" section="in-portal:browse" perm_section="PRODUCT" permission_type="VIEW" title_preset="products_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() {
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"/>');
}
);
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+<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"/>
+ <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" />" />
+ <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>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ImportSource" title="la_fld_ImportFilename"/>
- <td>
- <table border="0">
+ <!-- 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>
- <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 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="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');">
+ <label for="<inp2:p.import_InputName field="CheckDuplicatesMethod"/>_1"><inp2:m_phrase name="la_IDField" />: PRODUCTID</label>
</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 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>
- <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>
- <td class="error"><inp2:p.import_Error field="ImportSource"/>&nbsp;</td>
- </tr>
+ <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 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="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="ExportColumns" title="la_fld_ExportColumns"/>
- <td>
- <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>
+ <inp2:m_RenderElement prefix="p.import" name="inp_edit_hidden" field="DuplicateCheckFields"/>
</td>
</tr>
</table>
</td>
- <td class="error"><inp2:p.import_Error field="ExportColumns"/>&nbsp;</td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="p.import" field="CheckDuplicatesMethod"/>
</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="table-color1" even="table-color2"/>">
- <inp2:m_inc param="tab_index" by="1"/>
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="CategoryId" title="la_fld_ImportCategory"/>
- <td>
- <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" />" />
- <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="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="p.import" field="CheckDuplicatesMethod" title="la_fld_CheckDuplicatesMethod"/>
- <td>
- <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>
- <td class="error"><inp2:p.import_Error field="CheckDuplicatesMethod"/>&nbsp;</td>
- </tr>
-
-</table>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<script language="javascript" type="text/javascript">
reflectFormFields();
</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/import.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11.2.2
\ No newline at end of property
+1.11.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/coupons_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/coupons_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/coupons_tabs.tpl (nonexistent)
@@ -1,12 +0,0 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/discounts/coupon_edit" main_prefix="coup"/>
- <inp2:m_RenderElement name="tab" title="la_tab_CouponsItems" t="in-commerce/discounts/coupon_items" main_prefix="coup"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/coupons_tabs.tpl
___________________________________________________________________
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
Index: branches/RC/in-commerce/admin_templates/discounts/discounts_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/discounts_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/discounts_tabs.tpl (nonexistent)
@@ -1,12 +0,0 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/discounts/discount_edit" main_prefix="d"/>
- <inp2:m_RenderElement name="tab" title="la_tab_DiscountItems" t="in-commerce/discounts/discount_items" main_prefix="d"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/discounts_tabs.tpl
___________________________________________________________________
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
Index: branches/RC/in-commerce/admin_templates/discounts/coupons_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/coupons_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/coupons_list.tpl (revision 11549)
@@ -1,75 +1,67 @@
-<inp2:m_RequireLogin permissions="in-commerce:coupons.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="coup" icon="icon46_discounts" module="in-commerce" title="!la_title_Coupons!"/>
-
-<inp2:m_include t="in-commerce/discounts/discounts_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="coup" title_preset="coupons_list" module="in-commerce" icon="icon46_discounts"/>
+<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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/discounts/coupons_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl (revision 11549)
@@ -1,64 +1,72 @@
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="blue_bar" prefix="coup" title_preset="coupons_clone" module="in-commerce"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_clone"/>
<!-- 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', 'OnApplyClone');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td>
- <label for="clone_items_count"><inp2:m_phrase label="la_EnterNumberOfCopies"/>:</label>
- </td>
- <td>
- <input name="clone_items_count" id="clone_items_count" value="<inp2:coup_LastCloneCount />" size="5">
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color1"/>">
- <td>
- <inp2:m_Phrase label="la_Expiration" />
- </td>
- <td>
- <input type="text" name="clone_exp_date" id="clone_exp_date" value="<inp2:coup_DefaultExpDate />" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif" size="9">
- <span class="small">(mm.dd.yy)</span>
- <script type="text/javascript">
- initCalendar("clone_exp_date", "m.d.y");
- </script>
- &nbsp;<input type="text" name="clone_exp_time" id="clone_exp_time" value="<inp2:coup_DefaultExpTime />" size="9"><span class="small"> (h:mm:ss AM)</span>
- <br>
- </td>
- <td class="error"><inp2:coup_Error field="Expiration"/></td>
- </tr>
-</table>
+<inp2:coup_SaveWarning name="grid_save_warning"/>
+<inp2:coup_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <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">
+ <label for="clone_items_count"><inp2:m_phrase label="la_EnterNumberOfCopies"/>:</label>
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <input name="clone_items_count" id="clone_items_count" value="<inp2:coup_LastCloneCount />" size="5">
+ </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_Expiration" />:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
+ <input type="text" name="clone_exp_date" id="clone_exp_date" value="<inp2:coup_DefaultExpDate />" datepickerIcon="<inp2:m_ProjectBase/>admin/images/ddarrow.gif" size="9">
+ <span class="small">(mm.dd.yy)</span>
+ <script type="text/javascript">
+ initCalendar("clone_exp_date", "m.d.y");
+ </script>
+ &nbsp;<input type="text" name="clone_exp_time" id="clone_exp_time" value="<inp2:coup_DefaultExpTime />" size="9"><span class="small"> (h:mm:ss AM)</span>
+ <br>
+
+ </td>
+ <inp2:m_RenderElement name="inp_edit_error" prefix="coup" field="Expiration"/>
+ </tr>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<!-- <inp2:coup_HiddenSelection /> -->
<inp2:m_include t="incs/footer"/>
<script type="text/javascript">
set_event('coup', '');
</script>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/coupon_clone_selector.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11.2.1
\ No newline at end of property
+1.11.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/coupon_selector.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/coupon_selector.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/coupon_selector.tpl (revision 11549)
@@ -1,45 +1,47 @@
-<inp2:m_RequireLogin permissions="in-commerce:coupons.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-
-<inp2:m_RenderElement name="blue_bar" prefix="p" title_preset="coupon_selector" module="in-commerce" icon="icon46_discounts"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" grid="Radio" title_preset="coupon_selector" pagination="1"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
function edit()
{
//do nothing;
}
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
set_hidden_field('selected_ids', Grids['coup'].GetSelected());
submit_event('<inp2:m_recall name="main_prefix"/>', 'OnProcessSelected');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>', function() {
window_close();
}
) );
+ 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="coup" grid="Radio"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="coup" IdField="CouponId" grid="Radio" menu_filters="yes"/>
-<script type="text/javascript">
- Grids['coup'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
-</script>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/coupon_selector.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4.2.2
\ No newline at end of property
+1.4.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/coupon_items.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/coupon_items.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/coupon_items.tpl (revision 11549)
@@ -1,121 +1,116 @@
-<inp2:m_RequireLogin permissions="in-commerce:coupons.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="870" height="600"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="coup" icon="icon46_discounts" module="in-commerce" title="!la_title_Coupons!"/>
+<inp2:m_include t="incs/header"/>
-<inp2:m_include t="in-commerce/discounts/coupons_tabs"/>
+<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="blue_bar" prefix="coup" title_preset="coupons_items" module="in-commerce" icon="icon46_discounts"/>
+<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"/>',
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_checkbox_td">
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">&nbsp;
- <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>
- </td>
+<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_if check="coupi_IsEntireOrder" >
- <inp2:m_RenderElement name="grid" PrefixSpecial="coupi" IdField="CouponItemId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
-<inp2:m_else/>
- <inp2:m_RenderElement name="grid" PrefixSpecial="coupi" IdField="CouponItemId" grid="CouponItems" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
-</inp2:m_if>
-
-
+<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"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/coupon_items.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.2
\ No newline at end of property
+1.10.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/discounts_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/discounts_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/discounts_list.tpl (revision 11549)
@@ -1,66 +1,61 @@
-<inp2:m_RequireLogin permissions="in-commerce:discounts.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="d" icon="icon46_discounts" module="in-commerce" title="!la_title_Discounts!"/>
-
-<inp2:m_include t="in-commerce/discounts/discounts_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="d" title_preset="discounts_list" module="in-commerce" icon="icon46_discounts"/>
+<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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/discounts/discounts_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/gift_certificate_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/gift_certificate_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/gift_certificate_list.tpl (revision 11549)
@@ -1,71 +1,63 @@
-<inp2:m_RequireLogin permissions="in-commerce:gift-certificates.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="gc" icon="icon46_discounts" module="in-commerce" title="!la_title_GiftCertificates!"/>
-
-<inp2:m_include t="in-commerce/discounts/discounts_list_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="gc" title_preset="gift_certificates_list" module="in-commerce" icon="icon46_discounts"/>
+<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"/>',
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
Property changes on: branches/RC/in-commerce/admin_templates/discounts/gift_certificate_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.4
\ No newline at end of property
+1.1.2.5
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/gift_certificate_print.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/gift_certificate_print.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/gift_certificate_print.tpl (revision 11549)
@@ -1,45 +1,49 @@
<inp2:m_RequireLogin permissions="in-commerce:gift-certificates.view" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
+<script type="text/javascript">
+ set_window_title('Gift Certificate - Print Preview');
+</script>
+
<inp2:m_NoDebug/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="window.print();">
<img src="<inp2:m_TemplatesBase module="custom"/>/img/site_logo.jpg" width="159" height="61" border="0">
<br/>
<br/>
<strong><inp2:m_Phrase label="la_title_GiftCertificates"/></strong>
<br/>
<br/>
<inp2:m_Phrase label="la_fld_Amount"/>: <inp2:gc_Field name="Amount"/>
<br/>
<inp2:m_Phrase label="la_fld_Id"/>: <inp2:gc_Field name="Code"/>
<br/>
<br/>
<inp2:m_Phrase label="la_fld_MessageText"/>Message: <inp2:gc_Field name="Message"/>
<br/>
<br/>
<strong><inp2:m_Phrase label="la_section_EmailDelivery"/></strong>
<br/>
<br/>
<inp2:m_Phrase label="la_fld_FirstName"/>: <inp2:gc_Field name="RecipientFirstname"/>
<br/>
<inp2:m_Phrase label="la_fld_LastName"/>: <inp2:gc_Field name="RecipientLastname"/>
<br/>
<inp2:m_Phrase label="la_fld_AddressLine1"/>: <inp2:gc_Field name="RecipientAddress1"/>
<br/>
<inp2:m_Phrase label="la_fld_AddressLine2"/>: <inp2:gc_Field name="RecipientAddress2"/>
<br/>
<inp2:m_Phrase label="la_fld_City"/>: <inp2:gc_Field name="RecipientCity"/>
<br/>
<inp2:m_Phrase label="la_fld_Zip"/>: <inp2:gc_Field name="RecipientZipcode"/>
<br/>
<inp2:m_Phrase label="la_fld_State"/>: <inp2:gc_Field name="RecipientState"/>
<br/>
<inp2:m_Phrase label="la_fld_Country"/>: <inp2:gc_Field name="RecipientCountry"/>
<br/>
<inp2:m_Phrase label="la_fld_Phone"/>: <inp2:gc_Field name="RecipientPhone"/>
<br/>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/gift_certificate_print.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.3
\ No newline at end of property
+1.1.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/coupon_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/coupon_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/coupon_edit.tpl (revision 11549)
@@ -1,122 +1,120 @@
-<inp2:m_RequireLogin permissions="in-commerce:coupons.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="870" height="600"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="coup" icon="icon46_discounts" module="in-commerce" title="!la_title_Coupons!"/>
-
-<inp2:m_include t="in-commerce/discounts/coupons_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="coup" title_preset="coupons_edit" module="in-commerce" icon="icon46_discounts"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_edit" 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','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('coup', '<inp2:d_PrevId/>');
+ 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:d_NextId/>');
+ go_to_id('coup', '<inp2:coup_NextId/>');
}
) );
//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
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>
</script>
</td>
</tr>
</tbody>
</table>
<script language="JavaScript">
function Random(N) {
return Math.floor(N * (Math.random() % 1));
}
function generateRandomCode(elementId){
var j, S = "", d;
for (j = 0; j < 10; j++) {
d=Random(2);
if (d==1)
S += String.fromCharCode(65 + Random(26));
else
S += String(Random(9));
}
document.getElementById(elementId).value=S;
}
</script>
-<inp2:m_DefineElement name="inp_edit_box_generate" >
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
- <td>
- <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
- </td>
- <td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;
- <input type="button" class="button" onClick="generateRandomCode('<inp2:{$prefix}_InputName field="$field"/>')" value="<inp2:m_Phrase label="la_GenerateCode" />" />
+<inp2:m_DefineElement name="inp_edit_box_generate" is_last="0">
+ <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">
+ <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>">
+ <input type="button" class="button" onClick="generateRandomCode('<inp2:{$prefix}_InputName field="$field"/>')" value="<inp2:m_Phrase label="la_GenerateCode" />" />
</td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
</tr>
</inp2:m_DefineElement>
-<inp2:m_DefineElement name="inp_edit_box_comment" >
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
- <td>
- <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
+<inp2:m_DefineElement name="inp_edit_box_comment" is_last="0">
+ <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">
+ <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>">
<inp2:m_Phrase label="la_comment_LeaveBlank" />
</td>
- <td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;
- </td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
</tr>
</inp2:m_DefineElement>
<inp2:coup_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
- <inp2:m_RenderElement name="inp_label" prefix="coup" field="CouponId" title="!la_fld_CouponId!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="coup" field="Status" title="!la_fld_Status!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="coup" field="Name" title="!la_fld_Name!" size="35"/>
- <inp2:m_RenderElement name="inp_edit_box_generate" prefix="coup" field="Code" title="!la_fld_CouponCode!" size="35"/>
-
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="coup" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+<inp2:coup_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="coup" field="Type" title="!la_fld_Type!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="coup" field="Amount" title="!la_fld_Amount!" size="4"/>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="coup" field="CouponId" title="!la_fld_CouponId!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="coup" field="Status" title="!la_fld_Status!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="coup" field="Name" title="!la_fld_Name!" size="35"/>
+ <inp2:m_RenderElement name="inp_edit_box_generate" prefix="coup" field="Code" title="!la_fld_CouponCode!" size="35"/>
+
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="coup" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+
+ <inp2:m_RenderElement name="inp_edit_options" prefix="coup" field="Type" title="!la_fld_Type!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="coup" field="Amount" title="!la_fld_Amount!" size="4"/>
+
+ <inp2:m_RenderElement name="inp_label" prefix="coup" field="LastUsedBy" title="!la_fld_LastUsedBy!" size="15"/>
+ <inp2:m_RenderElement name="inp_label" prefix="coup" field="LastUsedOn" title="!la_fld_LastUsedOn!" size="10"/>
+
+ <inp2:m_RenderElement name="inp_edit_box_comment" prefix="coup" field="NumberOfUses" title="!la_fld_NumberOfUses!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
- <inp2:m_RenderElement name="inp_label" prefix="coup" field="LastUsedBy" title="!la_fld_LastUsedBy!" size="15"/>
- <inp2:m_RenderElement name="inp_label" prefix="coup" field="LastUsedOn" title="!la_fld_LastUsedOn!" size="10"/>
-
- <inp2:m_RenderElement name="inp_edit_box_comment" prefix="coup" field="NumberOfUses" title="!la_fld_NumberOfUses!" size="4"/>
-
-</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/coupon_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9.2.1
\ No newline at end of property
+1.9.2.2
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/discount_items.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/discount_items.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/discount_items.tpl (revision 11549)
@@ -1,120 +1,116 @@
-<inp2:m_RequireLogin permissions="in-commerce:discounts.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="870" height="600"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="d" icon="icon46_discounts" module="in-commerce" title="!la_title_Discounts!"/>
+<inp2:m_include t="incs/header"/>
-<inp2:m_include t="in-commerce/discounts/discounts_tabs"/>
+<inp2:m_if check="di_IsEntireOrder">
+ <inp2:m_SetParam grid="Default"/>
+<inp2:m_else/>
+ <inp2:m_SetParam grid="DiscountItems"/>
+</inp2:m_if>
-<inp2:m_RenderElement name="blue_bar" prefix="d" title_preset="discount_items" module="in-commerce" icon="icon46_discounts"/>
+<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discount_items" grid="$grid" pagination="1" pagination_prefix="di" 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('d','<inp2:d_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('d','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('d', '<inp2:d_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('d', '<inp2:d_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Products" escape="1"/>',
function() {
openSelector('di', '<inp2:adm_SelectorLink prefix="di" 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('di')
} ) );
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('di', '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="d_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="d_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="d_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="di" grid="$grid"/>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="grid_item_checkbox_td">
- <td valign="top" class="text">
- <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
- <img src="<inp2:ModulePath />img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">&nbsp;
- <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>
- </td>
+<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_if check="di_IsEntireOrder" >
- <inp2:m_RenderElement name="grid" PrefixSpecial="di" IdField="DiscountItemId" grid="Default" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
-<inp2:m_else/>
- <inp2:m_RenderElement name="grid" PrefixSpecial="di" IdField="DiscountItemId" grid="DiscountItems" header_block="grid_column_title" data_block="grid_data_td" search="on"/>
-</inp2:m_if>
-
+<inp2:m_RenderElement name="grid" PrefixSpecial="di" IdField="DiscountItemId" grid="$grid"/>
<script type="text/javascript">
<inp2:m_if check="di_IsEntireOrder" >
a_toolbar.DisableButton('new_item');
</inp2:m_if>
Grids['di'].SetDependantToolbarButtons( new Array('delete') );
</script>
<input type="hidden" name="main_prefix" id="main_prefix" value="di">
-<inp2:m_include t="incs/footer"/>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/discount_items.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11.2.2
\ No newline at end of property
+1.11.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/discount_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/discount_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/discount_edit.tpl (revision 11549)
@@ -1,74 +1,74 @@
-<inp2:m_RequireLogin permissions="in-commerce:discounts.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="870" height="600"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="d" icon="icon46_discounts" module="in-commerce" title="!la_title_Discounts!"/>
-
-<inp2:m_include t="in-commerce/discounts/discounts_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="d" title_preset="discount_edit" module="in-commerce" icon="icon46_discounts"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="d" section="in-commerce:discounts" title_preset="discount_edit" 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('d','<inp2:d_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('d','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('d', '<inp2:d_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('d', '<inp2:d_NextId/>');
}
) );
//a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.Render();
<inp2:m_if check="d_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
//a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="d_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="d_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:d_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
- <inp2:m_RenderElement name="inp_label" prefix="d" field="DiscountId" title="!la_fld_DiscountId!"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="d" field="Status" title="!la_fld_Status!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="d" field="Name" title="!la_fld_Name!" size="35"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="d" field="Start" title="!la_fld_Start!" size="10"/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="d" field="End" title="!la_fld_End!" size="10"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="d" field="GroupId" title="!la_fld_Group!"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="d" field="Type" title="!la_fld_Type!"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="d" field="Amount" title="!la_fld_Amount!" size="4"/>
-</table>
+<inp2:d_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_label" prefix="d" field="DiscountId" title="!la_fld_DiscountId!"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="d" field="Status" title="!la_fld_Status!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="d" field="Name" title="!la_fld_Name!" size="35"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="d" field="Start" title="!la_fld_Start!" size="10"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="d" field="End" title="!la_fld_End!" size="10"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="d" field="GroupId" title="!la_fld_Group!"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="d" field="Type" title="!la_fld_Type!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="d" field="Amount" title="!la_fld_Amount!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/discount_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.8.2.2
\ No newline at end of property
+1.8.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl (revision 11549)
@@ -1,179 +1,169 @@
-<inp2:m_RequireLogin permissions="in-commerce:gift-certificates.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="780" height="640"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="gc" icon="icon46_discounts" module="in-commerce" title="!la_title_GiftCertificates!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="gc" title_preset="gift_certificates_edit" module="in-commerce" icon="icon46_discounts"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="gc" section="in-commerce:gift-certificates" title_preset="gift_certificates_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() {
submit_event('gc','<inp2:gc_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:save_and_print', '<inp2:m_phrase label="la_ToolTip_SaveAndPrint" escape="1"/>', function() {
set_hidden_field('print_certificate', 1);
submit_event('gc','<inp2:gc_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('gc','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('gc', '<inp2:gc_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('gc', '<inp2:gc_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="gc_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="gc_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="gc_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script language="JavaScript">
function Random(N) {
return Math.floor(N * (Math.random() % 1));
}
function generateRandomCode(elementId){
var j, S = "", d;
for (j = 0; j < 10; j++) {
d=Random(2);
if (d==1)
S += String.fromCharCode(65 + Random(26));
else
S += String(Random(9));
}
document.getElementById(elementId).value=S;
}
</script>
<inp2:m_DefineElement name="inp_edit_box_generate" class="" onblur="" maxlength="" is_last="0">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
+ <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>
- <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
- </td>
- <td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;
- <input type="button" class="button" onClick="generateRandomCode('<inp2:{$prefix}_InputName field="$field"/>')" value="<inp2:m_Phrase label="la_GenerateCode" />" />
- </td>
- </tr>
-</inp2:m_DefineElement>
-
-<inp2:m_DefineElement name="inp_edit_box_comment" >
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <inp2:m_RenderElement name="inp_edit_field_caption" prefix="$prefix" field="$field" title_phrase="$title_phrase" title="$title" is_last="$is_last"/>
- <td>
- <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>" maxlength="<inp2:m_param name="maxlength"/>" class="<inp2:m_param name="class"/>" onblur="<inp2:m_Param name="onblur"/>">
- <inp2:m_Phrase label="la_comment_LeaveBlank" />
- </td>
- <td class="error"><inp2:{$prefix}_Error field="$field"/>&nbsp;
+ <td class="control-cell">
+ <input type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>">
+ <input type="button" class="button" onClick="generateRandomCode('<inp2:{$prefix}_InputName field="$field"/>')" value="<inp2:m_Phrase label="la_GenerateCode" />" />
</td>
+ <inp2:m_RenderElement name="inp_edit_error" pass_params="1"/>
</tr>
</inp2:m_DefineElement>
<inp2:gc_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="GiftCertificateId" title="la_fld_Id"/>
-
- <inp2:m_if check="gc_HasOrder">
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Purchaser" title="!la_fld_SenderName!" size="35"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Recipient" title="!la_fld_RecipientName!" size="35"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Message" title="!la_fld_MessageText!" cols="35" rows="7"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Amount" title="!la_fld_Amount!" size="7"/>
-
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="SendVia" title="!la_fld_DeliveryMethod!"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Purchaser" title="!la_fld_SenderName!" size="35"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Recipient" title="!la_fld_RecipientName!" size="35"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="gc" field="Message" title="!la_fld_MessageText!" cols="35" rows="7"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Amount" title="!la_fld_Amount!" size="7"/>
-
- <inp2:m_RenderElement name="inp_edit_radio" prefix="gc" field="SendVia" title="!la_fld_DeliveryMethod!"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_EmailDelivery!"/>
- <inp2:m_if check="gc_HasOrder">
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientEmail" title="!la_fld_Email!" size="35"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientEmail" title="!la_fld_Email!" size="35"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="subsection" title="!la_section_PostalDelivery!"/>
- <inp2:m_if check="gc_HasOrder">
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientFirstname" title="la_fld_FirstName" size="35"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientLastname" title="la_fld_LastName" size="35"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientAddress1" title="la_fld_AddressLine1"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientAddress2" title="la_fld_AddressLine2"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientCity" title="la_fld_City"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientState" title="la_fld_State"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientFirstname" title="la_fld_FirstName" size="35"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientLastname" title="la_fld_LastName" size="35"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientAddress1" title="la_fld_AddressLine1"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientAddress2" title="la_fld_AddressLine2"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientCity" title="la_fld_City"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientState" title="la_fld_State"/>
- <inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
- </inp2:m_if>
-
- <inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
- <inp2:m_RenderElement name="inp_edit_radio" prefix="gc" field="Status" title="!la_fld_Status!"/>
-
- <inp2:m_if check="gc_HasOrder">
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="AddDate" title="la_fld_CreatedOn"/>
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Code" title="!la_fld_Code!" size="35"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="gc" field="AddDate" title="la_fld_CreatedOn"/>
- <inp2:m_RenderElement name="inp_edit_box_generate" prefix="gc" field="Code" title="!la_fld_Code!" size="35"/>
- </inp2:m_if>
-
- <inp2:m_if check="gc_IsNewItem" inverse="inverse">
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Debit" title="!la_fld_RemainingAmount!" size="7"/>
- </inp2:m_if>
-
- <inp2:m_if check="gc_HasOrder">
- <inp2:m_RenderElement name="inp_label" prefix="gc" field="Expiration" title="!la_fld_Expiration!" size="10"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_edit_date_time" prefix="gc" field="Expiration" title="!la_fld_Expiration!" size="10"/>
- </inp2:m_if>
-</table>
-<inp2:m_include t="incs/footer"/>
+<inp2:gc_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
+ <inp2:m_RenderElement name="inp_id_label" prefix="gc" field="GiftCertificateId" title="la_fld_Id"/>
+
+ <inp2:m_if check="gc_HasOrder">
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Purchaser" title="!la_fld_SenderName!" size="35"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Recipient" title="!la_fld_RecipientName!" size="35"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Message" title="!la_fld_MessageText!" cols="35" rows="7"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Amount" title="!la_fld_Amount!" size="7"/>
+
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="SendVia" title="!la_fld_DeliveryMethod!"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Purchaser" title="!la_fld_SenderName!" size="35"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Recipient" title="!la_fld_RecipientName!" size="35"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="gc" field="Message" title="!la_fld_MessageText!" cols="35" rows="7"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="Amount" title="!la_fld_Amount!" size="7"/>
+
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="gc" field="SendVia" title="!la_fld_DeliveryMethod!"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_EmailDelivery!"/>
+ <inp2:m_if check="gc_HasOrder">
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientEmail" title="!la_fld_Email!" size="35"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientEmail" title="!la_fld_Email!" size="35"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" title="!la_section_PostalDelivery!"/>
+ <inp2:m_if check="gc_HasOrder">
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientFirstname" title="la_fld_FirstName" size="35"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientLastname" title="la_fld_LastName" size="35"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientAddress1" title="la_fld_AddressLine1"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientAddress2" title="la_fld_AddressLine2"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientCity" title="la_fld_City"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientState" title="la_fld_State"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientFirstname" title="la_fld_FirstName" size="35"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientLastname" title="la_fld_LastName" size="35"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientAddress1" title="la_fld_AddressLine1"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientAddress2" title="la_fld_AddressLine2"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientCity" title="la_fld_City"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientZipcode" title="la_fld_Zip"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientState" title="la_fld_State"/>
+ <inp2:m_RenderElement name="inp_edit_options" prefix="gc" field="RecipientCountry" title="la_fld_Country"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="gc" field="RecipientPhone" title="la_fld_Phone"/>
+ </inp2:m_if>
+
+ <inp2:m_RenderElement name="subsection" title="la_section_Properties"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="gc" field="Status" title="!la_fld_Status!"/>
+
+ <inp2:m_if check="gc_HasOrder">
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="AddDate" title="la_fld_CreatedOn"/>
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Code" title="!la_fld_Code!" size="35"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="gc" field="AddDate" title="la_fld_CreatedOn"/>
+ <inp2:m_RenderElement name="inp_edit_box_generate" prefix="gc" field="Code" title="!la_fld_Code!" size="35"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="gc_IsNewItem" inverse="inverse">
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Debit" title="!la_fld_RemainingAmount!" size="7"/>
+ </inp2:m_if>
+
+ <inp2:m_if check="gc_HasOrder">
+ <inp2:m_RenderElement name="inp_label" prefix="gc" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+ <inp2:m_else/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="gc" field="Expiration" title="!la_fld_Expiration!" size="10"/>
+ </inp2:m_if>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
+
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/discounts/gift_certificate_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.3
\ No newline at end of property
+1.1.2.4
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_tabs.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_tabs.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_tabs.tpl (nonexistent)
@@ -1,14 +0,0 @@
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
- <td align="right" width="100%">
- <table cellpadding="0" cellspacing="0" border="0" height="23">
- <tr>
- <inp2:m_RenderElement name="tab" title="la_tab_General" t="in-commerce/payment_type/payment_type_edit" main_prefix="pt"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Gateway" t="in-commerce/payment_type/payment_type_gateway" main_prefix="pt"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Currencies" t="in-commerce/payment_type/payment_type_currencies" main_prefix="pt"/>
- <inp2:m_RenderElement name="tab" title="la_tab_Groups" t="in-commerce/payment_type/payment_type_groups" main_prefix="pt"/>
- </tr>
- </table>
- </td>
-</tr>
-</table>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_tabs.tpl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.4
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_edit.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_edit.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_edit.tpl (revision 11549)
@@ -1,81 +1,74 @@
-<inp2:m_RequireLogin permissions="in-commerce:payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="790" height="520"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="pt" icon="icon46_payment_types" module="in-commerce" title="!la_title_PaymentTypes!"/>
-
-<inp2:m_include t="in-commerce/payment_type/payment_type_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="pt" title_preset="payment_type_edit" module="in-commerce" icon="icon46_payment_types"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="payment_type_edit" 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('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>
<inp2:pt_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="inp_label" prefix="pt" field="PaymentTypeId" title="!la_fld_PaymentTypeId!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Name" title="!la_fld_Name!" size="40"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Description" title="!la_fld_Description!" size="40"/>
-
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="pt" field="Instructions" title="!la_fld_Instructions!" cols="40" rows="5"/>
- <inp2:m_RenderElement name="inp_edit_textarea" prefix="pt" field="AdminComments" title="!la_fld_AdminComments!" cols="40" rows="5"/>
+<inp2:pt_ErrorWarning name="form_error_warning"/>
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pt" field="Status" title="!la_fld_Enabled!"/>
-
- <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pt" field="PlacedOrdersEdit" title="!la_fld_PlacedOrdersEdit!"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Priority" title="!la_fld_Priority!" size="3"/>
-
- <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="ProcessingFee" title="!la_fld_ProcessingFee!" size="4"/>
-</table>
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_id_label" prefix="pt" field="PaymentTypeId" title="!la_fld_PaymentTypeId!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Name" title="!la_fld_Name!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Description" title="!la_fld_Description!" size="40"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="pt" field="Instructions" title="!la_fld_Instructions!" cols="40" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_textarea" prefix="pt" field="AdminComments" title="!la_fld_AdminComments!" cols="40" rows="5"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pt" field="Status" title="!la_fld_Enabled!"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="pt" field="PlacedOrdersEdit" title="!la_fld_PlacedOrdersEdit!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="Priority" title="!la_fld_Priority!" size="3"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pt" field="ProcessingFee" title="!la_fld_ProcessingFee!" size="4"/>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10
\ No newline at end of property
+1.10.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl (revision 11549)
@@ -1,107 +1,104 @@
-<inp2:m_RequireLogin permissions="in-commerce:payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
-
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="pt" icon="icon46_payment_types" module="in-commerce" title="!la_title_PaymentTypes!"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="pt" title_preset="payment_type_list" module="in-commerce" icon="icon46_payment_types"/>
+<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"/>',
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() {
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: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>
- alert('<inp2:m_Phrase label="la_error_CannotDeletePaymentType"/>');
+<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') );
</script>
-<inp2:m_DefineElement name="remove_unused_warning" >
+<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
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9.2.2
\ No newline at end of property
+1.9.2.3
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_groups.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_groups.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_groups.tpl (revision 11549)
@@ -1,121 +1,119 @@
-<inp2:m_RequireLogin permissions="in-commerce:payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="790" height="520"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="pt" icon="icon46_payment_types" module="in-commerce" title="!la_title_PaymentTypes!"/>
-
-<inp2:m_include t="in-commerce/payment_type/payment_type_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="pt" title_preset="payment_type_edit" module="in-commerce" icon="icon46_payment_types"/>
+<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"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <inp2:m_RenderElement name="inp_label" prefix="pt" field="PaymentTypeId" title="!la_fld_PaymentTypeId!"/>
- <inp2:m_RenderElement name="inp_edit_hidden" prefix="pt" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
- <tr class="table-color2">
- <td style="width: 250px">
+<inp2:pt_ErrorWarning name="form_error_warning"/>
+
+<inp2:m_RenderElement name="inp_edit_hidden" prefix="pt" field="PortalGroups" title="!la_fld_Groups!" size="40"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <inp2:m_RenderElement name="inp_label" prefix="pt" field="PaymentTypeId" title="!la_fld_PaymentTypeId!"/>
+ <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"/>:
</td>
- <td>
- <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">
- <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">
- <inp2:pt_ListGroups render_as="group_option"/>
-</select>
- </td>
- </tr>
- </table>
-
+ <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">
+ <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">
+ <inp2:pt_ListGroups render_as="group_option"/>
+ </select>
+ </td>
+ </tr>
+ </table>
</td>
- <td>&nbsp;</td>
</tr>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
-
-</table>
-
-<inp2:m_include t="incs/footer"/>
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_groups.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl (revision 11549)
@@ -1,133 +1,136 @@
-<inp2:m_RequireLogin permissions="in-commerce:payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="790" height="520"/>
-<inp2:m_DefineElement name="GatewayFieldsDiv" >
+<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 name="dummy">
</inp2:m_DefineElement>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="pt" icon="icon46_payment_types" module="in-commerce" title="!la_title_PaymentTypes!"/>
-
-<inp2:m_include t="in-commerce/payment_type/payment_type_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="pt" title_preset="gateway" module="in-commerce" icon="icon46_payment_types"/>
-
<!-- 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"/>" size="<inp2:m_param name="size"/>" class="<inp2:m_param name="class"/>">
+ <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"/>">
</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:{$PrefixSpecial}_PredefinedOptions field="$field" block="inp_option_phrase" selected="selected"/>
+ <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="table-color1" even="table-color2"/>" GatewayId="<inp2:m_param name="gateway_id"/>" style="display: <inp2:m_param name="display"/>;">
- <td><inp2:gwf_Field field="FieldName"/></td>
- <td>
+ <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>
- <td>&nbsp;</td>
</tr>
</inp2:m_DefineElement>
-
<inp2:gwf_initGWConfigValues/>
+
<inp2:pt_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder" 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"/>
-</table>
+<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
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_gateway.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.11
\ No newline at end of property
+1.11.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl
===================================================================
--- branches/RC/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl (revision 11548)
+++ branches/RC/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl (revision 11549)
@@ -1,79 +1,83 @@
-<inp2:m_RequireLogin permissions="in-commerce:payment_types.view" system="1"/>
-<inp2:m_include t="incs/header" nobody="yes"/>
+<inp2:adm_SetPopupSize width="790" height="520"/>
-<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
-<inp2:m_RenderElement name="section_header" prefix="pt" icon="icon46_payment_types" module="in-commerce" title="!la_title_PaymentTypes!"/>
+<inp2:m_include t="incs/header"/>
+<inp2:m_RenderElement name="combined_header" prefix="pt" section="in-commerce:payment_types" title_preset="payment_currencies_edit" tab_preset="Default"/>
-<inp2:m_include t="in-commerce/payment_type/payment_type_tabs"/>
-
-<inp2:m_RenderElement name="blue_bar" prefix="pt" title_preset="payment_currencies_edit" module="in-commerce" icon="icon46_payment_types"/>
<!-- 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','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('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.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_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>
-
+ </inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
-<inp2:m_DefineElement name="currency_option" >
-<option value="<inp2:curr.active_field field="CurrencyId" />" <inp2:m_if check="ptc.active_CurrencySelected" >selected</inp2:m_if>>
- <inp2:curr.active_field field="ISO" /> / <inp2:curr.active_phrasefield field="Name" />
-</option>
+<inp2:m_DefineElement name="currency_option">
+ <option value="<inp2:curr.active_field field="CurrencyId" />" <inp2:m_if check="ptc.active_CurrencySelected" >selected</inp2:m_if>>
+ <inp2:curr.active_field field="ISO" /> / <inp2:curr.active_phrasefield field="Name" />
+ </option>
</inp2:m_DefineElement>
+
<inp2:pt_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
- <td><inp2:m_phrase label="la_fld_PaymentTypeCurrencies" /></td>
- <td>
+<inp2:pt_ErrorWarning name="form_error_warning"/>
+
+<div id="scroll_container">
+ <table class="edit-form">
+ <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_PaymentTypeCurrencies" />:
+ </td>
+ <td class="control-mid">&nbsp;</td>
+ <td class="control-cell">
<select multiple name="currency_list[]">
<inp2:curr.active_PrintList block="currency_option" />
</select>
</td>
- <td class="error">&nbsp;</td>
</tr>
-</table>
+ <inp2:m_RenderElement name="inp_edit_filler"/>
+ </table>
+</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/in-commerce/admin_templates/payment_type/payment_type_currencies.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.2.1
\ No newline at end of property
Index: branches/RC/in-commerce/install/upgrades.sql
===================================================================
--- branches/RC/in-commerce/install/upgrades.sql (revision 11548)
+++ branches/RC/in-commerce/install/upgrades.sql (revision 11549)
@@ -1,11 +1,14 @@
# ===== 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';
\ No newline at end of file
+UPDATE Category SET CachedTemplate = '/in-commerce/designs/section' WHERE CachedTemplate = 'in-commerce/store/category';
+
+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.%';
\ No newline at end of file
Property changes on: branches/RC/in-commerce/install/upgrades.sql
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.7
\ No newline at end of property
+1.1.2.8
\ No newline at end of property

Event Timeline