Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Mon, Feb 10, 11:41 PM

in-commerce

Index: branches/5.1.x/units/manufacturers/manufacturers_config.php
===================================================================
--- branches/5.1.x/units/manufacturers/manufacturers_config.php (revision 13146)
+++ branches/5.1.x/units/manufacturers/manufacturers_config.php (revision 13147)
@@ -1,144 +1,147 @@
<?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,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'manuf',
'HookToSpecial' => '',
'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnPrepareStates',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'ManufacturerId',
'StatusField' => Array(),
'TableName' => TABLE_PREFIX.'Manufacturers',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('manuf'=>'!la_title_AddingManufacturer!'),
'edit_status_labels' => Array('manuf'=>'!la_title_EditingManufacturer!'),
'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturers!'),
),
'manuf_list'=>Array( 'prefixes' => Array('manuf_List'),
'format' => "!la_title_Manufacturers!",
),
'manuf_edit'=>Array( 'prefixes' => Array('manuf'),
'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturer!'),
'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!",
),
),
'PermSection' => Array('main' => 'in-commerce:manufacturers'),
'Sections' => Array(
'in-commerce:manufacturers' => Array(
'parent' => 'in-commerce',
'icon' => '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,
'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),
+ 'State' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array(),
+ 'default' => null
+ ),
'Zip' => Array('type' => 'string', 'default' => null),
- 'Country' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType=1
- AND
- LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation', 'default' => null),
+ 'Country' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE DestType = 1
+ ORDER BY l%2$s_Translation',
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', 'default' => null
+ ),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
'module' => 'core',
),
'Fields' => Array (
'ManufacturerId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Name' => Array ('title' => 'la_col_ManufacturerName', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'IsPopular' => Array ('title' => 'la_col_IsPopular', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'URL' => Array ('title' => 'la_col_URL', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Manufacturers',
'ShortListPerPage' => 'Comm_Perpage_Manufacturers_Short',
),
);
\ No newline at end of file
Index: branches/5.1.x/units/taxes/taxes_tag_processor.php
===================================================================
--- branches/5.1.x/units/taxes/taxes_tag_processor.php (revision 13146)
+++ branches/5.1.x/units/taxes/taxes_tag_processor.php (revision 13147)
@@ -1,489 +1,471 @@
<?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 TaxesTagProcessor extends kDBTagProcessor
{
/*
function ShowDestinations($param)
{
$zone =& $this->Application->recallObject('tax');
$zone->SetDBField('TaxZoneId', $zone->ID);
$destination =& $this->Application->recallObject('taxdst');
if(!$this->Application->GetVar('loaded'))
{
if ($zone->GetID() == 0)
{
$this->Application->DeleteVar('taxdst');
}
else
{
$sql = 'SELECT * FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
$res = $this->Conn->Query($sql);
if (is_array($res)) foreach ($res as $dest_record)
{
$temp[$dest_record['TaxZoneDestId']]['TaxZoneDestId'] = $dest_record['TaxZoneDestId'];
$temp[$dest_record['TaxZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
$temp[$dest_record['TaxZoneDestId']]['DestValue'] = $dest_record['DestValue'];
}
$this->Application->SetVar('taxdst', $temp);
}
}
$destination =& $this->Application->recallObject('taxdst');
$hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('TaxZoneId').'">';
switch ( $zone->GetDBField('Type') )
{
case 1:
$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
$res = $this->Conn->Query($sql, 'DestId');
$dropdown = '<select name="country">'."\n";
foreach ($res as $record)
{
$dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$dropdown .= '</select>'."\n";
$form_params = Array();
$form_params['dropdown'] = $dropdown;
$form_params['block'] = $param['block'];
$form_params['res'] = $res;
$ret = $this->ShowDestionationForm($form_params);
break;
case 2:
$country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
'.TABLE_PREFIX.'StdDestinations d2
WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
GROUP BY d1.DestId';
if( !($current_country = $this->Application->GetVar('StatesCountry')) )
{
$current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
LEFT JOIN '.$destination->TableName.' zd
ON zd.StdDestId = sd.DestId
WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
if($zone->GetDBField('TaxZoneId'))
{
$current_country = $this->Conn->GetOne($current_country_sql);
}
if(!$current_country)
{
$current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
$current_country = $this->Conn->GetOne($current_country_sql);
}
}
$states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
$countries = $this->Conn->Query($country_sql, 'DestId');
$states = $this->Conn->Query($states_sql, 'DestId');
if($countries)
{
$countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
foreach ($countries as $record)
{
$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
if($record['DestId'] == $current_country)
{
$countries_dropdown .= 'selected';
}
$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$countries_dropdown .= '</select>'."\n";
}
if($states)
{
$states_dropdown = '<select name="state">'."\n";
foreach ($states as $id => $record)
{
$states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$states_dropdown .= '</select>'."\n";
}
$form_params = Array();
$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
$table .= '<tr><td>'.$this->Application->Phrase('la_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
$form_params['dropdown'] = $table;
$form_params['block'] = $param['block'];
$form_params['res'] = $states;
$ret = $this->ShowDestionationForm($form_params);
break;
case 3:
if( !($current_country = $this->Application->GetVar('StatesCountry')) )
{
$current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
LEFT JOIN '.$destination->TableName.' zd
ON zd.StdDestId = sd.DestId
WHERE sd.DestType=2 AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId');
if($zone->GetDBField('TaxZoneId'))
{
$current_country = $this->Conn->GetOne($current_country_sql);
}
if(!$current_country)
{
$current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.' WHERE TaxZoneId='.$zone->GetID();
$current_country = $this->Conn->GetOne($current_country_sql);
}
if(!$current_country)
{
$current_country_sql = 'SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
$current_country = $this->Conn->GetOne($current_country_sql);
}
}
$country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1
WHERE d1.DestType=1
GROUP BY d1.DestId';
$countries = $this->Conn->Query($country_sql, 'DestId');
if($countries)
{
$countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'tax\', \'OnCountryChange\')">'."\n";
foreach ($countries as $record)
{
print "<br>";
$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
if($record['DestId'] == $current_country)
{
$countries_dropdown .= 'selected';
}
$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$countries_dropdown .= '</select>'."\n";
}
$sql = 'SELECT DestValue FROM '.$this->Application->getUnitOption('taxdst', 'TableName').' WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
$res = array_unique( $this->Conn->GetCol($sql) );
$dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
if($res)
{
$dropdown .= ' or <select name="zip_dropdown">'."\n";
$dropdown .= '<option value=""></option>';
foreach ($res as $record)
{
$dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
}
$dropdown .= '</select>'."\n";
}
$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
$table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
$form_params = Array();
$form_params['dropdown'] = $table;
$form_params['block'] = $param['block'];
$form_params['res'] = $res;
$ret = $this->ShowDestionationForm($form_params);
break;
default:
}
$ret .= $hidden_clause;
return $ret;
}
*/
/*
function ShowDestionationForm($param)
{
$add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'tax\', \'OnAddLocation\')">';
$main_processor =& $this->Application->RecallObject('m_TagProcessor');
$oddevenparam['odd'] = 'table-color1';
$oddevenparam['even'] = 'table-color2';
$ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
$dest_list = $this->Application->GetVar('taxdst');
if (is_array($dest_list))
{
if (sizeof($dest_list)>0){
$ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td>&nbsp;</td><td>';
$ret .= '<select multiple name="location_list" onchange="SelectToString(this)">';
$hidden = '';
foreach ($dest_list as $id => $destination)
{
$params = $destination;
$params['id'] = $id;
$hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][TaxZoneDestId]" value="'.$destination['TaxZoneDestId'].'">';
if($destination['StdDestId'] && !$destination['DestValue'])
{
$params['destination_title'] = $param['res'][$destination['StdDestId']]['DestName'];
$hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" name="taxdst['.$destination['TaxZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
}
else
{
$params['destination_title'] = $destination['DestValue'];
$hidden .= '<input type="hidden" id="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" name="taxdst['.$destination['TaxZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
}
$params['name'] = $param['block'];
$ret .= $main_processor->ParseBlock($params);
}
$ret .= '</select>';
$ret .= '</td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['TaxZoneDestId'].')">';
$ret .= $hidden;
$ret .= "&nbsp;</td></tr>";
}else{
}
}
// <input type="hidden" id="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" name="taxdst[<inp:m_param name="id"/>][TaxZoneDestId]" value="<inp:m_param name="id"/>">
return $ret;
}
*/
function ShowCountries($param){
$param = $this->prepareTagParams($param);
$param['name'] = $param['block'];
$destination = &$this->Application->recallObject('taxdst');
$zone = &$this->Application->recallObject('tax');
switch ($param['show']){
case 'current':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1 AND zd.TaxZoneId = '.$zone->GetDBField('TaxZoneId').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
+
case 'available':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND zd.TaxZoneId IS NULL
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1 AND zd.TaxZoneId IS NULL
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
- case 'all':
+ case 'all':
$selected_country = $this->Application->GetVar('CountrySelector');
if (!$selected_country){
// get 1st available country ID
$selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
WHERE TaxZoneId='.$zone->GetDBField('TaxZoneId'));
if ($selected_country){
$this->Application->SetVar('CountrySelector', $selected_country);
}
}
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
+
case 'has_states':
$has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
WHERE sd.DestType=2');
$selected_country = $this->Application->GetVar('CountrySelector');
if ($selected_country && !in_array($selected_country, $has_states)){
$selected_country = $has_states[0];
$this->Application->SetVar('CountrySelector', $selected_country);
}
if (!$selected_country){
// get 1st available country ID
$selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
LEFT JOIN '.$destination->TableName.' zd
ON zd.StdDestId = sd.DestId
WHERE sd.DestType=2
AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId'));
if ($selected_country){
$this->Application->SetVar('CountrySelector', $selected_country);
}
else {
$selected_country = $has_states[0];
$this->Application->SetVar('CountrySelector', $selected_country);
}
}
-
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND DestId IN ('.implode(',', $has_states).')
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1 AND DestId IN ('.implode(',', $has_states).')
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
}
$countries = $this->Conn->Query($sql);
$o = '';
foreach($countries as $key => $country) {
$param['id'] = $country['DestId'];
$param['destination_title'] = $this->Application->Phrase($country['DestName']);
if (isset($selected_country) && $selected_country == $param['id']){
$param['selected'] = ' selected="selected"';
}
else {
$param['selected']='';
}
$o .= $this->Application->ParseBlock($param);
}
return $o;
}
- function ShowStates($param){
-
+ function ShowStates($param)
+ {
$param = $this->prepareTagParams($param);
$param['name'] = $param['block'];
$destination = &$this->Application->recallObject('taxdst');
$zone = &$this->Application->recallObject('tax');
switch ($param['show']){
case 'current':
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=2
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT *
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE
+ sd.DestType=2
+ AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+ AND zd.TaxZoneId='.$zone->GetDBField('TaxZoneId').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
- case 'available':
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=2
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND zd.TaxZoneId IS NULL
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY Translation
- ';
+ case 'available':
+ $sql = 'SELECT *
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE
+ sd.DestType=2
+ AND zd.TaxZoneId IS NULL
+ AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
+
case 'all':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=2
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 2 AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
}
$states = $this->Conn->Query($sql);
$o = '';
foreach($states as $key => $state) {
$param['id'] = $state['DestId'];
$param['destination_title'] = $this->Application->Phrase($state['DestName']);
$o .= $this->Application->ParseBlock($param);
}
return $o;
}
function ShowZips($param){
$param = $this->prepareTagParams($param);
$param['name'] = $param['block'];
$destination = &$this->Application->recallObject('taxdst');
$zone = &$this->Application->recallObject('tax');
$country_selector = $this->Application->GetVar('CountrySelector');
if (!$country_selector){
$country_selector=0;
}
switch ($param['show']){
case 'current':
$sql = 'SELECT * FROM '.$destination->TableName.'
WHERE NOT(DestValue IS NULL)
AND DestValue<>""
AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
ORDER BY DestValue
';
break;
case 'available':
$selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
WHERE NOT(DestValue IS NULL)
AND DestValue<>""
AND TaxZoneID='.$zone->GetDBField('TaxZoneId').'
ORDER BY DestValue
');
$sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('taxdst', 'TableName').'
WHERE NOT(DestValue IS NULL)
AND TaxZoneID!='.$zone->GetDBField('TaxZoneId').'
AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
AND DestValue<>"" AND StdDestId='.$country_selector.'
ORDER BY DestValue
';
break;
case 'all':
$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
ORDER BY DestValue
';
break;
}
$zips = $this->Conn->Query($sql);
$o = '';
foreach($zips as $key => $zip) {
$param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
$param['destination_title'] = $zip['DestValue'];
$o .= $this->Application->ParseBlock($param);
}
return $o;
}
}
\ No newline at end of file
Index: branches/5.1.x/units/zones/zones_tag_processor.php
===================================================================
--- branches/5.1.x/units/zones/zones_tag_processor.php (revision 13146)
+++ branches/5.1.x/units/zones/zones_tag_processor.php (revision 13147)
@@ -1,477 +1,460 @@
<?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 ZonesTagProcessor extends kDBTagProcessor
{
/*
function ShowDestinations($param)
{
$zone =& $this->Application->recallObject('z');
$zone->SetDBField('ZoneID', $zone->ID);
$destination =& $this->Application->recallObject('dst');
if(!$this->Application->GetVar('loaded'))
{
if ($zone->GetID() == 0)
{
$this->Application->DeleteVar('dst');
}
else
{
$sql = 'SELECT * FROM '.$destination->TableName.' WHERE ShippingZoneId='.$zone->GetID();
$res = $this->Conn->Query($sql);
if (is_array($res)) foreach ($res as $dest_record)
{
$temp[$dest_record['ZoneDestId']]['ZoneDestId'] = $dest_record['ZoneDestId'];
$temp[$dest_record['ZoneDestId']]['StdDestId'] = $dest_record['StdDestId'];
$temp[$dest_record['ZoneDestId']]['DestValue'] = $dest_record['DestValue'];
}
$this->Application->SetVar('dst', $temp);
}
}
$hidden_clause = '<input type="hidden" name="loaded" value="1"><input type="hidden" name="zone_id" value="'.$zone->GetDBField('ZoneID').'">';
switch ( $zone->GetDBField('Type') )
{
case 1:
$sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
$res = $this->Conn->Query($sql, 'DestId');
$dropdown = '<select name="country">'."\n";
foreach ($res as $record)
{
$dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$dropdown .= '</select>'."\n";
$form_params = Array();
$form_params['dropdown'] = $dropdown;
$form_params['block'] = $param['block'];
$form_params['res'] = $res;
$ret = $this->ShowDestionationForm($form_params);
break;
case 2:
$country_sql = 'SELECT d1.* FROM '.TABLE_PREFIX.'StdDestinations d1,
'.TABLE_PREFIX.'StdDestinations d2
WHERE d1.DestType=1 AND d1.DestId=d2.DestParentId
GROUP BY d1.DestId';
if( !($current_country = $this->Application->GetVar('StatesCountry')) )
{
$current_country_sql = 'SELECT sd.DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
LEFT JOIN '.$destination->TableName.' zd
ON zd.StdDestId = sd.DestId
WHERE sd.DestType=2 AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID');
if($zone->GetDBField('ZoneID'))
{
$current_country = $this->Conn->GetOne($current_country_sql);
}
if(!$current_country)
{
$current_country_sql = ' SELECT d1.DestId FROM '.TABLE_PREFIX.'StdDestinations d1
LEFT JOIN '.TABLE_PREFIX.'StdDestinations d2
ON d1.DestId = d2.DestParentId
WHERE d1.DestType=1
AND d2.DestId IS NOT NULL';
$current_country = $this->Conn->GetOne($current_country_sql);
}
}
$states_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestParentId='.$current_country;
$countries = $this->Conn->Query($country_sql, 'DestId');
$states = $this->Conn->Query($states_sql, 'DestId');
if($countries)
{
$countries_dropdown = '<select name="StatesCountry" onchange="submit_event(\'z\', \'OnCountryChange\')">'."\n";
foreach ($countries as $record)
{
$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
if($record['DestId'] == $current_country)
{
$countries_dropdown .= 'selected';
}
$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$countries_dropdown .= '</select>'."\n";
}
if($states)
{
$states_dropdown = '<select name="state">'."\n";
foreach ($states as $id => $record)
{
$states_dropdown .= '<option value="'.$record['DestId'].'">'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$states_dropdown .= '</select>'."\n";
}
$form_params = Array();
$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_fld_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
$table .= '<tr><td>'.$this->Application->Phrase('la_fld_State').': </td><td>'.$states_dropdown.'</td></tr></table>';
$form_params['dropdown'] = $table;
$form_params['block'] = $param['block'];
$form_params['res'] = $states;
$ret = $this->ShowDestionationForm($form_params);
break;
case 3:
$country_sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1';
if( !($current_country = $this->Application->GetVar('ZIPCountry')) )
{
$current_country_sql = 'SELECT StdDestId FROM '.$destination->TableName.'
WHERE ShippingZoneId='.$zone->GetDBField('ZoneID');
$cur_country = (int)$this->Conn->GetOne($current_country_sql);
if($zone->GetDBField('ZoneID') && $cur_country)
{
$current_country = $cur_country;
}
else
{
$current_country_sql = 'SELECT MIN(DestId) FROM '.TABLE_PREFIX.'StdDestinations';
$current_country = (int)$this->Conn->GetOne($current_country_sql);
}
}
$countries = $this->Conn->Query($country_sql, 'DestId');
if($countries)
{
$countries_dropdown = '<select name="ZIPCountry" onchange="submit_event(\'z\', \'OnCountryChange\')">'."\n";
foreach ($countries as $record)
{
$countries_dropdown .= '<option value="'.$record['DestId'].'" ';
if($record['DestId'] == $current_country)
{
$countries_dropdown .= 'selected';
}
$countries_dropdown .= '>'.$this->Application->Phrase($record['DestName']).'</option>'."\n";
}
$countries_dropdown .= '</select>'."\n";
}
$sql = 'SELECT DestValue FROM '.TABLE_PREFIX.'ShippingZonesDestinations WHERE NOT(DestValue IS NULL) AND DestValue<>"" AND StdDestId='.$current_country;
$res = array_unique( $this->Conn->GetCol($sql) );
$dropdown = '<input type="text" name="zip_input" id="zip_input" size="15">';
if($res)
{
$dropdown .= ' or <select name="zip_dropdown">'."\n";
$dropdown .= '<option value=""></option>';
foreach ($res as $record)
{
$dropdown .= '<option value="'.$record.'">'.$record.'</option>'."\n";
}
$dropdown .= '</select>'."\n";
}
$table = '<table border="0"><tr><td>'.$this->Application->Phrase('la_fld_Country').': </td><td>'.$countries_dropdown.'</td></tr>';
$table .= '<tr><td>'.$this->Application->Phrase('la_fld_ZIP').': </td><td>'.$dropdown.'</td></tr></table>';
$form_params = Array();
$form_params['dropdown'] = $table;
$form_params['block'] = $param['block'];
$form_params['res'] = $res;
$ret = $this->ShowDestionationForm($form_params);
break;
default:
}
$ret .= $hidden_clause;
return $ret;
}
function ShowDestionationForm($param)
{
$add_button = '<input type="button" class="button" value="'.$this->Application->Phrase('la_btn_AddLocation').'" onclick="submit_event(\'z\', \'OnAddLocation\')">';
$main_processor =& $this->Application->RecallObject('m_TagProcessor');
$oddevenparam['odd'] = 'table-color1';
$oddevenparam['even'] = 'table-color2';
$ret = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td>'.$param['dropdown'].'</td><td>'.$add_button.'</td></tr>';
$dest_list = $this->Application->GetVar('dst');
if (is_array($dest_list) && count($dest_list))
{
$ret .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td></td><td><select multiple name="location_list" onchange="SelectToString(this)">';
$hidden = '';
foreach ($dest_list as $id => $destination)
{
$params = $destination;
$params['id'] = $id;
$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][ZoneDestId]" name="dst['.$destination['ZoneDestId'].'][ZoneDestId]" value="'.$destination['ZoneDestId'].'">';
$zones_object =& $this->Application->recallObject('z');
switch($zones_object->GetDBField('Type'))
{
case 1:
$params['destination_title'] = $this->Application->Phrase( $param['res'][$destination['StdDestId']]['DestName'] );
$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][StdDestId]" name="dst['.$destination['ZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
break;
case 2:
$params['destination_title'] = $this->Application->Phrase( $param['res'][$destination['StdDestId']]['DestName'] );
$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][StdDestId]" name="dst['.$destination['ZoneDestId'].'][StdDestId]" value="'.$destination['StdDestId'].'">';
break;
case 3:
$params['destination_title'] = $destination['DestValue'];
$hidden .= '<input type="hidden" id="dst['.$destination['ZoneDestId'].'][DestValue]" name="dst['.$destination['ZoneDestId'].'][DestValue]" value="'.$destination['DestValue'].'">';
}
$params['name'] = $param['block'];
$ret .= $main_processor->ParseBlock($params);
}
$ret .= '</select></td><td><input type="button" class="button" value="'.$this->Application->Phrase('la_btn_RemoveLocations').'" onclick="remove_location('.$destination['ZoneDestId'].')"></td><tr>';
$ret .= $hidden;
}
return $ret;
}
*/
function ShowCountries($param){
$param = $this->prepareTagParams($param);
$param['name'] = $param['block'];
$destination = &$this->Application->recallObject('dst');
$zone = &$this->Application->recallObject('z');
$selected_country = Array(); // this prevents 241 warnings to me raised :D
switch ($param['show']){
case 'current':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1 AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
+
case 'available':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND zd.ShippingZoneId IS NULL
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1 AND zd.ShippingZoneId IS NULL
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
- case 'all':
+ case 'all':
$selected_country = $this->Application->GetVar('CountrySelector');
if (!$selected_country){
// get 1st available country ID
$selected_country = $this->Conn->GetOne('SELECT StdDestId FROM '.$destination->TableName.'
WHERE ShippingZoneId='.$zone->GetDBField('ZoneID'));
if ($selected_country){
$this->Application->SetVar('CountrySelector', $selected_country);
}
}
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
+
case 'has_states':
$has_states = $this->Conn->GetCol('SELECT DISTINCT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
WHERE sd.DestType=2');
$selected_country = $this->Application->GetVar('CountrySelector');
if ($selected_country && !in_array($selected_country, $has_states)){
$selected_country = $has_states[0];
$this->Application->SetVar('CountrySelector', $selected_country);
}
if (!$selected_country){
// get 1st available country ID
$selected_country = $this->Conn->GetOne('SELECT DestParentId FROM '.TABLE_PREFIX.'StdDestinations sd
LEFT JOIN '.$destination->TableName.' zd
ON zd.StdDestId = sd.DestId
WHERE sd.DestType=2
AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID'));
if ($selected_country){
$this->Application->SetVar('CountrySelector', $selected_country);
}
else {
$selected_country = $has_states[0];
$this->Application->SetVar('CountrySelector', $selected_country);
}
}
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=1
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND DestId IN ('.implode(',', $has_states).')
- ORDER BY Translation
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 1 AND DestId IN ('.implode(',', $has_states).')
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
}
$countries = $this->Conn->Query($sql);
$o = '';
foreach($countries as $key => $country) {
$param['id'] = $country['DestId'];
$param['destination_title'] = $this->Application->Phrase($country['DestName']);
if ($selected_country && $selected_country == $param['id']){
$param['selected'] = ' selected="selected"';
}
else {
$param['selected']='';
}
$o .= $this->Application->ParseBlock($param);
}
return $o;
}
function ShowStates($param){
$param = $this->prepareTagParams($param);
$param['name'] = $param['block'];
$destination = &$this->Application->recallObject('dst');
$zone = &$this->Application->recallObject('z');
switch ($param['show']){
case 'current':
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=2
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
- ORDER BY Translation
- ';
+ $sql = 'SELECT *
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE
+ sd.DestType=2
+ AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+ AND zd.ShippingZoneId='.$zone->GetDBField('ZoneID').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
- case 'available':
- $sql = 'SELECT * FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.$destination->TableName.' zd
- ON zd.StdDestId = sd.DestId
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=2
- AND zd.ShippingZoneId IS NULL
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY Translation
- ';
+ case 'available':
+ $sql = 'SELECT *
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.$destination->TableName.' zd ON zd.StdDestId = sd.DestId
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE
+ sd.DestType=2
+ AND zd.ShippingZoneId IS NULL
+ AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
+
case 'all':
- $sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
- WHERE sd.DestType=2
- AND LanguageId='.$this->Application->GetVar('lang.current_id').'
- AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
- ORDER BY Translations
- ';
+ $sql = 'SELECT sd.*
+ FROM '.TABLE_PREFIX.'StdDestinations sd
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = sd.DestName
+ WHERE sd.DestType = 2 AND sd.DestParentId='.$this->Application->GetVar('CountrySelector').'
+ ORDER BY l' . $this->Application->GetVar('lang.current_id') . '_Translation';
break;
}
$states = $this->Conn->Query($sql);
$o = '';
foreach($states as $key => $state) {
$param['id'] = $state['DestId'];
$param['destination_title'] = $this->Application->Phrase($state['DestName']);
$o .= $this->Application->ParseBlock($param);
}
return $o;
}
function ShowZips($param){
$param = $this->prepareTagParams($param);
$param['name'] = $param['block'];
$destination = &$this->Application->recallObject('dst');
$zone = &$this->Application->recallObject('z');
$country_selector = $this->Application->GetVar('CountrySelector');
if (!$country_selector){
$country_selector=0;
}
switch ($param['show']){
case 'current':
$sql = 'SELECT * FROM '.$destination->TableName.'
WHERE NOT(DestValue IS NULL)
AND DestValue<>""
AND ShippingZoneID='.$zone->GetDBField('ZoneID').'
ORDER BY DestValue
';
break;
case 'available':
$selected_zips = $this->Conn->GetCol('SELECT DestValue FROM '.$destination->TableName.'
WHERE NOT(DestValue IS NULL)
AND DestValue<>""
AND ShippingZoneID='.$zone->GetDBField('ZoneID').'
ORDER BY DestValue
');
$sql = 'SELECT DISTINCT(DestValue) FROM '.$this->Application->getUnitOption('dst', 'TableName').'
WHERE NOT(DestValue IS NULL)
AND ShippingZoneID!='.$zone->GetDBField('ZoneID').'
AND DestValue NOT IN ("'.implode('", "', $selected_zips).'")
AND DestValue<>"" AND StdDestId='.$country_selector.'
ORDER BY DestValue
';
break;
case 'all':
$sql = 'SELECT sd.* FROM '.TABLE_PREFIX.'StdDestinations sd
WHERE sd.DestType=3 AND sd.DestParentId='.$country_selector.'
ORDER BY DestValue
';
break;
}
$zips = $this->Conn->Query($sql);
$o = '';
foreach($zips as $key => $zip) {
$param['id'] = $zip['DestId'].'|'.$zip['DestValue'];
$param['destination_title'] = $zip['DestValue'];
$o .= $this->Application->ParseBlock($param);
}
return $o;
}
}
\ No newline at end of file
Index: branches/5.1.x/units/orders/orders_config.php
===================================================================
--- branches/5.1.x/units/orders/orders_config.php (revision 13146)
+++ branches/5.1.x/units/orders/orders_config.php (revision 13147)
@@ -1,500 +1,499 @@
<?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,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'ord',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnPreSave' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRecalculateItems',
),
/* OnApplyCoupon is called as hook for OnUpdateCart/OnCheckout, which calls OnRecalcualate themself
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'coup',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnApplyCoupon' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRecalculateItems',
),*/
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnCreate' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserCreate',
),
Array(
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array('OnCheckExpiredMembership'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnCheckRecurringOrders',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnLogin' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
Array(
'Mode' => hBEFORE, // before because OnInpLogin is called after real in-portal login and uses data from hooks
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnInpLogin' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
),
'AggregateTags' => Array(
Array(
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'LinkRemoveFromCart',
'LocalTagName' => 'Orditems_LinkRemoveFromCart',
),
Array(
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'ProductLink',
'LocalTagName' => 'Orderitems_ProductLink',
),
Array(
'AggregateTo' => 'orditems',
'AggregatedTagName' => 'ProductExists',
'LocalTagName' => 'Orderitems_ProductExists',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'OrderId',
'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events
'ViewMenuPhrase' => 'la_title_Orders',
'CatalogTabIcon' => 'icon16_item.png',
'TitleField' => 'OrderNumber',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('ord'=>'!la_title_Adding_Order!'),
'edit_status_labels' => Array('ord'=>'!la_title_Editing_Order!'),
'new_titlefield' => Array('ord'=>'!la_title_New_Order!'),
),
'orders_incomplete' => Array( 'prefixes' => Array('ord.incomplete_List'),
'format' => "!la_title_IncompleteOrders!",
),
'orders_pending' => Array( 'prefixes' => Array('ord.pending_List'),
'format' => "!la_title_PendingOrders!",
),
'orders_backorders' => Array( 'prefixes' => Array('ord.backorders_List'),
'format' => "!la_title_BackOrders!",
),
'orders_toship' => Array( 'prefixes' => Array('ord.toship_List'),
'format' => "!la_title_OrdersToShip!",
),
'orders_processed' => Array( 'prefixes' => Array('ord.processed_List'),
'format' => "!la_title_OrdersProcessed!",
),
'orders_returns' => Array( 'prefixes' => Array('ord.returns_List'),
'format' => "!la_title_OrdersReturns!",
),
'orders_denied' => Array( 'prefixes' => Array('ord.denied_List'),
'format' => "!la_title_OrdersDenied!",
),
'orders_archived' => Array( 'prefixes' => Array('ord.archived_List'),
'format' => "!la_title_OrdersArchived!",
),
'orders_search' => Array( 'prefixes' => Array('ord.search_List'),
'format' => "!la_title_OrdersSearch!",
),
'orders_edit_general' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_General!"),
'orders_edit_billing' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderBilling!"),
'orders_edit_shipping' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderShipping!"),
'orders_edit_items' => Array('prefixes' => Array('ord', 'orditems_List'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderItems!"),
'orders_edit_preview' => Array('prefixes' => Array('ord'), 'format' => "#ord_status# '#ord_titlefield#' - !la_title_OrderPreview!"),
'orders_gw_result' => Array('prefixes' => Array('ord'), 'format' => "!la_title_OrderGWResult!"),
'order_items_edit' => Array( 'prefixes' => Array('ord', 'orditems'),
'new_status_labels' => Array('orditems'=>'!la_title_Adding_Order_Item!'),
'edit_status_labels' => Array('orditems'=>'!la_title_Editing_Order_Item!'),
'new_titlefield' => Array('orditems'=>'!la_title_New_Order_Item!'),
'format' => "#ord_status# '#ord_titlefield#' - #orditems_status# '#orditems_titlefield#'",
),
'orders_export' => Array('format' => '!la_title_OrdersExport!'),
'orders_product_edit' => Array('format' => '!la_title_Editing_Order_Item!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'in-commerce/orders/orders_edit', 'priority' => 1),
'items' => Array ('title' => 'la_tab_Items', 't' => 'in-commerce/orders/orders_edit_items', 'priority' => 2),
'shipping' => Array ('title' => 'la_tab_Shipping', 't' => 'in-commerce/orders/orders_edit_shipping', 'priority' => 3),
'billing' => Array ('title' => 'la_tab_Billing', 't' => 'in-commerce/orders/orders_edit_billing', 'priority' => 4),
'preview' => Array ('title' => 'la_tab_Preview', 't' => 'in-commerce/orders/orders_edit_preview', 'priority' => 5),
),
),
'PermSection' => Array('main' => 'in-commerce:orders'),
'Sections' => Array(
'in-commerce:orders' => Array(
'parent' => 'in-commerce',
'icon' => 'in-commerce:orders',
'label' => 'la_tab_Orders',
'url' => Array('t' => 'in-commerce/orders/orders_pending_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:deny', 'advanced:archive', 'advanced:place', 'advanced:process', 'advanced:ship', 'advanced:reset_to_pending'),
'priority' => 1,
'type' => stTREE,
),
),
'SectionAdjustments' => Array (
'in-portal:visits' => Array (
'url' => Array ('t' => 'in-commerce/visits/visits_list_incommerce', 'pass' => 'm'),
),
),
'StatisticsInfo' => Array(
'pending' => Array(
'icon' => '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',
'FilterMenu' => Array(
'Groups' => Array(
Array('mode' => 'AND', 'filters' => Array(0,1,2,3,4,5,6), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' => 'la_Incomplete', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
1 => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
2 => Array('label' => 'la_BackOrders', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ),
3 => Array('label' => 'la_ToShip', 'on_sql' => '', 'off_sql' => '%1$s.Status != 3' ),
4 => Array('label' => 'la_Processed', 'on_sql' => '', 'off_sql' => '%1$s.Status != 4' ),
5 => Array('label' => 'la_Denied', 'on_sql' => '', 'off_sql' => '%1$s.Status != 5' ),
6 => Array('label' => 'la_Archived', 'on_sql' => '', 'off_sql' => '%1$s.Status != 6' ),
)
),
'CalculatedFields' => Array(
'' => Array (
'CustomerName' => 'IF( ISNULL(u.Login), IF (%1$s.PortalUserId = -1, \'root\', IF (%1$s.PortalUserId = -2, \'Guest\', \'n/a\')), CONCAT(u.FirstName,\' \',u.LastName) )',
'Username' => 'IF( ISNULL(u.Login),\'root\',u.Login)',
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
'SubtotalWithDiscount' => '(SubTotal)',
'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
'TotalAmount' => 'ROUND(SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount,2)',
'CouponCode' => 'pc.Code',
'CouponName' => 'pc.Name',
'AffiliateUser' => 'IF( LENGTH(au.Login),au.Login,\'!la_None!\')',
'AffiliatePortalUserId' => 'af.PortalUserId',
'GiftCertificateCode' => 'gc.Code',
'GiftCertificateRecipient' => 'gc.Recipient',
),
'myorders' => Array (
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
'SubtotalWithDiscount' => '(SubTotal)',
'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0))',
'TotalAmount' => 'ROUND(SubTotal+ShippingCost+VAT+ProcessingFee+InsuranceFee-GiftCertificateDiscount,2)',
/*'ItemsCount' => 'COUNT(%1$s.OrderId)',*/
),
),
// %1$s - table name of object
// %2$s - calculated fields
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
'myorders' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId',
// LEFT JOIN '.TABLE_PREFIX.'OrderItems ON %1$s.OrderId = '.TABLE_PREFIX.'OrderItems.OrderId',
),
'ItemSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'ProductsCoupons pc ON %1$s.CouponId = pc.CouponId
LEFT JOIN '.TABLE_PREFIX.'GiftCertificates gc ON %1$s.GiftCertificateId = gc.GiftCertificateId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId',
),
'SubItems' => Array('orditems'),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('OrderDate' => 'desc'),
)
),
'Fields' => Array(
'OrderId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0, 'filter_type' => 'equals'),
'Number' => Array('type' => 'int','required'=>1,'formatter'=>'kFormatter', 'unique'=>Array('SubNumber'),'format'=>'%06d', 'max_value_inc'>999999, 'not_null' => '1','default' => 0),
'SubNumber' => Array('type' => 'int','required'=>1,'formatter'=>'kFormatter','unique'=>Array('Number'), 'format'=>'%03d', 'max_value_inc'>999, 'not_null' => '1','default' => 0),
'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_Incomplete',1=>'la_Pending',2=>'la_BackOrders',3=>'la_ToShip',4=>'la_Processed',5=>'la_Denied',6=>'la_Archived'), 'use_phrases'=>1, 'not_null' => '1','default' => 0, 'filter_type' => 'equals'),
'OnHold' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'OrderDate' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
'PortalUserId'=>Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options'=>Array(-1=>'root',-2=>'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'','left_key_field'=>'PortalUserId','left_title_field'=>'Login','required'=>1,'not_null'=>1,'default'=>-1),
'OrderIP' => Array('type' => 'string','not_null' => '1','default' => '', 'filter_type' => 'like'),
'UserComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'AdminComment' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'BillingTo' => Array('type' => 'string','not_null' => '1','default' => ''),
'BillingCompany' => Array('type' => 'string','not_null' => '1','default' => ''),
'BillingPhone' => Array('type' => 'string','not_null' => '1','default' => ''),
'BillingFax' => Array('type' => 'string','not_null' => '1','default' => ''),
'BillingEmail' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
'BillingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''),
'BillingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''),
'BillingCity' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options' => Array(),
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => ''),
+ 'BillingState' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array(),
+ 'not_null' => 1, 'default' => ''
+ ),
'BillingZip' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'BillingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType=1
- AND
- LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => 'USA'),
+ 'BillingCountry' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE DestType = 1
+ ORDER BY l%2$s_Translation',
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ 'not_null' => 1, 'default' => 'USA'
+ ),
'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'),
'VATPercent' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.3f'),
'PaymentType' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PaymentTypes WHERE Status = 1', 'option_key_field'=>'PaymentTypeId','option_title_field'=>'Description', 'not_null' => 1, 'default' => 0),
'PaymentAccount' => Array('type' => 'string','not_null' => '1', 'cardtype_field' => 'PaymentCardType', 'default' => '', 'filter_type' => 'like'),
'PaymentNameOnCard' => Array('type' => 'string','not_null' => '1','default' => ''),
'PaymentCCExpDate' => Array('type' => 'string', 'formatter'=>'kCCDateFormatter', 'month_field' => 'PaymentCCExpMonth', 'year_field'=>'PaymentCCExpYear', 'not_null' => '1','default' => ''),
'PaymentCardType' => Array('type' => 'string', 'not_null' => 1, 'formatter'=>'kOptionsFormatter', 'options' => Array('' => '','1' => 'Visa','2' => 'Mastercard', '3' => 'Amex', '4' => 'Discover', '5' => 'Diners Club', '6' => 'JBC'), 'default' => ''),
'PaymentExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'ShippingTo' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingCompany' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingPhone' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingFax' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingEmail' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
'ShippingAddress1' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingAddress2' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingCity' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingState' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options' => Array(),
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => ''),
+ 'ShippingState' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array(),
+ 'not_null' => 1, 'default' => ''
+ ),
'ShippingZip' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'ShippingCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType=1
- AND
- LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => 'USA'),
+ 'ShippingCountry' => Array(
+ 'type' => 'string', 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE DestType = 1
+ ORDER BY l%2$s_Translation',
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ 'not_null' => 1, 'default' => 'USA'
+ ),
'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),
'ShippingCost' => Array('type' => 'double','formatter'=>'kFormatter','format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'ShippingCustomerAccount' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingTracking' => Array('type' => 'string','not_null' => '1','default' => ''),
'ShippingDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'SubTotal' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'ReturnTotal' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00'),
'CostTotal' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'OriginalAmount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'ShippingOption' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(0 => 'la_ship_all_together', 1 => 'la_ship_backorder_separately', 2 => 'la_ship_backorders_upon_avail'), 'default'=>0),
'ShippingGroupOption' => Array('type' => 'int', 'not_null' => 1, 'formatter'=>'kOptionsFormatter', 'use_phrases' => 1, 'options' => Array(0 => 'la_auto_group_shipments', 1 => 'la_manual_group_shipments'), 'default'=>0),
'GiftCertificateId' => Array('type' => 'int','default' => null),
'GiftCertificateDiscount' => Array('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'not_null' => 1, 'default' => '0.00',),
'ShippingInfo' => Array('type' => 'string', 'default' => NULL),
'CouponId' => Array('type' => 'int','default' => null),
'CouponDiscount' => Array('type' => 'float','not_null' => '1','default' => '0.00','formatter'=>'kFormatter','format'=>'%01.2f'),
'DiscountTotal' => Array('type' => 'float','not_null' => '1','default' => '0.00','formatter'=>'kFormatter','format'=>'%01.2f'),
'TransactionStatus' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options' => Array(0=>'la_Invalid', 1 => 'la_Verified', 2 => 'la_Penging'), 'use_phrases'=>1, 'not_null' => '1','default' => 2),
'GWResult1' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'default' => NULL),
'GWResult2' => Array('type' => 'string', 'formatter'=>'kSerializedFormatter', 'default' => NULL),
'AffiliateId' => Array('type'=>'int','formatter'=>'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(0 => 'lu_None'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field'=>'AffiliateId','left_title_field'=>'Login','not_null'=>1,'default'=>0),
'VisitId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'AffiliateCommission' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '1','default' => '0.0000'),
'ProcessingFee' => Array('type' => 'double', 'formatter'=>'kFormatter','format'=>'%.02f', 'not_null' => '0','default' => '0.0000'),
'InsuranceFee' => Array ('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'ShippingTaxable' => Array('type' => 'int', 'not_null' => 0, 'default' => 0),
'ProcessingTaxable' => Array('type' => 'int', 'not_null' => 0, 'default' => 0),
'IsRecurringBilling' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'ChargeOnNextApprove' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'NextCharge' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'GoogleOrderNumber' => Array ('type' => 'string', 'default' => NULL), // MySQL BIGINT UNSIGNED = 8 Bytes, PHP int = 4 Bytes -> threat as string
),
'VirtualFields' => Array(
'CustomerName' => Array('type'=>'string','default'=>'','filter_type'=>'like'),
'TotalAmount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'AmountWithoutVAT' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'SubtotalWithDiscount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'SubtotalWithoutDiscount' => Array('type' => 'float', 'formatter'=>'kFormatter', 'format'=>'%01.2f', 'not_null' => '1','default' => '0.00'),
'OrderNumber' => Array('type'=>'string','default'=>'', 'filter_type' => 'like'),
// for ResetToUser
'UserTo' => Array('type'=>'string','default'=>''),
'UserCompany' => Array('type'=>'string','default'=>''),
'UserPhone' => Array('type'=>'string','default'=>''),
'UserFax' => Array('type'=>'string','default'=>''),
'UserEmail' => Array('type'=>'string','default'=>''),
'UserAddress1' => Array('type'=>'string','default'=>''),
'UserAddress2' => Array('type'=>'string','default'=>''),
'UserCity' => Array('type'=>'string','default'=>''),
'UserState' => Array('type'=>'string','default'=>''),
'UserZip' => Array('type'=>'string','default'=>''),
'UserCountry' => Array('type'=>'string','default'=>''),
// for Search
'Username' => Array('type'=>'string','filter_type'=>'like'),
'OrderSearchId' => Array('type'=>'int','filter_type'=>'equals','filter_field'=>'OrderId'),
'FromDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_from','filter_field'=>'OrderDate' ),
'ToDateTime' => Array('formatter'=>'kDateFormatter','default'=>'','filter_type'=>'range_to','filter_field'=>'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ),
'FromAmount' => Array('type'=>'double', 'formatter'=>'kFormatter', 'format'=>'%01.2f','filter_type'=>'range_from','filter_field'=>'TotalAmount'),
'ToAmount' => Array('type'=>'double', 'formatter'=>'kFormatter', 'format'=>'%01.2f','filter_type'=>'range_to','filter_field'=>'TotalAmount'),
'HasBackOrders' => Array('default'=>false),
'PaymentCVV2' => Array('type'=>'string', 'default'=>false),
'AffiliateUser' => Array('type'=>'string', 'filter_type' => 'like'),
'AffiliatePortalUserId' => Array('type'=>'int'),
// export related fields: begin
'ExportFormat' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CSV', /*2 => 'XML'*/), 'default' => 1),
'ExportFilename' => Array('type' => 'string', 'default' => ''),
'FieldsSeparatedBy' => Array('type' => 'string', 'default' => ','),
'FieldsEnclosedBy' => Array('type' => 'string', 'default' => '"'),
'LineEndings' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'Windows', 2 => 'UNIX'), 'default' => 1),
'LineEndingsInside' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'CRLF', 2 => 'LF'), 'default' => 2),
'IncludeFieldTitles' => Array('type' => 'int', 'default' => 1),
'ExportColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
'AvailableColumns' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
'ExportPresets' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array()),
'ExportSavePreset' => Array('type'=>'int'),
'ExportPresetName' => Array('type'=>'string'),
// export related fields: end
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(
'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.1.x/units/currencies/currencies_event_handler.php
===================================================================
--- branches/5.1.x/units/currencies/currencies_event_handler.php (revision 13146)
+++ branches/5.1.x/units/currencies/currencies_event_handler.php (revision 13147)
@@ -1,216 +1,233 @@
<?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 CurrenciesEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
// admin
'OnUpdateRate' => Array('self' => 'add|edit'),
'OnUpdateRates' => Array('self' => 'advanced:update_rate|add|edit'),
'OnDisableUnused' => Array('self' => 'edit'),
// front
'OnChangeCurrency' => Array('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnSetPrimary(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$object =& $event->getObject();
$object->SetDBField('IsPrimary', 1);
$object->Update();
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnBeforeItemUpdate(&$event)
{
$object =& $event->getObject();
if($object->GetDBField('IsPrimary') && $object->Validate())
{
$sql = 'UPDATE '.$this->Application->getUnitOption($this->Prefix, 'TableName').'
SET IsPrimary = 0
WHERE CurrencyId <> '.$object->GetDBField('CurrencyId');
$this->Conn->Query($sql);
$object->SetDBField('Status', 1);
}
$object->SetDBField('Modified_date', adodb_mktime() );
$object->SetDBField('Modified_time', adodb_mktime() );
if($object->GetDBField('Status') == 0)
{
$sql = 'DELETE FROM '.$this->Application->getUnitOption('ptc', 'TableName').
' WHERE CurrencyId='.$object->GetDBField('CurrencyId');
$this->Conn->Query($sql);
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
- $object->addFilter('current_lang', 'phr.LanguageId = '.$this->Application->GetVar('m_lang'));
-
- if($event->Special == 'active')
- {
+ if ($event->Special == 'active') {
$object =& $event->getObject();
$object->addFilter('status_filter', '%1$s.Status = 1');
}
if (!$this->Application->isAdminUser) {
$object->addFilter('status_filter', $object->TableName.'.Status = 1');
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnSave(&$event)
{
$this->Application->StoreVar( 'saved_curr_ids', $this->Application->RecallVar($event->Prefix.'_selected_ids') );
parent::OnSave($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnDisableUnused(&$event)
{
if($unused_ids = $this->Application->GetVar('unused_ids'))
{
$sql = 'UPDATE '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
SET Status = 0
WHERE CurrencyId IN('.$unused_ids.') AND IsPrimary <> 1';
$this->Conn->Query($sql);
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnUpdateRate(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$event->CallSubEvent('OnPreSave');
$rate_source = $this->Application->ConfigValue('Comm_ExchangeRateSource');
$rate_source_classes = Array( 2 => 'FRNYCurrencyRates',
3 => 'ECBCurrencyRates',
1 => 'BankLVCurrencyRates'
);
$rates_class = $rate_source_classes[$rate_source];
$rates =& $this->Application->recallObject($rates_class);
$rates->GetRatesData();
$object =& $event->getObject();
$iso = $object->GetDBField('ISO');
$rates->StoreRates($iso);
if($rates->GetRate($iso, 'PRIMARY'))
{
$event->status=erSUCCESS;
}
else
{
$event->status=erFAIL;
$event->redirect=false;
$object->FieldErrors['RateToPrimary']['pseudo'] = 'couldnt_retrieve_rate';
$object->ErrorMsgs['couldnt_retrieve_rate'] = $this->Application->Phrase('la_couldnt_retrieve_rate');
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnUpdateRates(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$ids = $this->StoreSelectedIDs($event);
$event->setEventParam('ids', $ids);
$ids = $event->getEventParam('ids');
$object =& $event->getObject();
if(is_array($ids) && $ids[0])
{
$sql = 'SELECT ISO FROM '.$object->TableName.' WHERE CurrencyId IN ('.implode(',', $ids).')';
$iso_list = $this->Conn->GetCol($sql);
}
$rate_source = $this->Application->ConfigValue('Comm_ExchangeRateSource');
$rate_source_classes = Array( 2 => 'FRNYCurrencyRates',
3 => 'ECBCurrencyRates',
1 => 'BankLVCurrencyRates'
);
$rates_class = $rate_source_classes[$rate_source];
$rates =& $this->Application->recallObject($rates_class);
$rates->GetRatesData();
if($iso_list)
{
$rates->StoreRates($iso_list);
}
else
{
$rates->StoreRates();
}
}
function OnChangeCurrency(&$event)
{
$this->Application->StoreVar('curr_iso', $this->Application->GetVar('curr_iso'));
}
+
+ /**
+ * Changes default module to custom (when available)
+ *
+ * @param kEvent $event
+ */
+ function OnAfterConfigRead(&$event)
+ {
+ parent::OnAfterConfigRead($event);
+
+ // make sure, that currency Translation is on current language
+ $language_id = $this->Application->GetVar('m_lang');
+ $calculated_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');
+
+ foreach ($calculated_fields[''] as $field_name => $field_expression) {
+ $calculated_fields[''][$field_name] = str_replace('%4$s', $language_id, $field_expression);
+ }
+
+ $this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
+ }
}
\ No newline at end of file
Index: branches/5.1.x/units/currencies/currencies_config.php
===================================================================
--- branches/5.1.x/units/currencies/currencies_config.php (revision 13146)
+++ branches/5.1.x/units/currencies/currencies_config.php (revision 13147)
@@ -1,143 +1,142 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'curr',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'CurrenciesEventHandler', 'file' => 'currencies_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'CurrenciesTagProcessor', 'file' => 'currencies_tag_processor.php', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'BankLVCurrencyRates', 'class' => 'kBankLVCurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
Array ('pseudo' => 'ECBCurrencyRates', 'class' => 'kECBCurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
Array ('pseudo' => 'FRNYCurrencyRates', 'class' => 'kFRNYCurrencyRates', 'file' => 'currency_rates.php', 'build_event' => ''),
),
'AutoLoad' => true,
'hooks' => Array (),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
/*'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => true,
'HookToPrefix' => 'tax',
'HookToSpecial' => '',
'HookToEvent' => Array ( 'onEdit' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnLoadZoneForm',
),
),*/
'IDField' => 'CurrencyId',
'StatusField' => Array ('Status', 'IsPrimary'),
'TitleField' => 'ISO',
'TitlePresets' => Array (
'default' => Array ( 'new_status_labels' => Array ('curr' => '!la_title_AddingCurrency!'),
'edit_status_labels' => Array ('curr' => '!la_title_EditingCurrency!'),
'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'),
),
'currencies_list'=>Array ( 'prefixes' => Array ('curr_List'),
'format' => "!la_title_Currencies!",
),
'currencies_edit'=>Array ( 'prefixes' => Array ('curr'),
'new_titlefield' => Array ('curr' => '!la_title_NewCurrency!'),
'format' => "#curr_status# '#curr_titlefield#' - !la_title_General!",
),
),
'PermSection' => Array ('main' => 'in-commerce:currencies'),
'Sections' => Array (
'in-commerce:currencies' => Array (
'parent' => 'in-commerce:setting_folder',
'icon' => 'conf_currencies',
'label' => 'la_tab_Currencies',
'url' => Array ('t' => 'in-commerce/currencies/currencies_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:move_up', 'advanced:move_down', 'advanced:update_rate', 'advanced:set_primary'),
'priority' => 3,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'Currencies',
'AutoDelete' => true,
'AutoClone' => true,
'SubItems' => Array (),
- 'ListSQLs' => Array ( ''=> 'SELECT %1$s.*,
- phr.Translation
- FROM %1$s
- LEFT JOIN '.TABLE_PREFIX.'Phrase phr ON
- %1$s.Name = phr.Phrase'),
- // key - special, value - list select sql
- 'ItemSQLs' => Array ( ''=> 'SELECT * FROM %s'),
-
- 'CalculatedFields' => Array (
- '' => Array (
- 'Translation' => 'phr.Translation',
- ),
- ),
+ 'ListSQLs' => Array (
+ '' => ' SELECT %1$s.* %2$s
+ FROM %1$s
+ LEFT JOIN '.TABLE_PREFIX.'Phrase phr ON %1$s.Name = phr.Phrase'
+ ),
+
+ 'CalculatedFields' => Array (
+ '' => Array (
+ 'Translation' => 'phr.l%4$s_Translation',
+ ),
+ ),
'ListSortings' => Array (
'' => Array (
'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc', 'Status' => 'desc'),
'Sorting' => Array ('ISO' => 'asc'),
)
),
'Fields' => Array
(
'CurrencyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'ISO' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
'Symbol' => Array ('type' => 'string', 'default' => null),
'SymbolPosition' => Array ('type' => 'int', 'default' => null,'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Left', 1 => 'la_Right'),'use_phrases' => '1'),
'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''),
'RateToPrimary' => Array ('type' => 'float', 'not_null' => 1, 'min_value_exc' => 0, 'formatter' => 'kFormatter', 'format' => '%0.4f', 'default' => 1),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Status' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1, 'options' => Array ( 1 => 'la_Active', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'formatter' => 'kOptionsFormatter'),
'IsPrimary' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
- 'VirtualFields' => Array (
- 'Translation' => Array ('type' => 'string'),
- ),
+ 'VirtualFields' => Array (
+ 'Translation' => Array ('type' => 'string', 'default' => ''),
+ ),
+
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
'0_0' => 'icon16_disabled.png',
'0_1' => 'icon16_disabled.png',
'1_0' => 'icon16_item.png',
'1_1' => 'icon16_primary.png',
'module' => 'core',
),
'Fields' => Array (
'CurrencyId' => Array ( 'title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'ISO' => Array ( 'title' => 'la_col_ISOCode', 'data_block' => 'currency_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 90, ),
'Translation' => Array ( 'title' => 'la_col_CurrencyName', 'use_phrases' => 1, 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'RateToPrimary' => Array ( 'title' => 'la_col_RateToPrimary', 'filter_block' => 'grid_float_range_filter', 'width' => 130, ),
'Modified' => Array ( 'title' => 'la_col_LastUpdated', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.1.x/units/addresses/addresses_config.php
===================================================================
--- branches/5.1.x/units/addresses/addresses_config.php (revision 13146)
+++ branches/5.1.x/units/addresses/addresses_config.php (revision 13147)
@@ -1,127 +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' => 'addr',
'ItemClass' => Array('class'=>'AddressesItem','file'=>'addresses_item.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'AddressesList','file'=>'addresses_list.php','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class' => 'AddressesEventHandler', 'file' => 'addresses_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class' => 'AddressesTagProcessor', 'file' => 'addresses_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array(
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareStates',
),
// create/update profile addres (in addresses table)
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '#PARENT#',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnUpdateUserProfile',
),
Array(
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterItemCreate', 'OnAfterItemUpdate'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnUpdateProfileAddress',
),
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'AddressId',
'TableName' => TABLE_PREFIX.'Addresses',
'ParentTableKey'=> 'PortalUserId', // linked field in master table
'ForeignKey' => 'PortalUserId', // linked field in subtable
'ParentPrefix' => 'u',
'AutoDelete' => true,
'AutoClone' => true,
'CalculatedFields' => Array(
'' => Array(
'ShortAddress' => 'CONCAT( TRIM(CONCAT(Address1," ",Address2)),", ",City," ...")',
),
),
'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), // key - special, value - list select sql
'ItemSQLs' => Array( ''=>'SELECT * FROM %s'),
'ListSortings' => Array('' => Array('Sorting' => Array('IsProfileAddress' => 'desc')) ),
- 'Fields' => Array(
- 'AddressId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
- 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'To' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
- 'Company' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'Phone' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
- 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'Email' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
- 'Address1' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
- 'Address2' => Array('type' => 'string','not_null' => '1','default' => ''),
- 'City' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
- 'State' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter',
- 'options' => Array(),
- 'option_key_field'=>'DestAbbr', 'option_title_field'=>'Translation',
- 'not_null' => '1', 'default' => ''),
-
- 'Zip' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
- 'Country' => Array('type' => 'string', 'formatter' => 'kOptionsFormatter',
- 'options_sql' => ' SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType = 1 AND LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation',
- 'not_null' => '1', 'required' => 1, 'default' => ''),
-
- 'LastUsedAsBilling' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'LastUsedAsShipping' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- 'IsProfileAddress' => Array('type' => 'int','not_null' => 1, 'default' => 0),
- ),
+ 'Fields' => Array(
+ 'AddressId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+ 'To' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'Company' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'Phone' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'Fax' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'Email' => Array('type' => 'string','formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i','not_null' => '1','default' => ''),
+ 'Address1' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'Address2' => Array('type' => 'string','not_null' => '1','default' => ''),
+ 'City' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'State' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => Array(),
+ 'not_null' => '1', 'default' => ''
+ ),
+
+ 'Zip' => Array('type' => 'string','not_null' => '1', 'required' => 1, 'default' => ''),
+ 'Country' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE DestType = 1
+ ORDER BY l%2$s_Translation',
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ 'not_null' => '1', 'required' => 1, 'default' => ''
+ ),
+
+ 'LastUsedAsBilling' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+ 'LastUsedAsShipping' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+ 'IsProfileAddress' => Array('type' => 'int','not_null' => 1, 'default' => 0),
+ ),
'VirtualFields' => Array(
'ShortAddress' => Array('type'=>'string'),
),
'Grids' => Array(),
);
\ No newline at end of file
Index: branches/5.1.x/units/gift_certificates/gift_certificates_config.php
===================================================================
--- branches/5.1.x/units/gift_certificates/gift_certificates_config.php (revision 13146)
+++ branches/5.1.x/units/gift_certificates/gift_certificates_config.php (revision 13147)
@@ -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' => 'gc',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'GiftCertificateEventHandler', 'file' => 'gift_certificates_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'GiftCertificateTagProcessor', 'file' => 'gift_certificates_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'ord',
'HookToSpecial' => '',
'HookToEvent' => Array( 'OnUpdateCart', 'OnCheckout' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnApplyGiftCertificate',
),
),
'QueryString' => Array (
1 => 'id',
2 => 'page',
3 => 'event',
4 => 'mode',
),
'IDField' => 'GiftCertificateId',
'StatusField' => Array('Status'),
'TitleField' => 'Recipient',
'TableName' => TABLE_PREFIX.'GiftCertificates',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('gc' => '!la_title_AddingGiftCertificate!'),
'edit_status_labels' => Array ('gc' => '!la_title_EditingGiftCertificate!'),
'new_titlefield' => Array ('gc' => '!la_title_NewGiftCertificate!'),
),
'gift_certificates_list' => Array ('prefixes' => Array ('gc_List'), 'format' => "!la_title_GiftCertificates!",),
'gift_certificates_edit' => Array ('prefixes' => Array ('gc'), 'format' => "#gc_status# '#gc_titlefield#' - !la_title_General!",),
),
'PermSection' => Array ('main' => 'in-commerce:gift-certificates'),
'Sections' => Array (
'in-commerce:gift-certificates' => Array (
'parent' => 'in-commerce:discounts_folder',
'icon' => 'discounts_coupons',
'label' => 'la_tab_GiftCertificates',
'url' => Array('t' => 'in-commerce/discounts/gift_certificate_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:approve', 'advanced:decline'),
'priority' => 3.3, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'FilterMenu' => Array (
'Groups' => Array(
Array ('mode' => 'AND', 'filters' => Array(0,1,2), 'type' => WHERE_FILTER),
),
'Filters' => Array(
0 => Array('label' =>'la_Enabled', 'on_sql' => '', 'off_sql' => 'Status != 1' ),
1 => Array('label' => 'la_Used', 'on_sql' => '', 'off_sql' => 'Status != 2' ),
2 => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0' ),
)
),
'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s',),
'ItemSQLs' => Array ('' => 'SELECT * FROM %1$s',),
'ListSortings' => Array (
'' => Array(
'Sorting' => Array('Recipient' => 'asc'),
)
),
'Fields' => Array (
'GiftCertificateId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'OrderId' => Array ('type' => 'int', 'default' => 0),
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 1 => 'la_Enabled', 2 => 'la_Used', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2 ),
'SendVia' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( 0 => 'la_opt_Email', 1 => 'la_opt_PostalMail'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0 ),
'Purchaser' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'Recipient' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientEmail' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'required'=>1, 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ),
'RecipientFirstname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientLastname' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientAddress1' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientAddress2' => Array('type'=>'string', 'default'=>null, 'max_len'=>255),
'RecipientCity' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientState' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
'RecipientZipcode' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255),
- 'RecipientCountry' => Array('type' => 'string', 'formatter'=>'kOptionsFormatter',
- 'options_sql'=>'SELECT %1$s
- FROM '.TABLE_PREFIX.'StdDestinations
- LEFT JOIN '.TABLE_PREFIX.'Phrase
- ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
- WHERE
- DestType=1
- AND
- LanguageId = %2$s
- ORDER BY Translation',
- 'option_key_field'=>'DestAbbr','option_title_field'=>'Translation',
- 'not_null' => '1','default' => 'USA', 'required'=>1
+ 'RecipientCountry' => Array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter',
+ 'options_sql' => ' SELECT %1$s
+ FROM '.TABLE_PREFIX.'StdDestinations
+ LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName
+ WHERE DestType = 1
+ ORDER BY l%2$s_Translation',
+ 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation',
+ 'not_null' => 1, 'required' => 1, 'default' => 'USA'
),
+
'RecipientPhone' => Array('type'=>'string','default'=>null, 'max_len'=>255),
'Message' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'Code' => Array('type'=>'string','required'=>1,'default'=>null, 'max_len'=>255, 'unique'=>Array('Code')),
'AddDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#',),
'Expiration' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null,),
'Amount' => Array('type'=>'double', 'default' => null, 'required' => 1, 'min_value_exc' => 0),
'Debit' => Array('type'=>'double', 'default' => null),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array(
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
'module' => 'core',
),
'Fields' => Array (
'GiftCertificateId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'Code' => Array ('title' => 'la_col_Code', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'Debit' => Array ('title' => 'la_col_RemainingAmount', 'filter_block' => 'grid_float_range_filter', 'width' => 160, ),
'Amount' => Array ('title' => 'la_col_Amount', 'filter_block' => 'grid_float_range_filter', 'width' => 100, ),
'Expiration' => Array ('title'=>'la_col_Expiration', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.1.x/install/install_data.sql
===================================================================
--- branches/5.1.x/install/install_data.sql (revision 13146)
+++ branches/5.1.x/install/install_data.sql (revision 13147)
@@ -1,585 +1,585 @@
INSERT INTO ConfigurationAdmin VALUES ('Comm_AllowOrderingInNonPrimaryCurrency', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_ExchangeRateSource', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank,3=la_EuropeanCentralBank,1=la_BankOfLatvia', 20.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_DefaultCouponDuration', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_RequireLoginBeforeCheckout', 'la_Text_Orders', 'la_orders_RequireLogin', 'checkbox', NULL, NULL, 10.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Process_Backorders_Auto', 'la_Text_Orders', 'la_ProcessBackorderingAuto', 'checkbox', NULL, NULL, 10.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Next_Order_Number', 'la_Text_Orders', 'la_orders_NextOrderNumber', 'text', NULL, NULL, 10.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Enable_Backordering', 'la_Text_Orders', 'la_EnableBackordering', 'checkbox', NULL, NULL, 10.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Order_Number_Format_P', 'la_Text_Orders', 'la_OrderMainNumberDigits', 'text', NULL, NULL, 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Order_Number_Format_S', 'la_Text_Orders', 'la_OrderSecNumberDigits', 'text', NULL, NULL, 10.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Allow_Order_Different_Types', 'la_Text_Orders', 'la_AllowOrderDifferentTypes', 'checkbox', NULL, NULL, 10.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Products_Short', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Products', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Reviews', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Manufacturers', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Perpage_Manufacturers_Short', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_AddressLine1', 'la_Text_StoreAddress', 'la_AddressLine1', 'text', NULL, NULL, 20.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_AddressLine2', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_City', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_State', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_ZIP', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Country', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 20.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_AddressLine1', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_AddressLine2', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_City', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_State', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_ZIP', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Shipping_Country', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 30.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_CompanyName', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Comm_StoreName', 'la_Text_ContactsGeneral', 'la_text_StoreName', 'text', NULL, NULL, 10.02, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Name', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL , NULL , 10.03, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Phone', 'la_Text_ContactsGeneral', 'la_text_Phone', 'text', NULL, NULL, 10.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Fax', 'la_Text_ContactsGeneral', 'la_text_Fax', 'text', NULL, NULL, 10.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Email', 'la_Text_ContactsGeneral', 'la_text_Email', 'text', NULL, NULL, 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_Contacts_Additional', 'la_Text_ContactsGeneral', 'la_text_Additional', 'textarea', NULL, NULL, 10.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('product_RatingDelay_Interval', '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);
INSERT INTO ConfigurationAdmin VALUES ('product_RatingDelay_Value', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.1, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('product_ReviewDelay_Interval', '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);
INSERT INTO ConfigurationAdmin VALUES ('product_ReviewDelay_Value', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 20.02, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('ShowProductImagesInOrders', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsByDir', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.01, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsBy', '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);
INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsThenBy', '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);
INSERT INTO ConfigurationAdmin VALUES ('product_OrderProductsThenByDir', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.02, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('Product_NewDays', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Product_MinPopRating', 'la_Text_Products', 'la_fld_Product_MinPopRating', 'text', NULL, NULL, 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Product_MinPopVotes', 'la_Text_Products', 'la_fld_Product_MinPopVotes', 'text', NULL, NULL, 10.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Product_MaxHotNumber', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('products_EditorPicksAboveRegular', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('p_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 40.02, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_MaxImageCount', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 50.01, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_ThumbnailImageWidth', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 50.02, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_ThumbnailImageHeight', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 50.03, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_FullImageWidth', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_FullImageHeight', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Search_ShowMultiple_products', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_products', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_products', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_products', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_products', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_AffiliateStorageMethod', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session,2=la_opt_PermanentCookie', 40.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_AffiliateCookieDuration', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_RegisterAsAffiliate', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Comm_RecurringChargeInverval', 'la_Text_Orders', 'la_RecurringChargeInverval', 'text', NULL, NULL, 10.08, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Comm_AutoProcessRecurringOrders', 'la_Text_Orders', 'la_AutoProcessRecurringOrders', 'checkbox', NULL, NULL, 10.09, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('MaxAddresses', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.10, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Comm_PriceBracketCalculation', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL , '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal', '50', '0', '1');
INSERT INTO ConfigurationAdmin VALUES ('Comm_MaskProcessedCreditCards', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL , NULL , '10.11', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Allow_Order_Different_Types', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Order_Number_Format_P', '6', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Order_Number_Format_S', '3', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_RequireLoginBeforeCheckout', '0', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Enable_Backordering', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Next_Order_Number', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_StoreName', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Name', '' , 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Phone', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Fax', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Email', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Contacts_Additional', '', 'In-Commerce', 'in-commerce:contacts');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_Process_Backorders_Auto', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_MinPopVotes', '1', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Product_MinPopRating', '4', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_ItemTemplate', 'in-commerce/designs/detail', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_MaxImageCount', 5, 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_ThumbnailImageWidth', 120, 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_ThumbnailImageHeight', 120, 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_FullImageWidth', 450, 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'p_FullImageHeight', 450, 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Search_ShowMultiple_products', '1', 'In-Commerce', 'in-commerce:search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Keyword_products', '70', 'In-Commerce', 'in-commerce:search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Pop_products', '10', 'In-Commerce', 'in-commerce:search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Rating_products', '10', 'In-Commerce', 'in-commerce:search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Increase_products', '30', 'In-Commerce', 'in-commerce:search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_RecurringChargeInverval', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_AutoProcessRecurringOrders', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general');
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, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, NULL, 'In-Commerce', 'Order Submitted', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, NULL, 'In-Commerce', 'Order Submitted', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.APPROVE', NULL, 1, 0, NULL, 'In-Commerce', 'Order Approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.DENY', NULL, 1, 0, NULL, 'In-Commerce', 'Order Denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.SHIP', NULL, 1, 0, NULL, 'In-Commerce', 'Order Shipped', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, NULL, 'In-Commerce', 'Backorder Added', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, NULL, 'In-Commerce', 'Backorder Added', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'BACKORDER.FULLFILL', NULL, 1, 0, NULL, 'In-Commerce', 'Back-order is Fulfilled', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'BACKORDER.PROCESS', NULL, 1, 0, NULL, 'In-Commerce', 'Backorder Processed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 0, NULL, 'In-Commerce', 'Suggest product to a friend', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 1, NULL, 'In-Commerce', 'Suggest product to a friend', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, NULL, 'In-Commerce', 'Affiliate registered', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, NULL, 'In-Commerce', 'Affiliate registered', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment issued', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment issued', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate registration approved', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 0, 0, NULL, 'In-Commerce', 'Affiliate registration approved', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate registration denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 0, 0, NULL, 'In-Commerce', 'Affiliate registration denied', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment type changed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment type changed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Processed', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Processed', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Denied', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Denied', 1);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, NULL, 'In-Commerce', 'Gift Certificate', 0);
-INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, l1_Description, Type) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, NULL, 'In-Commerce', 'Gift Certificate', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, NULL, 'In-Commerce', 'Order Submitted', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.SUBMIT', NULL, 1, 1, NULL, 'In-Commerce', 'Order Submitted', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.APPROVE', NULL, 1, 0, NULL, 'In-Commerce', 'Order Approved', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.DENY', NULL, 1, 0, NULL, 'In-Commerce', 'Order Denied', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.SHIP', NULL, 1, 0, NULL, 'In-Commerce', 'Order Shipped', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, NULL, 'In-Commerce', 'Backorder Added', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.ADD', NULL, 1, 1, NULL, 'In-Commerce', 'Backorder Added', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.FULLFILL', NULL, 1, 0, NULL, 'In-Commerce', 'Back-order is Fulfilled', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'BACKORDER.PROCESS', NULL, 1, 0, NULL, 'In-Commerce', 'Backorder Processed', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 0, NULL, 'In-Commerce', 'Suggest product to a friend', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'PRODUCT.SUGGEST', NULL, 1, 1, NULL, 'In-Commerce', 'Suggest product to a friend', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, NULL, 'In-Commerce', 'Affiliate registered', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTER', NULL, 1, 1, NULL, 'In-Commerce', 'Affiliate registered', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment issued', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment issued', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate registration approved', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.APPROVED', NULL, 0, 0, NULL, 'In-Commerce', 'Affiliate registration approved', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate registration denied', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.REGISTRATION.DENIED', NULL, 0, 0, NULL, 'In-Commerce', 'Affiliate registration denied', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment type changed', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'AFFILIATE.PAYMENT.TYPE.CHANGED', NULL, 1, 0, NULL, 'In-Commerce', 'Affiliate payment type changed', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Processed', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.PROCESSED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Processed', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Denied', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'ORDER.RECURRING.DENIED', NULL, 1, 0, NULL, 'In-Commerce', 'Recurring Order Denied', 1);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, NULL, 'In-Commerce', 'Gift Certificate', 0);
+INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'USER.GIFTCERTIFICATE', NULL, 1, 0, NULL, 'In-Commerce', 'Gift Certificate', 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', 'lu_PermName_Product.Rate_desc', 'lu_PermName_Product.Rate_error', 'In-Commerce');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW', 'lu_PermName_Product.Review_desc', 'lu_PermName_Product.Review_error', 'In-Commerce');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.REVIEW.PENDING', 'lu_PermName_Product.Review_Pending_desc', ' lu_PermName_Product.Review_Pending_error', 'In-Commerce');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.ADD', 'lu_PermName_Product.Add_desc', 'lu_PermName_Product.Add_error', 'In-Commerce');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.DELETE', 'lu_PermName_Product.Delete_desc', 'lu_PermName_Product.Delete_error', 'In-Commerce');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.MODIFY', 'lu_PermName_Product.Modify_desc', 'lu_PermName_Product.Modify_desc', 'In-Commerce');
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PRODUCT.VIEW', 'lu_PermName_Product.View_desc', 'lu_PermName_Product.View_error', 'In-Commerce');
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 14, 1, 0, {ProductCatId});
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, 'CATEGORY.VIEW', 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, 'CATEGORY.VIEW', 12, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'PRODUCT.VIEW', 12, 1, 0, {ProductCatId});
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 11, 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:incommerce_configemail.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-commerce:incommerce_configemail.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);

Event Timeline