Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Sun, Jan 5, 6:54 PM

in-commerce

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/5.2.x/units/gateways/gateways_config.php
===================================================================
--- branches/5.2.x/units/gateways/gateways_config.php (revision 14568)
+++ branches/5.2.x/units/gateways/gateways_config.php (revision 14569)
@@ -1,85 +1,74 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'gwf',
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'GatewayEventHandler','file'=>'gw_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'GatewayTagProcessor','file'=>'gw_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'pt',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnListBuild' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCheckGateways',
),
Array(
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'pt',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnCreate', 'OnSave', 'OnUpdate', 'onPreSaveAndGoToTab', 'onPreSaveAndGo' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnSaveValues',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'GWConfigFieldId',
'TableName' => TABLE_PREFIX.'GatewayConfigFields',
- 'ListSQLs' => Array (''=>'SELECT * FROM %s',
- ), // key - special, value - list select sql
- 'ItemSQLs' => Array( ''=>'SELECT * FROM %s',
- ),
+ 'ListSQLs' => Array (
+ '' => 'SELECT * FROM %s',
+ ), // key - special, value - list select sql
+
+ 'ItemSQLs' => Array (
+ ''=>'SELECT * FROM %s',
+ ),
'Fields' => Array (
'GWConfigFieldId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
'SystemFieldName' => Array('type' => 'string', 'not_null' => 1, 'default' => '', ),
'FieldName' => Array('type' => 'string', 'required' => true, 'max_len' => 100, 'not_null' => 1, 'default' => '', ),
'ElementType' => Array('type' => 'string', 'not_null' => 1, 'default' => 'text', ),
'ValueList' => Array('type' => 'string', 'default' => NULL),
'GatewayId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, ),
),
- 'VirtualFields' => Array (
- 'Value' => Array('type' => 'string', 'default' => ''),
- ),
-
- 'Grids' => Array(
- 'Default' => Array(
- 'Icons' => Array(
- 'default' => 'icon16_item.png',
- 'module' => 'core',
- ),
- 'Fields' => Array(
- 'FieldName' => Array( 'title'=>'la_Fields' ),
- 'Value' => Array( 'title'=>'la_Value' ),
- ),
-
- ),
- ),
+ 'VirtualFields' => Array (
+ 'Value' => Array('type' => 'string', 'default' => ''),
+ ),
);
\ No newline at end of file
Index: branches/5.2.x/units/gateways/gw_classes/multicards.php
===================================================================
--- branches/5.2.x/units/gateways/gw_classes/multicards.php (revision 14568)
+++ branches/5.2.x/units/gateways/gw_classes/multicards.php (revision 14569)
@@ -1,122 +1,122 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
require_once GW_CLASS_PATH.'/gw_base.php';
$class_name = 'kMultiCardsGW'; // for automatic installation
class kMultiCardsGW extends kGWBase
{
function InstallData()
{
$data = array(
'Gateway' => Array('Name' => 'Multicards', 'ClassName' => 'kMultiCardsGW', 'ClassFile' => 'multicards.php', 'RequireCCFields' => 0),
'ConfigFields' => Array(
'submit_url' => Array('Name' => 'Submit URL', 'Type' => 'text', 'ValueList' => '', 'Default' => 'https://secure.multicards.com/cgi-bin/order2/processorder1.pl'),
'merchant_id' => Array('Name' => 'Merchant ID', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
'merchant_url_idx' => Array('Name' => 'Merchant Order Page Id', 'Type' => 'text', 'ValueList' => '', 'Default' => ''),
)
);
return $data;
}
/**
* Returns payment form submit url
*
* @param Array $gw_params gateway params from payment type config
* @return string
*/
function getFormAction($gw_params)
{
return $gw_params['submit_url'];
}
/**
* Processed input data and convets it to fields understandable by gateway
*
* @param Array $item_data
* @param Array $tag_params additional params for gateway passed through tag
* @param Array $gw_params gateway params from payment type config
* @return Array
*/
function getHiddenFields($item_data, $tag_params, $gw_params)
{
$ret = Array();
$ret['mer_id'] = $gw_params['merchant_id'];
$ret['mer_url_idx'] = $gw_params['merchant_url_idx'];
$ret['num_items'] = 100;
$ret['item1_price'] = $item_data['TotalAmount'];
$ret['item1_desc'] = 'Order #'.$item_data['OrderNumber'];
$ret['item1_qty'] = 1;
// $ret['cancel_return'] = $this->Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m'));
// $ret['return'] = $this->Application->HREF($tag_params['return_template'],'',Array('pass'=>'m'));
// $ret['notify_url'] = $this->getNotificationUrl() . '?sid='.$this->Application->GetSID().'&admin=1&order_id='.$item_data['OrderId'];
// $ret['cmd'] = '_xclick'; // act as "Buy Now" PayPal button
$ret['no_note'] = 1; // customer is not prompted for notes
$ret['no_shipping'] = 1; // customer is not prompted for shipping address
$ret['rm'] = 2; // return method - POST
$ret['currency_code'] = $target;
$ret['invoice'] = $item_data['OrderNumber'];
$ret['business'] = $gw_params['business_account'];
// prepopulated fields
$billing_email = $item_data['BillingEmail'];
if (!$billing_email) {
$billing_email = $this->Conn->GetOne(' SELECT Email FROM '.$this->Application->getUnitOption('u', 'TableName').'
WHERE PortalUserId = '.$this->Application->RecallVar('user_id'));
}
$ret['cust_email'] = $billing_email;
$ret['cust_name'] = $item_data['BillingTo'];
$ret['cust_company'] = $item_data['BillingCompany'];
$ret['cust_phone'] = $item_data['BillingPhone'];
$ret['cust_address1'] = $item_data['BillingAddress1'];
$ret['cust_address2'] = $item_data['BillingAddress2'];
$ret['cust_city'] = $item_data['BillingCity'];
$ret['cust_state'] = $item_data['BillingState'];
$ret['cust_zip'] = $item_data['BillingZip'] ? $item_data['BillingZip'] : '99999';
$ret['cust_country'] = $item_data['BillingCountry'];
$ret['user1'] = $this->Application->GetSID().','.MD5($item_data['OrderId']);
$url = $this->Application->HREF($tag_params['return_template'], '', array('pass'=>'m'));
$ret['user2'] = $url;
return $ret;
}
function processNotification($gw_params)
{
$this->parsed_responce = $_POST;
list ($sid, $auth_code) = explode(',', $this->Application->GetVar('user1'));
$session =& $this->Application->recallObject('Session');
$session->SID = $sid;
$order_id = $this->Conn->GetOne('SELECT OrderId FROM '.TABLE_PREFIX.'Orders WHERE md5(OrderId) = '.$this->Conn->qstr($auth_code));
$this->Application->SetVar('ord_id', $order_id);
$order =& $this->Application->recallObject('ord');
$order->Load($order_id);
$url = $this->Application->GetVar('user2');
- echo '<!--success--><a href="'.$url.'">'.$this->Application->Phrase('la_multicards_continue').'</a>';
+ echo '<!--success--><a href="'.$url.'">'.$this->Application->Phrase('lu_text_MulticardsContinue').'</a>';
return 1;
}
}
\ No newline at end of file
Index: branches/5.2.x/units/pricing/pricing_event_handler.php
===================================================================
--- branches/5.2.x/units/pricing/pricing_event_handler.php (revision 14568)
+++ branches/5.2.x/units/pricing/pricing_event_handler.php (revision 14569)
@@ -1,477 +1,484 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
// include globals.php from current folder
kUtil::includeOnce(MODULES_PATH .'/in-commerce/units/pricing/globals.php');
class PricingEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
- 'OnMoreBrackets' => Array('subitem' => 'add|edit'),
- 'OnInfinity' => Array('subitem' => 'add|edit'),
- 'OnArrange' => Array('subitem' => 'add|edit'),
+ 'OnMoreBrackets' => Array('subitem' => 'add|edit'),
+ 'OnInfinity' => Array('subitem' => 'add|edit'),
+ 'OnArrange' => Array('subitem' => 'add|edit'),
+ 'OnDeleteBrackets' => Array('subitem' => 'add|edit'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
function mapEvents()
{
parent::mapEvents(); // ensure auto-adding of approve/decine and so on events
- $brackets_events = Array( 'OnMoreBrackets' => 'PricingBracketsAction',
- 'OnArrange' => 'PricingBracketsAction',
- 'OnInfinity' => 'PricingBracketsAction');
+ $brackets_events = Array(
+ 'OnMoreBrackets' => 'PricingBracketsAction',
+ 'OnArrange' => 'PricingBracketsAction',
+ 'OnInfinity' => 'PricingBracketsAction',
+ 'OnDeleteBrackets' => 'PricingBracketsAction',
+ );
$this->eventMethods = array_merge($this->eventMethods, $brackets_events);
}
function PricingBracketsAction(&$event)
{
$event->redirect=false;
$temp = $this->Application->GetVar($event->getPrefixSpecial(true));
// $object =& $event->GetObject();
// $formatter =& $this->Application->recallObject('kFormatter');
// $temp = $formatter->TypeCastArray($temp, $object);
//uasort($temp, 'pr_bracket_comp');
$bracket =& $this->Application->recallObject($event->getPrefixSpecial());
foreach($temp as $id => $record)
{
if( $record['MaxQty'] == '&#8734;' || $record['MaxQty'] == '∞')
{
$temp[$id]['MaxQty'] = -1;
}
}
$group_id = $this->Application->getVar('group_id');
if($group_id>0){
$where_group=' GroupId = '.$group_id.' ';
}
else {
$where_group= ' TRUE ';
}
switch ($event->Name)
{
case 'OnMoreBrackets':
$new_id = (int)$this->Conn->GetOne('SELECT MIN('.$bracket->IDField.') FROM '.$bracket->TableName);
if($new_id > 0) $new_id = 0;
do
{
$new_id--;
} while
($this->check_array($this->Application->GetVar($event->getPrefixSpecial(true)), 'PriceId', $new_id));
$last_max_qty = $this->Conn->GetOne('SELECT MAX(MaxQty) FROM '.$bracket->TableName.' WHERE '.$where_group);
$min_qty = $this->Conn->GetOne('SELECT MIN(MaxQty) FROM '.$bracket->TableName.' WHERE '.$where_group);
if ($min_qty==-1) $last_max_qty = -1;
if (!$last_max_qty) $last_max_qty=1;
for($i = $new_id; $i > $new_id - 5; $i--)
{
$temp[$i]['PriceId'] = $i;
$temp[$i]['MinQty'] = ($i == $new_id-4 && $last_max_qty != -1) ? $last_max_qty : '';
$temp[$i]['MaxQty'] = ($i == $new_id-4 && $last_max_qty != -1) ? -1 : '';
$temp[$i]['Price'] = '';
$temp[$i]['Cost'] = '';
$temp[$i]['Points'] = '';
$temp[$i]['Negotiated'] = '0';
$temp[$i]['IsPrimary'] = '0';
$temp[$i]['GroupId'] = $group_id;
-
-
}
$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
$event->CallSubEvent('OnPreSaveBrackets');
break;
case 'OnArrange':
$temp=$this->OnArrangeBrackets($event, $temp, $bracket);
$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
$event->CallSubEvent('OnPreSaveBrackets');
break;
case 'OnInfinity':
$temp=$this->OnArrangeBrackets($event, $temp, $bracket);
$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
$event->CallSubEvent('OnPreSaveBrackets');
$infinite_exists = $this->Conn->GetOne('SELECT count(*) FROM '.$bracket->TableName.' WHERE MaxQty=-1 '.' AND '.$where_group);
if($infinite_exists==0){
reset($temp);
$last_bracket=end($temp);
$new_id = (int)$this->Conn->GetOne('SELECT MIN('.$bracket->IDField.') FROM '.$bracket->TableName);
$brackets_exist = (int)$this->Conn->GetOne('SELECT COUNT(*) FROM '.$bracket->TableName.' WHERE '.$where_group);
if($new_id > 0) $new_id = 0;
do
{
$new_id--;
} while
($this->check_array($this->Application->GetVar($event->getPrefixSpecial(true)), 'PriceId', $new_id));
$infinite_bracket['PriceId'] = $new_id;
$infinite_bracket['MinQty'] = ($brackets_exist>0)?$last_bracket['MaxQty']:1;
$infinite_bracket['MaxQty'] = '-1';
$infinite_bracket['Price'] = '';
$infinite_bracket['Cost'] = '';
$infinite_bracket['Points'] = '';
$infinite_bracket['Negotiated'] = '0';
$infinite_bracket['IsPrimary'] = '0';
$infinite_bracket['GroupId'] = $group_id;
$temp[$new_id]=$infinite_bracket;
reset($temp);
}
$this->Application->SetVar($event->getPrefixSpecial(true), $temp);
$event->CallSubEvent('OnPreSaveBrackets');
break;
+
+ case 'OnDeleteBrackets':
+ if ($group_id) {
+ $temp = ''; // delete all pricings from "pr_tang" var
+
+ $sql = 'DELETE FROM ' . $bracket->TableName . '
+ WHERE ProductId = ' . $this->Application->GetVar('p_id') . ' AND GroupId = ' . $group_id;
+ $this->Conn->Query($sql);
+ }
+ break;
default:
}
- $this->Application->SetVar($event->getPrefixSpecial(true), $temp);
+ $this->Application->SetVar($event->getPrefixSpecial(true), $temp); // store pr_tang var
}
function OnPreSaveBrackets(&$event)
{
- if( $this->Application->GetVar('pr_tang'))
- {
+ if( $this->Application->GetVar('pr_tang') ) {
+
$object =& $event->GetObject();
/* @var $object kDBItem */
+ $product_id = $this->Application->GetVar('p_id');
$group_id = $this->Application->getVar('group_id');
- if($group_id>0){
- $where_group=' AND GroupId = '.$group_id.' ';
- }
-
- $stored_ids = $this->Conn->GetCol("SELECT PriceId FROM ".$object->TableName." WHERE ProductId=".$this->Application->GetVar("p_id").' '.$where_group);
-
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true));
-
+ $sql = 'SELECT PriceId
+ FROM ' . $object->TableName . '
+ WHERE ProductId = ' . $product_id . ' ' . ($group_id? 'AND GroupId = ' . $group_id : '');
+ $stored_ids = $this->Conn->GetCol($sql);
+
+ $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) ); // get pr_tang var
uasort($items_info, 'pr_bracket_comp');
-
-
- foreach ($items_info as $item_id=>$values)
- {
+
+ foreach ($items_info as $item_id => $values) {
if (in_array($item_id, $stored_ids)) { //if it's already exist
$object->Load($item_id);
$object->SetFieldsFromHash($values);
+
if (!$object->Validate()) {
unset($stored_ids[array_search($item_id, $stored_ids)]);
$event->redirect = false;
continue;
}
- if( $object->Update($item_id) )
- {
+ if( $object->Update($item_id) ) {
$event->status=kEvent::erSUCCESS;
}
- else
- {
+ else {
$event->status=kEvent::erFAIL;
$event->redirect=false;
break;
}
unset($stored_ids[array_search($item_id, $stored_ids)]);
}
else {
$object->Clear();
$object->SetFieldsFromHash($values);
- $object->SetDBField('ProductId', $this->Application->GetVar("p_id"));
+ $object->SetDBField('ProductId', $product_id);
- if( $object->Create() )
- {
+ if( $object->Create() ) {
$event->status=kEvent::erSUCCESS;
}
}
}
// delete
- foreach ($stored_ids as $stored_id){
- $this->Conn->Query("DELETE FROM ".$object->TableName." WHERE PriceId=".$stored_id);
+ foreach ($stored_ids as $stored_id) {
+ $this->Conn->Query('DELETE FROM ' . $object->TableName . ' WHERE PriceId = ' . $stored_id);
}
}
}
function customProcessing(&$event,$type)
{
$bracket =& $event->getObject();
switch ($type)
{
case 'before':
$bracket->SetDBField('ProductId', $this->Application->GetVar('p_id'));
if( $bracket->GetDBField('MaxQty') == '&#8734;' || $bracket->GetDBField('MaxQty') == '∞' )
{
$bracket->SetDBField('MaxQty', -1);
}
break;
case 'after':
break;
default:
}
}
function OnArrangeBrackets(&$event, &$temp, &$bracket)
{
$temp_orig = $temp;
reset($temp);
if (is_array($temp))
{
// array to store max values (2nd column)
$end_values = Array();
// get minimal value of Min
$first_elem=current($temp);
$start = $first_elem['MinQty'];
if (!$start){
$start = 1;
}
foreach($temp as $id => $record)
{
/*
This 3-ifs logic fixes collision with invalid input values having
1 pricing record.
The logic is:
1) If we got Max less than Min, we set Min to 1 that gives us
integrity.
2) If we got equal values for Min and Max, we set range 1..Max like
in previous. But if Min was 1 and Max was 1 we set full range 1..infinity
3) If we got Max = 0 we just set it tom infinity because we can't
guess what user meant
*/
if (sizeof($temp) == 1 && $record['MinQty'] > ($record['MaxQty'] == -1 ? $record['MinQty']+1 : $record['MaxQty']) ){
$record['MinQty'] = 1;
$temp[$id]['MinQty'] = 1;
$start = 1;
}
if (sizeof($temp) == 1 && $record['MinQty'] == $record['MaxQty']){
if ($record['MaxQty'] == 1){
$record['MaxQty'] = -1;
$temp[$id]['MaxQty'] = -1;
}
else {
$record['MinQty'] = 1;
$temp[$id]['MinQty'] = 1;
}
}
if (sizeof($temp) == 1 && $record['MaxQty'] == 0){
$record['MaxQty'] = -1;
$temp[$id]['MaxQty'] = -1;
}
if(
// MAX is less than start
($record['MaxQty'] <= $start && $record['MaxQty'] != -1) ||
// Max is empty
!$record['MaxQty'] ||
// Max already defined in $end_values
(array_search($record['MaxQty'], $end_values) !== false)
) { // then delete from brackets list
unset($temp[$id]);
}
else { // this is when ok - add to end_values list
$end_values[] = $record['MaxQty'];
}
}
// sort brackets by 2nd column (Max values)
uasort($temp, 'pr_bracket_comp');
reset($temp);
$first_item=each($temp);
$first_item_key=$first_item['key'];
$group_id = $this->Application->getVar('group_id');
$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
if($group_id>0){
$where_group=' AND GroupId = '.$group_id.' ';
}
$ids = $this->Conn->GetCol('SELECT PriceId FROM '.$bracket->TableName.' WHERE ProductId='.$this->Application->GetVar('p_id').' '.$where_group);
if(is_array($ids)) {
usort($ids, 'pr_bracket_id_sort');
}
$min_id = min( min($ids) - 1, -1 );
foreach($temp as $key => $record)
{
$temp[$key]['MinQty']=$start;
$temp[$key]['IsPrimary']=0;
$temp[$key]['GroupId']=$group_id;
$start=$temp[$key]['MaxQty'];
}
if ($temp[$first_item_key]['GroupId'] == $default_group) {
$temp[$first_item_key]['IsPrimary']=1;
}
}
return $temp;
}
/**
* Set's price as primary for product
*
* @param kEvent $event
*/
function OnSetPrimary(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$this->StoreSelectedIDs($event);
$ids=$this->getSelectedIDs($event);
if($ids)
{
$id = array_shift($ids);
$table_info = $object->getLinkedInfo();
$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 1 WHERE ('.$table_info['ForeignKey'].' = '.$table_info['ParentId'].') AND (PriceId = '.$id.')');
}
$event->setRedirectParams(Array('opener' => 's'), true);
}
/**
* Resets primary mark for other pricings of given product, when current pricing is primary
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$object =& $event->getObject();
/* @var $object kDBItem */
if ($object->GetDBField('IsPrimary') == 1) {
// make all pricings non primary, when this one is
$sql = 'UPDATE ' . $object->TableName . '
SET IsPrimary = 0
WHERE (ProductId = ' . $object->GetDBField('ProductId') . ') AND (' . $object->IDField . ' <> ' . $object->GetID() . ')';
$this->Conn->Query($sql);
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
$object =& $event->getObject();
$table_info = $object->getLinkedInfo($event->Special);
$table_info['ParentId'] = ($table_info['ParentId']?$table_info['ParentId']:0);
if ( $object->GetDBField('IsPrimary') == 1 ){
$this->Conn->Query('UPDATE '.$object->TableName.' SET IsPrimary = 0 WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
}
else {
$prices_qty = $this->Conn->GetOne('SELECT COUNT(*) FROM '.$object->TableName.' WHERE '.$table_info['ForeignKey'].' = '.$table_info['ParentId']);
if ($prices_qty == 0) {
$object->SetDBField('IsPrimary', 1);
}
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
if ($this->Application->isAdminUser) {
return ;
}
if ( $this->Application->ConfigValue('Comm_PriceBracketCalculation') == 1 ) {
$sql = 'SELECT PrimaryGroupId
FROM ' . TABLE_PREFIX . 'PortalUser
WHERE PortalUserId = ' . $this->Application->GetVar('u_id');
$pricing_group = $this->Conn->GetOne($sql);
if ($pricing_group) {
$sql = 'SELECT COUNT(*)
FROM ' . TABLE_PREFIX . 'ProductsPricing
WHERE ProductId = ' . $this->Application->GetVar('p_id') . ' AND GroupId = ' . $pricing_group . ' AND Price IS NOT NULL';
$pricing_for_group_exists = $this->Conn->GetOne($sql);
}
if ( !$pricing_group || !$pricing_for_group_exists ) {
$pricing_group = $this->Application->ConfigValue('User_LoggedInGroup');
}
}
else {
$user_groups = $this->Application->RecallVar('UserGroups');
//$cheapest_group = $this->Conn->GetOne('SELECT GroupId FROM '.$object->TableName.' WHERE ProductId='.$this->Application->GetVar('p_id').' AND Price IS NOT NULL AND GroupId IN ('.$user_groups.') AND MinQty = 1 GROUP BY GroupId ORDER BY Price ASC');
$sql = 'SELECT PriceId, Price, GroupId
FROM ' . $object->TableName . '
WHERE ProductId = ' . $this->Application->GetVar('p_id') . ' AND Price IS NOT NULL AND GroupId IN (' . $user_groups . ')
ORDER BY GroupId ASC, MinQty ASC';
$effective_brackets = $this->Conn->Query($sql, 'PriceId');
$group_prices = array();
$min_price = -1;
$cheapest_group = 0;
foreach ($effective_brackets as $bracket) {
if (!isset($group_prices[$bracket['GroupId']])) {
$group_prices[$bracket['GroupId']] = $bracket['Price'];
if ($bracket['Price'] < $min_price || $min_price == -1) {
$min_price = $bracket['Price'];
$cheapest_group = $bracket['GroupId'];
}
}
}
if (!$cheapest_group) {
$cheapest_group = $this->Application->ConfigValue('User_LoggedInGroup');
}
$pricing_group = $cheapest_group;
}
$object->addFilter('price_user_group', $object->TableName.'.GroupId='.$pricing_group);
}
}
\ No newline at end of file
Index: branches/5.2.x/units/pricing/pricing_config.php
===================================================================
--- branches/5.2.x/units/pricing/pricing_config.php (revision 14568)
+++ branches/5.2.x/units/pricing/pricing_config.php (revision 14569)
@@ -1,145 +1,155 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => '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 => 'PerPage',
4 => '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' => null),
'MaxQty' => Array ('type' => 'int', 'default' => null),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => 0),
'Price' => Array ('type' => 'float', 'not_null' => 1, 'formatter' => 'kFormatter', 'min_value_inc' => 0, 'format' => '%.2f', 'default' => 0),
'Negotiated' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'default' => NULL,
),
'Points' => Array ('type' => 'int', 'default' => null),
'AccessDuration'=> Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'AccessUnit' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year'), 'not_null' => 1, 'default' => 0,),
'Description' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
'IsPrimary' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
- 'GroupId' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
- // 'AccessRebillDate' => Array ('type'=> 'integer', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default'=>0),
- // Customization healtheconomics.org
- // 'DurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_opt_interval', 2 => 'la_opt_date'), 'not_null' => 1, 'default' => 1),
- // 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'),
- // Customization healtheconomics.org --
+ 'GroupId' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
+
+ /* TODO implement these fields in business logic
+ 'AccessRebillDate' => Array (
+ 'type'=> 'int', 'min_value' => 0, 'max_value' => 31, 'not_null'=> '1', 'default' => 0,
+ ),
+ 'DurationType' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 1 => 'la_opt_Interval', 2 => 'la_opt_Date',
+ ),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
+ ),
+ 'AccessExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter'),
+ */
),
'VirtualFields' => Array (
),
'Grids' => Array (
/*
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'MinQty' => Array ( 'title'=> 'la_col_MinQty', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'MaxQty' => Array ( 'title'=> 'la_col_MaxQty', 'filter_block' => 'grid_range_filter'),
'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_range_filter'),
'Points' => Array ( 'title'=> 'la_col_Points', 'filter_block' => 'grid_range_filter'),
'Cost' => Array ( 'title'=> 'la_col_Cost', 'filter_block' => 'grid_range_filter'),
'Negotiated' => Array ( 'title'=> 'la_col_Negotiated', 'data_block' => 'negotiated_td', 'filter_block' => 'grid_options_filter'),
),
),
*/
'Access' => Array (
'Icons' => Array ('default'=> 'icon16_pricing.gif', '0'=> 'icon16_pricing.gif', '1'=> 'icon16_pricing_primary.gif'),
'Fields' => Array (
'AccessDuration' => Array ( 'title'=> 'la_col_AccessDuration', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'),
'AccessUnit' => Array ( 'title'=> 'la_col_AccessDurationUnit', 'filter_block' => 'grid_options_filter'),
'Description' => Array ( 'title'=> 'la_col_Description', 'filter_block' => 'grid_like_filter'),
'Price' => Array ( 'title'=> 'la_col_Price', 'filter_block' => 'grid_float_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/units/reports/reports_tag_processor.php
===================================================================
--- branches/5.2.x/units/reports/reports_tag_processor.php (revision 14568)
+++ branches/5.2.x/units/reports/reports_tag_processor.php (revision 14569)
@@ -1,443 +1,438 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
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));
/* @var $object kDBItem */
$object->setID(1);
$object->SetDBField('Metric', $metric);
-// echo '<pre>';
-// print_r($a_report_options);
-// echo date('m/d/Y H:i:s', $a_report_options['from']).'<br>';
-// echo date('m/d/Y H:i:s', $a_report_options['to']).'<br>';
-
if (!($a_report_options['from'] && $a_report_options['to'])) {
// calculate from & to as extreme order dates
$sql = 'SELECT MAX(OrderDate) AS date_to, MIN(OrderDate) AS date_frm
FROM '.TABLE_PREFIX.'Orders
WHERE
Status IN (4,6)
';
$a_dates = $this->Conn->GetRow($sql);
$a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_frm']), date('d', $a_dates['date_frm']), date('Y', $a_dates['date_frm']));
$a_report_options['to'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_to']), date('d', $a_dates['date_to']) + 1, date('Y', $a_dates['date_to'])) - 1;
}
$filter_value = 'AND o.OrderDate >= '.$a_report_options['from'].' AND o.OrderDate <= '.$a_report_options['to'];
if ($a_report_options['ReportType'] == 12)
{
// Overall
$selected_days = round(($a_report_options['to'] - $a_report_options['from'] + 1) / 3600 / 24);
// determine date interval
if ($selected_days < 2)
{
$step_seconds = 3600;
$step_labels = Array();
for ($i=0; $i<24; $i++)
{
$hour = str_pad($i, 2, '0', STR_PAD_LEFT);
$step_labels[$i] = $hour;
}
} elseif (
($selected_days < 31)
|| (date('mY', $a_report_options['from']) == date('mY', $a_report_options['to']))
)
{
$step_seconds = 24*3600;
$step_labels = Array();
$curr_date = $a_report_options['from'];
while ($curr_date <= $a_report_options['to'])
{
$curr_date += $step_seconds;
$step_labels[] = date('d-M', $curr_date);
}
} else {
$start_year = date('Y', $a_report_options['from']);
$start_month = date('m', $a_report_options['from']);
$end_month_year = date('Ym', $a_report_options['to']);
// big interval - move from date to the first day ot the month
$a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_report_options['from']), 1, date('Y', $a_report_options['from']));
$curr_time = $a_report_options['from'];
while (date('Ym', $curr_time) <= $end_month_year)
{
$step_labels[date('Ym', $curr_time)] = date('M-Y', $curr_time);
// add month
$curr_time = adodb_mktime(0,0,0, date('m', $curr_time) + 1, 1, date('Y', $curr_time));
}
$step_seconds = 0;
}
$a_expressions = Array(
'Qty' => 'od.Quantity',
'Cost' => 'od.Cost * od.Quantity',
'Amount' => 'od.Price * od.Quantity',
'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
'Profit' => '(od.Price - od.Cost) * od.Quantity',
);
if ($step_seconds)
{
$period_sql = 'FLOOR(
(o.OrderDate - '.$a_report_options['from'].')
/'.$step_seconds.'
)';
} else {
$period_sql = 'CONCAT(YEAR(FROM_UNIXTIME(o.OrderDate)),LPAD(MONTH(FROM_UNIXTIME(o.OrderDate)), 2, \'0\'))';
}
if ($this->Application->isModuleEnabled('in-auction'))
{
$sql = 'SELECT
'.$period_sql.' AS Period,
SUM(IF(ISNULL(eod.OptionsSalt), '.$a_expressions[$metric].', 0)) as StoreMetric,
SUM(IF(ISNULL(eod.OptionsSalt), 0, '.$a_expressions[$metric].')) as eBayMetric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY Period';
} else {
$sql = 'SELECT
'.$period_sql.' AS Period,
SUM('.$a_expressions[$metric].') as StoreMetric,
0 as eBayMetric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY Period';
}
$a_data = $this->Conn->Query($sql, 'Period');
// create series array
$a_serie1 = Array();
$a_serie2 = Array();
foreach ($step_labels AS $key => $label)
{
$a_serie1[$key] = (isset($a_data[$key]['eBayMetric']) && !is_null($a_data[$key]['eBayMetric'])) ? $a_data[$key]['eBayMetric'] : 0;
$a_serie2[$key] = (isset($a_data[$key]['StoreMetric']) && !is_null($a_data[$key]['StoreMetric'])) ? $a_data[$key]['StoreMetric'] : 0;
}
$show_date_from = date('m/d/Y', $a_report_options['from']);
$show_date_to = date('m/d/Y', $a_report_options['to']);
$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
$this->Application->StoreVar('graph_metric', $object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
$this->Application->StoreVar('graph_serie1', serialize($a_serie1));
$this->Application->StoreVar('graph_serie2', serialize($a_serie2));
$this->Application->StoreVar('graph_serie1_label', $this->Application->Phrase('la_eBayMarketplace'));
$this->Application->StoreVar('graph_serie2_label', $this->Application->Phrase('la_OnlineStore'));
$this->Application->StoreVar('graph_labels', serialize($step_labels));
return;
}
$ebay_joins = '';
if ($this->Application->isModuleEnabled('in-auction'))
{
$ebay_joins = '
LEFT JOIN '.TABLE_PREFIX.'eBayOrderItems AS eod
ON od.OptionsSalt = eod.OptionsSalt
';
}
if ($a_report_options['ReportType'] == 1)
{
// pie chart by category
$a_expressions = Array(
'Qty' => 'od.Quantity',
'Cost' => 'od.Cost * od.Quantity',
'Amount' => 'od.Price * od.Quantity',
'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
'Profit' => '(od.Price - od.Cost) * od.Quantity',
'StoreQty' => 'IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)',
'eBayQty' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)',
'StoreAmount' => 'IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)',
'eBayAmount' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)',
'StoreProfit' => 'IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)',
'eBayProfit' => 'IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)',
);
$lang = $this->Application->GetVar('m_lang');
$sql = 'SELECT
LEFT(c.l'.$lang.'_Name, 60) AS Name,
c.CategoryId,
SUM('.$a_expressions[$metric].') as Metric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
ON ci.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = ci.CategoryId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY c.CategoryId
HAVING NOT ISNULL(CategoryId)
ORDER BY Metric DESC
LIMIT 0,8
';
$a_data = $this->Conn->Query($sql, 'CategoryId');
$other_metric = 0;
if (count($a_data) > 7)
{
// gather ids for "others" call
$ids = join(',', array_keys($a_data));
$sql = 'SELECT
SUM('.$a_expressions[$metric].')
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
LEFT JOIN '.TABLE_PREFIX.'CategoryItems AS ci
ON ci.ItemResourceId = p.ResourceId
LEFT JOIN '.TABLE_PREFIX.'Category AS c
ON c.CategoryId = ci.CategoryId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
AND c.CategoryId NOT IN ('.$ids.')
';
$other_metric = $this->Conn->GetOne($sql);
if ($other_metric != 0)
{
$a_data[0] = Array(
'Metric' => $other_metric,
- 'Name' => $this->Application->Phrase('la_Others'),
+ 'Name' => $this->Application->Phrase('la_text_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_text_ReportByTopProductCategories').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
$this->Application->StoreVar('graph_data', serialize($a_data));
return;
}
if ($a_report_options['ReportType'] == 5)
{
// pie chart by product
$a_expressions = Array(
'Qty' => 'od.Quantity',
'Cost' => 'od.Cost * od.Quantity',
'Amount' => 'od.Price * od.Quantity',
'Tax' => 'o.VAT * od.Price * od.Quantity / o.SubTotal',
'Shipping' => 'o.ShippingCost * od.Price * od.Quantity / o.SubTotal',
'Processing' => 'o.ProcessingFee * od.Price * od.Quantity / o.SubTotal',
'Profit' => '(od.Price - od.Cost) * od.Quantity',
'StoreQty' => 'IF(ISNULL(eod.OptionsSalt), od.Quantity, 0)',
'eBayQty' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Quantity)',
'StoreAmount' => 'IF(ISNULL(eod.OptionsSalt), od.Price * od.Quantity, 0)',
'eBayAmount' => 'IF(ISNULL(eod.OptionsSalt), 0, od.Price * od.Quantity)',
'StoreProfit' => 'IF(ISNULL(eod.OptionsSalt), (od.Price - od.Cost) * od.Quantity, 0)',
'eBayProfit' => 'IF(ISNULL(eod.OptionsSalt), 0, (od.Price - od.Cost) * od.Quantity)',
);
$lang = $this->Application->GetVar('m_lang');
$sql = 'SELECT
LEFT(p.l'.$lang.'_Name, 60) AS Name,
p.ProductId,
SUM('.$a_expressions[$metric].') as Metric
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
GROUP BY p.ProductId
HAVING NOT ISNULL(ProductId)
ORDER BY Metric DESC
LIMIT 0,8
';
$a_data = $this->Conn->Query($sql, 'ProductId');
$other_metric = 0;
if (count($a_data) > 7)
{
// gather ids for "others" call
$ids = join(',', array_keys($a_data));
$sql = 'SELECT
SUM('.$a_expressions[$metric].')
FROM '.TABLE_PREFIX.'Orders AS o
LEFT JOIN '.TABLE_PREFIX.'OrderItems AS od
ON od.OrderId = o.OrderId
LEFT JOIN '.TABLE_PREFIX.'Products AS p
ON p.ProductId = od.ProductId
'.$ebay_joins.'
WHERE
o.Status IN (4,6)
'.$filter_value.'
AND p.ProductId NOT IN ('.$ids.')
';
$other_metric = $this->Conn->GetOne($sql);
if ($other_metric != 0)
{
$a_data[0] = Array(
'Metric' => $other_metric,
'Name' => $this->Application->Phrase('la_Others'),
);
}
}
$show_date_from = date('m/d/Y', $a_report_options['from']);
$show_date_to = date('m/d/Y', $a_report_options['to']);
$show_date = ($show_date_from == $show_date_to) ? $show_date_to : $show_date_from.' - '.$show_date_to;
$this->Application->StoreVar('graph_metric', $this->Application->Phrase('la_text_ReportByTopProducts').' '.$object->GetField('Metric').' :: ('.$show_date.') :: '.DOMAIN);
$this->Application->StoreVar('graph_data', serialize($a_data));
}
}
function GetRandom($params)
{
return rand(1,10000000);
}
function IsPHPxOrGreater($params)
{
$curver = explode(".", phpversion());
return ($curver[0] >= $params['version']);
}
}
\ No newline at end of file
Index: branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php
===================================================================
--- branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php (revision 14568)
+++ branches/5.2.x/units/affiliate_payments/affiliate_payments_config.php (revision 14569)
@@ -1,157 +1,154 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => '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 => 'PerPage',
4 => '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!"),
-
- ),
+ 'TitlePresets' => Array (
+ 'payments_log' => Array (
+ 'prefixes' => Array ('apayments.log_List'), 'format' => "!la_title_AffiliatePayments!",
+ ),
+ ),
'Sections' => Array(
'in-commerce:paymentlog' => Array(
'parent' => 'in-commerce',
'icon' => 'transactions',
'label' => 'la_tab_PaymentLog',
'url' => Array('t' => 'in-commerce/payments/payments_list', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 6,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'AffiliatePayments',
'ListSQLs' => Array(''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId'),
'ItemSQLs' => Array(''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId'),
'CalculatedFields' => Array(
'' => Array(
'PortalUserId' => 'af.PortalUserId',
),
'log' => Array(
'Username' => 'au.Login',
'PortalUserId' => 'af.PortalUserId',
),
),
'ForeignKey' => 'AffiliateId',
'ParentTableKey' => 'AffiliateId',
'ParentPrefix' => 'affil',
'AutoDelete' => true,
'AutoClone' => true,
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('PaymentDate' => 'desc'),
)
),
'Fields' => Array(
'AffiliatePaymentId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'AffiliateId' => Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(0 => 'lu_None'), 'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field'=>'AffiliateId','left_title_field'=>'Login','not_null'=>1,'default'=>0),
'PaymentDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'default' => '#NOW#'),
'Amount' => Array('type' => 'double', 'formatter'=>'kFormatter', 'format'=>'%.02f', 'not_null' => '1', 'required'=>1, 'default' => '0.00'),
'Comment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'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', 'default' => ''),
'PortalUserId' => Array('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array(
'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'Amount' => Array( 'title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter'),
'Comment' => Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
),
),
'Log' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array(
'AffiliatePaymentId'=> Array( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Username' => Array( 'title' => 'la_col_Username', 'data_block' => 'grid_userlink_td', 'filter_block' => 'grid_like_filter'),
'PaymentDate' => Array( 'title' => 'la_col_PaymentDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'Amount' => Array( 'title' => 'la_col_Amount', 'data_block' => 'grid_currency_td', 'filter_block' => 'grid_float_range_filter'),
'Comment' => Array( 'title' => 'la_col_Comment', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
'PaymentTypeId' => Array( 'title' => 'la_col_PaymentType', 'filter_block' => 'grid_options_filter'),
'PaymentReference' => Array( 'title' => 'la_col_PaymentReference', 'filter_block' => 'grid_like_filter', 'first_chars' => 50),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/5.2.x/units/manufacturers/manufacturers_config.php (revision 14568)
+++ branches/5.2.x/units/manufacturers/manufacturers_config.php (revision 14569)
@@ -1,137 +1,135 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'manuf',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ManufacturersEventHandler', 'file' => 'manufacturers_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ManufacturersTagProcessor', 'file' => 'manufacturers_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'ManufacturerId',
'StatusField' => Array (),
'TableName' => TABLE_PREFIX.'Manufacturers',
- 'TitlePresets' => Array (
- 'default' => Array ( 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'),
- 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'),
- 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturers!'),
- ),
-
- 'manuf_list' =>Array ( 'prefixes' => Array ('manuf_List'),
- 'format' => "!la_title_Manufacturers!",
- ),
-
- 'manuf_edit' =>Array ( 'prefixes' => Array ('manuf'),
- 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'),
- 'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
- ),
-
- ),
+ 'TitlePresets' => Array (
+ 'default' => Array (
+ 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'),
+ 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'),
+ ),
+ 'manuf_list' => Array (
+ 'prefixes' => Array ('manuf_List'), 'format' => "!la_title_Manufacturers!",
+ ),
+ 'manuf_edit' => Array (
+ 'prefixes' => Array ('manuf'),
+ 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'),
+ 'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
+ ),
+ ),
'PermSection' => Array ('main' => 'in-commerce:manufacturers'),
'Sections' => Array (
'in-commerce:manufacturers' => Array (
'parent' => 'in-commerce',
'icon' => 'manufacturers',
'label' => 'la_tab_Manufacturers',
'url' => Array ('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 4,
'type' => stTREE,
),
),
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'ListSQLs' => Array ( '' => 'SELECT * FROM %s',
), // key - special, value - list select sql
'ItemSQLs' => Array ('' => 'SELECT * FROM %s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Name' => 'asc'),
)
),
'Fields' => Array (
'ManufacturerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' =>true, 'max_len' =>255),
'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'URL' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'max_len' =>255),
'Logo' => Array (
'type' => 'string',
'formatter' => 'kPictureFormatter',
'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH.'manufacturers/',
'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!',
'multiple' => false, 'thumb_format' => 'resize:100x100',
'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 IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
FROM '.TABLE_PREFIX.'CountryStates
WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
ORDER BY Name',
'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', 'default' => null
),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'URL' => Array ('title' => 'la_col_URL', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Manufacturers',
'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short',
),
);
\ No newline at end of file
Index: branches/5.2.x/units/taxes/taxes_config.php
===================================================================
--- branches/5.2.x/units/taxes/taxes_config.php (revision 14568)
+++ branches/5.2.x/units/taxes/taxes_config.php (revision 14569)
@@ -1,128 +1,129 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'tax',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'TaxesEventHandler', 'file' => 'taxes_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'TaxesTagProcessor', 'file' => 'taxes_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'hooks' => Array (),
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => '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!",
- ),
- 'taxes_edit' =>Array ( 'prefixes' => Array ('tax'),
- 'new_titlefield' => Array ('tax' => '!la_title_NewTax!'),
- 'format' => "#tax_status# '#tax_titlefield#' - !la_title_General!",
- ),
-
-
- ),
+ 'default' => Array (
+ 'new_status_labels' => Array ('tax' => '!la_title_AddingTaxZone!'),
+ 'edit_status_labels' => Array ('tax' => '!la_title_EditingTaxZone!'),
+ ),
+ 'taxes_list' => Array (
+ 'prefixes' => Array ('tax_List'), '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:setting_folder',
'icon' => 'conf_taxes',
'label' => 'la_tab_Taxes',
'url' => Array ('t' => 'in-commerce/taxes/taxes_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 6,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'TaxZones',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array ('taxdst'),
'ListSQLs' => Array ( '' => 'SELECT %1$s.* %2$s FROM %s'),
// key - special, value - list select sql
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Name' => 'asc', 'TaxValue' => 'asc'),
)
),
'Fields' => Array (
'TaxZoneId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,),
'Name' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1, 'max_len' =>100, 'error_msgs' => Array ('required' => 'Please fill in')),
'Type' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array (1 => 'la_ByCountry', 2 => 'la_ByState', 3 => 'la_ByZIP'), 'not_null' => 1, 'default' => 1),
'TaxValue' => Array ('type' => 'double', 'not_null' => 1, 'default' => 0),
'ApplyToShipping' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'default' => 0, 'not_null' => 1,
),
'ApplyToProcessing' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' =>Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'default' => 0, 'not_null' => 1,
),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
'module' => 'core',
),
'Fields' => Array (
'TaxZoneId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
'Name' => Array ( 'title' => 'la_col_TaxZoneName', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'TaxValue' => Array ( 'title' => 'la_col_TaxValue', 'filter_block' => 'grid_float_range_filter', 'width' => 110, ),
'Type' => Array ( 'title' => 'la_col_ZoneType', 'filter_block' => 'grid_options_filter', 'width' => 90, ),
'ApplyToShipping' => Array ( 'title' => 'la_col_TaxApplyToShipping', 'filter_block' => 'grid_options_filter', 'width' => 140, ),
'ApplyToProcessing' => Array ( 'title' => 'la_col_TaxApplyToProcessing', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/units/coupons/coupons_config.php
===================================================================
--- branches/5.2.x/units/coupons/coupons_config.php (revision 14568)
+++ branches/5.2.x/units/coupons/coupons_config.php (revision 14569)
@@ -1,181 +1,186 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => '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 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'CouponId',
'StatusField' => Array('Status'),
'TitleField' => 'Name',
'TableName' => TABLE_PREFIX.'ProductsCoupons',
'SubItems' => Array('coupi'),
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('coup'=>'!la_title_Adding_Coupon!'),
'edit_status_labels' => Array('coup'=>'!la_title_Editing_Coupon!'),
'new_titlefield' => Array('coup'=>'!la_title_New_Coupon!'),
),
'coupons_list'=>Array('prefixes' => Array('coup_List'),
'format' => "!la_title_Coupons!",
),
'coupons_edit'=>Array( 'prefixes' => Array('coup'),
'format' => "#coup_status# '#coup_titlefield#' - !la_title_General!",
),
'coupons_items'=>Array('prefixes' => Array('coup','coupi_List'),
'format' => "#coup_status# '#coup_titlefield#' - !la_title_CouponItems!",
),
'coupons_clone'=>Array('prefixes' => Array('coup'),
'format' => "!la_CloneCoupon!",
),
'coupon_selector' => Array('format' => '!la_title_CouponSelector!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/discounts/coupon_edit', 'priority' => 1),
'items' => Array ('title' => 'la_tab_CouponsItems', 't' => 'in-commerce/discounts/coupon_items', 'priority' => 2),
),
),
'PermSection' => Array('main' => 'in-commerce:coupons'),
'Sections' => Array(
'in-commerce:coupons' => Array(
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts_coupons',
'label' => 'la_tab_Coupons',
'url' => Array('t' => 'in-commerce/discounts/coupons_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 3.2, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'ListSQLs' => Array( ''=>'SELECT %1$s.* %2$s FROM %1$s',
), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %1$s',
),
'ListSortings' => Array (
'' => Array(
'Sorting' => Array('Name' => 'asc'),
)
),
'Fields' => Array(
'CouponId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ),
'use_phrases' => 1, 'not_null' => 1, 'default' => 1
),
'Name' => Array ( 'type' =>'string', 'required' => 1, 'default' => null, 'max_len' => 255),
'Code' => Array (
'type' => 'string', 'required' => 1, 'default' => null,
'max_len' => 255, 'unique' => Array ('Code'),
),
'Expiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
'GroupId' => Array ('type' => 'int', 'default' => null, ),
'Type' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array ( 1 => 'la_Flat', 2 => 'la_Percent'/*, 3 => 'la_FreeShipping'*/),
'not_null' => 1, 'default' => 1,
),
'Amount' => Array ('type' => 'double', 'default' => null),
'LastUsedBy' => Array (
'type' => 'int', 'formatter' => 'kLEFTFormatter',
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId',
'left_title_field' => 'Login', 'required' => 0, 'default' => null,
),
'LastUsedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'NumberOfUses' => Array ('type' => 'int', 'default' => 1),
),
+ 'VirtualFields' => Array (
+ 'CouponCount' => Array ('type' => 'int', 'min_value_inc' => 1, 'default' => 1),
+ 'DefaultExpiration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
+ ),
+
'Grids' => Array(
'Default' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
'module' => 'core',
),
'Fields' => Array(
'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter', 'width' => 130, ),
),
),
'Radio' => Array(
'Icons' => Array(
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
'module' => 'core',
),
'Fields' => Array(
'CouponId' => Array ('title'=>'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Name' => Array( 'title'=>'la_col_Name', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'Code' => Array( 'title'=>'la_col_CouponCode', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Expiration' => Array( 'title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'Amount' => Array( 'title'=>'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
'LastUsedBy' => Array('title'=>'la_col_LastUsedBy', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
'LastUsedOn' => Array('title'=>'la_col_LastUsedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'NumberOfUses' => Array('title'=>'la_col_NumberOfUses', 'filter_block' => 'grid_range_filter', 'width' => 130, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/units/coupons/coupons_tag_processor.php
===================================================================
--- branches/5.2.x/units/coupons/coupons_tag_processor.php (revision 14568)
+++ branches/5.2.x/units/coupons/coupons_tag_processor.php (revision 14569)
@@ -1,40 +1,18 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class CouponsTagProcessor extends kDBTagProcessor {
- function LastCloneCount($params){
-
- $clone_count = $this->Application->RecallVar('CoupLastCloneCount');
- if (!$clone_count){
- $clone_count = 1;
- }
- return $clone_count;
- }
-
- function DefaultExpDate($params){
- $object =& $this->getObject($params);
- $formatter =& $this->Application->recallObject('kDateFormatter');
-
- return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_date', $object);
- }
-
- function DefaultExpTime($params){
- $object =& $this->getObject($params);
- $formatter =& $this->Application->recallObject('kDateFormatter');
-
- return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_time', $object);
- }
}
\ No newline at end of file
Index: branches/5.2.x/units/coupons/coupons_event_handler.php
===================================================================
--- branches/5.2.x/units/coupons/coupons_event_handler.php (revision 14568)
+++ branches/5.2.x/units/coupons/coupons_event_handler.php (revision 14569)
@@ -1,172 +1,238 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class CouponsEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnItemBuild' => Array('self' => true),
+ 'OnApplyClone' => Array('self' => 'add'),
+ 'OnPrepareClone' => Array('self' => 'view'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
-
- function OnApplyClone(&$event)
+ /**
+ * Prepares coupon cloning
+ *
+ * @param kEvent $event
+ */
+ function OnPrepareClone(&$event)
{
- $item = &$event->getObject();
- $clone_count = $this->Application->GetVar('clone_items_count');
- $table = $this->Application->getUnitOption($event->Prefix, 'TableName');
- if ($clone_count && $clone_count>0){
- $this->Application->StoreVar('CoupLastCloneCount', $clone_count);
- for ($i=0; $i<$clone_count; $i++) {
- $this->SetNewCode($item);
-
- $item->SetField('Expiration_date', $this->Application->GetVar('clone_exp_date'));
- $item->SetField('Expiration_time', $this->Application->GetVar('clone_exp_time'));
- $item->NameCopy();
- $validated = $item->Create();
+ $this->StoreSelectedIDs($event);
+ $event->CallSubEvent('OnNew');
- }
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $this->setCloningRequired($object);
+ $clone_count = $this->Application->RecallVar('CoupLastCloneCount');
+
+ if ( is_numeric($clone_count) && $clone_count > 0 ) {
+ $object->SetDBField('CouponCount', $clone_count);
}
- if ($validated){
- $this->finalizePopup($event);
- }else{
- $event->redirect = false;
+ $expire_days = $this->Application->ConfigValue('Comm_DefaultCouponDuration');
+ $default_expiration = strtotime('+' . $expire_days . ' days');
+
+ $object->SetDBField('DefaultExpiration_date', $default_expiration);
+ $object->SetDBField('DefaultExpiration_time', $default_expiration);
+ }
+
+
+ function OnBeforeClone(&$event)
+ {
+ parent::OnBeforeClone($event);
+
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $this->SetNewCode($object);
+
+ $object->SetDBField('LastUsedBy', NULL);
+ $object->SetDBField('LastUsedOn', NULL);
+ $object->SetDBField('NumberOfUses', NULL);
+
+ $expiration = $this->Application->GetVar('clone_coupon_expiration');
+ $object->SetDBField('Expiration_date', $expiration);
+ $object->SetDBField('Expiration_time', $expiration);
+ }
+
+ function OnApplyClone(&$event)
+ {
+ if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ $event->status = erFAIL;
+ return;
+ }
+
+ $object =& $event->getObject( Array ('skip_autoload' => true) );
+ /* @var $object kDBItem */
+
+ $this->setCloningRequired($object);
+
+ $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
+ list($id, $field_values) = each($items_info);
+ $object->SetFieldsFromHash($field_values);
+ $object->setID($id);
+
+ if ( !$object->Validate() ) {
+ $event->status = erFAIL;
+ return ;
}
+
+ $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
+ /* @var $temp kTempTablesHandler */
+
+ $original_coupon_ids = $this->getSelectedIDs($event, true);
+ $clone_count = $object->GetDBField('CouponCount');
+ $this->Application->StoreVar('CoupLastCloneCount', $clone_count);
+ $this->Application->SetVar('clone_coupon_expiration', $object->GetDBField('DefaultExpiration'));
+
+ for ($i = 0; $i < $clone_count; $i++) {
+ $temp->CloneItems($event->Prefix, $event->Special, $original_coupon_ids);
+ }
+
+ $this->finalizePopup($event);
+ }
+
+ function setCloningRequired(&$object)
+ {
+ $this->RemoveRequiredFields($object);
+ $object->setRequired('CouponCount');
+ $object->setRequired('DefaultExpiration');
}
function SetNewCode(&$item)
{
do{
$new_code = $this->RandomCouponCode(10);
$exists = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductsCoupons WHERE Code='.$this->Conn->qstr($new_code));
if ($exists){
$new_code = false;
}
} while (!$new_code);
$item->SetDBField('Code', $new_code);
}
function RandomCouponCode($size)
{
$rand_code = "";
for ($i=0; $i<10; $i++){
$is_letter = rand(0,1);
if ($is_letter){
$rand_char = chr(rand(65,90));
}else{
$rand_char = rand(0,9);
}
$rand_code .= $rand_char;
}
return $rand_code;
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnApplyCoupon(&$event)
{
$code = $this->Application->GetVar('coupon_code');
if ($code == '') {
return ;
}
$object =& $event->getObject(Array('skip_autoload' => true));
$object->Load($code, 'Code');
if (!$object->isLoaded()) {
$event->status = kEvent::erFAIL;
$this->Application->SetVar('set_checkout_error', 4);
$event->redirect = false; // check!!!
return ;
}
$expire_date = $object->GetDBField('Expiration');
$number_of_use = $object->GetDBField('NumberOfUses');
if( $object->GetDBField('Status') != 1 || ($expire_date && $expire_date < adodb_mktime()) ||
(isset($number_of_use) && $number_of_use <= 0))
{
$event->status = kEvent::erFAIL;
$this->Application->SetVar('set_checkout_error', 5);
$event->redirect->false;
return ;
}
$last_used = adodb_mktime();
$object->SetDBField('LastUsedBy', $this->Application->RecallVar('user_id'));
$object->SetDBField('LastUsedOn_date', $last_used);
$object->SetDBField('LastUsedOn_time', $last_used);
if(isset($number_of_use))
{
$object->SetDBField('NumberOfUses', $number_of_use - 1);
if($number_of_use == 1)
{
$object->SetDBField('Status', 2);
}
}
$object->Update();
$this->Application->setUnitOption('ord', 'AutoLoad', true);
$order =& $this->Application->recallObject('ord');
$order->SetDBField('CouponId', $object->GetDBField('CouponId'));
$order->Update();
$this->Application->SetVar('set_checkout_error', 10);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnPreCreate(&$event){
parent::OnPreCreate($event);
$object = &$event->getObject();
$exp_date = adodb_mktime();
$default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration');
if ($default_duration && $default_duration>0){
$exp_date += (int)$default_duration*86400;
}
$object->SetDBField('Expiration_date', $exp_date);
}
function OnBeforeItemUpdate(&$event)
{
$object =& $event->getObject();
$object->SetDBField( 'Amount', abs($object->GetDBField('Amount')) );
}
function OnBeforeItemCreate(&$event)
{
$this->OnBeforeItemUpdate($event);
}
}
\ No newline at end of file
Index: branches/5.2.x/units/orders/orders_event_handler.php
===================================================================
--- branches/5.2.x/units/orders/orders_event_handler.php (revision 14568)
+++ branches/5.2.x/units/orders/orders_event_handler.php (revision 14569)
@@ -1,3427 +1,3433 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class OrdersEventHandler extends kDBEventHandler
{
/**
* Checks permissions of user
*
* @param kEvent $event
*/
function CheckPermission(&$event)
{
if (!$this->Application->isAdminUser) {
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;
}
}
}
}
if ($event->Name == 'OnQuietPreSave') {
$section = $event->getSection();
if ($this->isNewItemCreate($event)) {
return $this->Application->CheckPermission($section.'.add', 1);
}
else {
return $this->Application->CheckPermission($section.'.add', 1) || $this->Application->CheckPermission($section.'.edit', 1);
}
}
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),
'OnDownloadLabel' => Array('self' => true, 'subitem' => 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->isAdminUser) {
return ;
}
$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');
/* @var $cs_helper kCountryStatesHelper */
$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 == kEvent::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 == kEvent::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;
}
/**
* Charge order
*
* @param OrdersItem $order
* @return Array
*/
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->GetFieldValues(), $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->SetRedirectParam('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 = kEvent::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->isAdminUser) {
// 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->SetRedirectParam('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->getRedirectParam('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->SetRedirectParam('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->_getDefaultPaymentType();
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);
parent::OnUpdate($event);
if ($this->Application->isAdminUser) {
return true;
}
else {
$event->setRedirectParams(Array('opener' => 's'), true);
}
if ($event->status == kEvent::erSUCCESS) {
$this->createMissingAddresses($event);
}
else {
// strange: recalculate total amount on error
$object =& $event->getObject();
/* @var $object kDBItem */
$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();
}
}
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->isAdminUser ? 1 : null);
}
if ($event->status == kEvent::erSUCCESS && !$event->redirect) {
$event->SetRedirectParam('pass', 'm');
$event->SetRedirectParam('pass_category', 0); //otherwise mod-rewrite shop-cart URL will include category
$event->redirect = true;
}
else {
if ($this->Application->isAdminUser) {
$event->SetRedirectParam('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 = kEvent::erSUCCESS;
$event->redirect = $this->Application->isAdminUser ? true : $this->Application->GetVar('shop_cart_template');
}
else {
$event->status = kEvent::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 == kEvent::erSUCCESS && $this->Application->isAdminUser) {
$event->SetRedirectParam('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';
+
+ /* TODO check on implementation
+ $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
+ /* TODO check on implementation (code from customization healtheconomics.org)
$item_data['DurationType'] = $pricing_info['DurationType'];
- $item_data['AccessExpiration'] = $pricing_info['AccessExpiration'];
- // Customization healtheconomics.org --
-*/
+ $item_data['AccessExpiration'] = $pricing_info['AccessExpiration'];
+ */
$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->isAdminUser) {
// work as usual in admin
return $passed;
}
if ($event->Special == 'last') {
// return last order id (for using on thank you page)
$order_id = $this->Application->RecallVar('front_order_id');
return $order_id > 0 ? $order_id : FAKE_ORDER_ID; // FAKE_ORDER_ID helps to keep parent filter for order items set in "kDBList::linkToParent"
}
$ses_id = $this->Application->RecallVar( $event->getPrefixSpecial(true) . '_id' );
if ($passed && ($passed != $ses_id)) {
// order id given in url doesn't match our current order id
$sql = 'SELECT PortalUserId
FROM ' . TABLE_PREFIX . 'Orders
WHERE OrderId = ' . $passed;
$user_id = $this->Conn->GetOne($sql);
if ($user_id == $this->Application->RecallVar('user_id')) {
// current user is owner of order with given id -> allow him to view order details
return $passed;
}
else {
// current user is not owner of given order -> hacking attempt
$this->Application->SetVar($event->getPrefixSpecial().'_id', 0);
return 0;
}
}
else {
// not passed or equals to ses_id
return $ses_id > 0 ? $ses_id : FAKE_ORDER_ID; // FAKE_ORDER_ID helps to keep parent filter for order items set in "kDBList::linkToParent"
}
return $passed;
}
/**
* Load item if id is available
*
* @param kEvent $event
*/
function LoadItem(&$event)
{
$id = $this->getPassedID($event);
if ($id == FAKE_ORDER_ID) {
// if we already know, that there is no such order,
// then don't run database query, that will confirm that
$object =& $event->getObject();
/* @var $object kDBItem */
$object->Clear($id);
return ;
}
parent::LoadItem($event);
}
/**
* Creates new shopping cart
*
* @param kEvent $event
*/
function _createNewCart(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$object->SetDBField('Number', $this->getNextOrderNumber($event));
$object->SetDBField('SubNumber', 0);
$object->SetDBField('Status', ORDER_STATUS_INCOMPLETE);
$object->SetDBField('VisitId', $this->Application->RecallVar('visit_id') );
// get user
$user_id = $this->Application->RecallVar('user_id');
if (!$user_id) {
$user_id = USER_GUEST;
}
$object->SetDBField('PortalUserId', $user_id);
// get affiliate
$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') );
}
// get payment type
$default_type = $this->_getDefaultPaymentType();
if ($default_type) {
$object->SetDBField('PaymentType', $default_type);
}
$created = $object->Create();
if ($created) {
$id = $object->GetID();
$this->Application->SetVar($event->getPrefixSpecial(true) . '_id', $id);
$this->Application->StoreVar($event->getPrefixSpecial(true) . '_id', $id);
return $id;
}
return 0;
}
/**
* Returns default payment type for order
*
* @return int
*/
function _getDefaultPaymentType()
{
$default_type = $this->Application->siteDomainField('PrimaryPaymentTypeId');
if (!$default_type) {
$sql = 'SELECT PaymentTypeId
FROM ' . TABLE_PREFIX . 'PaymentTypes
WHERE IsPrimary = 1';
$default_type = $this->Conn->GetOne($sql);
}
return $default_type;
}
function StoreContinueShoppingLink()
{
$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();
/* @var $order OrdersItem */
$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->setRequired($field, $has_tangibles);
}
$order->setRequired('ShippingState', $cs_helper->CountryHasStates( $field_values['ShippingCountry'] ));
}
// 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->setRequired($field, true);
}
$order->setRequired('BillingState', $cs_helper->CountryHasStates( $field_values['BillingCountry'] ));
}
$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->isAdminUser) {
$req_fields = array('PaymentCardType', 'PaymentAccount', 'PaymentNameOnCard', 'PaymentCCExpDate');
}
else {
$req_fields = array('PaymentCardType', 'PaymentAccount', 'PaymentNameOnCard', 'PaymentCCExpDate', 'PaymentCVV2');
}
foreach ($req_fields as $field) {
$order->setRequired($field, true);
}
}
}
/**
* Set's order's user_id to user from session or Guest otherwise
*
* @param kEvent $event
*/
function CheckUser(&$event)
{
if ($this->Application->isAdminUser || defined('GW_NOTIFY')) {
// don't check for user in order while processing payment
// gateways, because they can do cross-domain ssl redirects
return;
}
$order =& $event->GetObject();
$ses_user = $this->Application->RecallVar('user_id');
if ($order->GetDBField('PortalUserId') != $ses_user) {
if ($ses_user == 0) {
$ses_user = USER_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 = kEvent::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 = kEvent::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->GetFieldValues();
}
}
$order_items->GoNext();
}
return true;
}
function OnOrderPrint(&$event)
{
$event->setRedirectParams(Array('opener'=>'s'), true);
}
/**
* 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;
}
/**
* 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 = kEvent::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->GetFieldValues();
}
$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->GetFieldValues();
// 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)) {
$event->status = kEvent::erFAIL;
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)) {
$event->status = kEvent::erFAIL;
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 = kEvent::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->GetFieldValues(), $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->GetFieldValues(), $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':
$ret = Array ();
$shipping_info = $object->GetDBField('ShippingInfo');
if ($shipping_info) {
$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$shipping_info = unserialize($shipping_info);
$shipping_quote_engine = $quote_engine_collector->GetClassByType($shipping_info, 1);
}
// try to create usps order
if (($object->GetDBField('ShippingType') == 0) && ($shipping_quote_engine !== false)) {
$shipping_quote_engine =& $this->Application->recallObject($shipping_quote_engine);
/* @var $shipping_quote_engine ShippingQuoteEngine */
$ret = $shipping_quote_engine->MakeOrder($object);
}
if ( !array_key_exists('error_number', $ret) ) {
$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->GetFieldValues(), $gw_data['gw_params']);
}
else {
$sqe_errors = $this->Application->RecallVar('sqe_errors');
$sqe_errors = $sqe_errors ? unserialize($sqe_errors) : Array ();
$sqe_errors[ $object->GetField('OrderNumber') ] = $ret['error_description'];
$this->Application->StoreVar('sqe_errors', serialize($sqe_errors));
}
break;
case 'OnMassOrderProcess':
case 'OnOrderProcess':
if ($this->ReadyToProcess($object->GetID())) {
$event->CallSubEvent('OnReserveItems');
if ($event->status == kEvent::erSUCCESS) $set_new_status = true;
$email_event_user =& $this->Application->EmailEventUser('BACKORDER.PROCESS', $object->GetDBField('PortalUserId'), $email_params);
} else {
$event->status = kEvent::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' ? kDBList::WHERE_FILTER : kDBList::HAVING_FILTER;
$object->addFilter($filter_name, $filter_params['value'], $filter_type, kDBList::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');
/* @var $cs_helper kCountryStatesHelper */
$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'));
}
/**
* Processes states
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$object =& $event->getObject();
/* @var $object OrdersItem */
$old_payment_type = $object->GetOriginalField('PaymentType');
$new_payment_type = $object->GetDBField('PaymentType');
if ($new_payment_type != $old_payment_type) {
// payment type changed -> check that it's allowed
$available_payment_types = $this->Application->siteDomainField('PaymentTypes');
if ($available_payment_types) {
if (strpos($available_payment_types, '|' . $new_payment_type . '|') === false) {
// payment type isn't allowed in site domain
$object->SetDBField('PaymentType', $old_payment_type);
}
}
}
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'ShippingState', 'ShippingCountry');
$cs_helper->PopulateStates($event, 'BillingState', 'BillingCountry');
if ($object->HasTangibleItems()) {
$cs_helper->CheckStateField($event, 'ShippingState', 'ShippingCountry', false);
}
$cs_helper->CheckStateField($event, 'BillingState', 'BillingCountry', false);
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->isAdminUser) {
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->GetFieldValues());
$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);
}
}
}
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));
/* @var $product kDBItem */
$product->Load($item_id);
$object =& $this->Application->recallObject('orditems.-item', null, Array('skip_autoload' => true));
/* @var $object kDBItem */
$order =& $this->Application->recallObject('ord');
/* @var $order kDBItem */
if (!$order->isLoaded() && !$this->Application->isAdmin) {
// no order was created before -> create one now
if ($this->_createNewCart($event)) {
$this->LoadItem($event);
}
}
if (!$order->isLoaded()) {
// was unable to create new order
return false;
}
$manager =& $this->Application->recallObject('OrderManager');
/* @var $manager OrderManager */
$manager->setOrder($order);
$manager->addProduct($product, $event->getEventParam('ItemData'), $qty, $package_num);
$this->Application->HandleEvent($ord_event, 'ord:OnRecalculateItems');
/*if ($ord_event->getEventParam('RecalculateChangedCart') && !$this->Application->isAdmin) {
$event->SetRedirectParam('checkout_error', $ord_event->getRedirectParam('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 (is_object($event->MasterEvent) && ($event->MasterEvent->status != kEvent::erSUCCESS)) {
// e.g. master order update failed, don't recalculate order products
return ;
}
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;
}
$manager =& $this->Application->recallObject('OrderManager');
/* @var $manager OrderManager */
$manager->setOrder($order);
$result = $manager->calculate();
if ( $manager->getError() ) {
$event->SetRedirectParam('checkout_error', $manager->getError());
}
if ($order->GetDBField('CouponId') && $order->GetDBField('CouponDiscount') == 0) {
$this->RemoveCoupon($order);
$event->SetRedirectParam('checkout_error', 8);
}
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 && ($event->getEventParam('checkout_error') === false)) {
$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'];
}*/
/**
* 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++;
}
}
}
/**
* Updates shipping types
*
* @param kEvent $event
* @return bool
*/
function UpdateShippingTypes(&$event)
{
$object =& $event->getObject();
/* @var $object OrdersItem */
$ord_id = $object->GetID();
$order_info = $this->Application->GetVar('ord');
$shipping_ids = getArrayValue($order_info, $ord_id, 'ShippingTypeId');
if (!$shipping_ids) {
return;
}
$ret = true;
$shipping_types = Array();
$last_shippings = unserialize( $this->Application->RecallVar('LastShippings') );
$template = $this->Application->GetVar('t');
$shipping_templates = Array ('in-commerce/checkout/shipping', 'in-commerce/orders/orders_edit_shipping');
$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
foreach ($shipping_ids as $package => $id) {
// try to validate
$shipping_types[$package] = $last_shippings[$package][$id];
$shipping_quote_engine = $quote_engine_collector->GetClassByType($shipping_types, $package);
if (($object->GetDBField('ShippingType') == 0) && ($shipping_quote_engine !== false) && in_array($template, $shipping_templates)) {
$shipping_quote_engine =& $this->Application->recallObject($shipping_quote_engine);
/* @var $shipping_quote_engine ShippingQuoteEngine */
+ // USPS related part
+ // TODO: remove USPS condition from here
// set first of found shippings just to check if any errors are returned
$current_usps_shipping_types = unserialize($this->Application->RecallVar('current_usps_shipping_types'));
$object->SetDBField('ShippingInfo', serialize( Array($package => $current_usps_shipping_types[$id])) );
$sqe_data = $shipping_quote_engine->MakeOrder($object, true);
- if ( !isset($sqe_data['error_number']) ) {
- // update only international shipping
- if ( $object->GetDBField('ShippingCountry') != 'USA') {
- $shipping_types[$package]['TotalCost'] = $sqe_data['Postage'];
+ if ( $sqe_data ) {
+ if ( !isset($sqe_data['error_number']) ) {
+ // update only international shipping
+ if ( $object->GetDBField('ShippingCountry') != 'USA') {
+ $shipping_types[$package]['TotalCost'] = $sqe_data['Postage'];
+ }
+ }
+ else {
+ $ret = false;
+ $this->Application->StoreVar('sqe_error', $sqe_data['error_description']);
}
- }
- else {
- $ret = false;
- $this->Application->StoreVar('sqe_error', $sqe_data['error_description']);
}
$object->SetDBField('ShippingInfo', '');
}
}
$object->SetDBField('ShippingInfo', serialize($shipping_types));
return $ret;
}
/*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();
/* @var $object OrdersItem */
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();
/* @var $object OrdersItem */
$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=kEvent::erSUCCESS;
}
else
{
$event->status=kEvent::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 == kEvent::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);
}
if ( !is_object($event->MasterEvent) ) {
// not called as hook
return ;
}
$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'));
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->CheckFolder(EXPORT_PATH);
$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)
{
parent::OnAfterConfigRead($event);
if (defined('IS_INSTALL') && IS_INSTALL) {
return ;
}
$order_number = (int)$this->Application->ConfigValue('Comm_Order_Number_Format_P');
$order_sub_number = (int)$this->Application->ConfigValue('Comm_Order_Number_Format_S');
$calc_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
foreach ($calc_fields as $special => $fields) {
$calc_fields[$special]['OrderNumber'] = str_replace('6', $order_number, $calc_fields[$special]['OrderNumber']);
$calc_fields[$special]['OrderNumber'] = str_replace('3', $order_sub_number, $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'.$order_number.'d', $fields['Number']['format']);
$fields['SubNumber']['format'] = str_replace('%03d', '%0'.$order_sub_number.'d', $fields['SubNumber']['format']);
$site_helper =& $this->Application->recallObject('SiteHelper');
/* @var $site_helper SiteHelper */
$fields['BillingCountry']['default'] = $site_helper->getDefaultCountry('Billing');
$fields['ShippingCountry']['default'] = $site_helper->getDefaultCountry('Shipping');
if (!$this->Application->isAdminUser) {
$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;
}
$sql_part = '';
// limit payment types by domain
$payment_types = $this->Application->siteDomainField('PaymentTypes');
if (strlen($payment_types)) {
$payment_types = explode('|', substr($payment_types, 1, -1));
$sql_part .= ' AND PaymentTypeId IN (' . implode(',', $payment_types) . ')';
}
// limit payment types by user group
$sql_part .= ' AND (PortalGroups LIKE "%%,'.implode(',%%" OR PortalGroups LIKE "%%,', $user_groups).',%%")';
$fields['PaymentType']['options_sql'] = str_replace(
'ORDER BY ',
$sql_part . ' ORDER BY ',
$fields['PaymentType']['options_sql']
);
}
$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($columns, $new_columns);
}
function OnSave(&$event)
{
$res = parent::OnSave($event);
if ($event->status == kEvent::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->isAdminUser) {
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);
}
/**
* Downloads shipping tracking bar code, that was already generated by USPS service
*
* @param kEvent $event
*/
function OnDownloadLabel(&$event)
{
$event->status = kEvent::erSTOP;
ini_set('memory_limit', '300M');
ini_set('max_execution_time', '0');
$object =& $event->getObject();
$file = $object->GetDBField('ShippingTracking').'.pdf';
$full_path = USPS_LABEL_FOLDER.$file;
if (!file_exists($full_path) || !is_file($full_path)) {
return ;
}
$mime = function_exists('mime_content_type') ? mime_content_type($full_path) : 'application/download';
header('Content-type: '.$mime);
header('Content-Disposition: attachment; filename="'.$file.'"');
readfile($full_path);
}
}
\ No newline at end of file
Index: branches/5.2.x/units/orders/orders_config.php
===================================================================
--- branches/5.2.x/units/orders/orders_config.php (revision 14568)
+++ branches/5.2.x/units/orders/orders_config.php (revision 14569)
@@ -1,541 +1,550 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'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,
'RegisterClasses' => Array (
Array ('pseudo' => 'OrderCalculator', 'class' => 'OrderCalculator', 'file' => 'order_calculator.php', 'build_event' => ''),
Array ('pseudo' => 'OrderManager', 'class' => 'OrderManager', 'file' => 'order_manager.php', 'build_event' => ''),
),
'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' ),
+ 'HookToEvent' => Array ( 'OnAfterLogin' ),
'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 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'OrderId',
'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'ViewMenuPhrase' => 'la_title_Orders',
'CatalogTabIcon' => 'icon16_item.png',
'TitleField' => 'OrderNumber',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('ord' => '!la_title_Adding_Order!'),
'edit_status_labels' => Array ('ord' => '!la_title_Editing_Order!'),
'new_titlefield' => Array ('ord' => '!la_title_New_Order!'),
),
'orders_incomplete' => Array ( 'prefixes' => Array ('ord.incomplete_List'),
'format' => "!la_title_IncompleteOrders!",
),
'orders_pending' => Array ( 'prefixes' => Array ('ord.pending_List'),
'format' => "!la_title_PendingOrders!",
),
'orders_backorders' => Array ( 'prefixes' => Array ('ord.backorders_List'),
'format' => "!la_title_BackOrders!",
),
'orders_toship' => Array ( 'prefixes' => Array ('ord.toship_List'),
'format' => "!la_title_OrdersToShip!",
),
'orders_processed' => Array ( 'prefixes' => Array ('ord.processed_List'),
'format' => "!la_title_OrdersProcessed!",
),
'orders_returns' => Array ( 'prefixes' => Array ('ord.returns_List'),
'format' => "!la_title_OrdersReturns!",
),
'orders_denied' => Array ( 'prefixes' => Array ('ord.denied_List'),
'format' => "!la_title_OrdersDenied!",
),
'orders_archived' => Array ( 'prefixes' => Array ('ord.archived_List'),
'format' => "!la_title_OrdersArchived!",
),
'orders_search' => Array ( 'prefixes' => Array ('ord.search_List'),
'format' => "!la_title_OrdersSearch!",
),
'orders_edit_general' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"),
'orders_edit_billing' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"),
'orders_edit_shipping' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"),
'orders_edit_items' => Array ('prefixes' => Array ('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"),
'orders_edit_preview' => Array ('prefixes' => Array ('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"),
'orders_gw_result' => Array ('prefixes' => Array ('ord'), 'format' => "!la_title_OrderGWResult!"),
- 'order_items_edit' => Array ( 'prefixes' => Array ('ord', 'orditems'),
- 'new_status_labels' => Array ('orditems' => '!la_title_Adding_Order_Item!'),
- 'edit_status_labels' => Array ('orditems' => '!la_title_Editing_Order_Item!'),
- 'new_titlefield' => Array ('orditems' => '!la_title_New_Order_Item!'),
- 'format' => "#ord_status# '#ord_titlefield#' - #orditems_status# '#orditems_titlefield#'",
- ),
-
- 'orders_export' => Array ('format' => '!la_title_OrdersExport!'),
-
- 'orders_product_edit' => Array ('format' => '!la_title_Editing_Order_Item!'),
+ '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' => 'core:icon16_item.png',
'label' => 'la_title_Orders',
'js_url' => "#url#",
'url' => Array ('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
'status' => ORDER_STATUS_PENDING,
),
),
'TableName' => TABLE_PREFIX . 'Orders',
'CalculatedFields' => Array (
'' => Array (
'CustomerName' => 'IF( ISNULL(u.Login), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), CONCAT(u.FirstName,\' \',u.LastName) )',
'Username' => 'IF( ISNULL(u.Login),\'root\',u.Login)',
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
'SubtotalWithDiscount' => '(SubTotal)',
'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
'TotalAmount' => 'SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount',
'CouponCode' => 'pc.Code',
'CouponName' => 'pc.Name',
'AffiliateUser' => 'IF( LENGTH(au.Login),au.Login,\'!la_None!\')',
'AffiliatePortalUserId' => 'af.PortalUserId',
'GiftCertificateCode' => 'gc.Code',
'GiftCertificateRecipient' => 'gc.Recipient',
),
'myorders' => Array (
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
'SubtotalWithDiscount' => '(SubTotal)',
'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
'TotalAmount' => 'SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount',
/*'ItemsCount' => 'COUNT(%1$s.OrderId)',*/
),
),
// %1$s - table name of object
// %2$s - calculated fields
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
'myorders' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId',
// LEFT JOIN '.TABLE_PREFIX.'OrderItems ON %1$s.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId',
),
'ItemSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
),
'SubItems' => Array ('orditems'),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('OrderDate' => 'desc'),
)
),
'Fields' => Array (
'OrderId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
'Number' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('SubNumber'), 'format' => '%06d', 'max_value_inc'>999999, 'not_null' => 1, 'default' => 0),
'SubNumber' => Array ('type' => 'int', 'required' =>1, 'formatter' => 'kFormatter', 'unique' =>Array ('Number'), 'format' => '%03d', 'max_value_inc'>999, 'not_null' => 1, 'default' => 0),
'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0=> 'la_Incomplete',1=> 'la_Pending',2=> 'la_BackOrders',3=> 'la_ToShip',4=> 'la_Processed',5=> 'la_Denied',6=> 'la_Archived'), 'use_phrases' =>1, 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
'OnHold' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'OrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
'PortalUserId' =>Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' =>Array (USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' =>1, 'not_null' =>1, 'default' =>-1),
'OrderIP' => Array ('type' => 'string', 'not_null' => 1, 'default' => '', 'filter_type' => 'like'),
'UserComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'AdminComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'BillingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingEmail' => Array (
'type' => 'string',
'formatter' => 'kFormatter',
'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'not_null' => 1, 'default' => '',
),
'BillingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingState' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options' => Array (),
'option_key_field' => 'DestAbbr',
'option_title_field' => 'Translation',
'not_null' => 1, 'default' => '',
),
'BillingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'BillingCountry' => Array(
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
FROM '.TABLE_PREFIX.'CountryStates
WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
ORDER BY Name',
'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
'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
ORDER BY Priority DESC, Name ASC',
'option_key_field' => 'PaymentTypeId', 'option_title_field' => 'Description',
'not_null' => 1, 'default' => 0
),
'PaymentAccount' => Array ('type' => 'string', 'not_null' => 1, 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'),
'PaymentNameOnCard' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'PaymentCCExpDate' => Array ('type' => 'string', 'formatter' => 'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field' => 'PaymentCCExpYear', 'not_null' => 1, 'default' => ''),
'PaymentCardType' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => '', '1' => 'Visa', '2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''),
'PaymentExpires' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'ShippingTo' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingCompany' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingPhone' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingFax' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingEmail' => Array (
'type' => 'string', 'not_null' => 1, 'default' => '',
'formatter' => 'kOptionsFormatter',
'options' => Array (),
'option_key_field' => 'DestAbbr',
'option_title_field' => 'Translation',
),
'ShippingAddress1' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingAddress2' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingCity' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingState' => Array (
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options' => Array (),
'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation',
'not_null' => 1, 'default' => ''),
'ShippingZip' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ShippingCountry' => Array(
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
FROM '.TABLE_PREFIX.'CountryStates
WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
ORDER BY Name',
'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
'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'), 'not_null' => 1, '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),
+ 'ShippingOption' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (
+ 0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail',
+ ),
+ 'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
+ ),
+ 'ShippingGroupOption' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
+ 'options' => Array (0 => 'la_opt_AutoGroupShipments', 1 => 'la_opt_ManualGroupShipments'),
+ 'not_null' => 1, '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),
+ 'TransactionStatus' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter',
+ 'options' => Array (0 => 'la_opt_Invalid', 1 => 'la_opt_Verified', 2 => 'la_opt_Penging'),
+ 'use_phrases' =>1, 'not_null' => 1, 'default' => 2,
+ ),
'GWResult1' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL),
'GWResult2' => Array ('type' => 'string', 'formatter' => 'kSerializedFormatter', 'default' => NULL),
'AffiliateId' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'', 'left_key_field' => 'AffiliateId', 'left_title_field' => 'Login', 'not_null' =>1, 'default' =>0),
'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'AffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => 1, 'default' => '0.0000'),
'ProcessingFee' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%.02f', 'not_null' => '0', 'default' => '0.0000'),
'InsuranceFee' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
'ShippingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0),
'ProcessingTaxable' => Array ('type' => 'int', 'not_null' => 0, 'default' => 0),
'IsRecurringBilling' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
'default' => 0, 'not_null' => 1,
),
'ChargeOnNextApprove' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1,
'default' => 0, 'not_null' => 1,
),
'NextCharge' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'GroupId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string
),
'VirtualFields' => Array (
'CustomerName' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
'TotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'AmountWithoutVAT' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'SubtotalWithDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'SubtotalWithoutDiscount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'OrderNumber' => Array ('type' => 'string', 'default' => '', 'filter_type' => 'like'),
'CouponCode' => Array ('type' => 'string', 'default' => ''),
'CouponName' => Array ('type' => 'string', 'default' => ''),
'GiftCertificateCode' => Array ('type' => 'string', 'default' => ''),
'GiftCertificateRecipient' => Array ('type' => 'string', 'default' => ''),
// 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', 'default' => ''),
'HasBackOrders' => Array ('type' => 'int', 'default' => 0),
'PaymentCVV2' => Array ('type' => 'string', 'default' => ''),
'AffiliateUser' => Array ('type' => 'string', 'filter_type' => 'like', 'default' => ''),
'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => 0),
// export related fields: begin
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
'IncludeFieldTitles' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
'use_phrases' => 1, 'default' => 1,
),
'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'ExportPresets' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'ExportSavePreset' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
'use_phrases' => 1, 'default' => 0,
),
'ExportPresetName' => Array ('type' => 'string', 'default' => ''),
// export related fields: end
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
1 => 'icon16_pending.png',
5 => 'icon16_disabled.png',
'module' => 'core',
),
'Fields' => Array (
'OrderId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ), 'OrderNumber' => Array ( 'title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'OrderDate' => Array ( 'title' => 'la_col_OrderDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'CustomerName' => Array ( 'title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
'PaymentType' => Array ( 'title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter', 'width' => 140, ),
'TotalAmount' => Array ( 'title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_range_filter', 'width' => 140, ),
'AffiliateUser' => Array ( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 140, ),
'OnHold' => Array ('title' => 'la_col_OnHold', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
'Search' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
1 => 'icon16_pending.png',
5 => 'icon16_disabled.png',
'module' => 'core',
),
'Fields' => Array (
'OrderId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'OrderNumber' => Array ('title' => 'la_col_OrderNumber', 'data_block' => 'grid_ordernumber_td', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'OrderDate' => Array ('title' => 'la_col_OrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 140, ),
'CustomerName' => Array ('title' => 'la_col_CustomerName', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter'),
'PaymentType' => Array ('title' => 'la_col_PaymentType', 'data_block' => 'grid_billinglink_td', 'filter_block' => 'grid_options_filter'),
'TotalAmount' => Array ('title' => 'la_col_TotalAmount', 'data_block' => 'grid_previewlink_td', 'filter_block' => 'grid_float_range_filter'),
'AffiliateUser' => Array ( 'title' => 'la_col_AffiliateUser', 'data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_user_like_filter'),
'OrderIP' => Array ('title' => 'la_col_OrderIP', 'filter_block' => 'grid_like_filter'),
'Username' => Array ('title' => 'la_col_Username', 'filter_block' => 'grid_user_like_filter'),
'PaymentAccount' => Array ('title' => 'la_col_CreditCardNumber', 'filter_block' => 'grid_like_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/units/products/products_config.php
===================================================================
--- branches/5.2.x/units/products/products_config.php (revision 14568)
+++ branches/5.2.x/units/products/products_config.php (revision 14569)
@@ -1,675 +1,698 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => '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 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'CatalogItem' => true,
'AdminTemplatePath' => 'products',
'AdminTemplatePrefix' => 'products_',
'SearchConfigPostfix' => 'products',
'ConfigPriority' => 0,
'RewritePriority' => 104,
'RewriteListener' => 'ModRewriteHelper:CategoryItemRewriteListener',
'Hooks' => Array (
// for subscription products: access group is saved before changing pricings
Array (
'Mode' => hAFTER,
'Conditional' => true,
'HookToPrefix' => 'pr',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnNew', 'OnAfterItemLoad'),
'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',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'rev',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'fav',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'ci',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
),
'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_products.png',
'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#",
),
'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', 'custom' => 'in-commerce:configuration_custom'),
'Sections' => Array (
'in-commerce' => Array (
'parent' => 'in-portal:root',
'icon' => 'ecommerce',
'label' => 'la_title_In-Commerce',
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 2.1,
'container' => true,
'type' => stTREE,
),
'in-commerce:products' => Array (
'parent' => 'in-portal:site',
'icon' => 'products',
'label' => 'la_tab_Products',
'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-p.showall', 'pass' => 'm'),
'onclick' => 'setCatalogTab(\'p.showall\')',
'permissions' => Array ('view'),
'priority' => 3.2,
'type' => stTREE,
),
// product settings
'in-commerce:setting_folder' => Array (
'parent' => 'in-portal:system',
'icon' => 'conf_ecommerce',
'label' => 'la_title_In-Commerce',
'use_parent_header' => 1,
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 3.1,
'container' => true,
'type' => stTREE,
),
'in-commerce:general' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_ecommerce_general',
'label' => 'la_tab_GeneralSettings',
'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
'in-commerce:output' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 2,
'type' => stTREE,
),
'in-commerce:search' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array ('t' => 'config/config_search', 'module_key' => 'products', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 7,
'type' => stTREE,
),
'in-commerce:configuration_custom' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'core:conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 11, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 8,
'type' => stTREE,
),
'in-commerce:contacts' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_contact_info',
'label' => 'la_tab_ConfigContacts',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 10,
'type' => stTREE,
),
),
'FilterMenu' => Array (
'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_hot'), 'type' => kDBList::HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pop'), 'type' => kDBList::HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER),
),
'Filters' => 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 (
'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
'Price' => 'COALESCE(pricing.Price, 0)',
'Cost' => 'COALESCE(pricing.Cost, 0)',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'ParentPath' => TABLE_PREFIX.'Category.ParentPath',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
),
'showall' => Array (
'Price' => 'COALESCE(pricing.Price, 0)',
'Manufacturer' => TABLE_PREFIX.'Manufacturers.Name',
'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat',
'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId',
'FileSize' => 'files.Size',
'FilePath' => 'files.FilePath',
'FileVersion' => 'files.Version',
'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename',
'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath',
),
),
'CacheModRewrite' => true,
'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.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing 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.'%3$sProductsPricing pricing ON pricing.ProductId = %1$s.ProductId AND pricing.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles 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'),
+ 'ForcedSorting' => Array ('EditorsPick' => 'desc', '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.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'%3$sProductFiles files ON files.ProductId = %1$s.ProductId AND files.IsPrimary = 1
LEFT JOIN '.TABLE_PREFIX.'%3$sProductsPricing 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' => 1, 'max_len' =>255, 'default' => ''),
'AutomaticFilename' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
'use_phrases' => 1, 'not_null' => 1, 'default' => 1,
),
'SKU' => Array ('type' => 'string', 'required' => 1, 'max_len' =>255, 'error_msgs' => Array ('required' => 'Please fill in'), 'default' => NULL),
'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
'DescriptionExcerpt' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => NULL),
'Weight' => Array ('type' => 'float', 'min_value_exc' => 0, 'formatter' => 'kUnitFormatter', 'format' => '%0.2f', 'default' => NULL),
'MSRP' => Array ('type' => 'float', 'min_value_inc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => NULL),
'ManufacturerId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' =>Array (0 => ''), 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Manufacturers ORDER BY Name', 'option_key_field' => 'ManufacturerId', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1,
'default' => 2, 'not_null' => 1,
),
'BackOrder' => Array ('type' => 'int', 'not_null' => 1, 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'default' => 2 ),
'BackOrderDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'error_msgs' => Array ('bad_date_format' => 'Please use the following date format: %s'), 'default' => NULL),
'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
'EditorsPick' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'Featured' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'OnSale' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0),
'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Hits' => Array ('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Expire' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' =>null),
- 'Type' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ),
+ 'Type' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
+ 'options' => Array (
+ PRODUCT_TYPE_TANGIBLE => 'la_product_tangible',
+ PRODUCT_TYPE_SUBSCRIPTION => 'la_product_subscription',
+ PRODUCT_TYPE_SERVICE => 'la_product_service',
+ PRODUCT_TYPE_DOWNLOADABLE => 'la_product_downloadable',
+ /* PRODUCT_TYPE_PACKAGE => 'la_product_package', */
+ ),
+ 'not_null' => 1, 'default' => 1,
+ ),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'ModifiedById' => Array ('type' => 'int', 'default' => NULL),
- 'CreatedById' => Array ('type' => 'int', 'required' => 1, 'default' => NULL),
+ 'CreatedById' => Array (
+ 'type' => 'int',
+ 'formatter' => 'kLEFTFormatter',
+ 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
+ WHERE `%s` = \'%s\'',
+ 'left_key_field' => 'PortalUserId',
+ 'left_title_field' => 'Login',
+ 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
+ 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL,
+ ),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0),
'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'QtyInStock' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyInStockMin' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyReserved' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyBackOrdered' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'QtyOnOrder' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'InventoryComment' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'error_msgs' => Array ('invalid_format' => '!la_invalid_integer!')),
'AccessGroupId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalGroup WHERE System!=1 AND Personal !=1 ORDER BY Name', 'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL),
'AccessDuration' => Array ('type' => 'int', 'default' => NULL),
'AccessDurationType' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1 => 'la_opt_sec', 2 => 'la_opt_min', 3 => 'la_opt_hour', 4 => 'la_opt_day', 5 => 'la_opt_week', 6 => 'la_opt_month', 7 => 'la_opt_year' ), 'default' => NULL,),
'AccessStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'AccessEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL,),
'OptionsSelectionMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_opt_Selection', 1 => 'la_opt_List'), 'default' => 0),
'HasRequiredOptions' => Array ('type' => 'int', 'default' => 0, 'not_null' => 1),
'Virtual' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ProcessingData' => Array ('type' => 'string', 'default' => ''),
'PackageContent' => Array ('type' => 'string', 'default' => NULL),
'IsRecurringBilling' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
'use_phrases' => 1, 'not_null' => 1, 'default' => 0,
),
//'PayPalRecurring' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => '1', 'default' => '0'),
'ShippingMode' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (0 => 'la_shipping_AnyAndSelected', 1 => 'la_shipping_Limited'), 'not_null' => 1, 'default' =>0),
'ProcessingData' => Array ('type' => 'string', 'default' => null),
'ShippingLimitation' => Array ('type' => 'string', 'default' => NULL),
'AssignedCoupon' =>
Array ('type' => 'int', 'not_null' => 1, 'default' => 0,
'formatter' => 'kLEFTFormatter',
'options' => Array (0 => 'None'),
'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'ProductsCoupons WHERE `%s` = \'%s\'',
'left_key_field' => 'CouponId',
'left_title_field' => 'Name'),
'MinQtyFreePromoShipping' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'MetaKeywords' => Array ('type' => 'string', 'default' => null),
'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
),
'VirtualFields' => Array (
'Qty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'regexp' => '/^[\d]+$/', 'default' => 0),
'Price' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
'Cost' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%.2f', 'default' => NULL),
'CategoryFilename' => Array ('type' => 'string', 'default' => ''),
'PrimaryCat' => Array ('type' => 'int', 'default' => 0),
'IsHot' => Array ('type' => 'int', 'default' => 0),
'IsNew' => Array ('type' => 'int', 'default' => 0),
'IsPop' => Array ('type' => 'int', 'default' => 0),
'Manufacturer' => Array ('type' => 'string', 'default' => ''),
// export related fields: begin
'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'ExportFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array ('type' => 'string', 'default' => ''),
'FieldsSeparatedBy' => Array ('type' => 'string', 'default' => ', '),
'FieldsEnclosedBy' => Array ('type' => 'string', 'default' => '"'),
'LineEndings' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'CRLF', 2 => 'LF'), 'default' => 2),
'IncludeFieldTitles' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
'use_phrases' => 1, 'default' => 1,
),
'ExportColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'AvailableColumns' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => ''),
'CategoryFormat' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_MixedCategoryPath', 2 => 'la_SeparatedCategoryPath'), 'use_phrases' => 1, 'default' => 1),
'CategorySeparator' => Array ('type' => 'string', 'default' => ':'),
'IsBaseCategory' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'),
'use_phrases' => 1, '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' => EXPORT_BASE_PATH . '/', 'default' => ''),
'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', 'default' => ''),
'CachedNavbar' => Array ('type' => 'string', 'default' => ''),
'ParentPath' => Array ('type' => 'string', 'default' => ''),
'FileSize' => Array ('type' => 'int', 'formatter' => 'kFilesizeFormatter', 'default' => 0),
'FilePath' => Array ('type' => 'string', 'default' => ''),
'FileVersion' => Array ('type' => 'string', 'default' => ''),
// for primary image
'AltName' => Array ('type' => 'string', 'default' => ''),
'SameImages' => Array ('type' => 'string', 'default' => ''),
'LocalThumb' => Array ('type' => 'string', 'default' => ''),
'ThumbPath' => Array ('type' => 'string', 'default' => ''),
'ThumbUrl' => Array ('type' => 'string', 'default' => ''),
'LocalImage' => Array ('type' => 'string', 'default' => ''),
'LocalPath' => Array ('type' => 'string', 'default' => ''),
'FullUrl' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
'NEW' => 'icon16_product_new.png',
),
'Fields' => Array (
'ProductId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Priority' => Array('title'=>'la_col_Priority', 'filter_block' => 'grid_range_filter', 'width' => 65),
'Type' => Array ('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
'Manufacturer' => Array ('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'QtyInStock' => Array ('title' => 'la_col_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
'OnSale' => Array ('title' => 'la_col_OnSale', 'filter_block' => 'grid_options_filter', 'width' => 70, ), /*
'Weight' => Array ( 'title' => 'la_col_ProductWeight', 'filter_block' => 'grid_float_range_filter', 'width' => 150, ),
'CreatedOn' => Array ( 'title' => 'la_col_ProductCreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'BackOrderDate' => Array ( 'title' => 'la_col_ProductBackOrderDate', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
*/
),
),
'Radio' => Array (
'Icons' => Array (
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
'NEW' => 'icon16_product_new.png',
),
'Selector' => 'radio',
'Fields' => Array (
'ProductId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'SKU' => Array ( 'title' => 'la_col_ProductSKU', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Name' => Array ( 'title' => 'la_col_ProductName', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Priority' => Array('title'=>'la_col_Priority', 'filter_block' => 'grid_range_filter', 'width' => 65),
'Type' => Array ('title' => 'la_col_ProductType', 'filter_block' => 'grid_options_filter', 'width' => 80, ),
'Manufacturer' => Array ('title' => 'la_col_Manufacturer', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Price' => Array ('title' => 'la_col_Price', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ),
'QtyInStock' => Array ('title' => 'la_col_Qty', 'data_block' => 'qty_td', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
'QtyBackOrdered' => Array ('title' => 'la_col_QtyBackOrdered', 'filter_block' => 'grid_range_filter', 'width' => 80, ),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Products',
'ShortListPerPage' => 'Comm_Perpage_Products_Short',
'ForceEditorPick' => 'products_EditorPicksAboveRegular',
'DefaultSorting1Field' => 'product_OrderProductsBy',
'DefaultSorting2Field' => 'product_OrderProductsThenBy',
'DefaultSorting1Dir' => 'product_OrderProductsByDir',
'DefaultSorting2Dir' => 'product_OrderProductsThenByDir',
'RatingDelayValue' => 'product_RatingDelay_Value',
'RatingDelayInterval' => 'product_RatingDelay_Interval',
),
);
Index: branches/5.2.x/units/coupon_items/coupon_items_config.php
===================================================================
--- branches/5.2.x/units/coupon_items/coupon_items_config.php (revision 14568)
+++ branches/5.2.x/units/coupon_items/coupon_items_config.php (revision 14569)
@@ -1,151 +1,150 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array(
'Prefix' => 'coupi',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array('class' => 'CouponItemsEventHandler', 'file' => 'coupon_items_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class' => 'CouponItemsTagProcessor', 'file' => 'coupon_items_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'p',
'HookToSpecial' => '-item',
'HookToEvent' => Array('OnAfterItemDelete'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnDeleteCouponItem',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'CouponItemId',
- 'StatusField' => Array('Status'),
- 'TitleField' => 'Name',
+ 'StatusField' => Array('Status'),
'TableName' => TABLE_PREFIX . 'ProductsCouponItems',
'ForeignKey' => 'CouponId',
'ParentTableKey' => 'CouponId',
'ParentPrefix' => 'coup',
'AutoDelete' => true,
'AutoClone' => true,
'ListSQLs' => Array(
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Products p ON %1$s.ItemResourceId = p.ResourceId
LEFT JOIN ' . TABLE_PREFIX . 'Category c ON %1$s.ItemResourceId = c.ResourceId',
), // key - special, value - list select sql
'ItemSQLs' => Array(
'' => 'SELECT * FROM %s',
),
/*'BelongsTo' => Array(
Array(
'prefix' => 'd', 'key' => 'DiscountId', 'ForeignKey' => 'DiscountId'),
),*/
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('ItemName' => 'asc'),
),
),
'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',
),
),
'Fields' => Array (
'CouponItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,),
'CouponId' => Array('type' => 'int', 'default' => null, ),
'ItemResourceId' => Array('type' => 'int', 'default' => null, ),
'ItemType' => Array(
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (1 => 'la_Product', 2 => 'la_Category', 0 => 'la_WholeOrder'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
),
'VirtualFields' => Array(
'ProductId' => Array('type' => 'int', 'default' => 0),
'ItemName' => Array('type' => 'string', 'default' => ''),
'SKU' => Array('type' => 'string', 'default' => ''),
'Weight' => Array(
'type' => 'float',
'formatter' => 'kFormatter', 'format' => '%0.2f',
'min_value_exc' => 0, 'default' => NULL,
),
'CreatedOn' => Array(
'type' => 'int',
'formatter' => 'kDateFormatter',
'default' => '#NOW#',
),
'BackOrderDate' => 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,
'default' => 2,
),
'CategoryId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default'=>'icon16_entire_order.gif'),
'Fields' => Array(
'ItemType' => Array( 'title'=>'la_col_ItemType', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_empty_filter', 'width' => 200, ),
),
),
'CouponItems' => Array(
'Icons' => Array(
'default' => 'icon16_product.png',
0 => 'icon16_product_disabled.png',
1 => 'icon16_product.png',
2 => 'icon16_product_pending.png',
),
'Fields' => Array(
'ProductId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_item_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'ItemName' => Array( 'title'=>'la_col_ItemName', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'ItemType' => Array( 'title'=>'la_col_CouponItemType', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/units/order_items/order_items_tag_processor.php
===================================================================
--- branches/5.2.x/units/order_items/order_items_tag_processor.php (revision 14568)
+++ branches/5.2.x/units/order_items/order_items_tag_processor.php (revision 14569)
@@ -1,254 +1,258 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
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 = kUtil::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 {
$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($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'] = $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 = kUtil::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 */
+ $i = 0;
$product_id = $product_object->GetID();
$product_id_get = $this->Application->GetVar('p_id');
while (!$list->EOL()) {
// load product used in orderitem
$this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET
$this->Application->SetVar('p_id', $list->GetDBField('ProductId'));
$product_object->Load( $list->GetDBField('ProductId') ); // correct product load
$this->Application->SetVar('m_cat_id', $product_object->GetDBField('CategoryId'));
+ $block_params['is_last'] = ($i == $list->SelectedCount - 1);
+
$o.= $this->Application->ParseBlock($block_params, 1);
$list->GoNext();
+ $i++;
}
// restore IDs used in cycle
$this->Application->SetVar('p_id', $product_id_get);
$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
Index: branches/5.2.x/units/gift_certificates/gift_certificates_eh.php
===================================================================
--- branches/5.2.x/units/gift_certificates/gift_certificates_eh.php (revision 14568)
+++ branches/5.2.x/units/gift_certificates/gift_certificates_eh.php (revision 14569)
@@ -1,256 +1,203 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class GiftCertificateEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnItemBuild' => Array('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
- function OnApplyClone(&$event)
- {
- $item = &$event->getObject();
- $clone_count = $this->Application->GetVar('clone_items_count');
- $table = $this->Application->getUnitOption($event->Prefix, 'TableName');
- if ($clone_count && $clone_count>0){
- $this->Application->StoreVar('CoupLastCloneCount', $clone_count);
- for ($i=0; $i<$clone_count; $i++) {
- $this->SetNewCode($item);
-
- $item->SetField('Expiration_date', $this->Application->GetVar('clone_exp_date'));
- $item->SetField('Expiration_time', $this->Application->GetVar('clone_exp_time'));
- $item->NameCopy();
- $validated = $item->Create();
-
-
- }
- }
-
- if ($validated){
- $this->finalizePopup($event);
- }else{
- $event->redirect = false;
- }
- }
-
- function SetNewCode(&$item)
- {
- do{
- $new_code = $this->RandomCouponCode(10);
- $exists = $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductsCoupons WHERE Code='.$this->Conn->qstr($new_code));
- if ($exists){
- $new_code = false;
- }
- } while (!$new_code);
-
- $item->SetDBField('Code', $new_code);
- }
-
- function RandomCouponCode($size)
- {
- $rand_code = "";
- for ($i=0; $i<10; $i++){
- $is_letter = rand(0,1);
- if ($is_letter){
- $rand_char = chr(rand(65,90));
- }else{
- $rand_char = rand(0,9);
- }
- $rand_code .= $rand_char;
- }
- return $rand_code;
- }
-
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnApplyGiftCertificate(&$event)
{
$code = $this->Application->GetVar('giftcert_code');
if ($code == '') {
return ;
}
$object =& $event->getObject(Array('skip_autoload' => true));
$object->Load($code, 'Code');
if (!$object->isLoaded()) {
$event->status = kEvent::erFAIL;
$this->Application->SetVar('set_checkout_error', 104);
$event->redirect = false; // check!!!
return ;
}
$expire_date = $object->GetDBField('Expiration');
$debit = $object->GetDBField('Debit');
if( $object->GetDBField('Status') != 1 || ($expire_date && $expire_date < adodb_mktime()) ||
($debit <= 0))
{
$event->status = kEvent::erFAIL;
$this->Application->SetVar('set_checkout_error', 105);
$event->redirect->false;
return ;
}
$this->Application->setUnitOption('ord', 'AutoLoad', true);
$order =& $this->Application->recallObject('ord');
$order->SetDBField('GiftCertificateId', $object->GetDBField('GiftCertificateId'));
$order->Update();
$this->Application->SetVar('set_checkout_error', 110);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
- $object = &$event->getObject();
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
$exp_date = adodb_mktime();
-
$default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration');
-
- if ($default_duration && $default_duration > 0){
+
+ if ($default_duration){
$exp_date += (int)$default_duration * 86400;
}
$object->SetDBField('Expiration_date', $exp_date);
}
function OnBeforeItemUpdate(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$amount = abs($object->GetDBField('Amount'));
$debit = abs($object->GetDBField('Debit'));
if ($debit > $amount) {
$debit = $amount;
}
$object->SetDBField('Amount', $amount);
$object->SetDBField('Debit', $debit);
if ($object->GetDBField('SendVia') == 1) {
// by postal mail
if ($this->Application->GetVar('email_certificate') == 0) {
$object->setRequired('RecipientEmail', false);
}
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
if (!$cs_helper->CountryHasStates($object->GetDBField('RecipientCountry'))) {
$object->setRequired('RecipientState', false);
}
$cs_helper->CheckStateField($event, 'RecipientState', 'RecipientCountry');
} else {
$non_required_fields = Array (
'RecipientState', 'RecipientCity', 'RecipientCountry',
'RecipientZipcode', 'RecipientAddress1', 'RecipientFirstname',
'RecipientLastname',
);
foreach ($non_required_fields as $non_required_field) {
$object->setRequired($non_required_field, false);
}
}
}
function OnBeforeItemCreate(&$event)
{
$this->OnBeforeItemUpdate($event);
$object =& $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Debit', $object->GetDBField('Amount'));
}
/**
* Print current gift certiicate
*
* @param kEvent $event
*/
function OnSave(&$event)
{
parent::OnSave($event);
if ($event->status == kEvent::erSUCCESS) {
$object =& $event->getObject();
/* @var $object kDBItem */
if ($this->Application->GetVar('print_certificate') == 1) {
// get object id by unique field Code
$sql = 'SELECT '.$object->IDField.'
FROM '.$this->Application->GetLiveName($object->TableName).'
WHERE Code = '.$this->Conn->qstr($object->GetDBField('Code'));
$id = $this->Conn->GetOne($sql);
$this->Application->StoreVar('print_certificate_id', $id);
}
}
}
/**
* Email selected gift certificate
*
* @param kEvent $event
*/
function OnEmailGiftCertificate(&$event)
{
$ids = $this->StoreSelectedIDs($event);
if (!$ids) {
return ;
}
$object =& $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
foreach ($ids as $id) {
$object->Load($id);
$send_params = Array (
'from_email' => $this->Application->ConfigValue('Smtp_AdminMailFrom'),
'from_name' => $object->GetDBField('Purchaser'),
'to_email' => $object->GetDBField('RecipientEmail'),
'to_name' => $object->GetDBField('Recipient'),
'message' => $object->GetDBField('Message'),
'amount' => $object->GetField('Amount'),
'gifcert_id' => $object->GetDBField('Code'),
);
$this->Application->EmailEventUser('USER.GIFTCERTIFICATE', null, $send_params);
$this->Application->EmailEventAdmin('USER.GIFTCERTIFICATE', null, $send_params);
}
$this->clearSelectedIDs($event);
}
}
\ No newline at end of file
Index: branches/5.2.x/units/gift_certificates/gift_certificates_tp.php
===================================================================
--- branches/5.2.x/units/gift_certificates/gift_certificates_tp.php (revision 14568)
+++ branches/5.2.x/units/gift_certificates/gift_certificates_tp.php (revision 14569)
@@ -1,72 +1,47 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
class GiftCertificateTagProcessor extends kDBTagProcessor {
-
- function LastCloneCount($params)
- {
- $clone_count = $this->Application->RecallVar('CoupLastCloneCount');
- if (!$clone_count){
- $clone_count = 1;
- }
- return $clone_count;
- }
-
- function DefaultExpDate($params)
- {
- $object =& $this->getObject($params);
- $formatter =& $this->Application->recallObject('kDateFormatter');
-
- return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_date', $object);
- }
-
- function DefaultExpTime($params)
- {
- $object =& $this->getObject($params);
- $formatter =& $this->Application->recallObject('kDateFormatter');
-
- return $formatter->Format( adodb_mktime() + $this->Application->ConfigValue('Comm_DefaultCouponDuration') * 3600 * 24, 'Expiration_time', $object);
- }
-
+
function HasOrder($params)
{
if ($this->IsNewItem($params)) {
return 0;
}
$object =& $this->getObject($params);
$sql = 'SELECT COUNT(OrderId)
FROM '.TABLE_PREFIX.'Orders
WHERE GiftCertificateId = '.$object->GetID();
return $this->Conn->GetOne($sql);
}
/**
* Print link for gift certificate (admin only)
*
* @param Array $params
*/
function PrintLink($params)
{
$params[$this->getPrefixSpecial().'_id'] = $this->Application->RecallVar('print_certificate_id');
$this->Application->RemoveVar('print_certificate_id');
$main_processor =& $this->Application->recallTagProcessor('m');
/* @var $main_processor kMainTagProcessor */
return $main_processor->Link($params);
}
}
\ No newline at end of file
Index: branches/5.2.x/admin_templates/shipping/zone_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/shipping/zone_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/shipping/zone_edit.tpl (revision 14569)
@@ -1,384 +1,381 @@
<inp2:adm_SetPopupSize width="650" height="480"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="s" section="in-commerce:shipping" title_preset="zones_edit"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
SelectAll(document.getElementById('location_list[]'));
SelectToString(document.getElementById('location_list[]'));
submit_event('z','<inp2:z_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('z','OnCancel');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('z', '<inp2:z_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('z', '<inp2:z_NextId/>');
}
) );
- a_toolbar.AddButton( new ToolBarSeparator('sep2') );
-
a_toolbar.Render();
<inp2:m_if check="z_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
- a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="z_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="z_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="destination_block" selected="">
<option value="<inp2:m_param name="id"/>" <inp2:m_param name="selected"/>><inp2:m_param name="destination_title"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="countries_multiple">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">&nbsp;</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<table>
<tr><td>
<inp2:m_Phrase label="la_zones_SelectedCountries"/>:<br/>
<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
<inp2:z_ShowCountries block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableCountries"/>:<br/>
<select name="ShippingZoneIdChooser" multiple size="10" size="10" style="width: 200px">
<inp2:z_ShowCountries block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="states_multiple">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">&nbsp;</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<select name="CountrySelector" onChange="change_country()">
<inp2:z_ShowCountries block="destination_block" show="has_states"/>
</select>
<br />
<table>
<tr><td>
<inp2:m_Phrase label="la_zones_SelectedStates"/>:<br/>
<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
<inp2:z_ShowStates block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableStates"/>:<br/>
<select name="ShippingZoneIdChooser" multiple size="10" style="width: 200px">
<inp2:z_ShowStates block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="zips_multiple">
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">&nbsp;</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<select name="CountrySelector" onChange="change_country()">
<inp2:z_ShowCountries block="destination_block" show="all"/>
</select>
<br />
<table>
<tr><td>
<inp2:m_Phrase label="la_zones_SelectedZips"/>:<br/>
<select name="location_list[]" id="location_list[]" multiple onchange="SelectToString(this)" size="10" style="width: 200px">
<inp2:z_ShowZips block="destination_block" show="current"/>
</select>
</td>
<td>
<input class="button" type=button onclick="MoveSelected(this.form.ShippingZoneIdChooser, document.getElementById('location_list[]'))" value="&lt;"><br/>
<input class="button" type=button onclick="MoveSelected(document.getElementById('location_list[]'), this.form.ShippingZoneIdChooser)" value="&gt;">
</td>
<td>
<inp2:m_Phrase label="la_zones_AvailableZips"/>:<br/>
<select name="ShippingZoneIdChooser" multiple size="10" style="width: 200px">
<inp2:z_ShowZips block="destination_block" show="available"/>
</select>
</td>
</tr>
</table>
<br>
<input type="text" name="zone_add" id="zone_add"> <input type="button" onClick="add_zone(document.getElementById('location_list[]'))" value="<inp2:m_Phrase label='la_btn_AddLocation'/>" class="button"/>
</td>
</tr>
</inp2:m_DefineElement>
<inp2:z_SaveWarning name="grid_save_warning"/>
<inp2:z_ErrorWarning name="form_error_warning"/>
<!--## used for OnCountryChange event ##-->
<input type="hidden" name="z_id" value="<inp2:z_Field name='ZoneID'/>"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_ShippingZone"/>
<inp2:m_RenderElement name="inp_id_label" prefix="z" field="ZoneID" title="la_fld_Id"/>
<inp2:m_RenderElement name="inp_label" prefix="z" field="ShippingTypeID" title="la_fld_ShippingTypeId"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="z" field="Name" title="la_fld_ShipZoneName" size="40"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="z" field="CODallowed" title="la_fld_CODallowed"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="z" field="Type" title="la_fld_Zone_Type"/>
<inp2:m_if check="z_Field" field="Type" equals_to="1" db="db">
<inp2:m_RenderElement name="countries_multiple" prefix="z" />
</inp2:m_if>
<inp2:m_if check="z_Field" field="Type" equals_to="2" db="db">
<inp2:m_RenderElement name="states_multiple" prefix="z" />
</inp2:m_if>
<inp2:m_if check="z_Field" field="Type" equals_to="3" db="db">
<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/>">
<inp2:m_RenderElement name="inp_edit_hidden" prefix="z" field="ShippingTypeID"/>
<script>
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_1').onchange = change_type;
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_2').onchange = change_type;
document.getElementById('z[<inp2:z_field field="ZoneID"/>][Type]_3').onchange = change_type;
function change_type()
{
submit_event('z','OnTypeChange');
}
function change_country()
{
submit_event('z','OnCountryChange');
}
function remove_location(location_id)
{
document.getElementById('location_id').value = location_id;
submit_event('z', 'OnRemoveLocation');
}
function SelectToString(aSelect)
{
// written by Slava, patched by Alex, modified by SergeyG
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if(aSelect.options[i].selected == true) result += cur.value+',';
}
if(result.length > 0) result = result.substring(0,result.length-1);
document.getElementById('selected_destinations').value = result;
return result;
}
function add_zone(aSelect){
var el = document.getElementById('zone_add');
if (el)
{
if (el.value=='') return;
var found = false;
var valueArray;
for (i = 0; i < aSelect.options.length; i++){
valueArray = aSelect.options[i].value.split("|");
if (valueArray[1] == el.value){
found = true;
break;
}
}
if (!found){
aSelect.options[aSelect.length] = new Option(el.value, '0|'+el.value);
el.value='';
}
}
}
function SelectContainsValue(selectObject, searchValue)
{
for (i = 0; i < selectObject.options.length; i++){
if (selectObject.options[i].text == searchValue){
return true;
}
}
return false;
}
function SelectToArray(aSelect)
{
var an_arr = new Array();
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
an_arr[an_arr.length] = new Array(cur.text, cur.value, cur.selected);
}
return an_arr;
}
function ArrayToSelect(anArray, aSelect)
{
var initial_length = aSelect.length;
for (var i=initial_length-1; i >= 0; i--) { aSelect.options[i] = null; }
for (var i=0; i < anArray.length; i++)
{
cur = anArray[i];
aSelect.options[aSelect.length] = new Option(cur[0], cur[1]);
}
}
function SelectCompare(a, b)
{
if (a[0] < b[0])
return -1;
if (a[0] > b[0])
return 1;
return 0;
}
function MoveSelected(FromList, ToList)
{
FromArr = SelectToArray(FromList);
ToArr = SelectToArray(ToList);
NewFrom = Array();
for (var i=FromArr.length-1; i >= 0; i--)
{
cur = FromArr[i];
if (cur[2] && !SelectContainsValue(ToList, cur[0])) {
ToArr[ToArr.length] = cur;
}
else if(SelectContainsValue(ToList, cur[0])) {
}
else {
NewFrom[NewFrom.length] = cur;
}
}
NewFrom.sort(SelectCompare);
ToArr.sort(SelectCompare);
FromList = ArrayToSelect(NewFrom, FromList);
ToList = ArrayToSelect(ToArr, ToList);
}
function SelectToString2(aSelect)
{
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
result += cur.value+',';
}
return result;
}
function SelectAll(aSelect)
{
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
aSelect.options[i].selected = true;
}
// -----------
}
function OnlySelectedToString(aSelect)
{
var result = '';
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if (cur.selected)
result += cur.value+',';
}
return result;
}
function SelectMultipleSelected(aSelect, aStr)
{
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
if (aStr.match("(^|\,)+"+cur.value+"(,|$)+") ) {
aSelect.options[i].selected = true;
}
}
}
function SelectAll(aSelect)
{
for (var i=0; i < aSelect.length; i++)
{
cur = aSelect.options[i];
aSelect.options[i].selected = true;
}
}
// --------------
</SCRIPT>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/reports/reports.tpl
===================================================================
--- branches/5.2.x/admin_templates/reports/reports.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/reports/reports.tpl (revision 14569)
@@ -1,97 +1,99 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="rep" section="in-commerce:reports" title_preset="report_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_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>
<table width="100%" class="bordered">
<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='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>
</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"/>-->
+ <!--## TODO Commented out for now, but we have DB Fields!
+ <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"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/orders/orders_pending_list.tpl
===================================================================
--- branches/5.2.x/admin_templates/orders/orders_pending_list.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/orders/orders_pending_list.tpl (revision 14569)
@@ -1,74 +1,75 @@
<inp2:m_include t="incs/header"/>
<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('sep4') );
-// a_toolbar.AddButton( new ToolBarSeparator('sep5') );
-
- a_toolbar.AddButton( new ToolBarButton('print', '<inp2:m_phrase label="la_ToolTip_Print" escape="1"/>', function() {
+ 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');
- // }
- // ) );
+ <!--##
+ // TODO there is code for this in OrderEventHandler, but missing PDF template
+ 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"/>
<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
Index: branches/5.2.x/admin_templates/orders/orders_edit_billing.tpl
===================================================================
--- branches/5.2.x/admin_templates/orders/orders_edit_billing.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/orders/orders_edit_billing.tpl (revision 14569)
@@ -1,218 +1,218 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_billing" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_shipping', '<inp2:m_phrase label="la_ToolTip_ResetToShipping" escape="1"/>', function() {
submit_event('ord','OnResetToShipping');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
function OpenGWResults(field) {
openSelector('ord', '<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord"/>&field=' + field, '', '500x400');
}
</script>
<inp2:m_DefineElement name="inp_gwresults" is_last="" as_label="" currency="" is_last="">
<inp2:m_RenderElement design="form_row" pass_params="1">
<td class="control-cell">
<inp2:m_if check="m_Param" name="display_field"><inp2:m_Param name="display_field"/>: <inp2:Field name="$field" format="$display_field"/></inp2:m_if>
<a href="javascript:OpenGWResults('<inp2:m_param name="field"/>')"><inp2:m_Phrase label="la_Details"/></a>
</td>
</inp2:m_RenderElement>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_OrderBilling"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingTo" title="la_fld_BillingTo" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCompany" title="la_fld_BillingCompany" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="la_fld_BillingPhone" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingFax" title="la_fld_BillingFax" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="la_fld_BillingEmail" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress1" title="la_fld_BillingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress2" title="la_fld_BillingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="la_fld_BillingCity" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="la_fld_BillingState" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="la_fld_BillingZip" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="la_fld_BillingCountry" size="20"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentType" title="la_fld_PaymentType" onchange="submit_event('ord','OnPreSave');"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="la_fld_NextCharge"/>
<!--<inp2:m_RenderElement name="inp_gwresults" prefix="ord" display_field="score" field="VerificationResult" title="la_fld_VerificationResult" />-->
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="la_section_CreditCard"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentCardType" title="la_fld_PaymentCardType"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="la_fld_CreditCardNumber" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentNameOnCard" title="la_fld_PaymentNameOnCard" size="20"/>
<inp2:m_RenderElement design="form_row" 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>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentCVV2" title="la_fld_PaymentCVV2" size="5" maxlength="5"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="la_fld_PaymentExpires" size="16"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="ChargeOnNextApprove" title="la_fld_ChargeOnNextApprove"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="la_fld_PaymentAccount" size="20"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="la_fld_PaymentDate" size="16"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="la_fld_AuthorizationResult" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="la_fld_CaptureResult" />
</inp2:m_if>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingTo" title="la_fld_BillingTo" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCompany" title="la_fld_BillingCompany" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingPhone" title="la_fld_BillingPhone" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingFax" title="la_fld_BillingFax" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingEmail" title="la_fld_BillingEmail" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress1" title="la_fld_BillingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress2" title="la_fld_BillingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCity" title="la_fld_BillingCity" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingState" title="la_fld_BillingState" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingZip" title="la_fld_BillingZip" size="10"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCountry" title="la_fld_BillingCountry" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentType" title="la_fld_PaymentType"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="la_fld_NextCharge"/>
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="VerificationResult" display_field="score" title="la_fld_VerificationResult" />
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="la_section_CreditCard"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCardType" title="la_fld_PaymentCardType"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="la_fld_CreditCardNumber"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentNameOnCard" title="la_fld_PaymentNameOnCard"/>
<inp2:m_RenderElement design="form_row" 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>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCVV2" title="la_fld_PaymentCVV2"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="la_fld_PaymentExpires"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="la_fld_PaymentAccount"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="la_fld_PaymentDate"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="la_fld_AuthorizationResult" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="la_fld_CaptureResult" />
</inp2:m_if>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="CouponId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="CouponCode" title="la_fld_CouponCode" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="DiscountTotal" title="la_fld_TotalSavings" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ReturnTotal" title="la_fld_TotalReturns" />
<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
<inp2:m_else />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="AmountWithoutVAT" title="la_fld_SubTotal" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="VAT" title="la_fld_VAT" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GiftCertificateId">
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateCode" title="la_fld_Gift_Certificate_Number" />
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateDiscount" title="la_fld_Gift_Certificate_Amount_Applied" />
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateCode" title="la_fld_GiftCertificateNumber" />
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateDiscount" title="la_fld_GiftCertificateAmountApplied" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="TotalAmount" title="la_fld_TotalAmount" />
<inp2:m_if check="ord_HasOriginalAmount" >
<inp2:m_RenderElement name="inp_label" prefix="ord" field="OriginalAmount" title="la_fld_OriginalAmount" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Billing">
<input type="hidden" name="check_billing_address" value="true" />
<inp2:m_if check="ord_UsingCreditCard">
<input type="hidden" name="check_credit_card" value="true" />
</inp2:m_if>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/orders/orders_edit_preview.tpl
===================================================================
--- branches/5.2.x/admin_templates/orders/orders_edit_preview.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/orders/orders_edit_preview.tpl (revision 14569)
@@ -1,390 +1,390 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_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() {
openSelector('ord', '<inp2:m_Link template="in-commerce/orders/orders_edit_print" pass="all"/>', '', '750x700');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('new_item', '<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 class="edit-form">
<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 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_GiftCertificateNumber"/>:</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 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_CertificateAmountApplied"/>:</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"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl
===================================================================
--- branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl (revision 14569)
@@ -1,250 +1,252 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_shipping" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_billing', '<inp2:m_phrase label="la_ToolTip_ResetToBilling" escape="1"/>', function() {
submit_event('ord','OnResetToBilling');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:m_RenderElement design="form_message" id="sqe_error" style="display: none;" pass_params="1">
&nbsp;
</inp2:m_RenderElement>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_OrderShipping"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTo" title="la_fld_ShippingTo" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCompany" title="la_fld_ShippingCompany" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingPhone" title="la_fld_ShippingPhone" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingFax" title="la_fld_ShippingFax" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingEmail" title="la_fld_ShippingEmail" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress1" title="la_fld_ShippingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress2" title="la_fld_ShippingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCity" title="la_fld_ShippingCity" size="20"/>
<script type="text/javascript">
function update_address()
{
submit_event('ord','OnQuietPreSave');
}
</script>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingState" title="la_fld_ShippingState" size="20" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingZip" title="la_fld_ShippingZip" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="la_fld_ShippingCountry" size="20" />
<inp2:m_DefineElement name="order_option">
<input onclick="submit_event('ord','OnQuietPreSave');" class="simple" type="radio" <inp2:m_param name="checked"/> name="<inp2:InputName field="$field"/>" id="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label>&nbsp;<br>
</inp2:m_DefineElement>
- <!-- <inp2:m_RenderElement name="inp_edit_radio" prefix="ord" field="ShippingOption" title="la_fld_ShippingOption" size="20" /> -->
+ <!--## TODO looks like this field is NOT used in Admin - check on implementation of this field here
+ <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" currency="selected"/>
</select>
</td>
</tr>
</inp2:m_DefineElement>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingOptions"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<inp2:ord_PredefinedOptions field="ShippingOption" block="order_option" selected="checked" />
</td>
</tr>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingType"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<table border="0" cellspacing="1" cellpadding="3" width="100%" style="border: 1px solid black; border-collapse: collapse">
<tr class="subsectiontitle" style="border-bottom: 1px solid black">
<td width="25%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_Shipment" /></b></td>
<td width="45%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_ShippingType" /></b></td>
</tr>
<inp2:ord_PrintShippings block="order_shipment" currency="selected"/>
</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" currency="selected"/>
<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" currency="selected" 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" currency="selected"/>
</td>
</tr>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCost" title="la_fld_ShippingCost" size="10" format="$ %.2f"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="la_fld_InsuranceFee" size="10" format="$ %.2f"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCustomerAccount" title="la_fld_ShippingCustomerAccount" size="30"/>
<inp2:m_DefineElement name="inp_shipping_label" is_last="" as_label="" currency="" is_last="">
<inp2:m_RenderElement design="form_row" pass_params="1">
<td valign="top" class="control-cell">
<inp2:{$prefix}_Field field="$field" as_label="$as_label" currency="$currency"/>
<inp2:m_if check="{$prefix}_USPSLabelFound" field="$field">
&nbsp; &nbsp;<a href="#" onClick="javascript:submit_event('<inp2:m_Param name="prefix"/>', 'OnDownloadLabel'); return false;"><inp2:m_Phrase label="la_ViewLabel"/></a>
</inp2:m_if>
</td>
</inp2:m_RenderElement>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_shipping_label" prefix="ord" field="ShippingTracking" title="la_fld_ShippingTracking" size="30"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingDate" title="la_fld_ShippingDate" size="16"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Shipping">
<input type="hidden" name="check_shipping_address" value="true" />
<inp2:m_if check="m_Recall" name="sqe_error">
<script type="text/javascript">
var $error_table = $('#sqe_error');
$('td:first', $error_table).html('<inp2:m_Recall name="sqe_error" js_escape="1"/>');
$error_table.show();
<inp2:m_RemoveVar name="sqe_error"/>
</script>
</inp2:m_if>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/products/access_pricing_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/access_pricing_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/access_pricing_edit.tpl (revision 14569)
@@ -1,62 +1,82 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" 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.Render();
+
+ <inp2:m_if check="pr_IsSingle">
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <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>
<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="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 -->
-
- <!--
+ <!--## TODO check on implementation (came from customization healtheconomics.org)
+ <inp2:m_RenderElement name="inp_edit_box" prefix="pr" field="AccessRebillDate" title="la_fld_AccessRebillDate" size="5"/>
<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>
</inp2:m_if>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/products/products_pricing_grid.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/products_pricing_grid.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/products_pricing_grid.tpl (revision 14569)
@@ -1,103 +1,111 @@
<inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
<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" width="">
<td class="columntitle_small"<inp2:m_if check="m_Param" name="width"> style="width: <inp2:m_Param name='width'/>"</inp2:m_if>><inp2:m_phrase label="$phrase" /></td>
</inp2:m_DefineElement>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<tr nowrap="nowrap" class="grid-header-row-0">
<inp2:m_RenderElement name="pr_grid_th" phrase="la_col_minqty" width="15%"/>
<inp2:m_RenderElement name="pr_grid_th" phrase="la_col_maxqty" width="15%"/>
<inp2:m_RenderElement name="pr_grid_th" phrase="la_col_cost" width="10%"/>
<inp2:m_RenderElement name="pr_grid_th" phrase="la_col_price" width="10%"/>
<!--##
<inp2:m_RenderElement name="pr_grid_th" phrase="la_col_points" width="10%"/>
##-->
<inp2:m_RenderElement name="pr_grid_th" phrase="la_col_negotiated"/>
</tr>
<inp2:pr.tang_ShowPricingForm block="prbracket" IdField="PriceId"/>
+
+ <script type="text/javascript">
+ <inp2:m_if check="m_Get" name="pr_tang">
+ a_toolbar.EnableButton('delete');
+ <inp2:m_else/>
+ a_toolbar.DisableButton('delete');
+ </inp2:m_if>
+ </script>
</table>
</inp2:m_if>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/products/file_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/file_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/file_edit.tpl (revision 14569)
@@ -1,70 +1,95 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" 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.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('file', '<inp2:file_PrevId/>');
+ }
+ ));
+
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('file', '<inp2:file_NextId/>');
+ }
+ ));
+
a_toolbar.Render();
+
+ <inp2:m_if check="file_IsSingle">
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <inp2:m_else/>
+ <inp2:m_if check="file_IsLast">
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="file_IsFirst">
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
</script>
</td>
</tr>
</tbody>
</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"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/products/products_access.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/products_access.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/products_access.tpl (revision 14569)
@@ -1,104 +1,109 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" pagination="1" pagination_prefix="pr" grid="Access" title_preset="access" 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('new_item', '<inp2:m_phrase label="la_ToolTip_NewPricing" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_new_item('pr', 'in-commerce/products/access_pricing_edit')
} ) );
function edit()
{
std_edit_temp_item('pr', 'in-commerce/products/access_pricing_edit');
}
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('pr')
} ) );
a_toolbar.AddButton( new ToolBarButton('setprimary', '<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>
<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" has_empty="1"/>
<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" /> -->
+
+ <!--## TODO check on implementation of this field
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="p" field="PayPalRecurring" title="la_fld_IsPayPalRecurring"/>
+ ##-->
+
+ <!--## TODO check on implementation of these fields
+ <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="grid" PrefixSpecial="pr" IdField="PriceId" grid="Access" />
<script type="text/javascript">
Grids['pr'].SetDependantToolbarButtons( new Array('edit','delete', 'setprimary') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/products/relations_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/relations_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/relations_edit.tpl (revision 14569)
@@ -1,65 +1,74 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" 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.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('rel', '<inp2:rel_PrevId/>');
+ }
+ ));
+
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('rel', '<inp2:rel_NextId/>');
+ }
+ ));
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"/>
<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_Id"/>
<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
Index: branches/5.2.x/admin_templates/products/review_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/review_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/review_edit.tpl (revision 14569)
@@ -1,59 +1,71 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" 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.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.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>
<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_Id"/>
<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
Index: branches/5.2.x/admin_templates/products/images_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/images_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/images_edit.tpl (revision 14569)
@@ -1,77 +1,86 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" title_preset="images_edit"/>
<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">
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.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('img', '<inp2:img_PrevId/>');
+ }
+ ));
+
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('img', '<inp2:img_NextId/>');
+ }
+ ));
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');
+ a_toolbar.HideButton('sep1');
<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>
<inp2:img_SaveWarning name="grid_save_warning"/>
<inp2:img_ErrorWarning name="form_error_warning"/>
<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_Id"/>
<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
Index: branches/5.2.x/admin_templates/products/option_edit.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/option_edit.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/option_edit.tpl (revision 14569)
@@ -1,324 +1,352 @@
<inp2:adm_SetPopupSize width="780" height="590"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" 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() {
+ PrepareData();
+ go_to_id('po', '<inp2:po_PrevId/>');
+ }
+ ));
+
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ PrepareData();
+ go_to_id('po', '<inp2:po_NextId/>');
+ }
+ ));
+
a_toolbar.Render();
+
+ <inp2:m_if check="po_IsSingle">
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ <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 = {};
var price_types = {};
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() {
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) {
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) {
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() {
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) {
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
}
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) {
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) {
if (!e) return;
//enter
if (e.keyCode == 13) {
add_option('options_list[]')
}
}
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) {
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 i = 0; i < elems.length; i++) {
the_elem = document.getElementById(elems[i]);
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="<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 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>
</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_OptionPrice"/>:
</td>
<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>
</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">&nbsp;</td>
+ <td class="label-cell"><inp2:m_phrase label="$title"/>:</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>
</tr>
</inp2:m_DefineElement>
<inp2:po_SaveWarning name="grid_save_warning"/>
<inp2:po_ErrorWarning name="form_error_warning"/>
<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_Id"/>
<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" has_empty="1" empty_value="0" 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="options_list" prefix="po" field="Values" title="la_fld_OptionValues" 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"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/products/products_pricing.tpl
===================================================================
--- branches/5.2.x/admin_templates/products/products_pricing.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/products/products_pricing.tpl (revision 14569)
@@ -1,238 +1,250 @@
<inp2:adm_SetPopupSize width="1000" height="680"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="p" section="in-portal:browse" 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/catalog.js'></script>
<script type="text/javascript">
Request.progressText = '<inp2:m_phrase name="la_title_Loading" escape="1"/>';
Catalog.prototype.AfterInit = function () {
var $default_group = <inp2:conf_ConfigValue name="User_LoggedInGroup"/>;
set_hidden_field('group_id', $default_group);
$('#current_group_id').val($default_group).change();
}
Catalog.prototype.go_to_group = function($group_id) {
this.refreshTab('pr.tang', 'pr.tang_div');
}
Catalog.prototype.refreshTab = function($prefix, $div_id, $force) {
var $group_id = $('#current_group_id').val();
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_', 'ProductPriceBracketManager');
</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('in-commerce: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('in-commerce: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('in-commerce:arrange', '<inp2:m_phrase label="la_ToolTip_Arrange" escape="1"/>', arrange_brackets) );
-
+ function delete_brackets()
+ {
+ if (confirm('<inp2:m_Phrase name="la_msg_ConfirmDeletePricing" js_escape="1" no_editing="1"/>')) {
+ set_hidden_field('group_id', get_hidden_field('current_group_id'));
+ set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
+ $BracketManager.submit_event('pr.tang', 'OnDeleteBrackets', 'in-commerce/products/products_pricing_grid', true);
+ }
+ }
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_DeleteGroupPricing" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>', delete_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>
+
+ a_toolbar.DisableButton('delete');
+
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="g" grid="Radio"/>
</tr>
</tbody>
</table>
<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"/>
<div id="scroll_container" mode="minimal">
<table class="edit-form" style="border-bottom: 1px solid black;">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<td class="label-cell">
<inp2:m_Phrase name="la_fld_Group"/>:
</td>
<td class="control-mid">&nbsp;</td>
<td class="control-cell">
<select name="current_group_id" id="current_group_id">
<inp2:m_DefineElement name="group_element">
<option value="<inp2:Field name='GroupId'/>"><inp2:Field name="Name"/></option>
</inp2:m_DefineElement>
<inp2:g_PrintList render_as="group_element" per_page="-1"/>
</select>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<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">
var $last_group_id = false;
$(document).ready(
function() {
$('#current_group_id').change(
function ($e) {
var $group_id = $(this).val();
if ($last_group_id !== false) {
// save pricings from previous selected group
set_hidden_field('group_id', $last_group_id);
set_hidden_field('item_prefix', $BracketManager.ActivePrefix);
$BracketManager.submit_event('pr.tang', 'OnArrange', 'in-commerce/products/products_pricing_grid', false);
}
// get prices from new group
set_hidden_field('group_id', $group_id);
$BracketManager.go_to_group($group_id);
// remember previous selected group
$last_group_id = $group_id;
}
);
$BracketManager.Init(false);
}
);
document.forms.kernel_form.onsubmit = enableKernelFormFields;
</script>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/discounts/coupons_list.tpl
===================================================================
--- branches/5.2.x/admin_templates/discounts/coupons_list.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/discounts/coupons_list.tpl (revision 14569)
@@ -1,67 +1,67 @@
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="coup" section="in-commerce:coupons" title_preset="coupons_list" pagination="1" tabs="in-commerce/discounts/discounts_list_tabs"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('coup', 'in-commerce/discounts/coupon_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_New_Coupon" escape="1"/>::<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('coup', 'in-commerce/discounts/coupon_edit')
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('coup')
} ) );
a_toolbar.AddButton( new ToolBarButton('clone', '<inp2:m_phrase label="la_ToolTip_Clone" escape="1"/>',
function() {
//set_event('sc', 'OnSaveCreated');
- openSelector('coup', '<inp2:m_t t="in-commerce/discounts/coupon_clone_selector" pass="all"/>', '', '500x260');
+ openSelector('coup', '<inp2:m_Link template="in-commerce/discounts/coupon_clone_selector" pass="all"/>', '', '600x260', 'OnPrepareClone');
} ) );
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"/>
<script type="text/javascript">
Grids['coup'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','clone') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/admin_templates/discounts/coupon_clone_selector.tpl
===================================================================
--- branches/5.2.x/admin_templates/discounts/coupon_clone_selector.tpl (revision 14568)
+++ branches/5.2.x/admin_templates/discounts/coupon_clone_selector.tpl (revision 14569)
@@ -1,72 +1,40 @@
<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>
<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_box" prefix="coup" field="CouponCount" title="la_EnterNumberOfCopies" style="width: 50px;"/>
+ <inp2:m_RenderElement name="inp_edit_date_time" prefix="coup" field="DefaultExpiration" title="la_Expiration"/>
<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
+<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/install/upgrades.php
===================================================================
--- branches/5.2.x/install/upgrades.php (revision 14568)
+++ branches/5.2.x/install/upgrades.php (revision 14569)
@@ -1,158 +1,162 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$upgrade_class = 'InCommerceUpgrades';
/**
* Class, that holds all upgrade scripts for "In-Commerce" module
*
*/
class InCommerceUpgrades extends kUpgradeHelper {
public function __construct()
{
parent::__construct();
$this->dependencies = Array (
'4.3.9' => Array ('Core' => '4.3.9'),
'5.0.0' => Array ('Core' => '5.0.0'),
'5.0.1' => Array ('Core' => '5.0.1'),
'5.0.2-B1' => Array ('Core' => '5.0.2-B1'),
'5.0.2-B2' => Array ('Core' => '5.0.2-B2'),
'5.0.2-RC1' => Array ('Core' => '5.0.2-RC1'),
'5.0.2' => Array ('Core' => '5.0.2'),
'5.0.3-B1' => Array ('Core' => '5.0.3-B1'),
'5.0.3-B2' => Array ('Core' => '5.0.3-B2'),
'5.0.3-RC1' => Array ('Core' => '5.0.3-RC1'),
'5.0.3' => Array ('Core' => '5.0.3'),
'5.0.4-B1' => Array ('Core' => '5.0.4-B1'),
'5.0.4-B2' => Array ('Core' => '5.0.4-B2'),
'5.0.4' => Array ('Core' => '5.0.4'),
'5.1.0-B1' => Array ('Core' => '5.1.0-B1'),
'5.1.0-B2' => Array ('Core' => '5.1.0-B2'),
'5.1.0-RC1' => Array ('Core' => '5.1.0-RC1'),
'5.1.0' => Array ('Core' => '5.1.0'),
'5.1.1-B1' => Array ('Core' => '5.1.1-B1'),
'5.1.1-B2' => Array ('Core' => '5.1.1-B2'),
'5.1.1-RC1' => Array ('Core' => '5.1.1-RC1'),
'5.1.1' => Array ('Core' => '5.1.1'),
+ '5.1.2-B1' => Array ('Core' => '5.1.2-B1'),
+ '5.1.2-B2' => Array ('Core' => '5.1.2-B2'),
+ '5.1.2-RC1' => Array ('Core' => '5.1.2-RC1'),
+ '5.1.2' => Array ('Core' => '5.1.2'),
);
}
/**
* Changes table structure, where multilingual fields of TEXT type are present
*
* @param string $mode when called mode {before, after)
*/
function Upgrade_5_0_0($mode)
{
if ($mode == 'after') {
// update icon
$root_category = $this->Application->findModule('Name', 'In-Commerce', 'RootCat');
$sql = 'UPDATE ' . $this->Application->getUnitOption('c', 'TableName') . '
SET UseMenuIconUrl = 1, MenuIconUrl = "in-commerce/img/menu_products.gif"
WHERE ' . $this->Application->getUnitOption('c', 'IDField') . ' = ' . $root_category;
$this->Conn->Query($sql);
$this->_updateDetailTemplate('p', 'in-commerce/product/details', 'in-commerce/designs/detail');
// copy store name to company name
$store_name = $this->Application->ConfigValue('Comm_StoreName');
$sql = 'UPDATE ' . TABLE_PREFIX . 'ConfigurationValues
SET VariableValue = ' . $this->Conn->qstr($store_name) . '
WHERE VariableName = "Comm_CompanyName"';
$this->Conn->Query($sql);
}
}
/**
* Replaces deprecated detail template design with new one
*
* @param string $prefix
* @param string $from_template
* @param string $to_template
*/
function _updateDetailTemplate($prefix, $from_template, $to_template)
{
$sql = 'SELECT CustomFieldId
FROM ' . TABLE_PREFIX . 'CustomField
WHERE FieldName = "' . $prefix . '_ItemTemplate"';
$custom_field_id = $this->Conn->GetOne($sql);
$ml_formatter =& $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$field = $ml_formatter->LangFieldName('cust_' . $custom_field_id, true);
$sql = 'UPDATE ' . TABLE_PREFIX . 'CategoryCustomData
SET ' . $field . ' = "' . $to_template . '"
WHERE ' . $field . ' = "' . $from_template . '"';
$this->Conn->Query($sql);
}
/**
* Update to 5.0.1, update details template
*
* @param string $mode when called mode {before, after)
*/
function Upgrade_5_0_1($mode)
{
if ($mode == 'after') {
$this->_updateDetailTemplate('p', 'in-commerce/designs/detail', 'in-commerce/products/product_detail');
// clean incomplete orders 5+ hours old
// don't use ORDER_STATUS_INCOMPLETE constant, since it's not available upgrade
$delete_timestamp = mktime() - (3600 * 5);
$sql = 'SELECT OrderId FROM ' . TABLE_PREFIX . 'Orders
WHERE Status = ' . 0 . '
AND OrderDate < ' . $delete_timestamp;
$orders_to_delete = $this->Conn->GetCol($sql);
if ( $orders_to_delete && is_array($orders_to_delete) ) {
$this->Conn->Query( 'DELETE FROM ' . TABLE_PREFIX . 'OrderItems
WHERE OrderId IN ( ' . implode(',', $orders_to_delete) . ' )' );
$this->Conn->Query( 'DELETE FROM ' . TABLE_PREFIX . 'Orders
WHERE Status = ' . 0 . '
AND OrderDate < ' . $delete_timestamp );
}
// delete old events
$events_to_delete = Array ( 'SITE.SUGGEST' );
$sql = 'SELECT EventId FROM ' . TABLE_PREFIX . 'Events
WHERE Event IN ("' . implode('","', $events_to_delete) . '")';
$event_ids = $this->Conn->GetCol($sql);
if ($event_ids) {
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'EmailMessage
WHERE EventId IN (' . implode(',', $event_ids) . ')';
$this->Conn->Query($sql);
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'Events
WHERE EventId IN (' . implode(',', $event_ids) . ')';
$this->Conn->Query($sql);
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'Phrase
WHERE Phrase IN ("la_event_user.suggest_site")';
$this->Conn->Query($sql);
}
}
}
}
\ No newline at end of file
Index: branches/5.2.x/install/upgrades.sql
===================================================================
--- branches/5.2.x/install/upgrades.sql (revision 14568)
+++ branches/5.2.x/install/upgrades.sql (revision 14569)
@@ -1,200 +1,211 @@
# ===== v 4.3.9 =====
INSERT INTO ImportScripts VALUES (DEFAULT, 'Products from CSV file [In-Commerce]', '', 'p', 'In-Commerce', '', 'CSV', '1');
ALTER TABLE Products ADD OnSale TINYINT(1) NOT NULL default '0' AFTER Featured, ADD INDEX (OnSale);
UPDATE Phrase SET Module = 'In-Commerce' WHERE Phrase IN ('lu_comm_Images', 'lu_comm_ImagesHeader');
# ===== v 5.0.0 =====
UPDATE Category SET Template = '/in-commerce/designs/section' WHERE Template = 'in-commerce/store/category';
UPDATE Category SET CachedTemplate = '/in-commerce/designs/section' WHERE CachedTemplate = 'in-commerce/store/category';
UPDATE ConfigurationValues SET VariableValue = '/in-commerce/designs/section' WHERE VariableName = 'p_CategoryTemplate';
UPDATE ConfigurationValues SET VariableValue = 'in-commerce/designs/detail' WHERE VariableName = 'p_ItemTemplate';
DELETE FROM PersistantSessionData WHERE VariableName IN ('affil_columns_.', 'ap_columns_.', 'apayments_columns_.', 'apayments.log_columns_.', 'd_columns_.', 'coup_columns_.', 'file_columns_.', 'po_columns_.', 'z_columns_.', 'tax_columns_.');
DELETE FROM PersistantSessionData WHERE VariableName LIKE '%ord.%';
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:products.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:setting_folder.view', 11, 1, 1, 0);
INSERT INTO ShippingQuoteEngines VALUES (DEFAULT, 'USPS.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";s:0:"";s:15:"AccountPassword";N;s:10:"UPSEnabled";N;s:10:"UPSAccount";s:0:"";s:11:"UPSInvoiced";N;s:10:"FDXEnabled";N;s:10:"FDXAccount";s:0:"";s:10:"DHLEnabled";N;s:10:"DHLAccount";s:0:"";s:11:"DHLInvoiced";N;s:10:"USPEnabled";N;s:10:"USPAccount";s:0:"";s:11:"USPInvoiced";N;s:10:"ARBEnabled";N;s:10:"ARBAccount";s:0:"";s:11:"ARBInvoiced";N;s:10:"1DYEnabled";N;s:10:"2DYEnabled";N;s:10:"3DYEnabled";N;s:10:"GNDEnabled";N;s:10:"ShipMethod";N;}', 'USPS');
INSERT INTO ConfigurationAdmin VALUES ('Comm_CompanyName', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts');
UPDATE ConfigurationAdmin SET prompt = 'la_text_StoreName', DisplayOrder = 10.02 WHERE VariableName = 'Comm_StoreName';
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Name', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL, NULL, 10.03, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Name', '', 'In-Commerce', 'in-commerce:contacts');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Comm_Contacts_Phone';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Comm_Contacts_Fax';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'Comm_Contacts_Email';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'Comm_Contacts_Additional';
DELETE FROM Phrase WHERE Phrase IN ('la_fld_ManufacturerId', 'la_fld_DiscountId', 'la_fld_CouponId', 'la_fld_AffiliatePlanId', 'la_fld_AffiliateId', 'la_fld_ZoneId', 'la_fld_EngineId', 'la_fld_ShippingId', 'la_fld_ProductId', 'la_fld_OptionId', 'la_fld_CurrencyId', 'la_fld_Zone_Name');
UPDATE Phrase SET Module = 'In-Commerce' WHERE ((Phrase LIKE '%Product%' OR Phrase LIKE '%Shipping%' OR Phrase LIKE '%Coupon%' OR Phrase LIKE '%Discount%' OR Phrase LIKE '%Report%' OR Phrase LIKE '%Currency%' OR Phrase LIKE '%Cart%') AND (Module = 'Core'));
# ===== v 5.0.1 =====
UPDATE ConfigurationValues SET VariableValue = 'in-commerce/products/product_detail' WHERE VariableName = 'p_ItemTemplate';
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_Session,2=la_opt_PermanentCookie' WHERE VariableName = 'Comm_AffiliateStorageMethod';
UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
WHERE VariableName IN ('product_OrderProductsByDir', 'product_OrderProductsThenByDir');
UPDATE ConfigurationAdmin SET ValueList = '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal'
WHERE VariableName = 'Comm_PriceBracketCalculation';
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year'
WHERE VariableName IN ('product_ReviewDelay_Interval', 'product_RatingDelay_Interval');
UPDATE CustomField SET FieldLabel = 'la_fld_cust_p_ItemTemplate', Prompt = 'la_fld_cust_p_ItemTemplate' WHERE FieldName = 'p_ItemTemplate';
UPDATE Events SET Type = 1 WHERE Event = 'BACKORDER.FULLFILL';
UPDATE ConfigurationAdmin SET ValueList = 'style="width: 50px;"' WHERE VariableName IN ('product_RatingDelay_Value', 'product_ReviewDelay_Value');
# ===== v 5.0.2-B1 =====
ALTER TABLE AffiliatePayments
CHANGE Comment Comment text NULL,
CHANGE PaymentDate PaymentDate INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE AffiliatePaymentTypes CHANGE Description Description text NULL;
ALTER TABLE Affiliates
CHANGE Comments Comments text NULL,
CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL;
ALTER TABLE Manufacturers CHANGE Description Description text NULL;
ALTER TABLE Orders
CHANGE UserComment UserComment text NULL,
CHANGE AdminComment AdminComment text NULL,
CHANGE GWResult1 GWResult1 MEDIUMTEXT NULL,
CHANGE GWResult2 GWResult2 MEDIUMTEXT NULL,
CHANGE OrderDate OrderDate INT(10) UNSIGNED NULL DEFAULT NULL,
CHANGE PaymentExpires PaymentExpires INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE PaymentTypes CHANGE PortalGroups PortalGroups text NULL;
ALTER TABLE ProductOptionCombinations CHANGE Combination Combination text NULL;
ALTER TABLE Products
CHANGE ShippingLimitation ShippingLimitation text NULL,
CHANGE PackageContent PackageContent MEDIUMTEXT NULL;
ALTER TABLE ShippingQuoteEngines CHANGE Properties Properties text NULL;
ALTER TABLE ShippingType CHANGE PortalGroups PortalGroups text NULL;
ALTER TABLE ProductFiles
CHANGE ProductId ProductId INT(11) NOT NULL DEFAULT '0',
CHANGE `Name` `Name` VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Version Version VARCHAR(100) NOT NULL DEFAULT '',
CHANGE FilePath FilePath VARCHAR(255) NOT NULL DEFAULT '',
CHANGE RealPath RealPath VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Size Size INT(11) NOT NULL DEFAULT '0',
CHANGE AddedOn AddedOn INT(11) NULL DEFAULT NULL;
ALTER TABLE UserFileAccess
CHANGE ProductId ProductId INT( 11 ) NOT NULL DEFAULT '0',
CHANGE PortalUserId PortalUserId INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE GatewayConfigFields CHANGE ValueList ValueList MEDIUMTEXT NULL;
ALTER TABLE Currencies
CHANGE `Status` `Status` SMALLINT(6) NOT NULL DEFAULT '1',
CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
ALTER TABLE GiftCertificates CHANGE `Status` `Status` TINYINT(1) NOT NULL DEFAULT '2';
ALTER TABLE UserDownloads
CHANGE StartedOn StartedOn INT(11) NULL DEFAULT NULL,
CHANGE EndedOn EndedOn INT(11) NULL DEFAULT NULL;
# ===== v 5.0.2-B2 =====
# ===== v 5.0.2-RC1 =====
# ===== v 5.0.2 =====
# ===== v 5.0.3-B1 =====
UPDATE Phrase
SET PhraseType = 1
WHERE Phrase IN (
'la_ship_All_Together', 'la_ship_Backorders_Upon_Avail', 'la_ship_Backorder_Separately',
'lu_ship_Shipment', 'lu_ship_ShippingType'
);
# ===== v 5.0.3-B2 =====
# ===== v 5.0.3-RC1 =====
# ===== v 5.0.3 =====
# ===== v 5.0.4-B1 =====
# ===== v 5.0.4-B2 =====
# ===== v 5.0.4 =====
# ===== v 5.1.0-B1 =====
UPDATE Modules SET Path = 'modules/in-commerce/' WHERE `Name` = 'In-Commerce';
UPDATE ConfigurationValues
SET ValueList = '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, IsoCode AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
WHERE ValueList = '0=lu_none||<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>';
ALTER TABLE SiteDomains
ADD COLUMN BillingCountry varchar(3) NOT NULL DEFAULT '',
ADD COLUMN ShippingCountry varchar(3) NOT NULL DEFAULT '',
ADD COLUMN PrimaryCurrencyId int(11) NOT NULL DEFAULT '0',
ADD COLUMN Currencies varchar(255) NOT NULL DEFAULT '',
ADD COLUMN PrimaryPaymentTypeId int(11) NOT NULL DEFAULT '0',
ADD COLUMN PaymentTypes varchar(255) NOT NULL DEFAULT '',
ADD INDEX (BillingCountry),
ADD INDEX (ShippingCountry),
ADD INDEX (PrimaryCurrencyId),
ADD INDEX (Currencies),
ADD INDEX (PrimaryPaymentTypeId),
ADD INDEX (PaymentTypes);
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_btn_Add', 'la_fld_RecipientName', 'la_fld_SenderName');
DELETE FROM Permissions WHERE Permission LIKE 'in-commerce:incommerce_configemail%';
# ===== v 5.1.0-B2 =====
# ===== v 5.1.0-RC1 =====
UPDATE Phrase
SET PhraseType = 1
WHERE Phrase IN (
'la_col_Qty', 'la_col_QtyBackordered', 'la_ItemBackordered', 'la_ship_all_together',
'la_ship_backorders_upon_avail', 'la_ship_backorder_separately', 'la_tooltip_New_Coupon',
'la_tooltip_New_Discount'
);
DELETE FROM Phrase WHERE Phrase = 'la_comm_ProductsByManuf';
# ===== v 5.1.0 =====
ALTER TABLE Products CHANGE CachedRating CachedRating varchar(10) NOT NULL default '0';
# ===== v 5.1.1-B1 =====
ALTER TABLE Orders CHANGE ShippingOption ShippingOption TINYINT(4) NOT NULL DEFAULT '0';
ALTER TABLE ProductFiles CHANGE AddedById AddedById INT(11) NULL DEFAULT NULL;
UPDATE ProductFiles SET AddedById = NULL WHERE AddedById = 0;
ALTER TABLE Products
CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL ,
CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
UPDATE Products SET CreatedById = NULL WHERE CreatedById = 0;
UPDATE Products SET ModifiedById = NULL WHERE ModifiedById = 0;
# ===== v 5.1.1-B2 =====
# ===== v 5.1.1-RC1 =====
-# ===== v 5.1.1 =====
\ No newline at end of file
+# ===== v 5.1.1 =====
+
+# ===== v 5.1.2-B1 =====
+DELETE FROM Phrase WHERE PhraseKey = 'LA_TITLE_ADDING_ORDER_ITEM';
+
+# ===== v 5.1.2-B2 =====
+UPDATE Phrase SET l<%PRIMARY_LANGUAGE%>_Translation = REPLACE(l<%PRIMARY_LANGUAGE%>_Translation, 'Discounts & Coupons', 'Discounts & Certificates') WHERE PhraseKey = 'LA_TAB_DISCOUNTSANDCOUPONS';
+
+# ===== v 5.1.2-RC1 =====
+UPDATE Phrase SET Module = 'Core' WHERE PhraseKey = 'LA_FLD_ISOCODE' OR PhraseKey = 'LA_COL_ISOCODE';
+
+# ===== v 5.1.2 =====
\ No newline at end of file
Index: branches/5.2.x/install/english.lang
===================================================================
--- branches/5.2.x/install/english.lang (revision 14568)
+++ branches/5.2.x/install/english.lang (revision 14569)
@@ -1,1029 +1,1038 @@
<LANGUAGES Version="3">
<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<PHRASES>
<PHRASE Label="la_AccountLogin" Module="In-Commerce" Type="1">QWNjb3VudA==</PHRASE>
<PHRASE Label="la_AddressLine1" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDE=</PHRASE>
<PHRASE Label="la_AddressLine2" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDI=</PHRASE>
<PHRASE Label="la_ADP" Module="In-Commerce" Type="1">QW5kb3JyYW4gUGVzZXRh</PHRASE>
<PHRASE Label="la_AED" Module="In-Commerce" Type="1">VUFFIERpcmhhbQ==</PHRASE>
<PHRASE Label="la_AFA" Module="In-Commerce" Type="1">QWZnaGFuaQ==</PHRASE>
<PHRASE Label="la_affiliate_already_exists" Module="In-Commerce" Type="1">YWZmaWxpYXRlIGFscmVhZHkgZXhpc3Rz</PHRASE>
<PHRASE Label="la_AFN" Module="In-Commerce" Type="1">QWZnaGFuaQ==</PHRASE>
<PHRASE Label="la_ALL" Module="In-Commerce" Type="1">TGVjaw==</PHRASE>
<PHRASE Label="la_Allowed" Module="In-Commerce" Type="1">QWxsb3dlZA==</PHRASE>
<PHRASE Label="la_AllowOrderDifferentTypes" Module="In-Commerce" Type="1">QWxsb3cgb3JkZXJpbmcgb2YgcHJvZHVjdHMgd2l0aCBkaWZmZXJlbnQgdHlwZXM=</PHRASE>
<PHRASE Label="la_AllowOrderingInNonPrimaryCurrency" Module="In-Commerce" Type="1">QWxsb3cgb3JkZXJpbmcgaW4gbm9uLXByaW1hcnkgY3VycmVuY2llcw==</PHRASE>
<PHRASE Label="la_AllowOrderMoreThanAvailable" Module="In-Commerce" Type="1">QWxsb3cgb3JkZXJpbmcgb2YgbW9yZSBxdWFudGl0eSB0aGFuIGF2YWlsYWJsZSBhcyBiYWNrb3JkZXI=</PHRASE>
<PHRASE Label="la_AMD" Module="In-Commerce" Type="1">QXJtZW5pYW4gRHJhbQ==</PHRASE>
<PHRASE Label="la_ANG" Module="In-Commerce" Type="1">TmV0aGVybGFuZHMgQW50aWxsYW4gR3VpbGRlcg==</PHRASE>
<PHRASE Label="la_AOA" Module="In-Commerce" Type="1">S3dhbnph</PHRASE>
<PHRASE Label="la_Archived" Module="In-Commerce" Type="1">QXJjaGl2ZWQ=</PHRASE>
<PHRASE Label="la_ARS" Module="In-Commerce" Type="1">QXJnZW50aW5lIFBlc28=</PHRASE>
<PHRASE Label="la_AUD" Module="In-Commerce" Type="1">QXVzdHJhbGlhbiBEb2xsYXI=</PHRASE>
<PHRASE Label="la_AutoBackorder" Module="In-Commerce" Type="1">QXV0byBCYWNrb3JkZXI=</PHRASE>
<PHRASE Label="la_AutoProcessRecurringOrders" Module="In-Commerce" Type="1">QXV0b21hdGljYWxseSBQcm9jZXNzIFJlY3VycmluZyBPcmRlcnM=</PHRASE>
<PHRASE Label="la_Availability" Module="In-Commerce" Type="1">QXZhaWxhYmlsaXR5</PHRASE>
<PHRASE Label="la_AWG" Module="In-Commerce" Type="1">QXJ1YmFuIEd1aWxkZXI=</PHRASE>
<PHRASE Label="la_AZM" Module="In-Commerce" Type="1">QXplcmJhaWphbmlhbiBNYW5hdA==</PHRASE>
<PHRASE Label="la_BackOrders" Module="In-Commerce" Type="1">QmFja09yZGVycw==</PHRASE>
<PHRASE Label="la_BAM" Module="In-Commerce" Type="1">Q29udmVydGlibGUgTWFya3M=</PHRASE>
<PHRASE Label="la_BankOfLatvia" Module="In-Commerce" Type="1">QmFuayBvZiBMYXR2aWEgLSB3d3cuYmFuay5sdg==</PHRASE>
<PHRASE Label="la_Base_Fee" Module="In-Commerce" Type="1">QmFzZSBGZWU=</PHRASE>
<PHRASE Label="la_BBD" Module="In-Commerce" Type="1">QmFyYmFkb3MgRG9sbGFy</PHRASE>
<PHRASE Label="la_BDT" Module="In-Commerce" Type="1">VGFrYQ==</PHRASE>
<PHRASE Label="la_BGL" Module="In-Commerce" Type="1">TGV2</PHRASE>
<PHRASE Label="la_BGN" Module="In-Commerce" Type="1">QnVsZ2FyaWFuIExldg==</PHRASE>
<PHRASE Label="la_BHD" Module="In-Commerce" Type="1">QmFocmFpbmkgRGluYXI=</PHRASE>
<PHRASE Label="la_BIF" Module="In-Commerce" Type="1">QnVydW5kaSBGcmFuYw==</PHRASE>
<PHRASE Label="la_BMD" Module="In-Commerce" Type="1">QmVybXVkaWFuIERvbGxhcg==</PHRASE>
<PHRASE Label="la_BND" Module="In-Commerce" Type="1">QnJ1bmVpIERvbGxhcg==</PHRASE>
<PHRASE Label="la_BOB" Module="In-Commerce" Type="1">Qm9saXZpYW5v</PHRASE>
<PHRASE Label="la_BOV" Module="In-Commerce" Type="1">TXZkb2w=</PHRASE>
<PHRASE Label="la_BRL" Module="In-Commerce" Type="1">QnJhemlsaWFuIFJlYWw=</PHRASE>
<PHRASE Label="la_BSD" Module="In-Commerce" Type="1">QmFoYW1pYW4gRG9sbGFy</PHRASE>
<PHRASE Label="la_BTN" Module="In-Commerce" Type="1">Tmd1bHRydW0=</PHRASE>
<PHRASE Label="la_btn_AddLocation" Module="In-Commerce" Type="1">QWRkIExvY2F0aW9u</PHRASE>
<PHRASE Label="la_btn_CancelOrder" Module="In-Commerce" Type="1">Q2FuY2VsIE9yZGVy</PHRASE>
<PHRASE Label="la_btn_Order" Module="In-Commerce" Type="1">T3JkZXI=</PHRASE>
<PHRASE Label="la_btn_ReceiveOrder" Module="In-Commerce" Type="1">UmVjZWl2ZSBPcmRlcg==</PHRASE>
<PHRASE Label="la_btn_Remove" Module="In-Commerce" Type="1">UmVtb3Zl</PHRASE>
<PHRASE Label="la_btn_RemoveLocations" Module="In-Commerce" Type="1">UmVtb3ZlIExvY2F0aW9ucw==</PHRASE>
<PHRASE Label="la_BuiltIn" Module="In-Commerce" Type="1">QnVpbHQtSW4=</PHRASE>
<PHRASE Label="la_button_add" Module="In-Commerce" Type="1">QWRk</PHRASE>
<PHRASE Label="la_button_receive_order" Module="In-Commerce" Type="1">UmVjZWl2ZSBvcmRlcg==</PHRASE>
<PHRASE Label="la_button_remove" Module="In-Commerce" Type="1">UmVtb3Zl</PHRASE>
<PHRASE Label="la_Button_Save" Module="In-Commerce" Type="1">U2F2ZQ==</PHRASE>
<PHRASE Label="la_BWP" Module="In-Commerce" Type="1">UHVsYQ==</PHRASE>
<PHRASE Label="la_ByAmount" Module="In-Commerce" Type="1">YnkgYW1vdW50</PHRASE>
<PHRASE Label="la_ByCategory" Module="In-Commerce" Type="1">QnkgU2VjdGlvbg==</PHRASE>
<PHRASE Label="la_ByCountry" Module="In-Commerce" Type="1">QnkgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_ByItem" Module="In-Commerce" Type="1">YnkgaXRlbQ==</PHRASE>
<PHRASE Label="la_byProduct" Module="In-Commerce" Type="1">QnkgUHJvZHVjdA==</PHRASE>
<PHRASE Label="la_BYR" Module="In-Commerce" Type="1">QmVsYXJ1c3NpYW4gUnVibGU=</PHRASE>
<PHRASE Label="la_ByState" Module="In-Commerce" Type="1">QnkgU3RhdGU=</PHRASE>
<PHRASE Label="la_ByUser" Module="In-Commerce" Type="1">QnkgVXNlcg==</PHRASE>
<PHRASE Label="la_ByWeight" Module="In-Commerce" Type="1">Ynkgd2VpZ2h0</PHRASE>
<PHRASE Label="la_ByZIP" Module="In-Commerce" Type="1">QnkgWklQ</PHRASE>
<PHRASE Label="la_by_amount" Module="In-Commerce" Type="1">YnkgYW1vdW50</PHRASE>
<PHRASE Label="la_by_items_sold" Module="In-Commerce" Type="1">YnkgaXRlbXMgc29sZA==</PHRASE>
<PHRASE Label="la_by_options" Module="In-Commerce" Type="1">QnkgUHJvZHVjdCBPcHRpb25z</PHRASE>
<PHRASE Label="la_by_product" Module="In-Commerce" Type="1">QnkgUHJvZHVjdA==</PHRASE>
<PHRASE Label="la_by_request" Module="In-Commerce" Type="1">QnkgUmVxdWVzdA==</PHRASE>
<PHRASE Label="la_BZD" Module="In-Commerce" Type="1">QmVsaXplIERvbGxhcg==</PHRASE>
<PHRASE Label="la_CAD" Module="In-Commerce" Type="1">Q2FuYWRpYW4gRG9sbGFy</PHRASE>
<PHRASE Label="la_CDF" Module="In-Commerce" Type="1">RnJhbmMgQ29uZ29sYWlz</PHRASE>
<PHRASE Label="la_CHF" Module="In-Commerce" Type="1">U3dpc3MgRnJhbmM=</PHRASE>
<PHRASE Label="la_City" Module="In-Commerce" Type="1">Q2l0eQ==</PHRASE>
<PHRASE Label="la_ClearCostsWarning" Module="In-Commerce" Type="1">RG8geW91IHJlYWxseSB3YW50IHRvIHJlc2V0IHdob2xlIGNvc3RzIHRhYmxlPw==</PHRASE>
<PHRASE Label="la_CLF" Module="In-Commerce" Type="1">VW5pZGFkZXMgZGUgZm9tZW50bw==</PHRASE>
<PHRASE Label="la_CloneCoupon" Module="In-Commerce" Type="1">Q2xvbmluZyBhIENvdXBvbg==</PHRASE>
<PHRASE Label="la_CLP" Module="In-Commerce" Type="1">Q2hpbGVhbiBQZXNv</PHRASE>
<PHRASE Label="la_CNY" Module="In-Commerce" Type="1">Q2hpbmEgWXVhbiBSZW5taW5iaQ==</PHRASE>
<PHRASE Label="la_COD" Module="In-Commerce" Type="1">Q09E</PHRASE>
<PHRASE Label="la_COD_Flat_Surcharge" Module="In-Commerce" Type="1">Q09EIEZsYXQgU3VyY2hhcmdl</PHRASE>
<PHRASE Label="la_COD_Percent_Surcharge" Module="In-Commerce" Type="1">Q09EIFBlcmNlbnQgU3VyY2hhcmdl</PHRASE>
<PHRASE Label="la_col_AccessDuration" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9u</PHRASE>
<PHRASE Label="la_col_AccessDurationUnit" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9uIFVuaXQ=</PHRASE>
<PHRASE Label="la_col_AddedOn" Module="In-Commerce" Type="1">QWRkZWQgT24=</PHRASE>
<PHRASE Label="la_col_AffiliateUser" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFVzZXI=</PHRASE>
<PHRASE Label="la_col_Amount" Module="In-Commerce" Type="1">QW1vdW50</PHRASE>
<PHRASE Label="la_col_Availability" Module="In-Commerce" Type="1">QXZhaWwu</PHRASE>
<PHRASE Label="la_col_BaseFee" Module="In-Commerce" Type="1">QmFzZSBGZWU=</PHRASE>
<PHRASE Label="la_col_BillingCountry" Module="In-Commerce" Type="1">QmlsbGluZyBDb3VudHJ5</PHRASE>
<PHRASE Label="la_col_BuiltIn" Module="In-Commerce" Type="1">QnVpbHQtSW4=</PHRASE>
<PHRASE Label="la_col_CODallowed" Module="In-Commerce" Type="1">Q09EIEFsbG93ZWQ=</PHRASE>
<PHRASE Label="la_col_Code" Module="In-Commerce" Type="1">Q29kZQ==</PHRASE>
<PHRASE Label="la_col_CODFlatSurcharge" Module="In-Commerce" Type="1">Q09EIEZsYXQgU3VyZWNoYXJnZQ==</PHRASE>
<PHRASE Label="la_col_CODFlatSurecharge" Module="In-Commerce" Type="1">Q09EIGZsYXQgc3VyZWNoYXJnZQ==</PHRASE>
<PHRASE Label="la_col_CODPercentSurcharge" Module="In-Commerce" Type="1">Q09EIFBlcmNlbnQgU3VyY2hhcmdl</PHRASE>
<PHRASE Label="la_col_Combination" Module="In-Commerce" Type="1">Q29tYmluYXRpb24=</PHRASE>
<PHRASE Label="la_col_Comment" Module="In-Commerce" Type="1">Q29tbWVudA==</PHRASE>
<PHRASE Label="la_col_Commission" Module="In-Commerce" Type="1">QWZmaWxsaWF0ZSBDb21taXNzaW9u</PHRASE>
<PHRASE Label="la_col_Cost" Module="In-Commerce" Type="1">Q29zdA==</PHRASE>
<PHRASE Label="la_col_CouponCode" Module="In-Commerce" Type="1">Q291cG9uIENvZGU=</PHRASE>
<PHRASE Label="la_col_CouponItemType" Module="In-Commerce" Type="1">Q291cG9uIEl0ZW0gVHlwZQ==</PHRASE>
<PHRASE Label="la_col_CreditCardNumber" Module="In-Commerce" Type="1">Q3JlZGl0IENhcmQgTnVtYmVy</PHRASE>
<PHRASE Label="la_col_Currency" Module="In-Commerce" Type="1">Q3VycmVuY3k=</PHRASE>
<PHRASE Label="la_col_CurrencyName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_CurrencySymbol" Module="In-Commerce" Type="1">U3ltYm9s</PHRASE>
<PHRASE Label="la_col_CurrencySymbolPosition" Module="In-Commerce" Type="1">U3ltYm9sIFBvc2l0aW9u</PHRASE>
<PHRASE Label="la_col_CustomerName" Module="In-Commerce" Type="1">Q3VzdG9tZXIgTmFtZQ==</PHRASE>
<PHRASE Label="la_col_DisplayOnFront" Module="In-Commerce" Type="1">RGlzcGxheSBvbiBGcm9udC1FbmQ=</PHRASE>
<PHRASE Label="la_col_DownloadedFileName" Module="In-Commerce" Type="1">RmlsZW5hbWU=</PHRASE>
<PHRASE Label="la_col_DownloadedProductName" Module="In-Commerce" Type="1">UHJvZHVjdCBOYW1l</PHRASE>
<PHRASE Label="la_col_End" Module="In-Commerce" Type="1">RW5k</PHRASE>
<PHRASE Label="la_col_EndedOn" Module="In-Commerce" Type="1">RW5kZWQgT24=</PHRASE>
<PHRASE Label="la_col_Expiration" Module="In-Commerce" Type="1">RXhwaXJhdGlvbg==</PHRASE>
<PHRASE Label="la_col_ExtendedPrice" Module="In-Commerce" Type="1">RXh0LiBQcmljZQ==</PHRASE>
<PHRASE Label="la_col_FlatSurcharge" Module="In-Commerce" Type="1">RmxhdCBTdXJjaGFyZ2U=</PHRASE>
<PHRASE Label="la_col_FromAmount" Module="In-Commerce" Type="1">RnJvbSBBbW91bnQ=</PHRASE>
<PHRASE Label="la_col_FromUser" Module="In-Commerce" Type="1">RnJvbSBVc2Vy</PHRASE>
<PHRASE Label="la_col_GMV" Module="In-Commerce" Type="1">R01W</PHRASE>
<PHRASE Label="la_col_Group" Module="In-Commerce" Type="1">R3JvdXA=</PHRASE>
<PHRASE Label="la_col_IPAddress" Module="In-Commerce" Type="1">SVAgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_col_IsFreePromoShipping" Module="In-Commerce" Type="1">UHJvbW8=</PHRASE>
- <PHRASE Label="la_col_ISOCode" Module="In-Commerce" Type="1">SVNPIENvZGU=</PHRASE>
<PHRASE Label="la_col_ItemName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_ItemType" Module="In-Commerce" Type="1">RGlzY291bnQgSXRlbSBUeXBl</PHRASE>
<PHRASE Label="la_col_LastUpdated" Module="In-Commerce" Type="1">TGFzdCBVcGRhdGVk</PHRASE>
<PHRASE Label="la_col_LastUsedBy" Module="In-Commerce" Type="1">TGFzdCBVc2VkIEJ5</PHRASE>
<PHRASE Label="la_col_LastUsedOn" Module="In-Commerce" Type="1">TGFzdCBVc2VkIE9u</PHRASE>
<PHRASE Label="la_col_Listable" Module="In-Commerce" Type="1">TGlzdGFibGU=</PHRASE>
<PHRASE Label="la_col_ListingQuantity" Module="In-Commerce" Type="1">TGlzdGluZyBRdHk=</PHRASE>
<PHRASE Label="la_col_Manufacturer" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVy</PHRASE>
<PHRASE Label="la_col_ManufacturerName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_Marketplace" Module="In-Commerce" Type="1">TWFya2V0cGxhY2U=</PHRASE>
<PHRASE Label="la_col_MaxQty" Module="In-Commerce" Type="1">TWF4IFF0eQ==</PHRASE>
<PHRASE Label="la_col_MinQty" Module="In-Commerce" Type="1">TWluIFF0eQ==</PHRASE>
<PHRASE Label="la_col_Negotiated" Module="In-Commerce" Type="1">TmVnb3RpYXRlZA==</PHRASE>
<PHRASE Label="la_col_NumberOfUses" Module="In-Commerce" Type="1">TnVtYmVyIE9mIFVzZXM=</PHRASE>
<PHRASE Label="la_col_OnHold" Module="In-Commerce" Type="1">T24gSG9sZA==</PHRASE>
<PHRASE Label="la_col_OnSale" Module="In-Commerce" Type="1">T24gU2FsZQ==</PHRASE>
<PHRASE Label="la_col_OptionType" Module="In-Commerce" Type="1">T3B0aW9uIFR5cGU=</PHRASE>
<PHRASE Label="la_col_OrderDate" Module="In-Commerce" Type="1">RGF0ZQ==</PHRASE>
<PHRASE Label="la_col_OrderIP" Module="In-Commerce" Type="1">SVAgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_col_OrderNumber" Module="In-Commerce" Type="1">TnVtYmVy</PHRASE>
<PHRASE Label="la_col_OrderTotal" Module="In-Commerce" Type="1">T3JkZXIgVG90YWw=</PHRASE>
<PHRASE Label="la_col_PaymentDate" Module="In-Commerce" Type="1">UGF5bWVudCBEYXRl</PHRASE>
<PHRASE Label="la_col_PaymentReference" Module="In-Commerce" Type="1">UGF5bWVudCBSZWZlcmVuY2U=</PHRASE>
<PHRASE Label="la_col_PaymentType" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBl</PHRASE>
<PHRASE Label="la_col_PaymentTypeName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_Percent" Module="In-Commerce" Type="1">UGVyY2VudA==</PHRASE>
<PHRASE Label="la_col_PercentSurcharge" Module="In-Commerce" Type="1">UGVyY2VudCBTdXJjaGFyZ2U=</PHRASE>
<PHRASE Label="la_col_PlanName" Module="In-Commerce" Type="1">UGxhbiBOYW1l</PHRASE>
<PHRASE Label="la_col_PlanType" Module="In-Commerce" Type="1">UGxhbiBUeXBl</PHRASE>
<PHRASE Label="la_col_Points" Module="In-Commerce" Type="1">UG9pbnRz</PHRASE>
<PHRASE Label="la_col_Price" Module="In-Commerce" Type="1">UHJpY2U=</PHRASE>
<PHRASE Label="la_col_Processing" Module="In-Commerce" Type="1">UHJvY2Vzc2luZw==</PHRASE>
<PHRASE Label="la_col_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
<PHRASE Label="la_col_ProductBackOrderDate" Module="In-Commerce" Type="1">QmFja09yZGVyIERhdGU=</PHRASE>
<PHRASE Label="la_col_ProductCreatedOn" Module="In-Commerce" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_col_ProductName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_ProductNameId" Module="In-Commerce" Type="1">UHJvZHVjdCBOYW1lIChJRCk=</PHRASE>
<PHRASE Label="la_col_ProductSKU" Module="In-Commerce" Type="1">U0tV</PHRASE>
<PHRASE Label="la_col_ProductType" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_col_ProductWeight" Module="In-Commerce" Type="1">V2VpZ2h0</PHRASE>
<PHRASE Label="la_col_Profit" Module="In-Commerce" Type="1">UHJvZml0</PHRASE>
<PHRASE Label="la_col_Qty" Module="In-Commerce" Type="1">UXR5</PHRASE>
<PHRASE Label="la_col_QtyBackordered" Module="In-Commerce" Type="1">QmFja29yZGVyZWQ=</PHRASE>
<PHRASE Label="la_col_QtyInStock" Module="In-Commerce" Type="1">UXR5IEluIFN0b2Nr</PHRASE>
<PHRASE Label="la_col_QtyInStockMin" Module="In-Commerce" Type="1">UXR5SW5TdG9ja01pbg==</PHRASE>
<PHRASE Label="la_col_QtyOnOrder" Module="In-Commerce" Type="1">UXR5IE9uIE9yZGVy</PHRASE>
<PHRASE Label="la_col_QtyReserved" Module="In-Commerce" Type="1">UXR5IFJlc2VydmVk</PHRASE>
<PHRASE Label="la_col_Quantity" Module="In-Commerce" Type="1">UXR5Lg==</PHRASE>
<PHRASE Label="la_col_QuantityAvailable" Module="In-Commerce" Type="1">QXZhaWwu</PHRASE>
<PHRASE Label="la_col_QuantityReserved" Module="In-Commerce" Type="1">UmVzZXJ2ZWQ=</PHRASE>
<PHRASE Label="la_col_RateToPrimary" Module="In-Commerce" Type="1">UmF0ZSBUbyBQcmltYXJ5</PHRASE>
<PHRASE Label="la_col_RegisteredOn" Module="In-Commerce" Type="1">UmVnaXN0ZXJlZCBPbg==</PHRASE>
<PHRASE Label="la_col_RemainingAmount" Module="In-Commerce" Type="1">UmVtYWluaW5nIEFtb3VudA==</PHRASE>
<PHRASE Label="la_col_Required" Module="In-Commerce" Type="1">UmVxdWlyZWQ=</PHRASE>
<PHRASE Label="la_col_ReturnAmount" Module="In-Commerce" Type="1">UmV0LiBBbW91bnQ=</PHRASE>
<PHRASE Label="la_col_ReturnedOn" Module="In-Commerce" Type="1">UmV0LiBEYXRl</PHRASE>
<PHRASE Label="la_col_ReturnType" Module="In-Commerce" Type="1">UmV0LiBUeXBl</PHRASE>
<PHRASE Label="la_col_Shipping" Module="In-Commerce" Type="1">U2hpcHBpbmc=</PHRASE>
<PHRASE Label="la_col_ShippingCountry" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_col_ShippingFromLocation" Module="In-Commerce" Type="1">RnJvbSBMb2NhdGlvbg==</PHRASE>
<PHRASE Label="la_col_ShippingName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_ShippingQuoteEngineName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_col_ShippingType" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_col_ShipZoneName" Module="In-Commerce" Type="1">U2hpcHBpbmcgWm9uZSBOYW1l</PHRASE>
<PHRASE Label="la_col_Size" Module="In-Commerce" Type="1">U2l6ZQ==</PHRASE>
<PHRASE Label="la_col_SKU" Module="In-Commerce" Type="1">U0tV</PHRASE>
<PHRASE Label="la_col_SpeedCode" Module="In-Commerce" Type="1">U2hpcHBpbmcgU3BlZWQ=</PHRASE>
<PHRASE Label="la_col_Start" Module="In-Commerce" Type="1">U3RhcnQ=</PHRASE>
<PHRASE Label="la_col_StartedOn" Module="In-Commerce" Type="1">U3RhcnRlZCBPbg==</PHRASE>
<PHRASE Label="la_col_Tax" Module="In-Commerce" Type="1">VGF4</PHRASE>
<PHRASE Label="la_col_TaxApplyToProcessing" Module="In-Commerce" Type="1">QXBwbHkgdG8gUHJvY2Vzc2luZw==</PHRASE>
<PHRASE Label="la_col_TaxApplyToShipping" Module="In-Commerce" Type="1">QXBwbHkgdG8gU2hpcHBpbmc=</PHRASE>
<PHRASE Label="la_col_TaxValue" Module="In-Commerce" Type="1">VGF4IFZhbHVl</PHRASE>
<PHRASE Label="la_col_TaxZoneName" Module="In-Commerce" Type="1">VGF4IFpvbmUgTmFtZQ==</PHRASE>
<PHRASE Label="la_col_ToAmount" Module="In-Commerce" Type="1">VG8gQW1vdW50</PHRASE>
<PHRASE Label="la_col_TotalAmount" Module="In-Commerce" Type="1">VG90YWwgQW1vdW50</PHRASE>
<PHRASE Label="la_col_UnitsLimit" Module="In-Commerce" Type="1">TGltaXQ=</PHRASE>
<PHRASE Label="la_col_URL" Module="In-Commerce" Type="1">VVJM</PHRASE>
<PHRASE Label="la_col_Weight" Module="In-Commerce" Type="1">V2VpZ2h0</PHRASE>
<PHRASE Label="la_col_ZoneName" Module="In-Commerce" Type="1">Wm9uZSBOYW1l</PHRASE>
<PHRASE Label="la_col_ZoneType" Module="In-Commerce" Type="1">Wm9uZSBUeXBl</PHRASE>
<PHRASE Label="la_Combined" Module="In-Commerce" Type="1">Q29tYmluZWQ=</PHRASE>
<PHRASE Label="la_comment_LeaveBlank" Module="In-Commerce" Type="1">KGxlYXZlIGJsYW5rIGZvciB1bmxpbWl0ZWQp</PHRASE>
<PHRASE Label="la_comm_Any" Module="In-Commerce" Type="1">QW55</PHRASE>
<PHRASE Label="la_comm_OrderContents" Module="In-Commerce" Type="1">T3JkZXIgQ29udGVudHM=</PHRASE>
<PHRASE Label="la_comm_ShippingBillingInfo" Module="In-Commerce" Type="1">U2hpcHBpbmcgJiBCaWxsaW5nIEluZm9ybWF0aW9u</PHRASE>
<PHRASE Label="la_comm_Timeframe" Module="In-Commerce" Type="1">VGltZWZyYW1l</PHRASE>
<PHRASE Label="la_config_ShowProductImagesInOrders" Module="In-Commerce" Type="1">U2hvdyBQcm9kdWN0IEltYWdlcyBpbiBPcmRlcnM=</PHRASE>
<PHRASE Label="la_conf_DaysToBeNew" Module="In-Commerce" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgcHJvZHVjdCB0byBiZSBOZXc=</PHRASE>
<PHRASE Label="la_conf_DefaultCouponDuration" Module="In-Commerce" Type="1">RGVmYXVsdCBjb3Vwb24gZHVyYXRpb24gKGRheXMp</PHRASE>
<PHRASE Label="la_conf_EditorPicksAboveRegular" Module="In-Commerce" Type="1">RGlzcGxheSBFZGl0b3IgUGlja3MgYWJvdmUgcmVndWxhciBwcm9kdWN0cw==</PHRASE>
<PHRASE Label="la_conf_OrderProductsBy" Module="In-Commerce" Type="1">T3JkZXIgcHJvZHVjdHMgYnk=</PHRASE>
<PHRASE Label="la_conf_ThenBy" Module="In-Commerce" Type="1">VGhlbiBCeQ==</PHRASE>
<PHRASE Label="la_COP" Module="In-Commerce" Type="1">Q29sb21iaWFuIFBlc28=</PHRASE>
<PHRASE Label="la_COU" Module="In-Commerce" Type="1">Q09V</PHRASE>
<PHRASE Label="la_couldnt_retrieve_rate" Module="In-Commerce" Type="1">Q291bGRuJ3QgcmV0cmlldmUgY3VycmVuY3kgcmF0ZSE=</PHRASE>
<PHRASE Label="la_Country" Module="In-Commerce" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_CouponCode" Module="In-Commerce" Type="1">Q291cG9uIENvZGU=</PHRASE>
<PHRASE Label="la_CRC" Module="In-Commerce" Type="1">Q29zdGEgUmljYW4gQ29sb24=</PHRASE>
<PHRASE Label="la_CreditDirect" Module="In-Commerce" Type="1">Q3JlZGl0IERpcmVjdA==</PHRASE>
<PHRASE Label="la_CreditPreAuthorize" Module="In-Commerce" Type="1">Q3JlZGl0IFByZS1BdXRob3JpemU=</PHRASE>
<PHRASE Label="la_CSD" Module="In-Commerce" Type="1">Q1NE</PHRASE>
<PHRASE Label="la_CUP" Module="In-Commerce" Type="1">Q3ViYW4gUGVzbw==</PHRASE>
<PHRASE Label="la_CVE" Module="In-Commerce" Type="1">Q2FwZSBWZXJkZSBFc2N1ZG8=</PHRASE>
<PHRASE Label="la_CYP" Module="In-Commerce" Type="1">Q3lwcnVzIFBvdW5k</PHRASE>
<PHRASE Label="la_CZK" Module="In-Commerce" Type="1">Q3plY2ggS29ydW5h</PHRASE>
<PHRASE Label="la_day" Module="In-Commerce" Type="1">ZGF5</PHRASE>
<PHRASE Label="la_Denied" Module="In-Commerce" Type="1">RGVuaWVk</PHRASE>
<PHRASE Label="la_Details" Module="In-Commerce" Type="1">VmlldyBEZXRhaWxz</PHRASE>
<PHRASE Label="la_Discount" Module="In-Commerce" Type="1">RGlzY291bnQ=</PHRASE>
<PHRASE Label="la_DJF" Module="In-Commerce" Type="1">RGppYm91dGkgRnJhbmM=</PHRASE>
<PHRASE Label="la_DKK" Module="In-Commerce" Type="1">RGFuaXNoIEtyb25l</PHRASE>
<PHRASE Label="la_DOP" Module="In-Commerce" Type="1">RG9taW5pY2FuIFBlc28=</PHRASE>
<PHRASE Label="la_DZD" Module="In-Commerce" Type="1">QWxnZXJpYW4gRGluYXI=</PHRASE>
<PHRASE Label="la_ECS" Module="In-Commerce" Type="1">U3VjcmU=</PHRASE>
<PHRASE Label="la_ECV" Module="In-Commerce" Type="1">VW5pZGFkIGRlIFZhbG9yIENvbnN0YW50ZSAoVVZDKQ==</PHRASE>
<PHRASE Label="la_Edit_User" Module="In-Commerce" Type="1">RWRpdCBVc2Vy</PHRASE>
<PHRASE Label="la_EEK" Module="In-Commerce" Type="1">S3Jvb24=</PHRASE>
<PHRASE Label="la_EGP" Module="In-Commerce" Type="1">RWd5cHRpYW4gUG91bmQ=</PHRASE>
<PHRASE Label="la_EnableBackorderAvailabilityDate" Module="In-Commerce" Type="1">RW5hYmxlIGJhY2tvcmRlciBhdmFpbGFiaWxpdHkgZGF0ZQ==</PHRASE>
<PHRASE Label="la_EnableBackordering" Module="In-Commerce" Type="1">RW5hYmxlIEJhY2tvcmRlcmluZw==</PHRASE>
<PHRASE Label="la_enable_html" Module="In-Commerce" Type="1">RW5hYmxlIEhUTUw/</PHRASE>
<PHRASE Label="la_EnterNumberOfCopies" Module="In-Commerce" Type="1">TnVtYmVyIE9mIENvcGllcw==</PHRASE>
<PHRASE Label="la_EntireOrderConfirmation" Module="In-Commerce" Type="1">VGhpcyB3aWxsIHJlbW92ZSBhbGwgc2VsZWN0ZWQgcHJvZHVjdHMhIEFyZSB5b3Ugc3VyZT8=</PHRASE>
<PHRASE Label="la_ERN" Module="In-Commerce" Type="1">TmFrZmE=</PHRASE>
<PHRASE Label="la_error_CannotDeletePaymentType" Module="In-Commerce" Type="1">VGhlIHByaW1hcnkgcGF5bWVudCB0eXBlIGNhbm5vdCBiZSBkZWxldGVkIQ==</PHRASE>
<PHRASE Label="la_error_EnableCurlFirst" Module="In-Commerce" Type="1">RW5hYmxlIENVUkwgZmlyc3Q=</PHRASE>
<PHRASE Label="la_error_FillInShippingFromAddress" Module="In-Commerce" Type="1">RmlsbCBpbiBTaGlwcGluZyBGcm9tIGFkZHJlc3MgaW4gQ29udGFjdCBJbmZvcm1hdGlvbiBiZWZvcmUgZW5hYmxpbmcgSW50ZXJzaGlwcGVy</PHRASE>
<PHRASE Label="la_ETB" Module="In-Commerce" Type="1">RXRoaW9waWFuIEJpcnI=</PHRASE>
<PHRASE Label="la_EUR" Module="In-Commerce" Type="1">RXVybw==</PHRASE>
<PHRASE Label="la_EuropeanCentralBank" Module="In-Commerce" Type="1">RXVyb3BlYW4gQ2VudHJhbCBCYW5rIC0gd3d3LmVjYi5pbnQ=</PHRASE>
<PHRASE Label="la_ExchangeRateSource" Module="In-Commerce" Type="1">Q2hvb3NlIHRoZSBleGNoYW5nZSByYXRlIHNvdXJjZQ==</PHRASE>
<PHRASE Label="la_Expiration" Module="In-Commerce" Type="1">RXhwaXJhdGlvbg==</PHRASE>
<PHRASE Label="la_Features" Module="In-Commerce" Type="1">RmVhdHVyZXM=</PHRASE>
<PHRASE Label="la_FederalReserveBank" Module="In-Commerce" Type="1">RmVkZXJhbCBSZXNlcnZlIEJhbmsgb2YgTmV3IFlvcmsgLSB3d3cubnkuZnJiLm9yZw==</PHRASE>
<PHRASE Label="la_FJD" Module="In-Commerce" Type="1">RmlqaSBEb2xsYXI=</PHRASE>
<PHRASE Label="la_FKP" Module="In-Commerce" Type="1">RmFsa2xhbmQgSXNsYW5kcyBQb3VuZA==</PHRASE>
<PHRASE Label="la_Flat" Module="In-Commerce" Type="1">RmxhdA==</PHRASE>
<PHRASE Label="la_fld_AccessDuration" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9u</PHRASE>
<PHRASE Label="la_fld_AccessDurationType" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9uIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_AccessDurationUnit" Module="In-Commerce" Type="1">QWNjZXNzIER1cmF0aW9uIFVuaXQ=</PHRASE>
<PHRASE Label="la_fld_AccessEnd" Module="In-Commerce" Type="1">QWNjZXNzIEVuZA==</PHRASE>
<PHRASE Label="la_fld_AccessGroup" Module="In-Commerce" Type="1">QWNjZXNzIEdyb3Vw</PHRASE>
<PHRASE Label="la_fld_AccessStart" Module="In-Commerce" Type="1">QWNjZXNzIFN0YXJ0</PHRASE>
<PHRASE Label="la_fld_AccumulatedAmount" Module="In-Commerce" Type="1">QWNjdW11bGF0ZWQgQW1vdW50</PHRASE>
<PHRASE Label="la_fld_AddedOn" Module="In-Commerce" Type="1">QWRkZWQgT24=</PHRASE>
<PHRASE Label="la_fld_Address1" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDE=</PHRASE>
<PHRASE Label="la_fld_Address2" Module="In-Commerce" Type="1">QWRkcmVzcyBMaW5lIDI=</PHRASE>
<PHRASE Label="la_fld_AdminComment" Module="In-Commerce" Type="1">QWRtaW4gQ29tbWVudA==</PHRASE>
<PHRASE Label="la_fld_AdminComments" Module="In-Commerce" Type="1">QWRtaW4gQ29tbWVudHM=</PHRASE>
<PHRASE Label="la_fld_AffiliateCode" Module="In-Commerce" Type="1">QWZmaWxpYXRlIENvZGU=</PHRASE>
<PHRASE Label="la_fld_AffiliateCommission" Module="In-Commerce" Type="1">QWZmaWxpYXRlIENvbW1pc3Npb24=</PHRASE>
<PHRASE Label="la_fld_AffiliateLink" Module="In-Commerce" Type="1">QWZmaWxpYXRlIExpbms=</PHRASE>
<PHRASE Label="la_fld_AffiliatePlan" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBsYW4=</PHRASE>
<PHRASE Label="la_fld_AffiliatePlanPayment" Module="In-Commerce" Type="1">UGF5bWVudA==</PHRASE>
<PHRASE Label="la_fld_AffiliateUser" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFVzZXI=</PHRASE>
<PHRASE Label="la_fld_AllowedShippingTypes" Module="In-Commerce" Type="1">U2VsZWN0ZWQ=</PHRASE>
<PHRASE Label="la_fld_Amount" Module="In-Commerce" Type="1">QW1vdW50</PHRASE>
<PHRASE Label="la_fld_AmountToPay" Module="In-Commerce" Type="1">QW1vdW50IFRvIFBheQ==</PHRASE>
<PHRASE Label="la_fld_AssignedCoupon" Module="In-Commerce" Type="1">QXNzaWduZWQgQ291cG9u</PHRASE>
<PHRASE Label="la_fld_AuthorizationResult" Module="In-Commerce" Type="1">QXV0aG9yaXphdGlvbiBSZXN1bHQ=</PHRASE>
<PHRASE Label="la_fld_Availability" Module="In-Commerce" Type="1">QXZhaWxhYmxl</PHRASE>
<PHRASE Label="la_fld_AvailableGroups" Module="In-Commerce" Type="1">QXZhaWxhYmxlIFVzZXIgR3JvdXBz</PHRASE>
<PHRASE Label="la_fld_AvailableShippingTypes" Module="In-Commerce" Type="1">QXZhaWxhYmxl</PHRASE>
<PHRASE Label="la_fld_BackOrder" Module="In-Commerce" Type="1">QmFja09yZGVy</PHRASE>
<PHRASE Label="la_fld_BackOrderDate" Module="In-Commerce" Type="1">QmFja29yZGVyIGF2YWlsYWJpbGl0eSBkYXRl</PHRASE>
<PHRASE Label="la_fld_BaseFee" Module="In-Commerce" Type="1">QmFzZSBGZWU=</PHRASE>
<PHRASE Label="la_fld_BillingAddress1" Module="In-Commerce" Type="1">QmlsbGluZyBBZGRyZXNzIExpbmUgMQ==</PHRASE>
<PHRASE Label="la_fld_BillingAddress2" Module="In-Commerce" Type="1">QmlsbGluZyBBZGRyZXNzIExpbmUgMg==</PHRASE>
<PHRASE Label="la_fld_BillingCity" Module="In-Commerce" Type="1">QmlsbGluZyBDaXR5</PHRASE>
<PHRASE Label="la_fld_BillingCompany" Module="In-Commerce" Type="1">QmlsbGluZyBDb21wYW55</PHRASE>
<PHRASE Label="la_fld_BillingCountry" Module="In-Commerce" Type="1">QmlsbGluZyBDb3VudHJ5</PHRASE>
<PHRASE Label="la_fld_BillingEmail" Module="In-Commerce" Type="1">QmlsbGluZyBFbWFpbA==</PHRASE>
<PHRASE Label="la_fld_BillingFax" Module="In-Commerce" Type="1">QmlsbGluZyBGYXg=</PHRASE>
<PHRASE Label="la_fld_BillingPhone" Module="In-Commerce" Type="1">QmlsbGluZyBQaG9uZQ==</PHRASE>
<PHRASE Label="la_fld_BillingState" Module="In-Commerce" Type="1">QmlsbGluZyBTdGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_BillingTo" Module="In-Commerce" Type="1">QmlsbGluZyBUbw==</PHRASE>
<PHRASE Label="la_fld_BillingZip" Module="In-Commerce" Type="1">QmlsbGluZyBaaXBjb2Rl</PHRASE>
<PHRASE Label="la_fld_BlockShippingAddress" Module="In-Commerce" Type="1">QmxvY2sgU2hpcHBpbmcgQWRkcmVzcyBFZGl0aW5n</PHRASE>
<PHRASE Label="la_fld_CaptureResult" Module="In-Commerce" Type="1">Q2FwdHVyZSBSZXN1bHQ=</PHRASE>
<PHRASE Label="la_fld_ChargeOnNextApprove" Module="In-Commerce" Type="1">Q2hhcmdlIG9uIE5leHQgQXBwcm92ZQ==</PHRASE>
<PHRASE Label="la_fld_CODallowed" Module="In-Commerce" Type="1">Q09EIEFsbG93ZWQ=</PHRASE>
<PHRASE Label="la_fld_Code" Module="In-Commerce" Type="1">Q29kZQ==</PHRASE>
<PHRASE Label="la_fld_CODFlatSurcharge" Module="In-Commerce" Type="1">Q09EIEZsYXQgU3VyY2hhcmdl</PHRASE>
<PHRASE Label="la_fld_CODPercentSurcharge" Module="In-Commerce" Type="1">Q09EIFBlcmNlbnQgU3VyY2hhcmdl</PHRASE>
<PHRASE Label="la_fld_Comment" Module="In-Commerce" Type="1">Q29tbWVudA==</PHRASE>
<PHRASE Label="la_fld_Cost" Module="In-Commerce" Type="1">Q29zdA==</PHRASE>
<PHRASE Label="la_fld_CostType" Module="In-Commerce" Type="1">Q29zdCBUeXBl</PHRASE>
<PHRASE Label="la_fld_CouponCode" Module="In-Commerce" Type="1">Q291cG9uIENvZGU=</PHRASE>
<PHRASE Label="la_fld_CreditCardNumber" Module="In-Commerce" Type="1">Q3JlZGl0IENhcmQgTnVtYmVy</PHRASE>
<PHRASE Label="la_fld_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
<PHRASE Label="la_fld_Currency" Module="In-Commerce" Type="1">Q3VycmVuY3k=</PHRASE>
<PHRASE Label="la_fld_CurrencyName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_CurrencySymbol" Module="In-Commerce" Type="1">U3ltYm9s</PHRASE>
<PHRASE Label="la_fld_CurrencySymbolPosition" Module="In-Commerce" Type="1">U3ltYm9sIFBvc2l0aW9u</PHRASE>
<PHRASE Label="la_fld_cust_p_ItemTemplate" Module="In-Commerce" Type="1">UHJvZHVjdCBJdGVtIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_Date" Module="In-Commerce" Type="1">RGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_DeliveryMethod" Module="In-Commerce" Type="1">RGVsaXZlcnkgTWV0aG9k</PHRASE>
<PHRASE Label="la_fld_DescriptionExcerpt" Module="In-Commerce" Type="1">RXhjZXJwdA==</PHRASE>
<PHRASE Label="la_fld_Discount" Module="In-Commerce" Type="1">RGlzY291bnQ=</PHRASE>
<PHRASE Label="la_fld_DisplayOnFront" Module="In-Commerce" Type="1">RGlzcGxheSBvbiBGcm9udC1FbmQ=</PHRASE>
<PHRASE Label="la_fld_EmptyCellsAre" Module="In-Commerce" Type="1">RW1wdHkgQ2VsbHMgQXJl</PHRASE>
<PHRASE Label="la_fld_End" Module="In-Commerce" Type="1">RW5kIERhdGU=</PHRASE>
<PHRASE Label="la_fld_Expiration" Module="In-Commerce" Type="1">RXhwaXJhdGlvbg==</PHRASE>
<PHRASE Label="la_fld_Featured" Module="In-Commerce" Type="1">RmVhdHVyZWQ=</PHRASE>
<PHRASE Label="la_fld_FirstDayDelivery" Module="In-Commerce" Type="1">Rmlyc3QgRGF5</PHRASE>
<PHRASE Label="la_fld_FlatSurcharge" Module="In-Commerce" Type="1">RmxhdCBTdXJjaGFyZ2U=</PHRASE>
<PHRASE Label="la_fld_FreeShippingMinAmount" Module="In-Commerce" Type="1">TWluaW11bSBPcmRlciBUb3RhbCBmb3IgRnJlZSBTaGlwcGluZw==</PHRASE>
<PHRASE Label="la_fld_From" Module="In-Commerce" Type="1">RnJvbQ==</PHRASE>
<PHRASE Label="la_fld_FromAmount" Module="In-Commerce" Type="1">RnJvbSBBbW91bnQ=</PHRASE>
<PHRASE Label="la_fld_FromDateTime" Module="In-Commerce" Type="1">RnJvbSBkYXRlL3RpbWU=</PHRASE>
<PHRASE Label="la_fld_Gateway" Module="In-Commerce" Type="1">R2F0ZXdheQ==</PHRASE>
+ <PHRASE Label="la_fld_GiftCertificateAmountApplied" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZSBhbW91bnQ=</PHRASE>
+ <PHRASE Label="la_fld_GiftCertificateNumber" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZSBudW1iZXI=</PHRASE>
<PHRASE Label="la_fld_GroundDelivery" Module="In-Commerce" Type="1">R3JvdW5kIERlbGl2ZXJ5</PHRASE>
<PHRASE Label="la_fld_Groups" Module="In-Commerce" Type="1">VXNlciBHcm91cHMgU2VsZWN0aW9u</PHRASE>
<PHRASE Label="la_fld_Instructions" Module="In-Commerce" Type="1">SW5zdHJ1Y3Rpb25z</PHRASE>
<PHRASE Label="la_fld_InsuranceFee" Module="In-Commerce" Type="1">SW5zdXJhbmNlIENvc3Q=</PHRASE>
<PHRASE Label="la_fld_Insurance_Fee" Module="In-Commerce" Type="1">SW5zdXJhbmNlIENvc3Q=</PHRASE>
<PHRASE Label="la_fld_Insurance_Type" Module="In-Commerce" Type="1">SW5zdXJhbmNlIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_InventoryStatus" Module="In-Commerce" Type="1">RW5hYmxlZA==</PHRASE>
<PHRASE Label="la_fld_IsFreePromoShipping" Module="In-Commerce" Type="1">VXNlIGFzIEZyZWUgUHJvbW8gU2hpcHBpbmc=</PHRASE>
- <PHRASE Label="la_fld_ISOCode" Module="In-Commerce" Type="1">SVNPIENvZGU=</PHRASE>
<PHRASE Label="la_fld_IsRecurringBilling" Module="In-Commerce" Type="1">UmVjdXJyaW5nIEJpbGxpbmc=</PHRASE>
<PHRASE Label="la_fld_ItemsSold" Module="In-Commerce" Type="1">SXRlbXMgU29sZA==</PHRASE>
<PHRASE Label="la_fld_LastPaymentDate" Module="In-Commerce" Type="1">TGFzdCBQYXltZW50IERhdGU=</PHRASE>
<PHRASE Label="la_fld_LastUsedBy" Module="In-Commerce" Type="1">TGFzdCBVc2VkIEJ5</PHRASE>
<PHRASE Label="la_fld_LastUsedOn" Module="In-Commerce" Type="1">TGFzdCBVc2VkIE9u</PHRASE>
<PHRASE Label="la_fld_Listable" Module="In-Commerce" Type="1">TGlzdGFibGU=</PHRASE>
<PHRASE Label="la_fld_ManageCombinations" Module="In-Commerce" Type="1">TWFuYWdlIE9wdGlvbnMgQ29tYmluYXRpb25z</PHRASE>
<PHRASE Label="la_fld_ManageShipping" Module="In-Commerce" Type="1">TWFuYWdlIFNoaXBwaW5nIFR5cGVz</PHRASE>
<PHRASE Label="la_fld_Manufacturer" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVy</PHRASE>
<PHRASE Label="la_fld_MaxQty" Module="In-Commerce" Type="1">TWF4IFF0eQ==</PHRASE>
<PHRASE Label="la_fld_MinimumPaymentAmount" Module="In-Commerce" Type="1">TWluaW1hbCBQYXltZW50IEFtb3VudA==</PHRASE>
<PHRASE Label="la_fld_MinQty" Module="In-Commerce" Type="1">TWluIFF0eQ==</PHRASE>
<PHRASE Label="la_fld_MSRP" Module="In-Commerce" Type="1">TVNSUA==</PHRASE>
<PHRASE Label="la_fld_Negotiated" Module="In-Commerce" Type="1">TmVnb3RpYXRlZA==</PHRASE>
<PHRASE Label="la_fld_NextCharge" Module="In-Commerce" Type="1">TmV4dCBDaGFyZ2UgRGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_NumberOfUses" Module="In-Commerce" Type="1">TnVtYmVyIE9mIFVzZXM=</PHRASE>
<PHRASE Label="la_fld_OnHold" Module="In-Commerce" Type="1">T24gSG9sZA==</PHRASE>
<PHRASE Label="la_fld_OnSale" Module="In-Commerce" Type="1">UHJvZHVjdCBvbiBTYWxl</PHRASE>
<PHRASE Label="la_fld_OptionPrice" Module="In-Commerce" Type="1">T3B0aW9uIFByaWNl</PHRASE>
<PHRASE Label="la_fld_OptionsSelectionMode" Module="In-Commerce" Type="1">T3B0aW9ucyBTZWxlY3Rpb24gTW9kZQ==</PHRASE>
<PHRASE Label="la_fld_OptionType" Module="In-Commerce" Type="1">T3B0aW9uIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_OptionValue" Module="In-Commerce" Type="1">T3B0aW9uIFZhbHVl</PHRASE>
+ <PHRASE Label="la_fld_OptionValues" Module="In-Commerce" Type="1">T3B0aW9uIFZhbHVlcw==</PHRASE>
<PHRASE Label="la_fld_OrderId" Module="In-Commerce" Type="1">T3JkZXIgSUQ=</PHRASE>
<PHRASE Label="la_fld_OrderIP" Module="In-Commerce" Type="1">SVAgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_fld_OrderNumber" Module="In-Commerce" Type="1">TnVtYmVy</PHRASE>
<PHRASE Label="la_fld_Original" Module="In-Commerce" Type="1">T3JpZ2luYWw=</PHRASE>
<PHRASE Label="la_fld_OriginalAmount" Module="In-Commerce" Type="1">T3JpZ2luYWwgQW1vdW50</PHRASE>
<PHRASE Label="la_fld_PaymentAccount" Module="In-Commerce" Type="1">UGF5bWVudCBBY2NvdW50</PHRASE>
<PHRASE Label="la_fld_PaymentCardType" Module="In-Commerce" Type="1">Q2FyZCBUeXBl</PHRASE>
<PHRASE Label="la_fld_PaymentCCExpDate" Module="In-Commerce" Type="1">Q2FyZCBFeHBpcmF0aW9u</PHRASE>
<PHRASE Label="la_fld_PaymentCVV2" Module="In-Commerce" Type="1">Q1ZWMg==</PHRASE>
<PHRASE Label="la_fld_PaymentDate" Module="In-Commerce" Type="1">UGF5bWVudCBEYXRl</PHRASE>
<PHRASE Label="la_fld_PaymentExpires" Module="In-Commerce" Type="1">UGF5bWVudCBEYXRlL0V4cGlyYXRpb24=</PHRASE>
<PHRASE Label="la_fld_PaymentInterval" Module="In-Commerce" Type="1">UGF5bWVudCBJbnRlcnZhbA==</PHRASE>
<PHRASE Label="la_fld_PaymentNameOnCard" Module="In-Commerce" Type="1">TmFtZSBvbiB0aGUgQ2FyZA==</PHRASE>
<PHRASE Label="la_fld_PaymentReference" Module="In-Commerce" Type="1">UGF5bWVudCBSZWZlcmVuY2U=</PHRASE>
<PHRASE Label="la_fld_PaymentType" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBl</PHRASE>
<PHRASE Label="la_fld_PaymentTypeCurrencies" Module="In-Commerce" Type="1">QXZhaWxhYmxlIEN1cnJlbmNpZXM=</PHRASE>
<PHRASE Label="la_fld_PaymentTypeId" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlIElk</PHRASE>
<PHRASE Label="la_fld_PaymentTypes" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlcw==</PHRASE>
<PHRASE Label="la_fld_PercentSurcharge" Module="In-Commerce" Type="1">UGVyY2VudCBTdXJjaGFyZ2U=</PHRASE>
<PHRASE Label="la_fld_Period" Module="In-Commerce" Type="1">UGVyaW9k</PHRASE>
<PHRASE Label="la_fld_PlacedOrdersEdit" Module="In-Commerce" Type="1">QWxsb3cgUGxhY2VkIE9yZGVycyBFZGl0aW5n</PHRASE>
<PHRASE Label="la_fld_PlanType" Module="In-Commerce" Type="1">UGxhbiBUeXBl</PHRASE>
<PHRASE Label="la_fld_Points" Module="In-Commerce" Type="1">UG9pbnRz</PHRASE>
<PHRASE Label="la_fld_Price" Module="In-Commerce" Type="1">UHJpY2U=</PHRASE>
<PHRASE Label="la_fld_PriceType" Module="In-Commerce" Type="1">UHJpY2UgTW9kaWZpZXIgVHlwZQ==</PHRASE>
<PHRASE Label="la_fld_ProcessingFee" Module="In-Commerce" Type="1">UHJvY2Vzc2luZyBGZWU=</PHRASE>
<PHRASE Label="la_fld_ProductFreeShipping" Module="In-Commerce" Type="1">TWluaW11bSBxdWFudGl0eSBmb3IgRnJlZSBTaGlwcGluZw==</PHRASE>
<PHRASE Label="la_fld_ProductType" Module="In-Commerce" Type="1">UHJvZHVjdCBUeXBl</PHRASE>
<PHRASE Label="la_fld_Product_MaxHotNumber" Module="In-Commerce" Type="1">TWF4aW11bSBudW1iZXIgb2YgVG9wIFNlbGxlciBpdGVtcw==</PHRASE>
<PHRASE Label="la_fld_Product_MinPopRating" Module="In-Commerce" Type="1">TWluaW11bSByYXRpbmcgdG8gY29uc2lkZXIgaXRlbSBQT1A=</PHRASE>
<PHRASE Label="la_fld_Product_MinPopVotes" Module="In-Commerce" Type="1">TWluaW11bSBudW1iZXIgb2Ygc29sZCBpdGVtcyB0byBjb25zaWRlciBpdGVtIFBPUA==</PHRASE>
<PHRASE Label="la_fld_QtyBackOrdered" Module="In-Commerce" Type="1">UXR5IEJhY2tPcmRlcmVk</PHRASE>
<PHRASE Label="la_fld_QtyInStock" Module="In-Commerce" Type="1">UXR5IEluIFN0b2Nr</PHRASE>
<PHRASE Label="la_fld_QtyInStockMin" Module="In-Commerce" Type="1">TWluaW11bSBxdWFudGl0eSBpbiBzdG9jayB0aHJlc2hvbGQ=</PHRASE>
<PHRASE Label="la_fld_QtyOnOrder" Module="In-Commerce" Type="1">UXR5IE9uIE9yZGVy</PHRASE>
<PHRASE Label="la_fld_QtyReserved" Module="In-Commerce" Type="1">UXR5IFJlc2VydmVk</PHRASE>
<PHRASE Label="la_fld_QtySold" Module="In-Commerce" Type="1">UXR5IFNvbGQ=</PHRASE>
<PHRASE Label="la_fld_RateToPrimary" Module="In-Commerce" Type="1">UmF0ZSBUbyBQcmltYXJ5</PHRASE>
<PHRASE Label="la_fld_RegisteredOn" Module="In-Commerce" Type="1">UmVnaXN0ZXJlZCBPbg==</PHRASE>
<PHRASE Label="la_fld_RemainingAmount" Module="In-Commerce" Type="1">UmVtYWluaW5nIEFtb3VudA==</PHRASE>
<PHRASE Label="la_fld_ReportType" Module="In-Commerce" Type="1">UmVwb3J0IFR5cGU=</PHRASE>
<PHRASE Label="la_fld_SecondDayDelivery" Module="In-Commerce" Type="1">U2Vjb25kIERheQ==</PHRASE>
<PHRASE Label="la_fld_SelectedGroups" Module="In-Commerce" Type="1">U2VsZWN0ZWQgVXNlciBHcm91cHM=</PHRASE>
<PHRASE Label="la_fld_ShipMethod" Module="In-Commerce" Type="1">U2hpcCBNZXRob2Q=</PHRASE>
<PHRASE Label="la_fld_ShippingAddress1" Module="In-Commerce" Type="1">U2hpcHBpbmcgQWRkcmVzcyBMaW5lIDE=</PHRASE>
<PHRASE Label="la_fld_ShippingAddress2" Module="In-Commerce" Type="1">U2hpcHBpbmcgQWRkcmVzcyBMaW5lIDI=</PHRASE>
<PHRASE Label="la_fld_ShippingCity" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ2l0eQ==</PHRASE>
<PHRASE Label="la_fld_ShippingCode" Module="In-Commerce" Type="1">Q29kZQ==</PHRASE>
<PHRASE Label="la_fld_ShippingCompany" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29tcGFueQ==</PHRASE>
<PHRASE Label="la_fld_ShippingControl" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29udHJvbA==</PHRASE>
<PHRASE Label="la_fld_ShippingCost" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29zdA==</PHRASE>
<PHRASE Label="la_fld_ShippingCountry" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_fld_ShippingCustomerAccount" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ3VzdG9tZXIgQWNjb3VudA==</PHRASE>
<PHRASE Label="la_fld_ShippingDate" Module="In-Commerce" Type="1">U2hpcHBpbmcgRGF0ZS9UaW1l</PHRASE>
<PHRASE Label="la_fld_ShippingEmail" Module="In-Commerce" Type="1">U2hpcHBpbmcgRW1haWw=</PHRASE>
<PHRASE Label="la_fld_ShippingFax" Module="In-Commerce" Type="1">U2hpcHBpbmcgRmF4</PHRASE>
<PHRASE Label="la_fld_ShippingMode" Module="In-Commerce" Type="1">QWxsb3dlZCBTaGlwcGluZyBUeXBlcw==</PHRASE>
<PHRASE Label="la_fld_ShippingName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
+ <PHRASE Label="la_fld_ShippingOption" Module="In-Commerce" Type="1">U2hpcHBpbmcgT3B0aW9u</PHRASE>
<PHRASE Label="la_fld_ShippingOptions" Module="In-Commerce" Type="1">U2hpcHBpbmcgT3B0aW9ucw==</PHRASE>
<PHRASE Label="la_fld_ShippingPhone" Module="In-Commerce" Type="1">U2hpcHBpbmcgUGhvbmU=</PHRASE>
<PHRASE Label="la_fld_ShippingQuoteEngineName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_ShippingState" Module="In-Commerce" Type="1">U2hpcHBpbmcgU3RhdGU=</PHRASE>
<PHRASE Label="la_fld_ShippingTo" Module="In-Commerce" Type="1">U2hpcHBpbmcgVG8=</PHRASE>
<PHRASE Label="la_fld_ShippingTracking" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHJhY2tpbmcvUmVmZXJlbmNl</PHRASE>
<PHRASE Label="la_fld_ShippingType" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZQ==</PHRASE>
<PHRASE Label="la_fld_ShippingTypeId" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZSBJRA==</PHRASE>
<PHRASE Label="la_fld_ShippingTypes" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZXM=</PHRASE>
<PHRASE Label="la_fld_ShippingZip" Module="In-Commerce" Type="1">U2hpcHBpbmcgWmlwY29kZQ==</PHRASE>
<PHRASE Label="la_fld_ShipZoneName" Module="In-Commerce" Type="1">U2hpcHBpbmcgWm9uZSBOYW1l</PHRASE>
<PHRASE Label="la_fld_SKU" Module="In-Commerce" Type="1">U0tV</PHRASE>
<PHRASE Label="la_fld_SpeedCode" Module="In-Commerce" Type="1">U3BlZWQgQ29kZQ==</PHRASE>
<PHRASE Label="la_fld_SSN" Module="In-Commerce" Type="1">U1NOL1RheCBJZC9WQVQgTnVtYmVy</PHRASE>
<PHRASE Label="la_fld_Start" Module="In-Commerce" Type="1">U3RhcnQgRGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_SubTotal" Module="In-Commerce" Type="1">U3VidG90YWw=</PHRASE>
<PHRASE Label="la_fld_TaxApplyToProcessing" Module="In-Commerce" Type="1">QXBwbHkgdG8gUHJvY2Vzc2luZw==</PHRASE>
<PHRASE Label="la_fld_TaxApplyToShipping" Module="In-Commerce" Type="1">QXBwbHkgdG8gU2hpcHBpbmc=</PHRASE>
<PHRASE Label="la_fld_TaxValue" Module="In-Commerce" Type="1">VGF4IFZhbHVl</PHRASE>
<PHRASE Label="la_fld_TaxZoneName" Module="In-Commerce" Type="1">TmFtZSBvZiBUYXggWm9uZQ==</PHRASE>
<PHRASE Label="la_fld_ThirdDayDelivery" Module="In-Commerce" Type="1">VGhpcmQgRGF5</PHRASE>
<PHRASE Label="la_fld_Time" Module="In-Commerce" Type="1">VGltZQ==</PHRASE>
<PHRASE Label="la_fld_ToAmount" Module="In-Commerce" Type="1">VG8gQW1vdW50</PHRASE>
<PHRASE Label="la_fld_ToDateTime" Module="In-Commerce" Type="1">VG8gZGF0ZS90aW1l</PHRASE>
<PHRASE Label="la_fld_TopSeller" Module="In-Commerce" Type="1">VG9wIFNlbGxlcg==</PHRASE>
<PHRASE Label="la_fld_TotalAmount" Module="In-Commerce" Type="1">VG90YWwgQW1vdW50</PHRASE>
<PHRASE Label="la_fld_TotalReturns" Module="In-Commerce" Type="1">VG90YWwgUmV0dXJucw==</PHRASE>
<PHRASE Label="la_fld_TotalSavings" Module="In-Commerce" Type="1">VG90YWwgU2F2aW5ncw==</PHRASE>
<PHRASE Label="la_fld_UnitsLimit" Module="In-Commerce" Type="1">TGluaXQ=</PHRASE>
<PHRASE Label="la_fld_UserComment" Module="In-Commerce" Type="1">VXNlciBDb21tZW50</PHRASE>
<PHRASE Label="la_fld_VAT" Module="In-Commerce" Type="1">U2FsZXMgVGF4L1ZBVA==</PHRASE>
<PHRASE Label="la_fld_VerificationResult" Module="In-Commerce" Type="1">VmVyaWZpY2F0aW9uIFJlc3VsdA==</PHRASE>
<PHRASE Label="la_fld_Weight" Module="In-Commerce" Type="1">V2VpZ2h0</PHRASE>
<PHRASE Label="la_fld_WeightType" Module="In-Commerce" Type="1">V2VpZ2h0IE1vZGlmaWVyIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_ZoneName" Module="In-Commerce" Type="1">Wm9uZSBOYW1l</PHRASE>
<PHRASE Label="la_fld_ZoneType" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_Zone_Type" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_FontColor" Module="In-Commerce" Type="1">Rm9udCBDb2xvcg==</PHRASE>
<PHRASE Label="la_FreeShipping" Module="In-Commerce" Type="1">RnJlZSBTaGlwcGluZw==</PHRASE>
<PHRASE Label="la_GBP" Module="In-Commerce" Type="1">UG91bmQgU3Rlcmxpbmc=</PHRASE>
<PHRASE Label="la_GEL" Module="In-Commerce" Type="1">TGFyaQ==</PHRASE>
<PHRASE Label="la_GenerateCode" Module="In-Commerce" Type="1">R2VuZXJhdGUgQ29kZQ==</PHRASE>
<PHRASE Label="la_GHC" Module="In-Commerce" Type="1">Q2VkaQ==</PHRASE>
<PHRASE Label="la_GIP" Module="In-Commerce" Type="1">R2licmFsdGFyIFBvdW5k</PHRASE>
<PHRASE Label="la_GMD" Module="In-Commerce" Type="1">RGFsYXNp</PHRASE>
<PHRASE Label="la_GNF" Module="In-Commerce" Type="1">R3VpbmVhIEZyYW5j</PHRASE>
<PHRASE Label="la_GTQ" Module="In-Commerce" Type="1">UXVldHphbA==</PHRASE>
<PHRASE Label="la_GWP" Module="In-Commerce" Type="1">R3VpbmVhLUJpc3NhdSBQZXNv</PHRASE>
<PHRASE Label="la_GYD" Module="In-Commerce" Type="1">R3V5YW5hIERvbGxhcg==</PHRASE>
<PHRASE Label="la_Handling" Module="In-Commerce" Type="1">aGFuZGxpbmc=</PHRASE>
<PHRASE Label="la_Help" Module="In-Commerce" Type="1">SGVscA==</PHRASE>
<PHRASE Label="la_HKD" Module="In-Commerce" Type="1">SG9uZyBLb25nIERvbGxhcg==</PHRASE>
<PHRASE Label="la_HNL" Module="In-Commerce" Type="1">TGVtcGlyYQ==</PHRASE>
<PHRASE Label="la_HRK" Module="In-Commerce" Type="1">Q3JvYXRpYW4ga3VuYQ==</PHRASE>
<PHRASE Label="la_HTG" Module="In-Commerce" Type="1">R291cmRl</PHRASE>
<PHRASE Label="la_HUF" Module="In-Commerce" Type="1">Rm9yaW50</PHRASE>
<PHRASE Label="la_IDR" Module="In-Commerce" Type="1">UnVwaWFo</PHRASE>
<PHRASE Label="la_ILS" Module="In-Commerce" Type="1">TmV3IElzcmFlbGkgU2hlcWVs</PHRASE>
<PHRASE Label="la_In-commerce" Module="In-Commerce" Type="1">SW4tQ29tbWVyY2U=</PHRASE>
<PHRASE Label="la_Incomplete" Module="In-Commerce" Type="1">SW5jb21wbGV0ZQ==</PHRASE>
<PHRASE Label="la_INR" Module="In-Commerce" Type="1">SW5kaWFuIFJ1cGVl</PHRASE>
<PHRASE Label="la_Insurance_Fee" Module="In-Commerce" Type="1">SW5zdXJhbmNl</PHRASE>
<PHRASE Label="la_InvalidState" Module="In-Commerce" Type="1">U3RhdGUgaXMgaW52YWxpZA==</PHRASE>
<PHRASE Label="la_Invoiced" Module="In-Commerce" Type="1">SW52b2ljZWQ=</PHRASE>
<PHRASE Label="la_IQD" Module="In-Commerce" Type="1">SXJhcWkgRGluYXI=</PHRASE>
<PHRASE Label="la_IRR" Module="In-Commerce" Type="1">SXJhbmlhbiBSaWFs</PHRASE>
<PHRASE Label="la_ISK" Module="In-Commerce" Type="1">SWNlbGFuZCBLcm9uYQ==</PHRASE>
<PHRASE Label="la_ISOUsedIfBlank" Module="In-Commerce" Type="1">SVNPIENvZGUgd2lsbCBiZSB1c2VkIGlmIGxlZnQgYmxhbms=</PHRASE>
<PHRASE Label="la_ItemBackordered" Module="In-Commerce" Type="1">YmFja29yZGVyZWQ=</PHRASE>
<PHRASE Label="la_ItemTab_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
<PHRASE Label="la_JMD" Module="In-Commerce" Type="1">SmFtYWljYW4gRG9sbGFy</PHRASE>
<PHRASE Label="la_JOD" Module="In-Commerce" Type="1">Sm9yZGFuaWFuIERpbmFy</PHRASE>
<PHRASE Label="la_JPY" Module="In-Commerce" Type="1">WWVu</PHRASE>
<PHRASE Label="la_KES" Module="In-Commerce" Type="1">S2VueWFuIFNoaWxsaW5n</PHRASE>
<PHRASE Label="la_kg" Module="In-Commerce" Type="1">a2c=</PHRASE>
<PHRASE Label="la_KGS" Module="In-Commerce" Type="1">U29t</PHRASE>
<PHRASE Label="la_KHR" Module="In-Commerce" Type="1">UmllbA==</PHRASE>
<PHRASE Label="la_KMF" Module="In-Commerce" Type="1">Q29tb3JvIEZyYW5j</PHRASE>
<PHRASE Label="la_KPW" Module="In-Commerce" Type="1">Tm9ydGggS29yZWFuIFdvbg==</PHRASE>
<PHRASE Label="la_KRW" Module="In-Commerce" Type="1">V29u</PHRASE>
<PHRASE Label="la_KWD" Module="In-Commerce" Type="1">S3V3YWl0aSBEaW5hcg==</PHRASE>
<PHRASE Label="la_KYD" Module="In-Commerce" Type="1">Q2F5bWFuIElzbGFuZHMgRG9sbGFy</PHRASE>
<PHRASE Label="la_KZT" Module="In-Commerce" Type="1">VGVuZ2U=</PHRASE>
<PHRASE Label="la_LAK" Module="In-Commerce" Type="1">S2lw</PHRASE>
<PHRASE Label="la_LBP" Module="In-Commerce" Type="1">TGViYW5lc2UgUG91bmQ=</PHRASE>
<PHRASE Label="la_lbs" Module="In-Commerce" Type="1">cG91bmRz</PHRASE>
<PHRASE Label="la_Left" Module="In-Commerce" Type="1">TGVmdA==</PHRASE>
<PHRASE Label="la_LKR" Module="In-Commerce" Type="1">U3JpIExhbmthIFJ1cGVl</PHRASE>
<PHRASE Label="la_LRD" Module="In-Commerce" Type="1">TGliZXJpYW4gRG9sbGFy</PHRASE>
<PHRASE Label="la_LSL" Module="In-Commerce" Type="1">TG90aQ==</PHRASE>
<PHRASE Label="la_LTL" Module="In-Commerce" Type="1">TGl0aHVhbmlhbiBMaXR1cw==</PHRASE>
<PHRASE Label="la_LVL" Module="In-Commerce" Type="1">TGF0dmlhbiBMYXRz</PHRASE>
<PHRASE Label="la_LYD" Module="In-Commerce" Type="1">THliaWFuIERpbmFy</PHRASE>
<PHRASE Label="la_MAD" Module="In-Commerce" Type="1">TW9yb2NjYW4gRGlyaGFt</PHRASE>
<PHRASE Label="la_Manual" Module="In-Commerce" Type="1">TWFudWFs</PHRASE>
<PHRASE Label="la_MaskProcessedCreditCards" Module="In-Commerce" Type="1">TWFzayBQcm9jZXNzZWQgQ3JlZGl0IENhcmRz</PHRASE>
<PHRASE Label="la_MaxAddresses" Module="In-Commerce" Type="1">TnVtYmVyIG9mIGFsbG93ZWQgYWRkcmVzc2Vz</PHRASE>
<PHRASE Label="la_MDL" Module="In-Commerce" Type="1">TW9sZG92YW4gTGV1</PHRASE>
<PHRASE Label="la_MGA" Module="In-Commerce" Type="1">TUdB</PHRASE>
<PHRASE Label="la_MGF" Module="In-Commerce" Type="1">TWFsYWdhc3kgRnJhbmM=</PHRASE>
<PHRASE Label="la_MKD" Module="In-Commerce" Type="1">RGVuYXI=</PHRASE>
<PHRASE Label="la_MMK" Module="In-Commerce" Type="1">S3lhdA==</PHRASE>
<PHRASE Label="la_MNT" Module="In-Commerce" Type="1">VHVncmlr</PHRASE>
<PHRASE Label="la_ModifyByValue" Module="In-Commerce" Type="1">VmFsdWU=</PHRASE>
<PHRASE Label="la_ModifyOperation" Module="In-Commerce" Type="1">T3BlcmF0aW9u</PHRASE>
<PHRASE Label="la_month" Module="In-Commerce" Type="1">bW9udGg=</PHRASE>
<PHRASE Label="la_MOP" Module="In-Commerce" Type="1">UGF0YWNh</PHRASE>
<PHRASE Label="la_MRO" Module="In-Commerce" Type="1">T3VndWl5YQ==</PHRASE>
+ <PHRASE Label="la_msg_ConfirmDeletePricing" Module="In-Commerce" Type="1">UGxlYXNlIGNvbmZpcm0geW91IHdhbnQgdG8gZGVsZXRlIHRoZSBQcmljaW5nIGZvciB0aGlzIFVzZXIgR3JvdXAuIENsaWNrIE9LIHRvIHByb2NlZWQgd2l0aCBkZWxldGlvbiwgb3IgY2xpY2sgQ2FuY2VsIHRvIGNhbmNlbCBpdC4=</PHRASE>
<PHRASE Label="la_MTL" Module="In-Commerce" Type="1">TWFsdGVzZSBMaXJh</PHRASE>
<PHRASE Label="la_MUR" Module="In-Commerce" Type="1">TWF1cml0aXVzIFJ1cGVl</PHRASE>
<PHRASE Label="la_MVR" Module="In-Commerce" Type="1">UnVmaXlhYQ==</PHRASE>
<PHRASE Label="la_MWK" Module="In-Commerce" Type="1">S3dhY2hh</PHRASE>
<PHRASE Label="la_MXN" Module="In-Commerce" Type="1">TWV4aWNhbiBQZXNv</PHRASE>
<PHRASE Label="la_MXV" Module="In-Commerce" Type="1">TWV4aWNhbiBVbmlkYWQgZGUgSW52ZXJzaW9uIChVREkp</PHRASE>
<PHRASE Label="la_MYR" Module="In-Commerce" Type="1">TWFsYXlzaWFuIFJpbmdnaXQ=</PHRASE>
<PHRASE Label="la_MZM" Module="In-Commerce" Type="1">TWV0aWNhbA==</PHRASE>
<PHRASE Label="la_NAD" Module="In-Commerce" Type="1">TmFtaWJpYSBEb2xsYXI=</PHRASE>
<PHRASE Label="la_NGN" Module="In-Commerce" Type="1">TmFpcmE=</PHRASE>
<PHRASE Label="la_NIO" Module="In-Commerce" Type="1">Q29yZG9iYSBPcm8=</PHRASE>
<PHRASE Label="la_NOK" Module="In-Commerce" Type="1">Tm9yd2VnaWFuIEtyb25l</PHRASE>
<PHRASE Label="la_NoShipments" Module="In-Commerce" Type="1">Tm8gU2hpcG1lbnRz</PHRASE>
<PHRASE Label="la_NotAllowed" Module="In-Commerce" Type="1">Tm90IEFsbG93ZWQ=</PHRASE>
<PHRASE Label="la_NoZonesOrBrackets" Module="In-Commerce" Type="1">WW91IG11c3QgaGF2ZSBib3RoIHpvbmVzIGFuZCBicmFja2V0cyBkZWZpbmVkIGJlZm9yZSBlZGl0aW5nIHNoaXBwaW5nIGNvc3Rz</PHRASE>
<PHRASE Label="la_NPR" Module="In-Commerce" Type="1">TmVwYWxlc2UgUnVwZWU=</PHRASE>
<PHRASE Label="la_NZD" Module="In-Commerce" Type="1">TmV3IFplYWxhbmQgRG9sbGFy</PHRASE>
<PHRASE Label="la_OMR" Module="In-Commerce" Type="1">UmlhbCBPbWFuaQ==</PHRASE>
<PHRASE Label="la_OnlineStore" Module="In-Commerce" Type="1">T25saW5lIFN0b3Jl</PHRASE>
+ <PHRASE Label="la_opt_AutoGroupShipments" Module="In-Commerce" Type="1">QXV0by1ncm91cCBzaGlwbWVudHM=</PHRASE>
+ <PHRASE Label="la_opt_Date" Module="In-Commerce" Type="1">RGF0ZQ==</PHRASE>
<PHRASE Label="la_opt_Exchange" Module="In-Commerce" Type="1">RXhjaGFuZ2U=</PHRASE>
+ <PHRASE Label="la_opt_Interval" Module="In-Commerce" Type="1">SW50ZXJ2YWw=</PHRASE>
<PHRASE Label="la_opt_List" Module="In-Commerce" Type="1">TGlzdGluZw==</PHRASE>
+ <PHRASE Label="la_opt_ManualGroupShipments" Module="In-Commerce" Type="1">R3JvdXAgc2hpcG1lbnRzIG1hbnVhbGx5</PHRASE>
<PHRASE Label="la_opt_PermanentCookie" Module="In-Commerce" Type="1">UGVybWFuZW50IENvb2tpZQ==</PHRASE>
<PHRASE Label="la_opt_PostalMail" Module="In-Commerce" Type="1">UG9zdGFsIE1haWw=</PHRASE>
<PHRASE Label="la_opt_PriceCalculationByOptimal" Module="In-Commerce" Type="1">T3B0aW1hbCBQcmljZQ==</PHRASE>
<PHRASE Label="la_opt_PriceCalculationByPrimary" Module="In-Commerce" Type="1">UHJpbWFyeSBQcmljZQ==</PHRASE>
<PHRASE Label="la_opt_Refund" Module="In-Commerce" Type="1">UmVmdW5k</PHRASE>
<PHRASE Label="la_opt_Selection" Module="In-Commerce" Type="1">U2VsZWN0aW9u</PHRASE>
<PHRASE Label="la_opt_Session" Module="In-Commerce" Type="1">U2Vzc2lvbg==</PHRASE>
+ <PHRASE Label="la_opt_Verified" Module="In-Commerce" Type="1">VmVyaWZpZWQ=</PHRASE>
<PHRASE Label="la_opt_Warranty" Module="In-Commerce" Type="1">V2FycmFudHk=</PHRASE>
<PHRASE Label="la_OrderMainNumberDigits" Module="In-Commerce" Type="1">T3JkZXIgbWFpbiBudW1iZXIgZGlnaXRz</PHRASE>
<PHRASE Label="la_OrderSecNumberDigits" Module="In-Commerce" Type="1">T3JkZXIgc3VibnVtYmVyIGRpZ2l0cw==</PHRASE>
<PHRASE Label="la_OrderSubtotal" Module="In-Commerce" Type="1">U3VidG90YWw=</PHRASE>
<PHRASE Label="la_orders_NextOrderNumber" Module="In-Commerce" Type="1">TmV4dCBPcmRlciBOdW1iZXI=</PHRASE>
<PHRASE Label="la_orders_RequireLogin" Module="In-Commerce" Type="1">UmVxdWlyZSBsb2dpbiBiZWZvcmUgY2hlY2tvdXQ=</PHRASE>
<PHRASE Label="la_Order_Billing_Information" Module="In-Commerce" Type="1">T3JkZXIgQmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_Order_Preview" Module="In-Commerce" Type="1">T3JkZXIgUHJldmlldw==</PHRASE>
<PHRASE Label="la_Overall" Module="In-Commerce" Type="1">T3ZlcmFsbA==</PHRASE>
<PHRASE Label="la_oz" Module="In-Commerce" Type="1">b3VuY2Vz</PHRASE>
<PHRASE Label="la_PAB" Module="In-Commerce" Type="1">QmFsYm9h</PHRASE>
<PHRASE Label="la_PEN" Module="In-Commerce" Type="1">TnVldm8gU29s</PHRASE>
<PHRASE Label="la_Percent" Module="In-Commerce" Type="1">UGVyY2VudA==</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliates.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIEFmZmlsaWF0ZXM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliates.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBBZmZpbGlhdGVz</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_payment_types.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_payment_types.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBBZmZpbGlhdGUgUGF5bWVudCBUeXBl</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_payment_types.advanced:move_down" Module="In-Commerce" Type="1">TW92ZS1kb3duIEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_payment_types.advanced:move_up" Module="In-Commerce" Type="1">TW92ZS11cCBBZmZpbGlhdGUgUGF5bWVudCBUeXBl</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_payment_types.advanced:set_primary" Module="In-Commerce" Type="1">U2V0IFByaW1hcnkgQWZmaWxpYXRlIFBheW1lbnQgVHlwZQ==</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_plans.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIEFmZmlsaWF0ZSBQbGFucw==</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_plans.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBBZmZpbGlhdGUgUGxhbnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:affiliate_plans.advanced:set_primary" Module="In-Commerce" Type="1">U2V0IFByaW1hcnkgQWZmaWxpYXRlIFBsYW4=</PHRASE>
<PHRASE Label="la_permission_in-commerce:coupons.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIENvdXBvbnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:coupons.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBDb3Vwb25z</PHRASE>
<PHRASE Label="la_permission_in-commerce:currencies.advanced:move_down" Module="In-Commerce" Type="1">TW92ZS1kb3duIFByaW9yaXR5IGZvciBDdXJyZW5jeQ==</PHRASE>
<PHRASE Label="la_permission_in-commerce:currencies.advanced:move_up" Module="In-Commerce" Type="1">TW92ZS11cCBQcmlvcml0eSBmb3IgQ3VycmVuY3k=</PHRASE>
<PHRASE Label="la_permission_in-commerce:currencies.advanced:set_primary" Module="In-Commerce" Type="1">U2V0IFByaW1hcnkgQ3VycmVuY3k=</PHRASE>
<PHRASE Label="la_permission_in-commerce:currencies.advanced:update_rate" Module="In-Commerce" Type="1">VXBkYXRlIEN1cnJlbmN5IFJhdGVz</PHRASE>
<PHRASE Label="la_permission_in-commerce:discounts.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIERpc2NvdW50cw==</PHRASE>
<PHRASE Label="la_permission_in-commerce:discounts.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBEaXNjb3VudHM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:gift-certificates.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIEdpZnQgQ2VydGlmaWNhdGVz</PHRASE>
<PHRASE Label="la_permission_in-commerce:gift-certificates.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBHaWZ0IENlcnRpZmljYXRlcw==</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:approve" Module="In-Commerce" Type="1">QXBwcm92ZSBPcmRlcnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:archive" Module="In-Commerce" Type="1">QXJjaGl2ZSBPcmRlcnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:deny" Module="In-Commerce" Type="1">RGVueSBPcmRlcnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:place" Module="In-Commerce" Type="1">UGxhY2UgT3JkZXJz</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:process" Module="In-Commerce" Type="1">UHJvY2VzcyBPcmRlcnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:reset_to_pending" Module="In-Commerce" Type="1">UmVzZXQgT3JkZXJzIHRvIFBlbmRpbmc=</PHRASE>
<PHRASE Label="la_permission_in-commerce:orders.advanced:ship" Module="In-Commerce" Type="1">U2hpcCBPcmRlcnM=</PHRASE>
<PHRASE Label="la_permission_in-commerce:shipping.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIFNoaXBwaW5nIFR5cGU=</PHRASE>
<PHRASE Label="la_permission_in-commerce:shipping.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBTaGlwcGluZyBUeXBl</PHRASE>
<PHRASE Label="la_permission_in-commerce:shipping_quote_engines.advanced:approve" Module="In-Commerce" Type="1">RW5hYmxlIFNoaXBwaW5nIFF1b3RpbmcgRW5naW5lcw==</PHRASE>
<PHRASE Label="la_permission_in-commerce:shipping_quote_engines.advanced:decline" Module="In-Commerce" Type="1">RGlzYWJsZSBTaGlwcGluZyBRdW90aW5nIEVuZ2luZXM=</PHRASE>
<PHRASE Label="la_PermName_Product.Add_desc" Module="In-Commerce" Type="1">QWRkIFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_PermName_Product.Delete_desc" Module="In-Commerce" Type="1">RGVsZXRlIFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_PermName_Product.Modify_desc" Module="In-Commerce" Type="1">TW9kaWZ5IFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_PermName_Product.Rate_desc" Module="In-Commerce" Type="1">UmF0ZSBQcm9kdWN0</PHRASE>
<PHRASE Label="la_PermName_Product.Review_desc" Module="In-Commerce" Type="1">Q29tbWVudCBQcm9kdWN0</PHRASE>
<PHRASE Label="la_PermName_Product.Review_Pending_desc" Module="In-Commerce" Type="1">Q29tbWVudCBQcm9kdWN0IFBlbmRpbmc=</PHRASE>
<PHRASE Label="la_PermName_Product.View_desc" Module="In-Commerce" Type="1">VmlldyBQcm9kdWN0</PHRASE>
<PHRASE Label="la_Perpage_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycyBwZXIgcGFnZQ==</PHRASE>
<PHRASE Label="la_Perpage_Manufacturers_Short" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycyBwZXIgcGFnZSBvbiBhIHNob3J0IGxpc3Rpbmc=</PHRASE>
<PHRASE Label="la_Perpage_Products" Module="In-Commerce" Type="1">TnVtYmVyIG9mIHByb2R1Y3RzIHBlciBwYWdl</PHRASE>
<PHRASE Label="la_Perpage_Products_Shortlist" Module="In-Commerce" Type="1">TnVtYmVyIG9mIHByb2R1Y3RzIHBlciBwYWdlIG9uIGEgc2hvcnQgbGlzdGluZw==</PHRASE>
<PHRASE Label="la_PerUnit" Module="In-Commerce" Type="1">UGVyIFVuaXQ=</PHRASE>
<PHRASE Label="la_PGK" Module="In-Commerce" Type="1">S2luYQ==</PHRASE>
<PHRASE Label="la_PHP" Module="In-Commerce" Type="1">UGhpbGlwcGluZSBQZXNv</PHRASE>
<PHRASE Label="la_PKR" Module="In-Commerce" Type="1">UGFraXN0YW4gUnVwZWU=</PHRASE>
<PHRASE Label="la_PLN" Module="In-Commerce" Type="1">WmxvdHk=</PHRASE>
<PHRASE Label="la_Precision" Module="In-Commerce" Type="1">UHJlY2lzaW9u</PHRASE>
<PHRASE Label="la_prefix_ord" Module="In-Commerce" Type="1">T3JkZXI=</PHRASE>
<PHRASE Label="la_ProcessBackorderingAuto" Module="In-Commerce" Type="1">UHJvY2VzcyBiYWNrb3JkZXJzIGF1dG9tYXRpY2FsbHk=</PHRASE>
<PHRASE Label="la_Processed" Module="In-Commerce" Type="1">UHJvY2Vzc2Vk</PHRASE>
<PHRASE Label="la_ProcessingFee" Module="In-Commerce" Type="1">UHJvY2Vzc2luZyBGZWU=</PHRASE>
<PHRASE Label="la_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
<PHRASE Label="la_ProductDeleted" Module="In-Commerce" Type="1">UHJvZHVjdCBEZWxldGVk</PHRASE>
<PHRASE Label="la_product_downloadable" Module="In-Commerce" Type="1">RG93bmxvYWRhYmxl</PHRASE>
<PHRASE Label="la_product_package" Module="In-Commerce" Type="1">UGFja2FnZQ==</PHRASE>
<PHRASE Label="la_product_service" Module="In-Commerce" Type="1">U2VydmljZQ==</PHRASE>
<PHRASE Label="la_product_subscription" Module="In-Commerce" Type="1">U3Vic2NyaXB0aW9u</PHRASE>
<PHRASE Label="la_product_tangible" Module="In-Commerce" Type="1">VGFuZ2libGU=</PHRASE>
<PHRASE Label="la_prompt_affiliate_cookie_duration" Module="In-Commerce" Type="1">QWZmaWxpYXRlIENvb2tpZSBEdXJhdGlvbiAoaW4gZGF5cyk=</PHRASE>
<PHRASE Label="la_prompt_affiliate_group" Module="In-Commerce" Type="1">QWZmaWxpYXRlIEdyb3Vw</PHRASE>
<PHRASE Label="la_prompt_affiliate_storage_method" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFN0b3JhZ2UgTWV0aG9k</PHRASE>
<PHRASE Label="la_prompt_Multilingual" Module="In-Commerce" Type="1">TXVsdGlsaW5ndWFs</PHRASE>
<PHRASE Label="la_prompt_PriceBracketCalculation" Module="In-Commerce" Type="1">Q2FsY3VsYXRlIFByaWNpbmcgYnk=</PHRASE>
<PHRASE Label="la_prompt_register_as_affiliate" Module="In-Commerce" Type="1">QWxsb3cgcmVnaXN0cmF0aW9uIGFzIGFmZmlsaWF0ZQ==</PHRASE>
<PHRASE Label="la_PropagateValues" Module="In-Commerce" Type="1">UHJvcGFnYXRlIFZhbHVlcw==</PHRASE>
<PHRASE Label="la_PYG" Module="In-Commerce" Type="1">R3VhcmFuaQ==</PHRASE>
<PHRASE Label="la_QAR" Module="In-Commerce" Type="1">UWF0YXJpIFJpYWw=</PHRASE>
<PHRASE Label="la_quartely" Module="In-Commerce" Type="1">cXVhcnRlcg==</PHRASE>
<PHRASE Label="la_RecalculateOrder" Module="In-Commerce" Type="1">UmVjYWxjdWxhdGUgT3JkZXI=</PHRASE>
<PHRASE Label="la_RecurringChargeInverval" Module="In-Commerce" Type="1">Q2hhcmdlIFJlY3VycmluZyBPcmRlcnMgKGRheXMgaW4gYWR2YW5jZSk=</PHRASE>
<PHRASE Label="la_RecurringOrderDenied" Module="In-Commerce" Type="1">UmVjdXJyaW5nIE9yZGVyIERlbmllZA==</PHRASE>
<PHRASE Label="la_RecurringOrderProcessed" Module="In-Commerce" Type="1">UmVjdXJyaW5nIE9yZGVyIFByb2Nlc3NlZA==</PHRASE>
<PHRASE Label="la_ResetBackorderFlag" Module="In-Commerce" Type="1">UmVzZXQgYmFja29yZGVyIGZsYWcgYXV0b21hdGljYWxseSB3aGVuIEF2YWlsYWJsZSBxdWFudGl0eSBpcyBlcXVhbCB0bywgb3IgYWJvdmU=</PHRASE>
<PHRASE Label="la_reset_to_base" Module="In-Commerce" Type="1">UmVzZXQgVG8gQmFzZQ==</PHRASE>
<PHRASE Label="la_Right" Module="In-Commerce" Type="1">UmlnaHQ=</PHRASE>
<PHRASE Label="la_ROL" Module="In-Commerce" Type="1">TGV1</PHRASE>
<PHRASE Label="la_RUB" Module="In-Commerce" Type="1">UnVzc2lhbiBSdWJsZQ==</PHRASE>
<PHRASE Label="la_RUR" Module="In-Commerce" Type="1">UnVzc2lhbiBSdWJsZQ==</PHRASE>
<PHRASE Label="la_RWF" Module="In-Commerce" Type="1">UndhbmRhIEZyYW5j</PHRASE>
<PHRASE Label="la_SAR" Module="In-Commerce" Type="1">U2F1ZGkgUml5YWw=</PHRASE>
<PHRASE Label="la_SBD" Module="In-Commerce" Type="1">U29sb21vbiBJc2xhbmRzIERvbGxhcg==</PHRASE>
<PHRASE Label="la_SCR" Module="In-Commerce" Type="1">U2V5Y2hlbGxlcyBSdXBlZQ==</PHRASE>
<PHRASE Label="la_SDD" Module="In-Commerce" Type="1">U3VkYW5lc2UgRGluYXI=</PHRASE>
<PHRASE Label="la_section_AdvertisingMaterials" Module="In-Commerce" Type="1">QWR2ZXJ0aXNpbmcgTWF0ZXJpYWxz</PHRASE>
<PHRASE Label="la_section_Affiliate" Module="In-Commerce" Type="1">QWZmaWxpYXRl</PHRASE>
<PHRASE Label="la_section_Backordering" Module="In-Commerce" Type="1">QmFja29yZGVyaW5n</PHRASE>
<PHRASE Label="la_section_Comments" Module="In-Commerce" Type="1">Q29tbWVudHM=</PHRASE>
<PHRASE Label="la_section_CreditCard" Module="In-Commerce" Type="1">Q3JlZGl0IENhcmQ=</PHRASE>
<PHRASE Label="la_section_Currency" Module="In-Commerce" Type="1">Q3VycmVuY3k=</PHRASE>
<PHRASE Label="la_section_EmailDelivery" Module="In-Commerce" Type="1">U2VuZCB2aWEgRS1tYWlsIHRv</PHRASE>
<PHRASE Label="la_section_File" Module="In-Commerce" Type="1">RmlsZQ==</PHRASE>
<PHRASE Label="la_section_Files" Module="In-Commerce" Type="1">RmlsZXM=</PHRASE>
<PHRASE Label="la_section_help_file_missing" Module="In-Commerce" Type="1">IFRoaXMgaGVscCBzZWN0aW9uIGRvZXMgbm90IHlldCBleGlzdCwgaXQncyBjb21pbmcgc29vbiE=</PHRASE>
<PHRASE Label="la_section_OrderBilling" Module="In-Commerce" Type="1">QmlsbGluZyBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_section_OrderShipping" Module="In-Commerce" Type="1">U2hpcHBpbmcgSW5mb3JtYXRpb24=</PHRASE>
<PHRASE Label="la_section_PostalDelivery" Module="In-Commerce" Type="1">U2VuZCB2aWEgUG9zdGFsIE1haWwgdG8=</PHRASE>
<PHRASE Label="la_section_PriceBracket" Module="In-Commerce" Type="1">UHJpY2UgQnJhY2tldA==</PHRASE>
<PHRASE Label="la_section_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
<PHRASE Label="la_section_ShippingCosts" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29zdHM=</PHRASE>
<PHRASE Label="la_section_ShippingZone" Module="In-Commerce" Type="1">U2hpcHBpbmcgWm9uZQ==</PHRASE>
<PHRASE Label="la_section_Statistics" Module="In-Commerce" Type="1">U3RhdGlzdGljcw==</PHRASE>
<PHRASE Label="la_section_StoreSettings" Module="In-Commerce" Type="1">U3RvcmUgU2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_TaxZone" Module="In-Commerce" Type="1">VGF4IFpvbmU=</PHRASE>
<PHRASE Label="la_SEK" Module="In-Commerce" Type="1">U3dlZGlzaCBLcm9uYQ==</PHRASE>
<PHRASE Label="la_SelectedOnly" Module="In-Commerce" Type="1">U2VsZWN0ZWQgUHJvZHVjdHMgT25seQ==</PHRASE>
<PHRASE Label="la_SetBackorderFlag" Module="In-Commerce" Type="1">U2V0IGJhY2tvcmRlciBmbGFnIGF1dG9tYXRpY2FsbHkgd2hlbiBBdmFpbGFibGUgcXVhbnRpdHkgaXMgZXF1YWwgdG8=</PHRASE>
<PHRASE Label="la_SGD" Module="In-Commerce" Type="1">U2luZ2Fwb3JlIERvbGxhcg==</PHRASE>
<PHRASE Label="la_ShippingHandling" Module="In-Commerce" Type="1">U2hpcHBpbmcgYW5kIEhhbmRsaW5n</PHRASE>
<PHRASE Label="la_ShippingId" Module="In-Commerce" Type="1">SUQ=</PHRASE>
<PHRASE Label="la_shipping_AnyAndSelected" Module="In-Commerce" Type="1">QW55ICsgU2VsZWN0ZWQ=</PHRASE>
<PHRASE Label="la_Shipping_Code" Module="In-Commerce" Type="1">U2hpcHBpbmcgQ29kZQ==</PHRASE>
<PHRASE Label="la_Shipping_From_Location" Module="In-Commerce" Type="1">RnJvbSBMb2NhdGlvbg==</PHRASE>
<PHRASE Label="la_shipping_Limited" Module="In-Commerce" Type="1">U2VsZWN0ZWQgT25seQ==</PHRASE>
<PHRASE Label="la_Shipping_Name" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_Shipping_Type" Module="In-Commerce" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_ship_All_Together" Module="In-Commerce" Type="1">U2hpcCBhbGwgaXRlbXMgdG9nZXRoZXI=</PHRASE>
<PHRASE Label="la_ship_Backorders_Upon_Avail" Module="In-Commerce" Type="1">U2hpcCBiYWNrb3JkZXJzIHVwb24gYXZhaWxhYmxl</PHRASE>
<PHRASE Label="la_ship_Backorder_Separately" Module="In-Commerce" Type="1">U2hpcCBiYWNrb3JkZXJlZCBpdGVtcyBzZXBhcmF0ZWx5</PHRASE>
<PHRASE Label="la_SHP" Module="In-Commerce" Type="1">U2FpbnQgSGVsZW5hIFBvdW5k</PHRASE>
<PHRASE Label="la_SIT" Module="In-Commerce" Type="1">VG9sYXI=</PHRASE>
<PHRASE Label="la_SKK" Module="In-Commerce" Type="1">U2xvdmFrIEtvcnVuYQ==</PHRASE>
<PHRASE Label="la_SLL" Module="In-Commerce" Type="1">TGVvbmU=</PHRASE>
<PHRASE Label="la_SOS" Module="In-Commerce" Type="1">U29tYWxpIFNoaWxsaW5n</PHRASE>
<PHRASE Label="la_Speed_Code" Module="In-Commerce" Type="1">U3BlZWQgQ29kZQ==</PHRASE>
<PHRASE Label="la_SRD" Module="In-Commerce" Type="1">U1JE</PHRASE>
<PHRASE Label="la_SRG" Module="In-Commerce" Type="1">U3VyaW5hbWUgR3VpbGRlcg==</PHRASE>
<PHRASE Label="la_StartingOrderNumber" Module="In-Commerce" Type="1">U3RhcnRpbmcgb3JkZXIgbnVtYmVy</PHRASE>
<PHRASE Label="la_State" Module="In-Commerce" Type="1">U3RhdGU=</PHRASE>
<PHRASE Label="la_STD" Module="In-Commerce" Type="1">RG9icmE=</PHRASE>
<PHRASE Label="la_StoreName" Module="In-Commerce" Type="1">TmFtZQ==</PHRASE>
<PHRASE Label="la_SubTotal" Module="In-Commerce" Type="1">U3VidG90YWw=</PHRASE>
<PHRASE Label="la_SVC" Module="In-Commerce" Type="1">RWwgU2FsdmFkb3IgQ29sb24=</PHRASE>
<PHRASE Label="la_SYP" Module="In-Commerce" Type="1">U3lyaWFuIFBvdW5k</PHRASE>
<PHRASE Label="la_SZL" Module="In-Commerce" Type="1">TGlsYW5nZW5p</PHRASE>
<PHRASE Label="la_tab_Access" Module="In-Commerce" Type="1">QWNjZXNz</PHRASE>
<PHRASE Label="la_tab_AccessAndPricing" Module="In-Commerce" Type="1">QWNjZXNzICYgUHJpY2luZw==</PHRASE>
<PHRASE Label="la_tab_AffiliatePaymentTypes" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBheW1lbnQgVHlwZXM=</PHRASE>
<PHRASE Label="la_tab_AffiliatePlans" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBsYW5z</PHRASE>
<PHRASE Label="la_tab_Affiliates" Module="In-Commerce" Type="1">QWZmaWxpYXRlcw==</PHRASE>
<PHRASE Label="la_tab_Archived" Module="In-Commerce" Type="1">QXJjaGl2ZWQ=</PHRASE>
<PHRASE Label="la_tab_Backorders" Module="In-Commerce" Type="1">QmFja29yZGVycw==</PHRASE>
<PHRASE Label="la_tab_Billing" Module="In-Commerce" Type="1">QmlsbGluZw==</PHRASE>
<PHRASE Label="la_tab_Brackets" Module="In-Commerce" Type="1">QnJhY2tldHM=</PHRASE>
<PHRASE Label="la_tab_ConfigContacts" Module="In-Commerce" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_tab_Costs" Module="In-Commerce" Type="1">Q29zdHM=</PHRASE>
<PHRASE Label="la_tab_Coupons" Module="In-Commerce" Type="1">Q291cG9ucw==</PHRASE>
<PHRASE Label="la_tab_CouponsItems" Module="In-Commerce" Type="1">SXRlbXM=</PHRASE>
<PHRASE Label="la_tab_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
<PHRASE Label="la_tab_CustomShippingTypes" Module="In-Commerce" Type="1">Q3VzdG9tIFNoaXBwaW5nIFR5cGVz</PHRASE>
<PHRASE Label="la_tab_Denied" Module="In-Commerce" Type="1">RGVuaWVk</PHRASE>
<PHRASE Label="la_tab_DiscountItems" Module="In-Commerce" Type="1">SXRlbXM=</PHRASE>
<PHRASE Label="la_tab_Discounts" Module="In-Commerce" Type="1">RGlzY291bnRz</PHRASE>
- <PHRASE Label="la_tab_DiscountsAndCoupons" Module="In-Commerce" Type="1">RGlzY291bnRzICYgQ291cG9ucw==</PHRASE>
+ <PHRASE Label="la_tab_DiscountsAndCoupons" Module="In-Commerce" Type="1">RGlzY291bnRzICYgQ2VydGlmaWNhdGVz</PHRASE>
<PHRASE Label="la_tab_DownloadLog" Module="In-Commerce" Type="1">RG93bmxvYWQgTG9n</PHRASE>
<PHRASE Label="la_tab_Editing_Shipping_type" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyB0eXBl</PHRASE>
<PHRASE Label="la_tab_FilesAndPricing" Module="In-Commerce" Type="1">RmlsZXMgJiBQcmljaW5n</PHRASE>
<PHRASE Label="la_tab_Gateway" Module="In-Commerce" Type="1">R2F0ZXdheQ==</PHRASE>
<PHRASE Label="la_tab_GiftCertificates" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZXM=</PHRASE>
<PHRASE Label="la_tab_Incomplete" Module="In-Commerce" Type="1">SW5jb21wbGV0ZQ==</PHRASE>
<PHRASE Label="la_tab_Inventory" Module="In-Commerce" Type="1">SW52ZW50b3J5</PHRASE>
<PHRASE Label="la_tab_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycw==</PHRASE>
<PHRASE Label="la_tab_NewRegional" Module="In-Commerce" Type="1">TkVXIFJlZ2lvbmFs</PHRASE>
<PHRASE Label="la_tab_Options" Module="In-Commerce" Type="1">T3B0aW9ucw==</PHRASE>
<PHRASE Label="la_tab_Orders" Module="In-Commerce" Type="1">T3JkZXJz</PHRASE>
<PHRASE Label="la_tab_PaymentLog" Module="In-Commerce" Type="1">VHJhbnNhY3Rpb25z</PHRASE>
<PHRASE Label="la_tab_Payments" Module="In-Commerce" Type="1">UGF5bWVudHM=</PHRASE>
<PHRASE Label="la_tab_PaymentTypes" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlcw==</PHRASE>
<PHRASE Label="la_tab_Pending" Module="In-Commerce" Type="1">UGVuZGluZw==</PHRASE>
<PHRASE Label="la_tab_Preview" Module="In-Commerce" Type="1">UHJldmlldw==</PHRASE>
<PHRASE Label="la_tab_Pricing" Module="In-Commerce" Type="1">UHJpY2luZw==</PHRASE>
<PHRASE Label="la_tab_Processed" Module="In-Commerce" Type="1">UHJvY2Vzc2Vk</PHRASE>
<PHRASE Label="la_tab_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
<PHRASE Label="la_tab_Returns" Module="In-Commerce" Type="1">UmV0dXJuZWQ=</PHRASE>
<PHRASE Label="la_tab_SaleReports" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0</PHRASE>
<PHRASE Label="la_tab_Shipping" Module="In-Commerce" Type="1">U2hpcHBpbmc=</PHRASE>
<PHRASE Label="la_tab_ShippingQuoteEngines" Module="In-Commerce" Type="1">U2hpcHBpbmcgUXVvdGUgRW5naW5lcw==</PHRASE>
<PHRASE Label="la_tab_ShippingZones" Module="In-Commerce" Type="1">U2hpcHBpbmcgWm9uZXM=</PHRASE>
<PHRASE Label="la_tab_Shipping_Types" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBUeXBlcw==</PHRASE>
<PHRASE Label="la_tab_Taxes" Module="In-Commerce" Type="1">VGF4ZXM=</PHRASE>
<PHRASE Label="la_tab_ToShip" Module="In-Commerce" Type="1">VG8gU2hpcA==</PHRASE>
<PHRASE Label="la_tab_UserGroups" Module="In-Commerce" Type="1">VXNlciBHcm91cHM=</PHRASE>
<PHRASE Label="la_text_Additional" Module="In-Commerce" Type="1">QWRkaXRpb25hbA==</PHRASE>
<PHRASE Label="la_Text_Affiliates" Module="In-Commerce" Type="1">QWZmaWxpYXRlcw==</PHRASE>
<PHRASE Label="la_Text_Carriers" Module="In-Commerce" Type="1">Q2FycmllcnM=</PHRASE>
<PHRASE Label="la_Text_Combination" Module="In-Commerce" Type="1">Q29tYmluYXRpb24=</PHRASE>
<PHRASE Label="la_text_CompanyName" Module="In-Commerce" Type="1">Q29tcGFueSBOYW1l</PHRASE>
<PHRASE Label="la_text_ContactName" Module="In-Commerce" Type="1">Q29udGFjdCBOYW1l</PHRASE>
<PHRASE Label="la_Text_ContactsGeneral" Module="In-Commerce" Type="1">R2VuZXJhbCBjb250YWN0IGluZm9ybWF0aW9u</PHRASE>
<PHRASE Label="la_Text_Coupons" Module="In-Commerce" Type="1">Q291cG9ucw==</PHRASE>
<PHRASE Label="la_Text_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
<PHRASE Label="la_Text_Delivery" Module="In-Commerce" Type="1">RGVsaXZlcnk=</PHRASE>
<PHRASE Label="la_text_Fax" Module="In-Commerce" Type="1">RmF4</PHRASE>
<PHRASE Label="la_Text_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycw==</PHRASE>
<PHRASE Label="la_Text_Option" Module="In-Commerce" Type="1">T3B0aW9u</PHRASE>
<PHRASE Label="la_Text_Orders" Module="In-Commerce" Type="1">T3JkZXJz</PHRASE>
<PHRASE Label="la_Text_Other" Module="In-Commerce" Type="1">T3RoZXI=</PHRASE>
+ <PHRASE Label="la_text_Others" Module="In-Commerce" Type="1">T3RoZXJz</PHRASE>
<PHRASE Label="la_Text_PricingCalculation" Module="In-Commerce" Type="1">UHJpY2UgQnJha2V0IENhbGN1bGF0aW9u</PHRASE>
<PHRASE Label="la_text_Product" Module="In-Commerce" Type="1">UHJvZHVjdA==</PHRASE>
<PHRASE Label="la_Text_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
<PHRASE Label="la_Text_Properties" Module="In-Commerce" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_text_ReportByTopProductCategories" Module="In-Commerce" Type="1">UHJvZHVjdCBDYXRlZ29yaWVzIGJ5</PHRASE>
<PHRASE Label="la_text_ReportByTopProducts" Module="In-Commerce" Type="1">UHJvZHVjdHMgYnk=</PHRASE>
<PHRASE Label="la_Text_ShippingAddress" Module="In-Commerce" Type="1">U2hpcHBpbmcgRnJvbSBhZGRyZXNz</PHRASE>
<PHRASE Label="la_Text_Shipping_Type" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZQ==</PHRASE>
<PHRASE Label="la_Text_StoreAddress" Module="In-Commerce" Type="1">Q29udGFjdCBBZGRyZXNz</PHRASE>
<PHRASE Label="la_text_StoreName" Module="In-Commerce" Type="1">U3RvcmUgTmFtZQ==</PHRASE>
<PHRASE Label="la_Text_TopSellers" Module="In-Commerce" Type="1">VG9wIHNlbGxlcnM=</PHRASE>
<PHRASE Label="la_THB" Module="In-Commerce" Type="1">QmFodA==</PHRASE>
<PHRASE Label="la_title_AddingCurrency" Module="In-Commerce" Type="1">QWRkaW5nIEN1cnJlbmN5</PHRASE>
<PHRASE Label="la_title_AddingGiftCertificate" Module="In-Commerce" Type="1">QWRkaW5nIEdpZnQgQ2VydGlmaWNhdGU=</PHRASE>
<PHRASE Label="la_title_AddingManufacturer" Module="In-Commerce" Type="1">QWRkaW5nIG1hbnVmYWN0dXJlcg==</PHRASE>
<PHRASE Label="la_title_AddingPaymentType" Module="In-Commerce" Type="1">QWRkaW5nIFBheW1lbnQgVHlwZQ==</PHRASE>
<PHRASE Label="la_title_AddingShippingType" Module="In-Commerce" Type="1">QWRkaW5nIFNoaXBwaW5nIFR5cGU=</PHRASE>
<PHRASE Label="la_title_AddingShippingZone" Module="In-Commerce" Type="1">QWRkaW5nIFNoaXBwaW5nIFpvbmU=</PHRASE>
<PHRASE Label="la_title_AddingTaxZone" Module="In-Commerce" Type="1">QWRkaW5nIFRheCBab25l</PHRASE>
<PHRASE Label="la_title_Adding_Affiliate" Module="In-Commerce" Type="1">QWRkaW5nIEFmZmlsaWF0ZQ==</PHRASE>
<PHRASE Label="la_title_Adding_Affiliate_Payment_Type" Module="In-Commerce" Type="1">QWRkaW5nIEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_title_Adding_Affiliate_Plan" Module="In-Commerce" Type="1">QWRkaW5nIEFmZmlsaWF0ZSBQbGFu</PHRASE>
<PHRASE Label="la_title_Adding_Coupon" Module="In-Commerce" Type="1">QWRkaW5nIENvdXBvbg==</PHRASE>
<PHRASE Label="la_title_Adding_Discount" Module="In-Commerce" Type="1">QWRkaW5nIERpc2NvdW50</PHRASE>
<PHRASE Label="la_title_Adding_File" Module="In-Commerce" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
<PHRASE Label="la_title_Adding_Option" Module="In-Commerce" Type="1">QWRkaW5nIE9wdGlvbg==</PHRASE>
<PHRASE Label="la_title_Adding_Order" Module="In-Commerce" Type="1">QWRkaW5nIE9yZGVy</PHRASE>
- <PHRASE Label="la_title_Adding_Order_Item" Module="In-Commerce" Type="1">QWRkaW5nIE9yZGVyIEl0ZW0=</PHRASE>
<PHRASE Label="la_title_Adding_PriceBracket" Module="In-Commerce" Type="1">QWRkaW5nIFByaWNlIEJyYWNrZXQ=</PHRASE>
<PHRASE Label="la_title_Adding_Product" Module="In-Commerce" Type="1">QWRkaW5nIFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_title_AffiliatePayments" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBheW1lbnRz</PHRASE>
<PHRASE Label="la_title_AffiliatePaymentTypes" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBheW1lbnQgVHlwZXM=</PHRASE>
<PHRASE Label="la_title_AffiliatePlans" Module="In-Commerce" Type="1">QWZmaWxpYXRlIFBsYW5z</PHRASE>
<PHRASE Label="la_title_AffiliatePlansBrackets" Module="In-Commerce" Type="1">QnJhY2tldHM=</PHRASE>
<PHRASE Label="la_title_Affiliates" Module="In-Commerce" Type="1">QWZmaWxpYXRlcw==</PHRASE>
<PHRASE Label="la_title_ApplyModifier" Module="In-Commerce" Type="1">QXBwbHkgTW9kaWZpZXI=</PHRASE>
<PHRASE Label="la_title_BackOrders" Module="In-Commerce" Type="1">QmFja29yZGVycyBMaXN0</PHRASE>
<PHRASE Label="la_title_Brackets" Module="In-Commerce" Type="1">QnJhY2tldHM=</PHRASE>
<PHRASE Label="la_title_Costs" Module="In-Commerce" Type="1">Q29zdHM=</PHRASE>
<PHRASE Label="la_title_CouponItems" Module="In-Commerce" Type="1">Q291cG9uIEl0ZW1z</PHRASE>
<PHRASE Label="la_title_Coupons" Module="In-Commerce" Type="1">Q291cG9ucw==</PHRASE>
<PHRASE Label="la_title_CouponSelector" Module="In-Commerce" Type="1">Q291cG9uIFNlbGVjdG9y</PHRASE>
<PHRASE Label="la_title_Currencies" Module="In-Commerce" Type="1">Q3VycmVuY2llcw==</PHRASE>
<PHRASE Label="la_title_DiscountItems" Module="In-Commerce" Type="1">RGlzY291bnQgSXRlbXM=</PHRASE>
<PHRASE Label="la_title_Discounts" Module="In-Commerce" Type="1">RGlzY291bnRz</PHRASE>
<PHRASE Label="la_title_EditingCurrency" Module="In-Commerce" Type="1">RWRpdGluZyBDdXJyZW5jeQ==</PHRASE>
<PHRASE Label="la_title_EditingGiftCertificate" Module="In-Commerce" Type="1">RWRpdGluZyBHaWZ0IENlcnRpZmljYXRl</PHRASE>
<PHRASE Label="la_title_EditingManufacturer" Module="In-Commerce" Type="1">RWRpdGluZyBNYW51ZmFjdHVyZXI=</PHRASE>
<PHRASE Label="la_title_EditingPaymentType" Module="In-Commerce" Type="1">RWRpdGluZyBQYXltZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_title_EditingShippingQuoteEngine" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBRdW90ZSBFbmdpbmU=</PHRASE>
<PHRASE Label="la_title_EditingShippingType" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBUeXBl</PHRASE>
<PHRASE Label="la_title_EditingShippingZone" Module="In-Commerce" Type="1">RWRpdGluZyBTaGlwcGluZyBab25l</PHRASE>
<PHRASE Label="la_title_EditingTaxZone" Module="In-Commerce" Type="1">RWRpdGluZyBUYXggWm9uZQ==</PHRASE>
<PHRASE Label="la_title_Editing_Affiliate" Module="In-Commerce" Type="1">RWRpdGluZyBBZmZpbGlhdGU=</PHRASE>
<PHRASE Label="la_title_Editing_Affiliate_Payment_Type" Module="In-Commerce" Type="1">RWRpdGluZyBBZmZpbGlhdGUgUGF5bWVudCBUeXBl</PHRASE>
<PHRASE Label="la_title_Editing_Affiliate_Plan" Module="In-Commerce" Type="1">RWRpdGluZyBBZmZpbGlhdGUgUGxhbg==</PHRASE>
<PHRASE Label="la_title_Editing_Coupon" Module="In-Commerce" Type="1">RWRpdGluZyBDb3Vwb24=</PHRASE>
<PHRASE Label="la_title_Editing_Discount" Module="In-Commerce" Type="1">RWRpdGluZyBEaXNjb3VudA==</PHRASE>
<PHRASE Label="la_title_Editing_File" Module="In-Commerce" Type="1">RWRpdGluZyBGaWxl</PHRASE>
<PHRASE Label="la_title_Editing_Option" Module="In-Commerce" Type="1">RWRpdGluZyBPcHRpb24=</PHRASE>
<PHRASE Label="la_title_Editing_Order" Module="In-Commerce" Type="1">RWRpdGluZyBPcmRlcg==</PHRASE>
<PHRASE Label="la_title_Editing_Order_Item" Module="In-Commerce" Type="1">RWRpdGluZyBPcmRlciBJdGVt</PHRASE>
<PHRASE Label="la_title_Editing_PriceBracket" Module="In-Commerce" Type="1">RWRpdGluZyBQcmljZSBCcmFja2V0</PHRASE>
<PHRASE Label="la_title_Editing_Product" Module="In-Commerce" Type="1">RWRpdGluZyBQcm9kdWN0</PHRASE>
<PHRASE Label="la_title_FileDownloads" Module="In-Commerce" Type="1">RmlsZSBEb3dubG9hZHM=</PHRASE>
<PHRASE Label="la_title_Gateway" Module="In-Commerce" Type="1">R2F0ZXdheQ==</PHRASE>
<PHRASE Label="la_title_GiftCertificates" Module="In-Commerce" Type="1">R2lmdCBDZXJ0aWZpY2F0ZXM=</PHRASE>
<PHRASE Label="la_title_ImportProducts" Module="In-Commerce" Type="1">SW1wb3J0IFByb2R1Y3Rz</PHRASE>
<PHRASE Label="la_title_In-Commerce" Module="In-Commerce" Type="1">RS1jb21tZXJjZQ==</PHRASE>
<PHRASE Label="la_title_IncompleteOrders" Module="In-Commerce" Type="1">SW5jb21wbGV0ZSBPcmRlcnMgTGlzdA==</PHRASE>
<PHRASE Label="la_title_ManagingOptionCombinations" Module="In-Commerce" Type="1">TWFuYWdpbmcgT3B0aW9uIENvbWJpbmF0aW9ucw==</PHRASE>
<PHRASE Label="la_title_ManagingShippingOptions" Module="In-Commerce" Type="1">TWFuYWdlIFNoaXBwaW5nIFR5cGVz</PHRASE>
<PHRASE Label="la_title_Manufacturers" Module="In-Commerce" Type="1">TWFudWZhY3R1cmVycw==</PHRASE>
<PHRASE Label="la_title_NewCurrency" Module="In-Commerce" Type="1">TmV3IEN1cnJlbmN5</PHRASE>
<PHRASE Label="la_title_NewGiftCertificate" Module="In-Commerce" Type="1">TmV3IEdpZnQgQ2VydGlmaWNhdGU=</PHRASE>
<PHRASE Label="la_title_NewManufacturer" Module="In-Commerce" Type="1">TmV3IG1hbnVmYWN0dXJlcg==</PHRASE>
<PHRASE Label="la_title_NewPaymentType" Module="In-Commerce" Type="1">TmV3IFBheW1lbnQgVHlwZQ==</PHRASE>
<PHRASE Label="la_title_NewProduct" Module="In-Commerce" Type="1">TmV3IFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_title_NewShippingType" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIFR5cGU=</PHRASE>
<PHRASE Label="la_title_NewShippingZone" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIFpvbmU=</PHRASE>
<PHRASE Label="la_title_NewTax" Module="In-Commerce" Type="1">TmV3IFRheCBab25l</PHRASE>
<PHRASE Label="la_title_New_Affiliate" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZQ==</PHRASE>
<PHRASE Label="la_title_New_Affiliate_Payment_Type" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_title_New_Affiliate_Plan" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQbGFu</PHRASE>
<PHRASE Label="la_title_New_Coupon" Module="In-Commerce" Type="1">TmV3IENvdXBvbg==</PHRASE>
<PHRASE Label="la_title_New_Discount" Module="In-Commerce" Type="1">TmV3IERpc2NvdW50</PHRASE>
<PHRASE Label="la_title_New_File" Module="In-Commerce" Type="1">TmV3IEZpbGU=</PHRASE>
<PHRASE Label="la_title_New_Option" Module="In-Commerce" Type="1">TmV3IE9wdGlvbg==</PHRASE>
<PHRASE Label="la_title_New_Order" Module="In-Commerce" Type="1">TmV3IE9yZGVy</PHRASE>
<PHRASE Label="la_title_New_PriceBracket" Module="In-Commerce" Type="1">TmV3IFByaWNlIEJyYWNrZXQ=</PHRASE>
<PHRASE Label="la_title_OrderBilling" Module="In-Commerce" Type="1">QmlsbGluZw==</PHRASE>
<PHRASE Label="la_title_OrderGWResult" Module="In-Commerce" Type="1">VHJhbnNhY3Rpb24gRGV0YWlscw==</PHRASE>
<PHRASE Label="la_title_OrderItems" Module="In-Commerce" Type="1">SXRlbXM=</PHRASE>
<PHRASE Label="la_title_OrderPreview" Module="In-Commerce" Type="1">UHJldmlldw==</PHRASE>
<PHRASE Label="la_title_Orders" Module="In-Commerce" Type="1">T3JkZXJz</PHRASE>
<PHRASE Label="la_title_OrdersArchived" Module="In-Commerce" Type="1">QXJjaGl2ZWQgT3JkZXJzIExpc3Q=</PHRASE>
<PHRASE Label="la_title_OrdersDenied" Module="In-Commerce" Type="1">RGVuaWVkIE9yZGVycyBMaXN0</PHRASE>
<PHRASE Label="la_title_OrdersExport" Module="In-Commerce" Type="1">T3JkZXJzIEV4cG9ydA==</PHRASE>
<PHRASE Label="la_title_OrderShipping" Module="In-Commerce" Type="1">U2hpcHBpbmc=</PHRASE>
<PHRASE Label="la_title_OrdersProcessed" Module="In-Commerce" Type="1">UHJvY2Vzc2VkIE9yZGVycyBMaXN0</PHRASE>
<PHRASE Label="la_title_OrdersReturns" Module="In-Commerce" Type="1">T3JkZXJzIHdpdGggUmV0dXJucw==</PHRASE>
<PHRASE Label="la_title_OrdersSearch" Module="In-Commerce" Type="1">Rm91bmQgT3JkZXJzIExpc3Q=</PHRASE>
<PHRASE Label="la_title_OrdersToShip" Module="In-Commerce" Type="1">VG8gU2hpcCBPcmRlcnMgTGlzdA==</PHRASE>
<PHRASE Label="la_title_Payments" Module="In-Commerce" Type="1">UGF5bWVudHM=</PHRASE>
<PHRASE Label="la_title_PaymentTypes" Module="In-Commerce" Type="1">UGF5bWVudCBUeXBlcw==</PHRASE>
<PHRASE Label="la_title_PayOut_To" Module="In-Commerce" Type="1">UGF5IE91dCBUbw==</PHRASE>
<PHRASE Label="la_title_PendingOrders" Module="In-Commerce" Type="1">UGVuZGluZyBPcmRlcnMgTGlzdA==</PHRASE>
<PHRASE Label="la_title_Products" Module="In-Commerce" Type="1">UHJvZHVjdHM=</PHRASE>
<PHRASE Label="la_title_ProductsExport" Module="In-Commerce" Type="1">UHJvZHVjdHMgRXhwb3J0</PHRASE>
<PHRASE Label="la_title_Product_Access" Module="In-Commerce" Type="1">QWNjZXNz</PHRASE>
<PHRASE Label="la_title_Product_AccessPricing" Module="In-Commerce" Type="1">UHJpY2luZw==</PHRASE>
<PHRASE Label="la_title_Product_Files" Module="In-Commerce" Type="1">RmlsZXM=</PHRASE>
<PHRASE Label="la_title_Product_Inventory" Module="In-Commerce" Type="1">SW52ZW50b3J5</PHRASE>
<PHRASE Label="la_title_Product_Options" Module="In-Commerce" Type="1">UHJvZHVjdCBPcHRpb25z</PHRASE>
<PHRASE Label="la_title_Product_PackageContent" Module="In-Commerce" Type="1">UGFja2FnZSBDb250ZW50</PHRASE>
<PHRASE Label="la_title_Product_Pricing" Module="In-Commerce" Type="1">UHJpY2luZw==</PHRASE>
<PHRASE Label="la_title_ReportOptions" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0IC0gT3B0aW9ucw==</PHRASE>
<PHRASE Label="la_title_ReportResults" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0IFJlc3VsdHM=</PHRASE>
<PHRASE Label="la_title_SalesReportChart" Module="In-Commerce" Type="1">U2FsZXMgUmVwb3J0IENoYXJ0</PHRASE>
<PHRASE Label="la_title_ShippingQuoteEngines" Module="In-Commerce" Type="1">U2hpcHBpbmcgUXVvdGUgRW5naW5lcw==</PHRASE>
<PHRASE Label="la_title_ShippingTypes" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZXM=</PHRASE>
<PHRASE Label="la_title_Taxes" Module="In-Commerce" Type="1">VGF4ZXM=</PHRASE>
<PHRASE Label="la_title_Zones" Module="In-Commerce" Type="1">Wm9uZXM=</PHRASE>
<PHRASE Label="la_TJS" Module="In-Commerce" Type="1">U29tb25p</PHRASE>
<PHRASE Label="la_TMM" Module="In-Commerce" Type="1">TWFuYXQ=</PHRASE>
<PHRASE Label="la_TND" Module="In-Commerce" Type="1">VHVuaXNpYW4gRGluYXI=</PHRASE>
<PHRASE Label="la_Tooltip_Add_Items" Module="In-Commerce" Type="1">QWRkIEl0ZW1z</PHRASE>
<PHRASE Label="la_ToolTip_Add_Product" Module="In-Commerce" Type="1">QWRkIFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_ToolTip_Archive" Module="In-Commerce" Type="1">QXJjaGl2ZQ==</PHRASE>
<PHRASE Label="la_tooltip_Arrange" Module="In-Commerce" Type="1">QXJyYW5nZQ==</PHRASE>
<PHRASE Label="la_tooltip_ClearAll" Module="In-Commerce" Type="1">Q2xlYXIgQWxs</PHRASE>
<PHRASE Label="la_tooltip_EntireOrder" Module="In-Commerce" Type="1">RW50aXJlIE9yZGVy</PHRASE>
<PHRASE Label="la_tooltip_Flip" Module="In-Commerce" Type="1">RmxpcA==</PHRASE>
<PHRASE Label="la_ToolTip_GoToOrder" Module="In-Commerce" Type="1">R28gdG8gT3JkZXI=</PHRASE>
<PHRASE Label="la_tooltip_Infinity" Module="In-Commerce" Type="1">SW5maW5pdHk=</PHRASE>
<PHRASE Label="la_tooltip_Modify" Module="In-Commerce" Type="1">TW9kaWZ5</PHRASE>
<PHRASE Label="la_tooltip_MoreBrackets" Module="In-Commerce" Type="1">TW9yZSBCcmFja2V0cw==</PHRASE>
<PHRASE Label="la_ToolTip_NewAffiliatePaymentType" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQYXltZW50IFR5cGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewGiftCertificate" Module="In-Commerce" Type="1">TmV3IEdpZnQgQ2VydGlmaWNhdGU=</PHRASE>
<PHRASE Label="la_tooltip_NewManufacturer" Module="In-Commerce" Type="1">TmV3IE1hbnVmYWN0dXJlcg==</PHRASE>
<PHRASE Label="la_ToolTip_NewOption" Module="In-Commerce" Type="1">TmV3IE9wdGlvbg==</PHRASE>
<PHRASE Label="la_tooltip_NewPaymentType" Module="In-Commerce" Type="1">TmV3IFBheW1lbnQgVHlwZQ==</PHRASE>
<PHRASE Label="la_ToolTip_NewPricing" Module="In-Commerce" Type="1">TmV3IFByaWNpbmc=</PHRASE>
<PHRASE Label="la_tooltip_newproduct" Module="In-Commerce" Type="1">TmV3IFByb2R1Y3Q=</PHRASE>
<PHRASE Label="la_ToolTip_NewShipZone" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIFpvbmU=</PHRASE>
<PHRASE Label="la_ToolTip_NewTaxZone" Module="In-Commerce" Type="1">TmV3IFRheCBab25l</PHRASE>
<PHRASE Label="la_ToolTip_New_Affiliate" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZQ==</PHRASE>
<PHRASE Label="la_ToolTip_New_Affiliate_Plan" Module="In-Commerce" Type="1">TmV3IEFmZmlsaWF0ZSBQbGFu</PHRASE>
<PHRASE Label="la_tooltip_New_Coupon" Module="In-Commerce" Type="1">TmV3IENvdXBvbg==</PHRASE>
<PHRASE Label="la_tooltip_New_Discount" Module="In-Commerce" Type="1">TmV3IERpc2NvdW50</PHRASE>
<PHRASE Label="la_ToolTip_New_Order" Module="In-Commerce" Type="1">TmV3IE9yZGVy</PHRASE>
<PHRASE Label="la_ToolTip_New_PricingLimit" Module="In-Commerce" Type="1">TmV3IFByaWNpbmcgTGltaXQ=</PHRASE>
<PHRASE Label="la_tooltip_new_products" Module="In-Commerce" Type="1">QWRkIG5ldyBwcm9kdWN0cw==</PHRASE>
<PHRASE Label="la_tooltip_new_shipping" Module="In-Commerce" Type="1">TmV3IFNoaXBwaW5nIHR5cGU=</PHRASE>
<PHRASE Label="la_tooltip_new_Zone" Module="In-Commerce" Type="1">TmV3IFpvbmU=</PHRASE>
<PHRASE Label="la_ToolTip_PayOut" Module="In-Commerce" Type="1">UGF5IE91dA==</PHRASE>
+ <PHRASE Label="la_Tooltip_Pdf" Module="In-Commerce" Type="1">UERG</PHRASE>
<PHRASE Label="la_tooltip_PlaceOrder" Module="In-Commerce" Type="1">UGxhY2UgT3JkZXI=</PHRASE>
<PHRASE Label="la_Tooltip_Process" Module="In-Commerce" Type="1">UHJvY2Vzcw==</PHRASE>
<PHRASE Label="la_Tooltip_ResetToBilling" Module="In-Commerce" Type="1">UmVzZXQgVG8gQmlsbGluZw==</PHRASE>
<PHRASE Label="la_ToolTip_ResetToPending" Module="In-Commerce" Type="1">UmVzZXQgVG8gUGVuZGluZw==</PHRASE>
<PHRASE Label="la_ToolTip_ResetToShipping" Module="In-Commerce" Type="1">UmVzZXQgVG8gU2hpcHBpbmc=</PHRASE>
<PHRASE Label="la_Tooltip_ResetToUser" Module="In-Commerce" Type="1">UmVzZXQgVG8gVXNlcg==</PHRASE>
<PHRASE Label="la_tooltip_RunReport" Module="In-Commerce" Type="1">UnVuIFJlcG9ydA==</PHRASE>
<PHRASE Label="la_ToolTip_SaveAndPrint" Module="In-Commerce" Type="1">U2F2ZSAmIFByaW50</PHRASE>
<PHRASE Label="la_Tooltip_Ship" Module="In-Commerce" Type="1">U2hpcA==</PHRASE>
<PHRASE Label="la_ToolTip_UpdateRates" Module="In-Commerce" Type="1">VXBkYXRlIFJhdGVz</PHRASE>
<PHRASE Label="la_tooltip_view_chart" Module="In-Commerce" Type="1">VmlldyBDaGFydA==</PHRASE>
<PHRASE Label="la_TOP" Module="In-Commerce" Type="1">UGFgYW5nYQ==</PHRASE>
<PHRASE Label="la_ToShip" Module="In-Commerce" Type="1">VG8gU2hpcA==</PHRASE>
<PHRASE Label="la_TotalSavings" Module="In-Commerce" Type="1">VG90YWwgU2F2aW5ncw==</PHRASE>
<PHRASE Label="la_TPE" Module="In-Commerce" Type="1">VGltb3IgRXNjdWRv</PHRASE>
<PHRASE Label="la_TRL" Module="In-Commerce" Type="1">VHVya2lzaCBMaXJh</PHRASE>
<PHRASE Label="la_TRY" Module="In-Commerce" Type="1">VFJZ</PHRASE>
<PHRASE Label="la_TTD" Module="In-Commerce" Type="1">VHJpbmlkYWQgYW5kIFRvYmFnbyBEb2xsYXI=</PHRASE>
<PHRASE Label="la_TWD" Module="In-Commerce" Type="1">TmV3IFRhaXdhbiBEb2xsYXI=</PHRASE>
<PHRASE Label="la_Txt_=" Module="In-Commerce" Type="1">RXF1YWxz</PHRASE>
<PHRASE Label="la_TZS" Module="In-Commerce" Type="1">VGFuemFuaWFuIFNoaWxsaW5n</PHRASE>
<PHRASE Label="la_UAH" Module="In-Commerce" Type="1">SHJ5dm5pYQ==</PHRASE>
<PHRASE Label="la_UGX" Module="In-Commerce" Type="1">VWdhbmRhIFNoaWxsaW5n</PHRASE>
<PHRASE Label="la_UpdateRate" Module="In-Commerce" Type="1">VXBkYXRlIFJhdGUgVG8gUHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_USD" Module="In-Commerce" Type="1">VVMgRG9sbGFy</PHRASE>
<PHRASE Label="la_Used" Module="In-Commerce" Type="1">VXNlZA==</PHRASE>
<PHRASE Label="la_UserDefined" Module="In-Commerce" Type="1">VXNlciBEZWZpbmVk</PHRASE>
<PHRASE Label="la_USN" Module="In-Commerce" Type="1">VVMgRG9sbGFyIChOZXh0IGRheSk=</PHRASE>
<PHRASE Label="la_USS" Module="In-Commerce" Type="1">VVMgRG9sbGFyIChTYW1lIGRheSk=</PHRASE>
<PHRASE Label="la_UYU" Module="In-Commerce" Type="1">UGVzbyBVcnVndWF5bw==</PHRASE>
<PHRASE Label="la_UZS" Module="In-Commerce" Type="1">VXpiZWtpc3RhbiBTdW0=</PHRASE>
<PHRASE Label="la_VAT" Module="In-Commerce" Type="1">U2FsZXMgVGF4L1ZBVA==</PHRASE>
<PHRASE Label="la_VEB" Module="In-Commerce" Type="1">Qm9saXZhcg==</PHRASE>
<PHRASE Label="la_ViewLabel" Module="In-Commerce" Type="1">VmlldyBMYWJlbA==</PHRASE>
<PHRASE Label="la_VND" Module="In-Commerce" Type="1">RG9uZw==</PHRASE>
<PHRASE Label="la_VUV" Module="In-Commerce" Type="1">VmF0dQ==</PHRASE>
<PHRASE Label="la_WarningCurrenciesNotUsed" Module="In-Commerce" Type="1">Rm9sbG93aW5nIGN1cnJlbmNpZXMgYXJlIG5vdCBzdXBwb3J0ZWQgaW4gYW55IHBheW1lbnQgdHlwZXM=</PHRASE>
<PHRASE Label="la_WarningRemoveUnusedCurrencies" Module="In-Commerce" Type="1">V291bGQgeW91IGxpa2UgdG8gZGlzYWJsZSB0aGVt</PHRASE>
<PHRASE Label="la_warning_ChangeInventoryStatus" Module="In-Commerce" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGNoYW5nZSBJbnZlbnRvcnkgU3RhdHVzPyBDaGFuZ2luZyB0aGUgc3RhdHVzIG1heSBhZmZlY3QgY3VycmVudCBvcmRlcnMgYW5kIHByb2R1Y3QgcXVhbnRpdGllcy4=</PHRASE>
<PHRASE Label="la_warning_SelectOptionCombination" Module="In-Commerce" Type="1">U2VsZWN0IG9wdGlvbiBjb21iaW5hdGlvbiB0byB1c2U=</PHRASE>
<PHRASE Label="la_warning_UpdateAllCurrencyRates" Module="In-Commerce" Type="1">RG8geW91IHdhbnQgdG8gdXBkYXRlIGFsbCByYXRlcw==</PHRASE>
<PHRASE Label="la_warning_UpdateSelectedCurrencyRates" Module="In-Commerce" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIHVwZGF0ZSB0aGUgc2VsZWN0ZWQgcmF0ZXM=</PHRASE>
<PHRASE Label="la_WholeOrder" Module="In-Commerce" Type="1">V2hvbGUgT3JkZXI=</PHRASE>
<PHRASE Label="la_WST" Module="In-Commerce" Type="1">VGFsYQ==</PHRASE>
<PHRASE Label="la_XAF" Module="In-Commerce" Type="1">Q0ZBIEZyYW5jIEJFQUM=</PHRASE>
<PHRASE Label="la_XCD" Module="In-Commerce" Type="1">RWFzdCBDYXJpYmJlYW4gRG9sbGFy</PHRASE>
<PHRASE Label="la_XDR" Module="In-Commerce" Type="1">WERS</PHRASE>
<PHRASE Label="la_XOF" Module="In-Commerce" Type="1">Q0ZBIEZyYW5jIEJDRUFP</PHRASE>
<PHRASE Label="la_XPF" Module="In-Commerce" Type="1">Q0ZQIEZyYW5j</PHRASE>
<PHRASE Label="la_YER" Module="In-Commerce" Type="1">WWVtZW5pIFJpYWw=</PHRASE>
<PHRASE Label="la_YUM" Module="In-Commerce" Type="1">WXVnb3NsYXZpYW4gRGluYXI=</PHRASE>
<PHRASE Label="la_ZAR" Module="In-Commerce" Type="1">UmFuZA==</PHRASE>
<PHRASE Label="la_Zeros" Module="In-Commerce" Type="1">WmVyb3M=</PHRASE>
<PHRASE Label="la_ZIP" Module="In-Commerce" Type="1">WklQ</PHRASE>
<PHRASE Label="la_ZMK" Module="In-Commerce" Type="1">S3dhY2hh</PHRASE>
<PHRASE Label="la_zones_AvailableCountries" Module="In-Commerce" Type="1">QXZhaWxhYmxlIGNvdW50cmllcw==</PHRASE>
<PHRASE Label="la_zones_AvailableStates" Module="In-Commerce" Type="1">QXZhaWxhYmxlIHN0YXRlcw==</PHRASE>
<PHRASE Label="la_zones_AvailableZips" Module="In-Commerce" Type="1">QXZhaWxhYmxlIFpJUCBjb2Rlcw==</PHRASE>
<PHRASE Label="la_zones_SelectedCountries" Module="In-Commerce" Type="1">U2hpcCB0byBDb3VudHJpZXM=</PHRASE>
<PHRASE Label="la_zones_SelectedStates" Module="In-Commerce" Type="1">U2hpcCB0byBTdGF0ZXMvUHJvdmljZXM=</PHRASE>
<PHRASE Label="la_zones_SelectedZips" Module="In-Commerce" Type="1">U2hpcCB0byBaSVAgY29kZXM=</PHRASE>
<PHRASE Label="la_ZWD" Module="In-Commerce" Type="1">WmltYmFid2UgRG9sbGFy</PHRASE>
<PHRASE Label="lu_comm_LastQuater" Module="In-Commerce" Type="1">TGFzdCBRdWF0ZXI=</PHRASE>
<PHRASE Label="lu_comm_ProfileAddressWarning" Module="In-Commerce" Type="1">VGhpcyBpcyB5b3VyIHByb2ZpbGUgYWRkcmVzcy4gSXQgd2lsbCBiZSB1cGRhdGVkIGlmIHlvdSBlZGl0IHRoZSBhZGRyZXNzIGJlbG93Lg==</PHRASE>
<PHRASE Label="lu_field_manufacturer" Module="In-Commerce" Type="2">TWFudWZhY3R1cmVy</PHRASE>
<PHRASE Label="lu_ship_Shipment" Module="In-Commerce" Type="1">U2hpcG1lbnQ=</PHRASE>
<PHRASE Label="lu_ship_ShippingType" Module="In-Commerce" Type="1">U2hpcHBpbmcgVHlwZQ==</PHRASE>
<PHRASE Label="lu_title_ReviewProduct" Module="In-Commerce" Type="1">Q29tbWVudCB0aGlzIFByb2R1Y3Q=</PHRASE>
<PHRASE Label="lu_title_ShippingInformation" Module="In-Commerce" Type="1">U2hpcHBpbmcgSW5mb3JtYXRpb24=</PHRASE>
</PHRASES>
<EVENTS>
<EVENT MessageType="html" Event="AFFILIATE.PAYMENT" Type="0">U3ViamVjdDogQWZmaWxpYXRlIGNvbW1pc3Npb24gcGF5bWVudCBoYXMgYmVlbiBpc3N1ZWQKCllvdXIgYWZmaWxpYXRlIGNvbW1pc3Npb24gcGF5bWVudCBoYXMgYmVlbiBpc3N1ZWQsIHBsZWFzZSBsb2dpbiB0byBZb3VyIEFjY291bnQsIEFmZmlsaWF0ZSBQYXltZW50cyBzZWN0aW9uIHRvIGNoZWNrIHRoZSBkZXRhaWxzLg==</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.PAYMENT" Type="1">U3ViamVjdDogQWZmaWxpYXRlIGNvbW1pc3Npb24gcGF5bWVudCBpc3N1ZWQKCkFmZmlsaWF0ZSBjb21taXNzaW9uIHBheW1lbnQgaGFzIGJlZW4gaXNzdWVkLg==</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.PAYMENT.TYPE.CHANGED" Type="0">U3ViamVjdDogQWZmaWxpYXRlIHBheW1lbnQgdHlwZSBoYXMgY2hhbmdlZAoKQWZmaWxpYXRlIHBheW1lbnQgdHlwZSBoYXMgY2hhbmdlZA==</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.PAYMENT.TYPE.CHANGED" Type="1">U3ViamVjdDogQWZmaWxpYXRlIHBheW1lbnQgdHlwZSBjaGFuZ2VkCgpBZmZpbGlhdGUgcGF5bWVudCB0eXBlIGNoYW5nZWQ=</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.REGISTER" Type="0">U3ViamVjdDogTmV3IEFmZmlsaWF0ZSBSZWdpc3RyYXRpb24KCkhlbGxvLDxici8+PGJyLz4NCg0KVGhhbmsgeW91IGZvciByZWdpc3RlcmluZyBhcyBhZmZpbGlhdGUuIFlvdSB3aWxsIGJlIG5vdGlmaWVkIHZpYSBlLW1haWwgd2hlbiB5b3VyIHJlZ2lzdHJhdGlvbiBpcyBhcHByb3ZlZC4=</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.REGISTER" Type="1">U3ViamVjdDogTmV3IEFmZmlsaWF0ZSBSZWdpc3RlcmVkCgpOZXcgYWZmaWxpYXRlIHVzZXIgaGFzIHJlZ2lzdGVyZWQuIFBsZWFzZSBwcm9jZWVkIHRvIEFkbWluaXN0cmF0aXZlIENvbnNvbGUgdG8gcmV2aWV3IHRoZSByZWdpc3RyYXRpb24u</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.REGISTRATION.APPROVED" Type="0">U3ViamVjdDogQWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBhcHByb3ZlZAoKQWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBoYXMgYmVlbiBhcHByb3ZlZC4=</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.REGISTRATION.APPROVED" Type="1">U3ViamVjdDogQWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBhcHByb3ZlZAoKTmV3IEFmZmlsaWF0ZSByZWdpc3RyYXRpb24gaGFzIGJlZW4gYXBwcm92ZWQu</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.REGISTRATION.DENIED" Type="0">U3ViamVjdDogQWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBkZW5pZWQKCk5ldyBBZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGRlbmllZC4=</EVENT>
<EVENT MessageType="html" Event="AFFILIATE.REGISTRATION.DENIED" Type="1">U3ViamVjdDogQWZmaWxpYXRlIHJlZ2lzdHJhdGlvbiBkZW5pZWQKCk5ldyBBZmZpbGlhdGUgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGRlbmllZC4=</EVENT>
<EVENT MessageType="html" Event="BACKORDER.ADD" Type="0">U3ViamVjdDogTmV3IEJhY2tvcmRlciBhZGRlZAoKRGVhciA8aW5wMjpvcmRfRmllbGQgbmFtZT0iQmlsbGluZ1RvIi8+LDxici8+PGJyLz4NCg0KWW91ciBiYWNrIG9yZGVyIG51bWJlciA8aW5wMjpvcmRfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gYWNjZXB0ZWQuIDxici8+PGJyLz4NCg0KWW91IHdpbGwgYmUgbm90aWZpZWQgYnkgZW1haWwgb25jZSB0aGUgb3JkZXIgaXMgcHJvY2Vzc2VkLg==</EVENT>
<EVENT MessageType="html" Event="BACKORDER.ADD" Type="1">U3ViamVjdDogTmV3IEJhY2tvcmRlciBhZGRlZAoKTmV3IGJhY2sgb3JkZXIgbnVtYmVyIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJPcmRlck51bWJlciIvPiBoYXMgYmVlbiBhZGRlZC4gPGJyLz48YnIvPg0KDQpQbGVhc2UgcHJvY2VlZCB0byBhZG1pbmlzdHJhdGl2ZSBjb25zb2xlIHRvIHJldmlldyB0aGUgb3JkZXIu</EVENT>
<EVENT MessageType="html" Event="BACKORDER.FULLFILL" Type="1">U3ViamVjdDogQmFja29yZGVyIGhhcyBiZWVuIFByb2Nlc3NlZAoKRGVhciA8aW5wMjpvcmQuLWludl9GaWVsZCBuYW1lPSJCaWxsaW5nVG8iLz4sPGJyLz48YnIvPg0KDQpZb3VyIGJhY2sgb3JkZXIgbnVtYmVyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGhhcyBiZWVuIHByb2Nlc3NlZCBhbmQgZnVsZmlsbGVkLg==</EVENT>
<EVENT MessageType="html" Event="BACKORDER.PROCESS" Type="0">U3ViamVjdDogWW91IEJhY2tvcmRlciAjPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gLSBQcm9jZXNzZWQhCgpEZWFyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9IkJpbGxpbmdUbyIvPiw8YnIvPjxici8+DQoNCllvdXIgYmFjayBvcmRlciAobnVtYmVyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+KSBoYXMgYmVlbiBwcm9jZXNzZWQu</EVENT>
<EVENT MessageType="html" Event="ORDER.APPROVE" Type="0">U3ViamVjdDogWW91ciBPcmRlciBpcyBBcHByb3ZlZAoKRGVhciA8aW5wMjpvcmQuLWludl9GaWVsZCBuYW1lPSJCaWxsaW5nVG8iLz4sPGJyLz48YnIvPg0KDQpZb3VyIG9yZGVyIG51bWJlciA8aW5wMjpvcmQuLWludl9GaWVsZCBuYW1lPSJPcmRlck51bWJlciIvPiBoYXMgYmVlbiBhcHByb3ZlZC48YnIvPjxici8+DQoNCjxpbnAyOm1faWYgY2hlY2s9Im1fZ2V0IiB2YXI9Im9yZGVyX2NvdXBvbnMiPg0KWW91IGNhbiB1c2UgY291cG9uczo8YnIvPjxici8+DQo8aW5wMjptX2dldCB2YXI9Im9yZGVyX2NvdXBvbnMiLz4NCjwvaW5wMjptX2lmPg==</EVENT>
<EVENT MessageType="html" Event="ORDER.DENY" Type="0">U3ViamVjdDogWW91ciBPcmRlciBpcyBEZW5pZWQKCkRlYXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iQmlsbGluZ1RvIi8+LDxici8+PGJyLz4NCg0KU29ycnksIGJ1dCB5b3VyIG9yZGVyIChudW1iZXIgPGlucDI6b3JkLi1pbnZfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4pIGhhcyBiZWVuIGRlbmllZC48YnIvPjxici8+DQoNClBsZWFzZSBmZWVsIGZyZWUgdG8gY29udGFjdCB1cyBhcmUgPGEgaHJlZj0iIj48L2E+</EVENT>
<EVENT MessageType="html" Event="ORDER.RECURRING.DENIED" Type="0">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyIGlzIERlbmllZAoKRGVhciA8aW5wMjpvcmQucmVjdXJyaW5nX0ZpZWxkIG5hbWU9IkJpbGxpbmdUbyIvPiw8YnIvPjxici8+DQoNClNvcnJ5LCBidXQgeW91ciByZWN1cnJpbmcgb3JkZXIgKG51bWJlciA8aW5wMjpvcmQucmVjdXJyaW5nX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+KSBoYXMgYmVlbiBkZW5pZWQuPGJyLz48YnIvPg0KDQpQbGVhc2UgY29udGFjdCB3ZWJzaXRlIGFkbWluaXN0cmF0b3IgYXQgPGEgaHJlZj0ibWFpbHRvOjxpbnAyOm1fR2V0Q29uZmlnIHZhcj0iU210cF9BZG1pbk1haWxGcm9tIi8+PjxpbnAyOm1fR2V0Q29uZmlnIHZhcj0iU210cF9BZG1pbk1haWxGcm9tIi8+PC9hPg==</EVENT>
<EVENT MessageType="html" Event="ORDER.RECURRING.DENIED" Type="1">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyICM8aW5wMjpvcmQucmVjdXJyaW5nX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+IGlzIERlbmllZCBieSB0aGUgc3lzdGVtCgpSZWN1cnJpbmcgb3JkZXIgbnVtYmVyIDxpbnAyOm9yZC5yZWN1cnJpbmdfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gZGVuaWVkLjxici8+PGJyLz4NCg0KUGxlYXNlIHByb2NlZWQgdG8gYWRtaW5pc3RyYXRpdmUgY29uc29sZSB0byByZXZpZXcgdGhlIG9yZGVyLg==</EVENT>
<EVENT MessageType="html" Event="ORDER.RECURRING.PROCESSED" Type="0">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyIFN1Y2Nlc3NmdWxseSBQcm9jZXNzZWQKCkRlYXIgPGlucDI6b3JkLnJlY3VycmluZ19GaWVsZCBuYW1lPSJCaWxsaW5nVG8iLz4sPGJyLz48YnIvPg0KDQpZb3VyIHJlY3VycmluZyBvcmRlciAobnVtYmVyIDxpbnAyOm9yZC5yZWN1cnJpbmdfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4pIGhhcyBiZWVuIHN1Y2Nlc3NmdWxseSBwcm9jZXNzZWQuPGJyLz48YnIvPg0KDQpObyBmdXJ0aGVyIGFjdGlvbiBpcyByZXF1aXJlZCBhdCB0aGlzIHRpbWUuPGJyLz48YnIvPg==</EVENT>
<EVENT MessageType="html" Event="ORDER.RECURRING.PROCESSED" Type="1">U3ViamVjdDogUmVjdXJyaW5nIE9yZGVyICgjPGlucDI6b3JkLnJlY3VycmluZ19GaWVsZCBuYW1lPSJPcmRlck51bWJlciIvPikgaXMgUHJvY2Vzc2VkCgpSZWN1cnJpbmcgb3JkZXIgbnVtYmVyIDxpbnAyOm9yZC5yZWN1cnJpbmdfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiLz4gaGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IHByb2Nlc3NlZC48YnIvPjxici8+DQoNCk5vIGZ1cnRoZXIgYWN0aW9uIGlzIHJlcXVpcmVkIGF0IHRoaXMgdGltZS4NCg==</EVENT>
<EVENT MessageType="html" Event="ORDER.SHIP" Type="0">U3ViamVjdDogWW91ciBPcmRlciB3YXMgc2hpcHBlZAoKRGVhciA8aW5wMjpvcmQuLWludl9GaWVsZCBuYW1lPSJTaGlwcGluZ1RvIi8+LDxici8+PGJyLz4NCg0KWW91ciBvcmRlciAobnVtYmVyIDxpbnAyOm9yZC4taW52X0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+KSBoYXMgYmVlbiBzaGlwcGVkLg==</EVENT>
<EVENT MessageType="html" Event="ORDER.SUBMIT" Type="0">U3ViamVjdDogVGhhbmsgeW91IGZvciBZb3VyIE9yZGVyICg8aW5wMjpvcmRfRmllbGQgbmFtZT0iT3JkZXJOdW1iZXIiIC8+KSEKCjxpbnAyOm1fRGVmaW5lRWxlbWVudCBuYW1lPSJvcmRlcml0ZW1fZWxlbSI+DQoJPGlucDI6RmllbGQgbmFtZT0iUHJvZHVjdE5hbWUiIHBhZD0iMzQiLz4gKHF0eSA8aW5wMjpGaWVsZCBuYW1lPSJRdWFudGl0eSIvPikgPGlucDI6RmllbGQgbmFtZT0iRXh0ZW5kZWRQcmljZSIgY3VycmVuY3k9InNlbGVjdGVkIi8+PGJyLz4NCjwvaW5wMjptX0RlZmluZUVsZW1lbnQ+DQoNCg0KRGVhciA8aW5wMjpvcmRfRmllbGQgbmFtZT0iQmlsbGluZ1RvIiAvPiw8YnIvPjxici8+DQoNClRoYW5rIHlvdSBmb3IgeW91ciBwdXJjaGFzZSE8YnIvPjxici8+DQoNCjxpbnAyOm1faWYgY2hlY2s9Im9yZF9Vc2luZ0NyZWRpdENhcmQiPg0KUGxlYXNlIGFsbG93IDI0IGhvdXJzIGZvciB1cyB0byBjb25maXJtIGFuZCBwcm9jZXNzIHlvdXIgb3JkZXIuDQo8aW5wMjptX2Vsc2UgLz4NClBsZWFzZSBzZW5kIGEgY2hlY2sgb3IgYSBtb25leSBvcmRlciBpbiB0aGUgYW1vdW50IG9mIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iVG90YWxBbW91bnQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPiB0bzoNCjxici8+DQpBZGRyZXNzDQo8YnIvPg0KQWxsIGNoZWNrcyBtdXN0IGJlIGRyYXduIGluIFUuUy4gZnVuZHMgZnJvbSBhIFUuUy4gYmFuay4NClBsZWFzZSBhdHRhY2ggYSBwcmludG91dCBvZiB0aGlzIHJlY2VpcHQgd2l0aCB5b3VyIGNoZWNrIGFuZA0Kd3JpdGUgZG93biB5b3VyIG9yZGVyIG51bWJlci4gIFlvdXIgb3JkZXIgd2lsbCBiZSBhcHByb3ZlZA0Kd2l0aGluIDggYnVzaW5lc3MgZGF5cyBhZnRlciB0aGUgZGF5IHdlIHJlY2VpdmUgeW91ciBjaGVjaywNCm9yIHdpdGhpbiAyIGJ1c2luZXNzIGRheXMgYWZ0ZXIgd2UgcmVjZWl2ZSBhIG1vbmV5IG9yZGVyIG9yDQpiYW5rIGRyYWZ0Lg0KPC9pbnAyOm1faWY+DQo8YnIvPjxici8+PGJyLz4NCg0KDQpCZWxvdyBhcmUgdGhlIGRldGFpbHMgb2YgeW91ciBvcmRlcjo8YnIvPjxici8+DQoNCk9yZGVyIENvbnRlbnRzOg0KPGhyLz4NCjxpbnAyOm9yZF9QcmludENhcnQgaXRlbV9yZW5kZXJfYXM9Im9yZGVyaXRlbV9lbGVtIiBoZWFkZXJfcmVuZGVyX2FzPSJodG1sOiIgZm9vdGVyX3JlbmRlcl9hcz0iaHRtbDoiIGVtcHR5X2NhcnRfcmVuZGVyX2FzPSJodG1sOiIgcGVyX3BhZ2U9Ii0xIi8+IA0KPGhyLz4NClN1YiBUb3RhbDogICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlN1YnRvdGFsV2l0aERpc2NvdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz48YnIvPg0KVGF4ZXM6ICAgICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJWQVQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPjxici8+DQpUb3RhbDogICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJUb3RhbEFtb3VudCIgY3VycmVuY3k9InNlbGVjdGVkIi8+IDxici8+PGJyLz4NCg0KQmlsbGluZyBJbmZvcm1hdGlvbjoNCjxoci8+DQpBbW91bnQgQmlsbGVkOiAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlRvdGFsQW1vdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz4NCjxpbnAyOm1faWYgY2hlY2s9Im9yZF9Vc2luZ0NyZWRpdENhcmQiPg0KUGF5bWVudCBUeXBlOiAgICAgPGlucDI6b3JkX0ZpZWxkIG5hbWU9IlBheW1lbnRUeXBlIiAvPg0KQ3JlZGl0IENhcmQ6ICAgICAgPGlucDI6b3JkX0ZpZWxkIG5hbWU9IlBheW1lbnRBY2NvdW50IiBtYXNrZWQ9Im1hc2tlZCIvPg0KPGlucDI6bV9lbHNlIC8+DQpQYXltZW50IFR5cGU6ICAgICA8aW5wMjpvcmRfRmllbGQgbmFtZT0iUGF5bWVudFR5cGUiIC8+DQo8L2lucDI6bV9pZj48YnI+PGJyLz4NCg0KQ29udGFjdCBJbmZvcm1hdGlvbjoNCjxoci8+DQpOYW1lOiAgICAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdUbyIvPjxici8+DQpFLW1haWw6CQkJPGlucDI6bV9pZiBjaGVjaz0ib3JkX0ZpZWxkIiBuYW1lPSJCaWxsaW5nRW1haWwiPg0KICA8YSBocmVmPSJtYWlsdG86PGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nRW1haWwiLz4iPjxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0VtYWlsIi8+PC9hPg0KPGlucDI6bV9lbHNlIC8+DQogIDxhIGhyZWY9Im1haWx0bzo8aW5wMjp1X0ZpZWxkIGZpZWxkPSJFbWFpbCIvPiI+PGlucDI6dV9GaWVsZCBmaWVsZD0iRW1haWwiLz48L2E+DQo8L2lucDI6bV9pZj48YnIvPg0KQ29tcGFueS9Pcmdhbml6YXRpb246ICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0NvbXBhbnkiLz48YnIvPg0KUGhvbmU6ICAgICAgICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nUGhvbmUiLz48YnIvPg0KRmF4OiAgICAgICAgICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nRmF4Ii8+PGJyLz4NCkFkZHJlc3MgTGluZSAxOiAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0FkZHJlc3MxIi8+PGJyLz4NCkFkZHJlc3MgTGluZSAyOiAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0FkZHJlc3MyIi8+PGJyLz4NCkNpdHk6ICAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0NpdHkiLz48YnIvPg0KU3RhdGU6ICAgICAgICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJCaWxsaW5nU3RhdGUiLz4gPGJyLz4NClpJUCBDb2RlOiAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1ppcCIvPjxici8+DQpDb3VudHJ5OiAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDb3VudHJ5Ii8+PGJyLz4NCg==</EVENT>
<EVENT MessageType="html" Event="ORDER.SUBMIT" Type="1">U3ViamVjdDogTmV3IE9yZGVyIFN1Ym1pdHRlZCAoPGlucDI6b3JkX0ZpZWxkIG5hbWU9Ik9yZGVyTnVtYmVyIi8+KQoKPGlucDI6bV9EZWZpbmVFbGVtZW50IG5hbWU9Im9yZGVyaXRlbV9lbGVtIj4NCjxpbnAyOkZpZWxkIG5hbWU9IlByb2R1Y3ROYW1lIiBwYWQ9IjM0Ii8+IChxdHkgPGlucDI6RmllbGQgbmFtZT0iUXVhbnRpdHkiLz4pIDxpbnAyOkZpZWxkIG5hbWU9IkV4dGVuZGVkUHJpY2UiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPjxici8+DQo8L2lucDI6bV9EZWZpbmVFbGVtZW50Pg0KDQoNCkEgbmV3IG9yZGVyIGhhcyBiZWVuIHBsYWNlZC4gQmVsb3cgaXMgdGhlIHJlY2VpcHQgdGhhdCBoYXMgYmVlbiBzZW50IHRvIHRoZSBjdXN0b21lci48YnIvPg0KUGxlYXNlIHByb2NlZWQgdG8gYWRtaW5pc3RyYXRpb24gc2VjdGlvbiB0byBhcHByb3ZlIHRoaXMgb3JkZXIuPGJyLz48YnIvPg0KDQpPcmRlciBOdW1iZXI6IDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJPcmRlck51bWJlciIgLz48YnIvPg0KRGF0ZS9UaW1lOiA8aW5wMjpvcmRfRmllbGQgbmFtZT0iT3JkZXJEYXRlIiAvPjxici8+PGJyLz48YnIvPg0KDQpEZWFyIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJCaWxsaW5nVG8iIC8+LDxici8+PGJyLz4NCg0KVGhhbmsgeW91IGZvciB5b3VyIHB1cmNoYXNlITxici8+PGJyLz4NCg0KPGlucDI6bV9pZiBjaGVjaz0ib3JkX1VzaW5nQ3JlZGl0Q2FyZCI+DQpQbGVhc2UgYWxsb3cgMjQgaG91cnMgZm9yIHVzIHRvIGNvbmZpcm0gYW5kIHByb2Nlc3MgeW91ciBvcmRlci4NCjxpbnAyOm1fZWxzZSAvPg0KUGxlYXNlIHNlbmQgYSBjaGVjayBvciBhIG1vbmV5IG9yZGVyIGluIHRoZSBhbW91bnQgb2YgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJUb3RhbEFtb3VudCIgY3VycmVuY3k9InNlbGVjdGVkIi8+IHRvOg0KPGJyPg0KQWRkcmVzcw0KPGJyPg0KQWxsIGNoZWNrcyBtdXN0IGJlIGRyYXduIGluIFUuUy4gZnVuZHMgZnJvbSBhIFUuUy4gYmFuay4NClBsZWFzZSBhdHRhY2ggYSBwcmludG91dCBvZiB0aGlzIHJlY2VpcHQgd2l0aCB5b3VyIGNoZWNrIGFuZA0Kd3JpdGUgZG93biB5b3VyIG9yZGVyIG51bWJlci4gIFlvdXIgb3JkZXIgd2lsbCBiZSBhcHByb3ZlZA0Kd2l0aGluIDggYnVzaW5lc3MgZGF5cyBhZnRlciB0aGUgZGF5IHdlIHJlY2VpdmUgeW91ciBjaGVjaywNCm9yIHdpdGhpbiAyIGJ1c2luZXNzIGRheXMgYWZ0ZXIgd2UgcmVjZWl2ZSBhIG1vbmV5IG9yZGVyIG9yDQpiYW5rIGRyYWZ0Lg0KPC9pbnAyOm1faWY+DQoNCg0KQmVsb3cgYXJlIHRoZSBkZXRhaWxzIG9mIHlvdXIgb3JkZXI6PGJyLz48YnIvPg0KDQpPcmRlciBDb250ZW50czo8YnIvPg0KPGhyLz4NCjxpbnAyOm9yZF9QcmludENhcnQgaXRlbV9yZW5kZXJfYXM9Im9yZGVyaXRlbV9lbGVtIiBoZWFkZXJfcmVuZGVyX2FzPSJodG1sOiIgZm9vdGVyX3JlbmRlcl9hcz0iaHRtbDoiIGVtcHR5X2NhcnRfcmVuZGVyX2FzPSJodG1sOiIgcGVyX3BhZ2U9Ii0xIi8+IA0KPGhyLz4NClN1YiBUb3RhbDogICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlN1YnRvdGFsV2l0aERpc2NvdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz48YnIvPg0KVGF4ZXM6ICAgICAgIDxpbnAyOm9yZF9GaWVsZCBuYW1lPSJWQVQiIGN1cnJlbmN5PSJzZWxlY3RlZCIvPjxici8+DQpUb3RhbDogICAgICAgPGlucDI6b3JkX0ZpZWxkIGZpZWxkPSJUb3RhbEFtb3VudCIgY3VycmVuY3k9InNlbGVjdGVkIi8+PGJyLz4NCg0KQmlsbGluZyBJbmZvcm1hdGlvbjoNCjxoci8+DQpBbW91bnQgQmlsbGVkOgk8aW5wMjpvcmRfRmllbGQgZmllbGQ9IlRvdGFsQW1vdW50IiBjdXJyZW5jeT0ic2VsZWN0ZWQiLz48YnIvPg0KPGlucDI6bV9pZiBjaGVjaz0ib3JkX1VzaW5nQ3JlZGl0Q2FyZCI+DQpQYXltZW50IFR5cGU6CTxpbnAyOm9yZF9GaWVsZCBuYW1lPSJQYXltZW50VHlwZSIgLz48YnIvPg0KQ3JlZGl0IENhcmQ6CTxpbnAyOm9yZF9GaWVsZCBuYW1lPSJQYXltZW50QWNjb3VudCIgbWFza2VkPSJtYXNrZWQiLz4NCjxpbnAyOm1fZWxzZSAvPg0KUGF5bWVudCBUeXBlOgk8aW5wMjpvcmRfRmllbGQgbmFtZT0iUGF5bWVudFR5cGUiIC8+DQo8L2lucDI6bV9pZj48YnIvPjxici8+DQoNCkNvbnRhY3QgSW5mb3JtYXRpb246PGJyLz4NCjxoci8+DQpOYW1lOiA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdUbyIvPjxici8+IA0KRS1tYWlsOgkJCTxpbnAyOm1faWYgY2hlY2s9Im9yZF9GaWVsZCIgbmFtZT0iQmlsbGluZ0VtYWlsIj4NCiAgPGEgaHJlZj0ibWFpbHRvOjxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0VtYWlsIi8+Ij48aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdFbWFpbCIvPjwvYT4NCjxpbnAyOm1fZWxzZSAvPg0KICA8YSBocmVmPSJtYWlsdG86PGlucDI6dV9GaWVsZCBmaWVsZD0iRW1haWwiLz4iPjxpbnAyOnVfRmllbGQgZmllbGQ9IkVtYWlsIi8+PC9hPg0KPC9pbnAyOm1faWY+PGJyLz4NCkNvbXBhbnkvT3JnYW5pemF0aW9uOiA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDb21wYW55Ii8+PGJyLz4NClBob25lOiAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1Bob25lIi8+PGJyLz4NCkZheDogICAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ0ZheCIvPjxici8+DQpBZGRyZXNzIExpbmUgMTogICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdBZGRyZXNzMSIvPjxici8+DQpBZGRyZXNzIExpbmUgMjogICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdBZGRyZXNzMiIvPjxici8+DQpDaXR5OiAgICAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDaXR5Ii8+PGJyLz4NClN0YXRlOiAgICAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1N0YXRlIi8+PGJyLz4NClpJUCBDb2RlOiAgICAgICAgIDxpbnAyOm9yZF9GaWVsZCBmaWVsZD0iQmlsbGluZ1ppcCIvPjxici8+DQpDb3VudHJ5OiAgICAgICAgICA8aW5wMjpvcmRfRmllbGQgZmllbGQ9IkJpbGxpbmdDb3VudHJ5Ii8+PGJyLz4=</EVENT>
<EVENT MessageType="html" Event="PRODUCT.SUGGEST" Type="0">U3ViamVjdDogWW91ciBGcmllbmQgcmVjb21tZW5kcyB0byBsb29rIGF0IHRoaXMgaXRlbQoKRGVhciA8aW5wMjptX3BhcmFtIG5hbWU9InRvX25hbWUiIC8+LDxici8+PGJyLz4NCg0KPGlucDI6bV9wYXJhbSBuYW1lPSJmcm9tX25hbWUiIC8+IHRoaW5rcyB0aGF0IHRoaXMgaXRlbSBpbiBvdXIgb25saW5lIHN0b3JlIG1pZ2h0IGJlIG9mIGludGVyZXN0IHRvIHlvdS4gPGlucDI6bV9wYXJhbSBuYW1lPSJmcm9tX25hbWUiIC8+IHdyaXRlczo8YnI+DQotLS0tPGJyPg0KPGJsb2NrcXVvdGU+DQo8aW5wMjptX3BhcmFtIG5hbWU9Im1lc3NhZ2VfdGV4dCIvPg0KPC9ibG9ja3F1b3RlPg0KLS0tLTxicj4NCjxicj4NClRvIHNlZSB0aGUgaXRlbSBkZXRhaWxzLCBwbGVhc2UgPGEgaHJlZj0iPGlucDI6cF9Qcm9kdWN0TGluayB0ZW1wbGF0ZT0iaW4tY29tbWVyY2UvcHJvZHVjdC9kZXRhaWxzIi8+Ij5jbGljayBoZXJlPC9hPi48YnI+DQo8YnI+DQpTaW5jZXJlbHksPGJyPg0KPGlucDI6Y29uZl9Db25maWdWYWx1ZSBuYW1lPSJTaXRlX05hbWUiLz4gb25saW5lIHN0b3JlIEFkbWluaXN0cmF0aW9uPGJyPg0KPGJyPg0KPHNwYW4gc3R5bGU9ImZvbnQtc2l6ZTogc21hbGw7IGNvbG9yOiAjNTU1Ij4NClRoaXMgZW1haWwgd2FzIGdlbmVyYXRlZCBiZWNhdXNlIHNvbWVvbmUgd2hvIGtub3dzIHlvdXIgZW1haWwgYWRkcmVzcyBoYXMgY2hvc2VuIHRvIG5vdGlmeSB5b3UgYWJvdXQgb25lIG9mIG91ciBwcm9kdWN0cy4gVGhpcyBpcyBhbiBhdXRvbWF0aWMgZmVhdHVyZSBvZiBvdXIgb25saW5lIHN0b3JlLiBZb3VyIGVtYWlsIGFkZHJlc3MgaGFzIG5vdCBiZWVuIHJlY29yZGVkLCBhbmQgeW91IGhhdmUgbm90IGJlZW4gc3Vic2NyaWJlZCB0byBhbnkgbWFpbGluZyBsaXN0cy4gV2UgYXBvbG9naXplIGZvciBhbnkgaW5jb252ZW5pZW5jZSB0aGlzIG1lc3NhZ2UgbWlnaHQgaGF2ZSBjYXVzZWQuDQo8L3NtYWxsPg==</EVENT>
<EVENT MessageType="html" Event="PRODUCT.SUGGEST" Type="1">U3ViamVjdDogT25lIG9mIHlvdXIgUHJvZHVjdHMgaGFzIGJlZW4gUmVjb21tZW5kZWQKCkEgcHJvZHVjdCBmcm9tIGhhcyBiZWVuIHN1Z2dlc3RlZC48YnIvPjxici8+DQoNClN1Z2dlc3RlZCBwcm9kdWN0IGRldGFpbHM6IDxhIGhyZWY9IjxpbnAyOnBfUHJvZHVjdExpbmsgdGVtcGxhdGU9Il9fZGVmYXVsdF9fIi8+Ij48aW5wMjpwX0ZpZWxkIG5hbWU9Ik5hbWUiLz48L2E+PGJyPg0K</EVENT>
<EVENT MessageType="html" Event="USER.GIFTCERTIFICATE" Type="0">U3ViamVjdDogWW91ciBHaWZ0IENlcnRpZmljYXRlCgpEZWFyIDxpbnAyOm1fcGFyYW0gbmFtZT0idG9fbmFtZSIvPiw8YnIvPjxici8+DQoNClBsZWFzZSBhY2NlcHQgdGhpcyBnaWZ0IGNlcnRpZmljYXRlIGZvciB0aGUgYW1vdW50IG9mIDxpbnAyOm1fcGFyYW0gbmFtZT0iYW1vdW50Ii8+IC48YnIvPjxici8+DQoNCkNlcnRpZmljYXRlIGNvZGUgaXM6IDxpbnAyOm1fcGFyYW0gbmFtZT0iZ2lmY2VydF9pZCIvPiBhbmQgY2FuIGJlIHVzZWQgZm9yIGFueSBwdXJjaGFzZSBvbiBvdXIgd2Vic2l0ZS48YnIvPjxici8+DQoNCjxpbnAyOm1faWYgY2hlY2s9Im1fcGFyYW0iIG5hbWU9Im1lc3NhZ2UiPg0KPGlucDI6bV9wYXJhbSBuYW1lPSJtZXNzYWdlIi8+PGJyLz4NCjwvaW5wMjptX2lmPg0KPGJyLz4NCg0KVGhhbmsgeW91IGZvciBzaG9wcGluZyB3aXRoIHVzIQ0KDQoNCg0KDQo=</EVENT>
<EVENT MessageType="html" Event="USER.GIFTCERTIFICATE" Type="1">U3ViamVjdDogR2lmdCBDZXJ0aWZpY2F0ZSAtIEVtYWlsIENvbmZpcm1hdGlvbgoKVGhpcyBpcyBhbiBlbWFpbCBjb25maXJtYXRpb24gdGhhdCBHaWZ0IENlcnRpZmljYXRlICI8aW5wMjptX3BhcmFtIG5hbWU9ImdpZmNlcnRfaWQiLz4iIGhhcyBiZWVuIHN1Y2Nlc3NmdWxseSBlbWFpbGVkIHRvIDxpbnAyOm1fcGFyYW0gbmFtZT0idG9fbmFtZSIvPiAoPGEgaHJlZj0ibWFpbHRvOjxpbnAyOm1fcGFyYW0gbmFtZT0idG9fZW1haWwiLz4iPjxpbnAyOm1fcGFyYW0gbmFtZT0idG9fZW1haWwiLz48L2E+KSAu</EVENT>
</EVENTS>
</LANGUAGE>
</LANGUAGES>
\ No newline at end of file
Index: branches/5.2.x/install/install_data.sql
===================================================================
--- branches/5.2.x/install/install_data.sql (revision 14568)
+++ branches/5.2.x/install/install_data.sql (revision 14569)
@@ -1,509 +1,473 @@
# Section "in-commerce:contacts":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_StoreName', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_StoreName', 'text', NULL, NULL, 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Name', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL, NULL, 10.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Phone', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Phone', 'text', NULL, NULL, 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Fax', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Fax', 'text', NULL, NULL, 10.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Email', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Email', 'text', NULL, NULL, 10.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Additional', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Additional', 'textarea', NULL, NULL, 10.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine1', 'text', NULL, NULL, 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, IsoCode AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 20.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, IsoCode AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 30.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1, NULL);
# Section "in-commerce:general":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RequireLoginBeforeCheckout', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_orders_RequireLogin', 'checkbox', NULL, NULL, 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Allow_Order_Different_Types', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_AllowOrderDifferentTypes', 'checkbox', NULL, NULL, 10.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Enable_Backordering', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_EnableBackordering', 'checkbox', NULL, NULL, 10.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Process_Backorders_Auto', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_ProcessBackorderingAuto', 'checkbox', NULL, NULL, 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Next_Order_Number', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_orders_NextOrderNumber', 'text', NULL, NULL, 10.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Order_Number_Format_P', '6', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_OrderMainNumberDigits', 'text', NULL, NULL, 10.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Order_Number_Format_S', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_OrderSecNumberDigits', 'text', NULL, NULL, 10.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RecurringChargeInverval', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_RecurringChargeInverval', 'text', NULL, NULL, 10.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AutoProcessRecurringOrders', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_AutoProcessRecurringOrders', 'checkbox', NULL, NULL, 10.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.1, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL, NULL, 10.11, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank||3=la_EuropeanCentralBank||1=la_BankOfLatvia', 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session||2=la_opt_PermanentCookie', 40.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary||2=la_opt_PriceCalculationByOptimal', 50, 0, 1, NULL);
# Section "in-commerce:output":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.01, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.02, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MinPopRating', '4', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MinPopRating', 'text', NULL, NULL, 10.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MinPopVotes', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MinPopVotes', 'text', NULL, NULL, 10.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.1, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.1, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 20.02, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 20.02, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_ItemTemplate', 'in-commerce/designs/detail', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 40.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_MaxImageCount', '5', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 50.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_ThumbnailImageWidth', '120', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 50.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_ThumbnailImageHeight', '120', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 50.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_FullImageWidth', '450', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_FullImageHeight', '450', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0, NULL);
# Section "in-commerce:search":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_ShowMultiple_products', '1', 'In-Commerce', 'in-commerce:search', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Keyword_products', '70', 'In-Commerce', 'in-commerce:search', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Pop_products', '10', 'In-Commerce', 'in-commerce:search', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Rating_products', '10', 'In-Commerce', 'in-commerce:search', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Increase_products', '30', 'In-Commerce', 'in-commerce:search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO Currencies VALUES (6, 'AFA', '', 0, 'la_AFA', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (7, 'ALL', '', 0, 'la_ALL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (8, 'DZD', '', 0, 'la_DZD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (9, 'ADP', '', 0, 'la_ADP', 1, 1124019233, 0, 0, 0);
INSERT INTO Currencies VALUES (10, 'AOA', '', 0, 'la_AOA', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (11, 'ARS', '', 0, 'la_ARS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (12, 'AMD', '', 0, 'la_AMD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (13, 'AWG', '', 0, 'la_AWG', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (14, 'AZM', '', 0, 'la_AZM', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (15, 'BSD', '', 0, 'la_BSD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (16, 'BHD', '', 0, 'la_BHD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (17, 'BDT', '', 0, 'la_BDT', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (18, 'BBD', '', 0, 'la_BBD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (19, 'BYR', '', 0, 'la_BYR', 0.46440677966102, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (20, 'BZD', '', 0, 'la_BZD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (21, 'BMD', '', 0, 'la_BMD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (22, 'BTN', '', 0, 'la_BTN', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (23, 'INR', '', 0, 'la_INR', 0.022962112514351, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (24, 'BOV', '', 0, 'la_BOV', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (25, 'BOB', '', 0, 'la_BOB', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (26, 'BAM', '', 0, 'la_BAM', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (27, 'BWP', '', 0, 'la_BWP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (28, 'BRL', '', 0, 'la_BRL', 0.42331625957753, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (29, 'BND', '', 0, 'la_BND', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (30, 'BGL', '', 0, 'la_BGL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (31, 'BGN', '', 0, 'la_BGN', 0.60754639807761, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (32, 'BIF', '', 0, 'la_BIF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (33, 'KHR', '', 0, 'la_KHR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (34, 'CAD', '', 0, 'la_CAD', 0.80579100834068, 1120657409, 0, 0, 0);
INSERT INTO Currencies VALUES (35, 'CVE', '', 0, 'la_CVE', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (36, 'KYD', '', 0, 'la_KYD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (37, 'XAF', '', 0, 'la_XAF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (38, 'CLF', '', 0, 'la_CLF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (39, 'CLP', '', 0, 'la_CLP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (40, 'CNY', '', 0, 'la_CNY', 0.12082358922217, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (41, 'COP', '', 0, 'la_COP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (42, 'KMF', '', 0, 'la_KMF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (43, 'CDF', '', 0, 'la_CDF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (44, 'CRC', '', 0, 'la_CRC', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (45, 'HRK', '', 0, 'la_HRK', 0.16222968545216, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (46, 'CUP', '', 0, 'la_CUP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (47, 'CYP', '', 0, 'la_CYP', 2.0723753051971, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (48, 'CZK', '', 0, 'la_CZK', 0.039512535745162, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (49, 'DKK', '', 0, 'la_DKK', 0.15944343065693, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (50, 'DJF', '', 0, 'la_DJF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (51, 'DOP', '', 0, 'la_DOP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (52, 'TPE', '', 0, 'la_TPE', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (53, 'ECV', '', 0, 'la_ECV', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (54, 'ECS', '', 0, 'la_ECS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (55, 'EGP', '', 0, 'la_EGP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (56, 'SVC', '', 0, 'la_SVC', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (57, 'ERN', '', 0, 'la_ERN', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (58, 'EEK', '', 0, 'la_EEK', 0.075946211956591, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (59, 'ETB', '', 0, 'la_ETB', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (60, 'FKP', '', 0, 'la_FKP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (61, 'FJD', '', 0, 'la_FJD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (62, 'GMD', '', 0, 'la_GMD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (63, 'GEL', '', 0, 'la_GEL', 1, 1124019233, 0, 0, 0);
INSERT INTO Currencies VALUES (64, 'GHC', '', 0, 'la_GHC', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (65, 'GIP', '', 0, 'la_GIP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (66, 'GTQ', '', 0, 'la_GTQ', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (67, 'GNF', '', 0, 'la_GNF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (68, 'GWP', '', 0, 'la_GWP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (69, 'GYD', '', 0, 'la_GYD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (70, 'HTG', '', 0, 'la_HTG', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (71, 'HNL', '', 0, 'la_HNL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (72, 'HKD', '', 0, 'la_HKD', 0.1286359158665, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (73, 'HUF', '', 0, 'la_HUF', 0.0048070388349515, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (74, 'ISK', '', 0, 'la_ISK', 0.015143366891806, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (75, 'IDR', '', 0, 'la_IDR', 0.00010126584435926, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (76, 'IRR', '', 0, 'la_IRR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (77, 'IQD', '', 0, 'la_IQD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (78, 'ILS', '', 0, 'la_ILS', 0.21864406779661, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (79, 'JMD', '', 0, 'la_JMD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (80, 'JPY', '', 0, 'la_JPY', 0.0089325716003909, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (81, 'JOD', '', 0, 'la_JOD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (82, 'KZT', '', 0, 'la_KZT', 7.3559322033898, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (83, 'KES', '', 0, 'la_KES', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (84, 'AUD', '', 0, 'la_AUD', 0.74088160109733, 1120650640, 1, 0, 0);
INSERT INTO Currencies VALUES (85, 'KPW', '', 0, 'la_KPW', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (86, 'KRW', '', 0, 'la_KRW', 0.00095066281590758, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (87, 'KWD', '', 0, 'la_KWD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (88, 'KGS', '', 0, 'la_KGS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (89, 'LAK', '', 0, 'la_LAK', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (90, 'LVL', '', 0, 'la_LVL', 1.7697169946847, 1124019016, 0, 0, 0);
INSERT INTO Currencies VALUES (91, 'LBP', '', 0, 'la_LBP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (92, 'LSL', '', 0, 'la_LSL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (93, 'LRD', '', 0, 'la_LRD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (94, 'LYD', '', 0, 'la_LYD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (95, 'CHF', '', 0, 'la_CHF', 0.76560788608981, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (96, 'LTL', '', 0, 'la_LTL', 0.34415546802595, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (97, 'MOP', '', 0, 'la_MOP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (98, 'MKD', '', 0, 'la_MKD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (99, 'MGF', '', 0, 'la_MGF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (100, 'MWK', '', 0, 'la_MWK', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (101, 'MYR', '', 0, 'la_MYR', 0.2631019594819, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (102, 'MVR', '', 0, 'la_MVR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (103, 'MTL', '', 0, 'la_MTL', 2.7679944095038, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (104, 'EUR', '&euro;&nbsp;', 0, 'la_EUR', 1.2319, 1124019016, 1, 0, 0);
INSERT INTO Currencies VALUES (105, 'MRO', '', 0, 'la_MRO', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (106, 'MUR', '', 0, 'la_MUR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (107, 'MXN', '', 0, 'la_MXN', 0.092980009298001, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (108, 'MXV', '', 0, 'la_MXV', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (109, 'MDL', '', 0, 'la_MDL', 0.079830508474576, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (110, 'MNT', '', 0, 'la_MNT', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (111, 'XCD', '', 0, 'la_XCD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (112, 'MZM', '', 0, 'la_MZM', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (113, 'MMK', '', 0, 'la_MMK', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (114, 'ZAR', '', 0, 'la_ZAR', 0.14487399875645, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (115, 'NAD', '', 0, 'la_NAD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (116, 'NPR', '', 0, 'la_NPR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (117, 'ANG', '', 0, 'la_ANG', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (118, 'XPF', '', 0, 'la_XPF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (119, 'NZD', '', 0, 'la_NZD', 0.67409802586794, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (120, 'NIO', '', 0, 'la_NIO', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (121, 'NGN', '', 0, 'la_NGN', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (122, 'NOK', '', 0, 'la_NOK', 0.15015163002274, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (123, 'OMR', '', 0, 'la_OMR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (124, 'PKR', '', 0, 'la_PKR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (125, 'PAB', '', 0, 'la_PAB', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (126, 'PGK', '', 0, 'la_PGK', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (127, 'PYG', '', 0, 'la_PYG', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (128, 'PEN', '', 0, 'la_PEN', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (129, 'PHP', '', 0, 'la_PHP', 0.017769769111138, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (130, 'PLN', '', 0, 'la_PLN', 0.29408270844161, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (131, 'USD', '$&nbsp;', 0, 'la_USD', 1, 1124019100, 1, 1, 0);
INSERT INTO Currencies VALUES (132, 'QAR', '', 0, 'la_QAR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (133, 'ROL', '', 0, 'la_ROL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (134, 'RUB', NULL, 0, 'la_RUB', 0.0347, 1123850285, 0, 0, 0);
INSERT INTO Currencies VALUES (136, 'RWF', '', 0, 'la_RWF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (137, 'SHP', '', 0, 'la_SHP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (138, 'WST', '', 0, 'la_WST', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (139, 'STD', '', 0, 'la_STD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (140, 'SAR', '', 0, 'la_SAR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (141, 'SCR', '', 0, 'la_SCR', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (142, 'SLL', '', 0, 'la_SLL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (143, 'SGD', '', 0, 'la_SGD', 0.58838383838384, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (144, 'SKK', '', 0, 'la_SKK', 0.031050431147113, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (145, 'SIT', '', 0, 'la_SIT', 0.0049628299365185, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (146, 'SBD', '', 0, 'la_SBD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (147, 'SOS', '', 0, 'la_SOS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (148, 'LKR', '', 0, 'la_LKR', 0.0099920063948841, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (149, 'SDD', '', 0, 'la_SDD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (150, 'SRG', '', 0, 'la_SRG', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (151, 'SZL', '', 0, 'la_SZL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (152, 'SEK', '', 0, 'la_SEK', 0.12594327624216, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (153, 'SYP', '', 0, 'la_SYP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (154, 'TWD', '', 0, 'la_TWD', 0.031298904538341, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (155, 'TJS', '', 0, 'la_TJS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (156, 'TZS', '', 0, 'la_TZS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (157, 'THB', '', 0, 'la_THB', 0.024061474911918, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (158, 'XOF', '', 0, 'la_XOF', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (159, 'NZD', '', 0, 'la_NZD', 0.67409802586794, 1120650640, 0, 0, 0);
INSERT INTO Currencies VALUES (160, 'TOP', '', 0, 'la_TOP', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (161, 'TTD', '', 0, 'la_TTD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (162, 'TND', '', 0, 'la_TND', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (163, 'TRL', '', 0, 'la_TRL', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (164, 'TMM', '', 0, 'la_TMM', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (165, 'UGX', '', 0, 'la_UGX', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (166, 'UAH', '', 0, 'la_UAH', 0.19830508474576, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (167, 'AED', '', 0, 'la_AED', 0.2728813559322, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (168, 'GBP', NULL, 0, 'la_GBP', 1.7543367535248, 1120657409, 1, 0, 0);
INSERT INTO Currencies VALUES (169, 'USS', '', 0, 'la_USS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (170, 'USN', '', 0, 'la_USN', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (171, 'UYU', '', 0, 'la_UYU', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (172, 'UZS', '', 0, 'la_UZS', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (173, 'VUV', '', 0, 'la_VUV', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (174, 'VEB', '', 0, 'la_VEB', 0.00046628741956542, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (175, 'VND', '', 0, 'la_VND', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (176, 'MAD', '', 0, 'la_MAD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (177, 'YER', '', 0, 'la_YER', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (178, 'YUM', '', 0, 'la_YUM', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (179, 'ZMK', '', 0, 'la_ZMK', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (180, 'ZWD', '', 0, 'la_ZWD', 1, 1120641028, 0, 0, 0);
INSERT INTO Currencies VALUES (181, 'AFN', '', 0, 'la_AFN', 0.02, 1120641028, 0, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 11, 'Features', 'la_Features', 1, 'la_Text_CustomFields', 'la_Features', 'textarea', 'rows="5" cols="70"', '', 0, 1, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 11, 'Availability', 'la_Availability', 1, 'la_Text_CustomFields', 'la_Availability', 'text', 'size="70"', '', 0, 1, 0, 0);
INSERT INTO CustomField VALUES (DEFAULT, 1, 'p_ItemTemplate', 'la_fld_cust_p_ItemTemplate', 0, 'la_title_SystemCF', 'la_fld_cust_p_ItemTemplate', 'text', NULL, '', 0, 0, 1, 0);
INSERT INTO CustomField VALUES (DEFAULT, 6, 'shipping_addr_block', 'la_fld_BlockShippingAddress', 0, 'la_section_StoreSettings', 'la_fld_BlockShippingAddress', 'checkbox', '1=+Block', '', 0, 1, 1, 0);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, 'In-Commerce', 'Order Submitted', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, 'In-Commerce', 'Order Submitted', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.APPROVE', NULL, 1, 0, 'In-Commerce', 'Order Approved', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.DENY', NULL, 1, 0, 'In-Commerce', 'Order Denied', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.SHIP', NULL, 1, 0, 'In-Commerce', 'Order Shipped', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, 'In-Commerce', 'Backorder Added', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, 'In-Commerce', 'Backorder Added', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.FULLFILL', NULL, 1, 0, 'In-Commerce', 'Back-order is Fulfilled', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'BACKORDER.PROCESS', NULL, 1, 0, 'In-Commerce', 'Backorder Processed', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 0, 'In-Commerce', 'Suggest product to a friend', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 1, 'In-Commerce', 'Suggest product to a friend', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, 'In-Commerce', 'Affiliate registered', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, 'In-Commerce', 'Affiliate registered', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, 'In-Commerce', 'Affiliate payment issued', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, 'In-Commerce', 'Affiliate payment issued', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 1, 0, 'In-Commerce', 'Affiliate registration approved', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 0, 0, 'In-Commerce', 'Affiliate registration approved', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 1, 0, 'In-Commerce', 'Affiliate registration denied', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 0, 0, 'In-Commerce', 'Affiliate registration denied', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, 'In-Commerce', 'Affiliate payment type changed', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, 'In-Commerce', 'Affiliate payment type changed', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Processed', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Processed', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Denied', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, 'In-Commerce', 'Recurring Order Denied', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, 'In-Commerce', 'Gift Certificate', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, 'In-Commerce', 'Gift Certificate', 1, 1, 1);
INSERT INTO GatewayConfigFields VALUES (1, 'submit_url', 'Gateway URL', 'text', '', 2);
INSERT INTO GatewayConfigFields VALUES (2, 'user_account', 'Authorize.net User Name', 'text', '', 2);
INSERT INTO GatewayConfigFields VALUES (4, 'transaction_key', 'Authorize.net Transaction Key', 'text', '', 2);
INSERT INTO GatewayConfigFields VALUES (9, 'business_account', 'Username', 'text', '', 4);
INSERT INTO GatewayConfigFields VALUES (10, 'submit_url', 'Gateway URL', 'text', '', 4);
INSERT INTO GatewayConfigFields VALUES (11, 'currency_code', 'Payment Currency Code', 'text', '', 4);
INSERT INTO GatewayConfigFields VALUES (12, 'shipping_control', 'Shipping Control', 'select', '3=la_CreditDirect,4=la_CreditPreAuthorize', 2);
INSERT INTO GatewayConfigFields VALUES (13, 'encapsulate_char', 'Encapsulate Char', 'text', '', 2);
INSERT INTO GatewayConfigFields VALUES (14, 'shipping_control', 'Shipping Control', 'select', '3=la_CreditDirect,4=la_CreditPreAuthorize', 4);
INSERT INTO GatewayConfigValues VALUES (36, 12, 3, '4');
INSERT INTO GatewayConfigValues VALUES (35, 1, 3, 'https://secure.authorize.net/gateway/transact.dll');
INSERT INTO GatewayConfigValues VALUES (34, 2, 3, '');
INSERT INTO GatewayConfigValues VALUES (33, 4, 3, '');
INSERT INTO GatewayConfigValues VALUES (32, 9, 4, '');
INSERT INTO GatewayConfigValues VALUES (31, 10, 4, 'https://www.paypal.com/cgi-bin/webscr');
INSERT INTO GatewayConfigValues VALUES (37, 11, 4, 'USD');
INSERT INTO GatewayConfigValues VALUES (38, 13, 3, '|');
INSERT INTO GatewayConfigValues VALUES (39, 14, 4, '4');
INSERT INTO Gateways VALUES (1, 'None', 'kGWBase', 'gw_base.php', 0);
INSERT INTO Gateways VALUES (2, 'Credit Card (Authorize.Net)', 'kGWAuthorizeNet', 'authorizenet.php', 1);
INSERT INTO Gateways VALUES (3, 'Credit Card (Manual Processing)', 'kGWBase', 'gw_base.php', 1);
INSERT INTO Gateways VALUES (4, 'PayPal', 'kGWPayPal', 'paypal.php', 0);
INSERT INTO ItemTypes VALUES (11, 'In-Commerce', 'p', 'Products', 'Name', 'CreatedById', NULL, NULL, '', 0, '', 'ProductsItem', 'Product');
INSERT INTO ItemTypes VALUES (13, 'In-Commerce', 'ord', 'Orders', 'OrderNumber', '', NULL, NULL, '', 0, '', 'OrdersItem', 'Order');
INSERT INTO PaymentTypes VALUES (1, 'Credit Card (manual)', 'Credit Card', 'Please enter your credit card details.', NULL, 1, 0, 1, 1, 3, DEFAULT, DEFAULT, ',15,');
INSERT INTO PaymentTypes VALUES (4, 'PayPal', 'PayPal', 'You will be redirected to PayPal site to make the payment after confirming your order on the next checkout step.', NULL, 0, 0, 0, 1, 4, DEFAULT, DEFAULT, ',15,');
INSERT INTO PaymentTypes VALUES (2, 'Check/MO', 'Check or Money Order', NULL, NULL, 0, 0, 0, 1, 1, 1, DEFAULT, ',15,');
INSERT INTO PaymentTypes VALUES (3, 'Authorize.Net', 'Credit Card', 'Please enter your Credit Card details below. Your credit card will not be charged until you confirm your purchase on the next(last) step of checkout process.', NULL, 0, 0, 0, 1, 2, DEFAULT, DEFAULT, ',15,');
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 4, 131);
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 2, 131);
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 3, 131);
INSERT INTO PaymentTypeCurrencies VALUES (DEFAULT, 1, 131);
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.RATE', 'la_PermName_Product.Rate_desc', 'la_PermName_Product.Rate_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW', 'la_PermName_Product.Review_desc', 'la_PermName_Product.Review_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 'la_PermName_Product.Review_Pending_desc', ' la_PermName_Product.Review_Pending_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.ADD', 'la_PermName_Product.Add_desc', 'la_PermName_Product.Add_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.DELETE', 'la_PermName_Product.Delete_desc', 'la_PermName_Product.Delete_error', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.MODIFY', 'la_PermName_Product.Modify_desc', 'la_PermName_Product.Modify_desc', 'In-Commerce');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.VIEW', 'la_PermName_Product.View_desc', 'la_PermName_Product.View_error', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.RATE', 'la_PermName_Product.Rate_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW', 'la_PermName_Product.Review_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 'la_PermName_Product.Review_Pending_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.ADD', 'la_PermName_Product.Add_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.DELETE', 'la_PermName_Product.Delete_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.MODIFY', 'la_PermName_Product.Modify_desc', 'In-Commerce');
+INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.VIEW', 'la_PermName_Product.View_desc', 'In-Commerce');
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 14, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.RATE', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.REVIEW', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 13, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 12, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.ADD', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.DELETE', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.MODIFY', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 11, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:products.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:deny', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:archive', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:place', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:process', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:ship', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:orders.advanced:reset_to_pending', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:discounts.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:coupons.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:manufacturers.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:move_up', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:move_down', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:update_rate', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:currencies.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:shipping_quote_engines.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:payment_types.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:taxes.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliates.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_plans.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_up', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:affiliate_payment_types.advanced:move_down', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:general.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:output.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:search.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:contacts.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:configuration_custom.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:paymentlog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:downloadlog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:downloadlog.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:gift-certificates.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:reports.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:reports.add', 11, 1, 1, 0);
INSERT INTO SearchConfig VALUES ('Products', 'OrgId', 0, 0, 'lu_fielddesc_prod_orgid', 'lu_field_orgid', 'In-Commerce', 'la_Text_Products', 19, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'NewItem', 0, 1, 'lu_fielddesc_prod_newitem', 'lu_field_newproduct', 'In-Commerce', 'la_Text_Products', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'PopItem', 0, 1, 'lu_fielddesc_prod_popitem', 'lu_field_popproduct', 'In-Commerce', 'la_Text_Products', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'HotItem', 0, 1, 'lu_fielddesc_prod_topseller', 'lu_field_topseller', 'In-Commerce', 'la_Text_Products', 16, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'EditorsPick', 0, 1, 'lu_fielddesc_prod_editorspick', 'lu_field_editorspick', 'In-Commerce', 'la_Text_Products', 14, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'CachedReviewsQty', 0, 0, 'lu_fielddesc_prod_cachedreviewsqty', 'lu_field_cachedreviewsqty', 'In-Commerce', 'la_Text_Products', 9, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'CachedVotesQty', 0, 0, 'lu_fielddesc_prod_cachedvotesqty', 'lu_field_cachedvotesqty', 'In-Commerce', 'la_Text_Products', 8, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'ProductId', 0, 0, 'lu_fielddesc_prod_productid', 'lu_field_productid', 'In-Commerce', 'la_Text_Products', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'Name', 1, 1, 'lu_fielddesc_prod_producttitle', 'lu_field_producttitle', 'In-Commerce', 'la_Text_Products', 1, DEFAULT, 3, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'Description', 1, 1, 'lu_fielddesc_prod_description', 'lu_field_description', 'In-Commerce', 'la_Text_Products', 2, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'CreatedOn', 0, 1, 'lu_fielddesc_prod_createdon', 'lu_field_createdon', 'In-Commerce', 'la_Text_Products', 4, DEFAULT, 0, 'date', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'Modified', 0, 1, 'lu_fielddesc_prod_modified', 'lu_field_modified', 'In-Commerce', 'la_Text_Products', 5, DEFAULT, 0, 'date', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'Hits', 0, 1, 'lu_fielddesc_prod_qtysold', 'lu_field_qtysold', 'In-Commerce', 'la_Text_Products', 6, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'CachedRating', 0, 0, 'lu_fielddesc_prod_cachedrating', 'lu_field_cachedrating', 'In-Commerce', 'la_Text_Products', 7, DEFAULT, 0, 'range', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('CustomField', 'Features', 1, 0, 'la_Features', 'la_Features', 'In-Commerce', 'la_Text_CustomFields', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'SKU', 1, 1, 'lu_fielddesc_prod_sku', 'lu_field_sku', 'In-Commerce', 'la_Text_Products', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'DescriptionExcerpt', 1, 0, 'lu_fielddesc_prod_descriptionex', 'lu_field_descriptionex', 'In-Commerce', 'la_Text_Products', 2, DEFAULT, 1, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'ManufacturerId', 1, 1, 'lu_fielddesc_prod_manufacturer', 'lu_field_manufacturer', 'In-Commerce', 'la_Text_Products', 3, DEFAULT, 2, 'text', 'Manufacturers.Name', '{ForeignTable}.ManufacturerId={LocalTable}.ManufacturerId', NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Products', 'Price', 1, 1, 'lu_fielddesc_prod_price', 'lu_field_price', 'In-Commerce', 'la_Text_Products', 23, DEFAULT, 2, 'range', 'CALC:MIN( IF({PREFIX}ProductsDiscounts.Type = 1, {PREFIX}ProductsPricing.Price - {PREFIX}ProductsDiscounts.Amount, IF({PREFIX}ProductsDiscounts.Type = 2, ({PREFIX}ProductsPricing.Price * (1-{PREFIX}ProductsDiscounts.Amount/100)), {PREFIX}ProductsPricing.Price ) ) )', '{PREFIX}ProductsPricing ON {PREFIX}ProductsPricing.ProductId = {PREFIX}Products.ProductId AND {PREFIX}ProductsPricing.IsPrimary = 1 LEFT JOIN {PREFIX}ProductsDiscountItems ON {PREFIX}ProductsDiscountItems.ItemResourceId = {PREFIX}Products.ResourceId LEFT JOIN {PREFIX}ProductsDiscounts ON {PREFIX}ProductsDiscounts.DiscountId = {PREFIX}ProductsDiscountItems.DiscountId AND {PREFIX}ProductsDiscounts.Status = 1 AND {PREFIX}ProductsDiscountItems.ItemType = 1 AND ( {PREFIX}ProductsDiscounts.GroupId IN ({USER_GROUPS},NULL) AND ( ({PREFIX}ProductsDiscounts.Start IS NULL OR {PREFIX}ProductsDiscounts.Start < UNIX_TIMESTAMP()) AND ({PREFIX}ProductsDiscounts.Start IS NULL OR {PREFIX}ProductsDiscounts.End > UNIX_TIMESTAMP()) ) )', NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('CustomField', 'Availability', 0, 0, 'la_Availability', 'la_Availability', 'In-Commerce', 'la_Text_CustomFields', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO ShippingQuoteEngines VALUES (1, 'Intershipper.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";N;s:15:"AccountPassword";s:0:"";s:10:"UPSEnabled";i:1;s:10:"UPSAccount";N;s:11:"UPSInvoiced";N;s:10:"FDXEnabled";i:1;s:10:"FDXAccount";N;s:10:"DHLEnabled";i:1;s:10:"DHLAccount";N;s:11:"DHLInvoiced";i:0;s:10:"USPEnabled";i:1;s:10:"USPAccount";N;s:11:"USPInvoiced";i:0;s:10:"ARBEnabled";i:1;s:10:"ARBAccount";N;s:11:"ARBInvoiced";N;s:10:"1DYEnabled";i:1;s:10:"2DYEnabled";i:1;s:10:"3DYEnabled";i:1;s:10:"GNDEnabled";i:1;s:10:"ShipMethod";s:3:"DRP";}', 'Intershipper');
INSERT INTO ShippingQuoteEngines VALUES ( DEFAULT, 'USPS.com', 0, 0, 0, 'a:21:{s:12:"AccountLogin";s:0:"";s:15:"AccountPassword";N;s:10:"UPSEnabled";N;s:10:"UPSAccount";s:0:"";s:11:"UPSInvoiced";N;s:10:"FDXEnabled";N;s:10:"FDXAccount";s:0:"";s:10:"DHLEnabled";N;s:10:"DHLAccount";s:0:"";s:11:"DHLInvoiced";N;s:10:"USPEnabled";N;s:10:"USPAccount";s:0:"";s:11:"USPInvoiced";N;s:10:"ARBEnabled";N;s:10:"ARBAccount";s:0:"";s:11:"ARBInvoiced";N;s:10:"1DYEnabled";N;s:10:"2DYEnabled";N;s:10:"3DYEnabled";N;s:10:"GNDEnabled";N;s:10:"ShipMethod";N;}', 'USPS' ) ;
-INSERT INTO StylesheetSelectors VALUES (27, 1, 'Block Header', 'td.block-header', 'a:6:{s:5:"color";s:7:"#FFFFFF";s:9:"font-size";s:4:"14px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#80B0C7";s:6:"border";s:4:"none";s:7:"padding";s:3:"5px";}', 'Block Header', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (167, 1, 'Calendar''s selected days', '.calendar tbody .selected', 'a:0:{}', '', 1, 'font-weight: bold;\r\nbackground-color: #9ED7ED;\r\nborder: 1px solid #83B2C5;', 0);
-INSERT INTO StylesheetSelectors VALUES (39, 1, 'Main Left Column', '.main-column-left', 'a:1:{s:11:"padding-top";s:4:"10px";}', 'Main Left Column', 1, 'width:200px;', 0);
-INSERT INTO StylesheetSelectors VALUES (90, 1, 'Toolbar Bottom', 'td.toolbar-bottom', 'a:0:{}', 'Bottom toolbar ', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (166, 1, 'Calendar''s weekends', '.calendar .weekend', 'a:0:{}', '', 1, 'color: #990000;', 0);
-INSERT INTO StylesheetSelectors VALUES (29, 1, 'Featured Item Block Header', '.featured-block-header', 'a:0:{}', 'Featured Item Block Header', 2, '', 27);
-INSERT INTO StylesheetSelectors VALUES (36, 1, 'Actions Block header', '.actions-block-header', 'a:2:{s:5:"color";s:7:"#0200AF";s:16:"background-color";s:7:"#89E867";}', 'Actions block appears on the inner pages like product details', 2, '', 27);
-INSERT INTO StylesheetSelectors VALUES (28, 1, 'Categories Block Header', '.categories-block-header', 'a:0:{}', 'Categories Block Header', 2, '', 27);
-INSERT INTO StylesheetSelectors VALUES (150, 1, 'Editors Pick Block', '.pick-products-block', 'a:0:{}', 'Editor Picks Block', 2, '', 30);
-INSERT INTO StylesheetSelectors VALUES (149, 1, 'New Products Block Header', '.new-products-block-header', 'a:2:{s:16:"background-color";s:7:"#23BC06";s:6:"border";s:14:"1px solid #aaa";}', 'New Products Block Header', 2, '', 27);
-INSERT INTO StylesheetSelectors VALUES (152, 1, 'Toolbar Link', 'a.toolbar', 'a:2:{s:5:"color";s:7:"#003399";s:15:"text-decoration";s:9:"underline";}', 'Toolbar Link', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (168, 1, 'Calendar''s highlighted day', '.calendar tbody .hilite', 'a:0:{}', '', 1, 'background-color: #f6f6f6;\r\nborder: 1px solid #83B2C5 !important;', 0);
-INSERT INTO StylesheetSelectors VALUES (162, 1, 'Calendar''s top and bottom titles', '.calendar .title', 'a:0:{}', '', 1, 'color: #00309C;\r\nbackground-color: #98CEE4;\r\nborder: 1px solid #83B2C5;\r\nborder-top: 0px;\r\npadding: 1px;', 0);
-INSERT INTO StylesheetSelectors VALUES (163, 1, 'Calendar''s control buttons', '.calendar .calendar_button', 'a:0:{}', '', 1, 'color: black;\r\nfont-size: 12px;\r\nbackground-color: #eeeeee;', 0);
-INSERT INTO StylesheetSelectors VALUES (30, 1, 'Block without a border', '.block-no-border', 'a:2:{s:6:"border";s:4:"none";s:13:"margin-bottom";s:4:"10px";}', 'Block without a border', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (164, 1, 'Calendar''s day names', '.calendar thead .name', 'a:0:{}', '', 1, 'background-color: #DEEEF6;\r\nborder-bottom: 1px solid #000000;', 0);
-INSERT INTO StylesheetSelectors VALUES (165, 1, 'Calendar''s days', '.calendar tbody .day', 'a:0:{}', '', 1, 'text-align: right;\r\npadding: 2px 4px 2px 2px;\r\nwidth: 2em;\r\nborder: 1px solid #fefefe;', 0);
-INSERT INTO StylesheetSelectors VALUES (154, 1, 'Category Link', 'a.subcat', 'a:3:{s:5:"color";s:7:"#003399";s:11:"font-weight";s:4:"bold";s:15:"text-decoration";s:9:"underline";}', 'Category Link', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (40, 1, 'Main Center Column', '.main-column-center', 'a:1:{s:11:"padding-top";s:4:"10px";}', 'Main Center Column', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (37, 1, 'Actions Block', '.actions-block', 'a:0:{}', '', 2, '', 34);
-INSERT INTO StylesheetSelectors VALUES (151, 1, 'Editor Picks Block Header', '.pick-products-block-header', 'a:3:{s:5:"color";s:7:"#34871F";s:16:"background-color";s:7:"#89E867";s:6:"border";s:14:"1px solid #aaa";}', 'Editor Picks Block Header', 2, '', 27);
-INSERT INTO StylesheetSelectors VALUES (38, 1, 'Categories Block', '.categories-block', 'a:0:{}', '', 2, '', 34);
-INSERT INTO StylesheetSelectors VALUES (32, 1, 'Button', '.button', 'a:7:{s:4:"font";s:37:"Verdana, Arial, Helvetica, sans-serif";s:5:"color";s:7:"#003399";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#99CCFF";s:6:"border";s:17:"1px solid #FFFFFF";s:7:"padding";s:15:"1px 4px 1px 4px";s:5:"width";s:4:"auto";}', 'Button class used in all templates', 1, 'border-bottom-color: #003399;\r\nborder-right-color: #003399;\r\noverflow: visible;', 0);
-INSERT INTO StylesheetSelectors VALUES (34, 1, 'Block with border (side block)', '.block', 'a:3:{s:16:"background-color";s:7:"#FFFFFF";s:6:"border";s:17:"1px solid #999999";s:13:"margin-bottom";s:4:"10px";}', 'Block with border (side block)', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (153, 1, 'Toolbar Link Mouseover (hover)', 'a.toolbar:hover', 'a:1:{s:5:"color";s:7:"#FFFFFF";}', 'Toolbar Link Mouseover (hover)', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (41, 1, 'Main Right Column', '.main-column-right', 'a:1:{s:11:"padding-top";s:4:"10px";}', 'Main Right Column', 1, 'width:210px;', 0);
-INSERT INTO StylesheetSelectors VALUES (156, 1, 'Category Link Mouseover (hover)', 'a.subcat:hover', 'a:1:{s:5:"color";s:7:"#2FEF0E";}', 'Category Link Mouseover (hover)', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (148, 1, 'New Products Block', '.new-products-block', 'a:0:{}', 'New Products Block', 2, '', 30);
-INSERT INTO StylesheetSelectors VALUES (157, 1, 'Link', 'a', 'a:2:{s:5:"color";s:7:"#003399";s:15:"text-decoration";s:9:"underline";}', 'Link', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (33, 1, 'Page Body', 'body', 'a:3:{s:9:"font-size";s:5:"small";s:16:"background-color";s:7:"#FFFFFF";s:6:"margin";s:4:"15px";}', 'Page Body', 1, 'width: auto;', 0);
-INSERT INTO StylesheetSelectors VALUES (158, 1, 'Link Mouseover (hover)', 'a:hover', 'a:1:{s:5:"color";s:7:"#2FEF0E";}', 'Link Mouseover (hover)', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (35, 1, 'Toolbar Top', 'td.toolbar', 'a:8:{s:5:"color";s:7:"#3C7D9B";s:9:"font-size";s:5:"small";s:10:"background";s:41:"url(incommerce/bg1.gif) repeat-x left top";s:16:"background-color";s:7:"#99CCFF";s:10:"margin-top";s:3:"7px";s:12:"margin-right";s:4:"20px";s:13:"margin-bottom";s:3:"7px";s:11:"margin-left";s:4:"20px";}', 'Top toolbar', 1, '', 0);
-INSERT INTO StylesheetSelectors VALUES (31, 1, 'Featured Item Block', '.featured-block', 'a:0:{}', 'Featured Item Block', 2, '', 30);
-
-INSERT INTO Stylesheets VALUES (1, 'OnlineStore', 'This is default stylesheet supplied with OnlineStore theme', '.my_selector {\r\n background-color: #000000;\r\n}', 1124387197, 1);
-
DELETE FROM Cache WHERE VarName = 'config_files';
INSERT INTO ImportScripts VALUES (DEFAULT, 'Products from CSV file [In-Commerce]', '', 'p', 'In-Commerce', '', 'CSV', '1');
INSERT INTO Modules VALUES ('In-Commerce', 'modules/in-commerce/', 'p', DEFAULT, 1, 4, 'in-commerce/', 2, NULL);
Index: branches/5.2.x
===================================================================
--- branches/5.2.x (revision 14568)
+++ branches/5.2.x (revision 14569)
Property changes on: branches/5.2.x
___________________________________________________________________
Modified: svn:mergeinfo
## -0,0 +0,2 ##
Merged /w/in-commerce/releases/5.1.2:r14312-14568
Merged /w/in-commerce/branches/5.1.x:r14076-14311

Event Timeline