Page MenuHomeIn-Portal Phabricator

in-commerce
No OneTemporary

File Metadata

Created
Mon, Jan 6, 8:08 AM

in-commerce

Index: branches/5.1.x/units/products/products_tag_processor.php
===================================================================
--- branches/5.1.x/units/products/products_tag_processor.php (revision 13184)
+++ branches/5.1.x/units/products/products_tag_processor.php (revision 13185)
@@ -1,768 +1,772 @@
<?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 ProductsTagProcessor extends kCatDBTagProcessor {
function Rating($params)
{
$object =& $this->getObject($params);
$rating = round($object->GetDBField('CachedRating') );
$o = '';
for ($i = 0; $i < $rating; $i++) {
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_on_render_as,block_star_on')) );
}
for ($i = 0; $i < 5 - $rating; $i++) {
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'star_off_render_as,block_star_off')) );
}
return $o;
}
function NewMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('IsNew'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function HotMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('IsHot'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function TopSellerMark($params)
{
return $this->HotMark($params);
}
function PopMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('IsPop'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
function EdPickMark($params)
{
$object =& $this->getObject($params);
$o = '';
if($object->GetDBField('EditorsPick'))
{
$o .= $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
}
return $o;
}
/**
* Parses block only if item is favorite
*
* @param Array $params
* @return string
* @deprecated used only in default,onlinestore
*/
function FavoriteMark($params)
{
if ($this->IsFavorite($params)) {
return $this->Application->ParseBlock( Array( 'name' => $this->SelectParam($params, 'render_as,block') ) );
}
return '';
}
function CurrentCategory($params){
$conn=$this->Application->GetADODBConnection();
return $conn->GetOne("SELECT Name FROM ".TABLE_PREFIX."Category WHERE CategoryId=".$this->Application->GetVar("m_cat_id"));
}
function RateForm($params)
{
$params['name'] = $this->SelectParam($params, 'render_as,block');
$labels = explode(',', $params['labels']);
$o = '';
$star_block = $this->SelectParam($params, 'star_render_as,star_block');
for($i = 5; $i >= 0; $i--)
{
$params['rating'] = $i;
$params['label'] = $this->Application->Phrase($labels[5 - $i]);
$params['stars'] = '';
for($j = $i; $j > 0; $j--)
{
$params['stars'] .= $this->Application->ParseBlock(Array('name' => $star_block));
}
$o .= $this->Application->ParseBlock($params);
}
return $o;
}
/**
* Parses block for changing favorite status
*
* @param Array $params
* @return string
* @deprecated used only in default,onlinestore
*/
function FavoriteToggle($params)
{
$block_params = Array ();
$block_names = $this->IsFavorite($params) ? 'remove_favorite_render_as,block_remove_favorite' : 'add_favorite_render_as,block_add_favorite';
$block_params['name'] = $this->SelectParam($params, $block_names);
$params['template'] = $params[$this->IsFavorite($params) ? 'template_on_remove' : 'template_on_add'];
$remove_params = Array (
'remove_favorite_render_as', 'block_remove_favorite', 'add_to_wish_list_render_as', 'block_add_to_wish_list',
'add_favorite_render_as', 'block_add_favorite', 'remove_from_wish_list_render_as', 'block_remove_from_wish_list',
'template_on_remove', 'template_on_add'
);
foreach ($params as $param_name => $param_value) {
if (in_array($param_name, $remove_params)) {
unset($params[$param_name]);
}
}
$block_params['wish_list_toggle_link'] = $this->FavoriteToggleLink($params);
return $this->Application->ParseBlock($block_params);
}
function WishListToggleLink($params)
{
$params['block_add_favorite'] = $this->SelectParam($params, 'add_to_wish_list_render_as,block_add_to_wish_list');
$params['block_remove_favorite'] = $this->SelectParam($params, 'remove_from_wish_list_render_as,block_remove_from_wish_list');
return $this->FavoriteToggle($params);
}
function AddReviewLink($params)
{
$o = $this->Application->ParseBlock( Array('name' => $this->SelectParam($params, 'render_as,block')) );
return $o;
}
function ListProducts($params)
{
return $this->PrintList2($params);
}
function ListRelatedProducts($params)
{
// $related = &$this->Application->recallObject('rel');
return $this->PrintList2($params);
}
function BuildListSpecial($params)
{
if ($this->Special != '') return $this->Special;
if ( isset($params['parent_cat_id']) ) {
$parent_cat_id = $params['parent_cat_id'];
}
else {
$parent_cat_id = $this->Application->GetVar('c_id');
if (!$parent_cat_id) {
$parent_cat_id = $this->Application->GetVar('m_cat_id');
}
}
if ( isset($params['manufacturer']) ) {
$manufacturer = $params['manufacturer'];
}
else {
$manufacturer = $this->Application->GetVar('manuf_id');
}
$recursive = isset($params['recursive']);
$list_unique_key = $this->getUniqueListKey($params).$recursive;
if ($list_unique_key == '') {
return parent::BuildListSpecial($params);
}
return crc32($parent_cat_id.$list_unique_key.$manufacturer);
}
function ProductList($params)
{
if($params['shortlist'])
{
$params['per_page'] = $this->Application->ConfigValue('Comm_Perpage_Products_Short');
}
$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
switch($params['ListType'])
{
case 'favorites':
return $this->PrintList($params);
break;
case 'search':
default:
if(isset($params['block']))
{
return $this->PrintList($params);
}
else
{
$params['block'] = $params['block_main'];
$params['row_start_block'] = $params['block_row_start'];
$params['row_end_block'] = $params['block_row_end'];
return $this->PrintList2($params);
}
}
}
/**
* Adds product to recently viewed list (only in case, when not already there)
*
* @param Array $params
*/
function AddToRecent($params)
{
$recent_products = $this->Application->RecallVar('recent_products');
if (!$recent_products) {
$recent_products = Array();
}
else {
$recent_products = unserialize($recent_products);
}
$product_id = $this->Application->GetVar('p_id');
if (!in_array($product_id, $recent_products)) {
array_push($recent_products, $product_id);
$this->Application->StoreVar('recent_products', serialize($recent_products));
}
}
function SearchMoreLink($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
$o = '';
if($object->PerPage < $this->SearchResultsCount())
{
$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
}
return $o;
}
function AddToCartLink($params)
{
$object =& $this->getObject($params);
if ($object->GetDBField('HasRequiredOptions')) {
$t = $params['product_template'];
if (!$t) {
$theme =& $this->Application->recallObject('theme.current');
if ($theme->GetDBField('Name') == 'onlinestore') {
$t = 'in-commerce/product/details';
}
elseif ($theme->GetDBField('Name') == 'default') {
$t = 'in-commerce/product';
}
}
$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p');
}
else {
$t = $params['template'];
$link_params = Array('m_cat_id' => $object->GetDBField('CategoryId'), 'pass' => 'm,p,ord', 'ord_event' => 'OnAddToCart');
}
$this->Application->SetVar('p_id', $this->Application->GetVar($this->getPrefixSpecial().'_id'));
return $this->Application->HREF($t, '', $link_params);
}
function SearchResultsCount($params)
{
$search_results_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$sql = ' SELECT COUNT(ResourceId)
FROM '.$search_results_table.'
WHERE ItemType=11';
return $this->Conn->GetOne($sql);
}
function DetailsLink($params)
{
$this->Application->SetVar( $this->Prefix.'_id', $this->Application->GetVar($this->getPrefixSpecial().'_id') );
$ret = $this->Application->HREF('in-commerce/details', '', Array('pass' => 'all,p'));
return $ret;
}
function ProductLink($params)
{
return $this->ItemLink($params, 'product');
}
function ProductFileLink($params)
{
// 'p_id'=>'0', ??
$params = array_merge($params, Array('pass'=>'all,m,p,file.downl'));
$product_id = getArrayValue($params,'product_id');
if (!$product_id) {
$product_id = $this->Application->GetVar($this->Prefix.'_id');
}
$params['p_id'] = $product_id;
$product =& $this->Application->recallObject($this->getPrefixSpecial());
$params['m_cat_id'] = $product->GetDBField('CategoryId');
$main_processor =& $this->Application->recallObject('m_TagProcessor');
return $main_processor->T($params);
}
/*
function MoreLink($params)
{
$object =& $this->Application->recallObject( $this->getPrefixSpecial() , $this->Prefix.'_List', $params );
$favorites_tag_processor =& $this->Application->recallObject('fav_TagProcessor');
$o = '';
if($object->PerPage < $favorites_tag_processor->FavoriteProductCount( Array('filter' => 'all') ))
{
$o = $this->Application->ParseBlock( Array('name' => $params['block']) );
}
return $o;
}
*/
function GetMarkedVal($params)
{
$list =& $this->GetList($params);
return $this->Application->RecallVar($list->getPrefixSpecial().$params['name']);
}
function SortingOptions($params)
{
$list =& $this->GetList($params);
$sorting_field_selected = $this->Application->RecallVar($list->getPrefixSpecial().$params['sorting_select_name']);
if (!$sorting_field_selected){
$sorting_field_selected = $this->Application->ConfigValue('product_OrderProductsBy');
}
- $field_list_plain = $this->Conn->GetOne('SELECT ValueList FROM '.TABLE_PREFIX.'ConfigurationAdmin WHERE VariableName = '.$this->Conn->qstr('product_OrderProductsBy') );
+ $sql = 'SELECT ValueList
+ FROM ' . TABLE_PREFIX . 'ConfigurationValues
+ WHERE VariableName = "product_OrderProductsBy"';
+ $field_list_plain = $this->Conn->GetOne($sql);
+
$field_list = explode(',', $field_list_plain);
$o = '';
foreach ($field_list as $key=>$field){
list($fieldname, $fieldlabel) = explode('=', $field);
$option_params = $this->prepareTagParams($params);
$option_params['fieldname'] = $fieldname;
$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
$option_params['name'] = $params['block_options'];
if ($fieldname == $sorting_field_selected){
$option_params['selected'] = 'selected';
}else{
$option_params['selected'] = '';
}
$o .= $this->Application->ParseBlock($option_params);
}
return $o;
}
function SortingDirectionOptions($params)
{
$list =& $this->GetList($params);
$sorting_dir_selected = $this->Application->RecallVar($list->getPrefixSpecial().$params['sorting_select_name']);
if (!$sorting_dir_selected){
$sorting_dir_selected = $this->Application->ConfigValue('product_OrderProductsByDir');
}
$o = '';
$field_list = array('asc' => 'lu_Ascending', 'desc' => 'lu_Descending');
foreach ($field_list as $fieldname=>$fieldlabel){
$option_params = $this->prepareTagParams($params);
$option_params['fieldname'] = $fieldname;
$option_params['fieldlabel'] = $this->Application->Phrase($fieldlabel);
$option_params['name'] = $params['block_options'];
if ($fieldname == $sorting_dir_selected){
$option_params['selected'] = 'selected';
}else{
$option_params['selected'] = '';
}
$o .= $this->Application->ParseBlock($option_params);
}
return $o;
}
function ErrorMessage($params)
{
if( $this->Application->GetVar('keywords_too_short') )
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'keywords_too_short_render_as,block_keywords_too_short')));
}
elseif( $this->Application->GetVar('adv_search_error') )
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'adv_search_error_render_as,block_adv_search_error')));
}
else
{
$ret = $this->Application->ParseBlock(Array('name' => $this->SelectParam($params, 'no_found_render_as,block_no_found')));
}
return $ret;
}
function ListReviews($params)
{
$review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->PrintList($params);
}
function ReviewCount($params)
{
$review_tag_processor =& $this->Application->recallObject('rev.product_TagProcessor');
return $review_tag_processor->TotalRecords($params);
}
function InitList($params){
$passed_manuf_id = $this->Application->GetVar('manuf_id');
if ($passed_manuf_id && !isset($params['manufacturer'])){
$params['manufacturer'] = $passed_manuf_id;
}
parent::InitList($params);
}
/**
* Builds link to manufacturer page
*
* @param Array $params
* @return string
*/
function ManufacturerLink($params)
{
if ( array_key_exists('manufacturer_id', $params) ) {
// use direct manufacturer from tag
$params['manuf_id'] = $params['manufacturer_id'];
unset($params['manufacturer_id']);
}
else {
// use product's manufacturer
$object =& $this->getObject($params);
$item_manufacturer_id = $object->GetDBField('ManufacturerId');
if ($item_manufacturer_id){
$params['manuf_id'] = $item_manufacturer_id;
}
}
$params['pass'] = 'm,manuf';
$params['m_cat_id'] = 0;
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function AlreadyReviewed($params)
{
$rev_tag_processor =& $this->Application->recallObject('rev_TagProcessor');
return $rev_tag_processor->AlreadyReviewed($params);
}
function PrepareSearchResults($params)
{
$names_mapping = $this->Application->GetVar('NamesToSpecialMapping');
if($this->Application->GetVar('search_type') == 'advanced' || !getArrayValue($names_mapping, $this->Prefix, 'search_results'))
{
$params = Array('list_name' => 'search_results',
'types' => 'search',
'parent_cat_id' => 'any',
'recursive' => 'true',
'per_page' => 'short_list'
);
$this->InitList($params);
}
return '';
}
function Available($params)
{
$object =& $this->Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params);
if (!$object->GetDBField('InventoryStatus')) return true;
$backordering = $this->Application->ConfigValue('Comm_Enable_Backordering');
if ($object->GetDBField('InventoryStatus') == 2) {
$poc_table = $this->Application->getUnitOption('poc', 'TableName');
$sql = 'SELECT SUM(IF(QtyInStock > '.$object->GetDBField('QtyInStockMin').', 1, 0))
FROM '.$poc_table.'
WHERE (ProductId = '.$object->GetID().') AND (Availability = 1)';
$stock_available = $this->Conn->GetOne($sql) > 0; // at least one option combination present
}
else {
$stock_available = $object->GetDBField('QtyInStock') > $object->GetDBField('QtyInStockMin');
}
$prod_backordering = $object->GetDBField('BackOrder');
if ($stock_available) return true;
// stock is NOT available:
if (!$backordering || $prod_backordering == 0) return false; // if backordering is generaly disabled or disabled for product (Never)
// backordering enabled; (auto or always mode)
return true;
}
function IsSubscription($params)
{
$object = &$this->Application->recallObject($this->getPrefixSpecial());
return ($object->GetDBField('Type') == 2);
}
function IsTangible($params)
{
$object = &$this->Application->recallObject($this->getPrefixSpecial());
return ($object->GetDBField('Type') == 1);
}
function HasFiles($params)
{
$sql = 'SELECT COUNT(FileId) FROM '.$this->Application->getUnitOption('file', 'TableName').'
WHERE ProductId = '.$this->Application->GetVar('p_id').' AND Status = 1';
return $this->Conn->GetOne($sql) ? 1 : 0;
}
function UniqueFileName($params)
{
$file_object =& $this->Application->recallObject('file.downl');
return ($file_object->GetDBField('Name') &&
$file_object->GetDBField('Name') != $file_object->GetDBField('FilePath'))
? 1 : 0;
}
function FileDownload($params)
{
$file_id = $this->Application->GetVar('file.downl_id');
$product_id = $file_id ? $this->Conn->GetOne('SELECT ProductId
FROM '.$this->Application->getUnitOption('file', 'TableName').'
WHERE FileId = '.$file_id) :
$this->Application->GetVar($this->getPrefixSpecial().'_id');
$download_helper_class = $this->Application->getUnitOption($this->Prefix, 'DownloadHelperClass');
if (!$download_helper_class) {
$download_helper_class = 'DownloadHelper';
}
$download_helper =& $this->Application->recallObject($download_helper_class);
if (!$download_helper->CheckAccess($file_id, $product_id)) {
$this->Application->ApplicationDie('File Access permission check failed!');
}
$file_info = $download_helper->SendFile($file_id, $product_id);
$download_helper->LogDownload($product_id, $file_info);
define('DBG_SKIP_REPORTING', 1);
$this->Application->ApplicationDie();
}
function PictureLink($params)
{
if (getArrayValue($params, 'picture_list')) {
$params['img_id'] = $this->Application->GetVar('img_id');
$params['pass'] = 'all,p,img';
unset($params['picture_list']);
}
else {
$params['pass'] = 'all,p';
}
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function ShouldListOptions($params)
{
$object =& $this->getObject($params);
$req_filter = '';
if (getArrayValue($params, 'required_only')) {
$req_filter = ' AND Required = 1';
}
$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID().$req_filter;
$res = $this->Conn->GetOne($query);
return $res > 0;
}
function CountOptions($params)
{
$object =& $this->getObject($params);
$query = 'SELECT COUNT(*) FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductId = '.$object->GetID();
$res = $this->Conn->GetOne($query);
$max = $this->SelectParam($params, 'greater');
if (!$max) $max = 0;
return $res > $max;
}
function OptionsUpdateMode($params)
{
return $this->Application->GetVar('orditems_id') !== false;
}
function OptionsHaveError($params)
{
return $this->Application->GetVar('opt_error') > 0;
}
function OptionsError($params)
{
switch ($this->Application->GetVar('opt_error')) {
case 1:
return $this->Application->Phrase($params['required']);
case 2:
return $this->Application->Phrase($params['not_available']);
}
}
function ListShippingTypes($params)
{
$quote_engine_collector =& $this->Application->recallObject('ShippingQuoteCollector');
$types = $quote_engine_collector->GetAvailableShippingTypes();
$object =& $this->getObject($params);
$selected = $object->GetDBField('ShippingLimitation');
$selected = explode('|', substr($selected, 1, -1));
$o = '';
foreach ($types as $a_type)
{
$is_selected = in_array($a_type['_Id'], $selected);
$continue = $params['mode'] == 'selected' ? !$is_selected : $is_selected;
if ($continue) continue;
$block_params = $a_type;
$block_params['name'] = $params['render_as'];
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
function PageLink($params)
{
$manufacturer_id = $this->Application->GetVar('manuf_id');
if ($manufacturer_id) {
$params['pass'] = 'm,'.$this->getPrefixSpecial().',manuf';
}
return parent::PageLink($params);
}
/**
* Calculate savings based on price & market price relationship
*
* @param Array $params
* @return int
*/
function Savings($params)
{
$object =& $this->getObject($params);
/* @var $object kDBItem */
$price = $object->GetDBField('Price');
$msrp = $object->GetDBField('MSRP');
$value = 0;
if (isset($params['type']) && ($params['type'] == 'percent')) {
if ($msrp > 0) {
return 100 - round($price * 100 / $msrp);
}
}
else {
if ($msrp > $price) {
$value = $msrp - $price;
}
}
if (isset($params['currency'])) {
$lang =& $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
$iso = $this->GetISO($params['currency']);
$value = $this->ConvertCurrency($value, $iso);
$value = $lang->formatNumber( sprintf('%.2f', $value) );
$value = $this->AddCurrencySymbol($value, $iso);
}
return $value;
}
/**
* Hides permission tab, when it's not allowed by configuration settings
*
* @param Array $params
*/
function ModifyUnitConfig($params)
{
$edit_tab_presets = $this->Application->getUnitOption($this->Prefix, 'EditTabPresets');
$edit_tab_preset = $edit_tab_presets['Default'];
$object =& $this->getObject($params);
/* @var $object kDBItem */
$product_type = $object->GetDBField('Type');
if ($product_type != PRODUCT_TYPE_TANGIBLE) {
unset($edit_tab_preset['inventory']);
}
if ($product_type == PRODUCT_TYPE_SUBSCRIPTION) {
unset($edit_tab_preset['options']);
}
else {
unset($edit_tab_preset['access_and_pricing']);
}
if ($product_type != PRODUCT_TYPE_TANGIBLE && $product_type != PRODUCT_TYPE_PACKAGE) {
unset($edit_tab_preset['pricing']);
}
else {
unset($edit_tab_preset['pricing2']);
}
if ($product_type != PRODUCT_TYPE_DOWNLOADABLE) {
unset($edit_tab_preset['files_and_pricing']);
}
if ($product_type != PRODUCT_TYPE_PACKAGE) {
unset($edit_tab_preset['package_content']);
}
$edit_tab_presets['Default'] = $edit_tab_preset;
$this->Application->setUnitOption($this->Prefix, 'EditTabPresets', $edit_tab_presets);
}
}
\ No newline at end of file
Index: branches/5.1.x/units/affiliates/affiliates_event_handler.php
===================================================================
--- branches/5.1.x/units/affiliates/affiliates_event_handler.php (revision 13184)
+++ branches/5.1.x/units/affiliates/affiliates_event_handler.php (revision 13185)
@@ -1,535 +1,534 @@
<?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 AffiliatesEventHandler extends kDBEventHandler {
/**
* Allows to override standart permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnItemBuild' => Array ('self' => true),
'OnChangePaymentType' => Array ('self' => true),
'OnBecomeAffiliate' => Array ('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Generate new affiliate code
*
* @param kEvent $event
* @return string
*/
function generateAffiliateCode(&$event)
{
// accepts 1 - 36
$number_length = 11;
$num_chars = Array( '1'=>'a','2'=>'b','3'=>'c','4'=>'d','5'=>'e','6'=>'f',
'7'=>'g','8'=>'h','9'=>'i','10'=>'j','11'=>'k','12'=>'l',
'13'=>'m','14'=>'n','15'=>'o','16'=>'p','17'=>'q','18'=>'r',
'19'=>'s','20'=>'t','21'=>'u','22'=>'v','23'=>'w','24'=>'x',
'25'=>'y','26'=>'z','27'=>'0','28'=>'1','29'=>'2','30'=>'3',
'31'=>'4','32'=>'5','33'=>'6','34'=>'7','35'=>'8','36'=>'9');
$ret = '';
for($i=1; $i<=$number_length; $i++)
{
mt_srand((double)microtime() * 1000000);
$num = mt_rand(1,36);
$ret .= $num_chars[$num];
}
$ret = strtoupper($ret);
$idfield = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$sql = 'SELECT %s FROM %s WHERE AffiliateCode = %s';
$code_found = $this->Conn->GetOne( sprintf($sql, $idfield, $table, $this->Conn->qstr($ret) ) );
if($code_found) return $this->generateAffiliateCode($event);
return $ret;
}
/**
* Creates new affiliate code when new affiliate is created
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
$object =& $event->getObject( Array('skip_autoload'=>true) );
$object->SetDBField('AffiliateCode', $this->generateAffiliateCode($event) );
}
/**
* Stores affiliate id using method from Config (session or cookie) if correct code is present in url
*
* @param kEvent $event
* @return bool
*/
function OnStoreAffiliate(&$event)
{
$event->Init($event->Prefix, '-item');
$object =& $event->getObject( Array('skip_autoload'=>true) );
$affiliate_storage_method = $this->Application->ConfigValue('Comm_AffiliateStorageMethod');
$affiliate = $this->Application->GetVar('affiliate');
if($affiliate)
{
$object->Load($affiliate, 'AffiliateCode');
}
elseif($affiliate_storage_method == 2)
{
$affiliate_id = $this->Application->GetVar('affiliate_id');
$object->Load($affiliate_id);
}
if( $object->isLoaded() && ($object->GetDBField('Status') == 1) )
{
// user is found with such email
$affiliate_user =& $this->Application->recallObject('u.affiliate', null, Array('skip_autoload'=>true) );
$affiliate_user->Load( $object->GetDBField('PortalUserId') );
if($affiliate_user->GetDBField('Status') == 1)
{
$affiliate_id = $object->GetDBField('AffiliateId');
$this->Application->setVisitField('AffiliateId', $affiliate_id);
if($affiliate_storage_method == 1)
{
$this->Application->StoreVar('affiliate_id', $affiliate_id); // per session
}
else
{
setcookie('affiliate_id', $affiliate_id, $this->getCookieExpiration(), BASE_PATH, '.'.SERVER_NAME); // in cookie
}
}
}
}
/**
* Returns affiliate cookie expiration date
*
* @return int
*/
function getCookieExpiration()
{
$expire = $this->Application->ConfigValue('Comm_AffiliateCookieDuration'); // days
return adodb_mktime() + $expire * 24 * 60 * 60;
}
/**
* Calculate what amount is earned by affiliate based on it's affiliate plan & store it
*
* @param kEvent $event
* @author Alex
*/
function OnOrderApprove(&$event)
{
$order =& $this->Application->recallObject( $event->getEventParam('Order_PrefixSpecial') );
$affiliate_id = $order->GetDBField('AffiliateId');
if(!$affiliate_id) return false;
$object =& $event->getObject( Array('ship_autoload' => true) );
if( $object->Load($affiliate_id) )
{
$affiliate_plan =& $this->Application->recallObject('ap', null, Array('skip_autoload'=>true) );
$affiliate_plan->Load( $object->GetDBField('AffiliatePlanId') );
if( $affiliate_plan->isLoaded() )
{
$sql = 'SELECT SUM(Quantity) FROM %s WHERE OrderId = %s';
$orderitems_table = $this->Application->getUnitOption('orditems', 'TableName');
$items_sold = $this->Conn->GetOne( sprintf($sql, $orderitems_table, $order->GetID() ) );
$object->SetDBField('AccumulatedAmount', $object->GetDBField('AccumulatedAmount') + $order->GetDBField('TotalAmount') );
$object->SetDBField('ItemsSold', $object->GetDBField('ItemsSold') + $items_sold);
switch( $affiliate_plan->GetDBField('PlanType') )
{
case 1: // by amount
$value = $object->GetDBField('AccumulatedAmount');
break;
case 2: // by items sold (count)
$value = $object->GetDBField('ItemsSold');
break;
}
$apb_table = $this->Application->getUnitOption('apbrackets', 'TableName');
$sql = 'SELECT Percent FROM %1$s WHERE (%2$s >= FromAmount) AND ( (%2$s <= ToAmount) OR (ToAmount = -1) ) AND (AffiliatePlanId = %3$s)';
$commission_percent = $this->Conn->GetOne( sprintf($sql, $apb_table, $this->Conn->qstr($value), $affiliate_plan->GetID() ) );
// process only orders of current affiliate from period start to this order date
$period_ends = $order->GetDBField('OrderDate');
$period_starts = $this->getPeriodStartTS( $period_ends, $affiliate_plan->GetDBField('ResetInterval') );
$sql = 'SELECT AffiliateCommission, (SubTotal+ShippingCost+VAT) AS TotalAmount, OrderId FROM '.$order->TableName.' WHERE OrderDate >= %s AND OrderDate <= %s';
$amount_to_pay_before = 0;
$amount_to_pay_after = 0;
$order_update_sql = 'UPDATE '.$order->TableName.' SET AffiliateCommission = %s WHERE '.$order->IDField.' = %s';
$orders = $this->Conn->Query( sprintf($sql, $period_starts, $period_ends), 'OrderId' );
if($orders)
{
foreach($orders as $order_id => $order_data)
{
$amount_to_pay_before += $order_data['AffiliateCommission'];
$commission = $order_data['TotalAmount'] * ($commission_percent / 100);
$this->Conn->Query( sprintf($order_update_sql, $this->Conn->qstr($commission), $order_id) );
$amount_to_pay_after += $commission;
}
}
$object->SetDBField('AmountToPay', $object->GetDBField('AmountToPay') - $amount_to_pay_before + $amount_to_pay_after );
$object->SetDBField('LastOrderDate_date', $order->GetDBField('OrderDate_date') );
$object->SetDBField('LastOrderDate_time', $order->GetDBField('OrderDate_time') );
$object->Update();
$order->SetDBField('AffiliateCommission', $commission); // set last commission to this order, because ApproveEvent was called for him
}
}
}
function OnCheckAffiliateAgreement(&$event)
{
$user_object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true));
$items_info = $this->Application->GetVar('u');
if($items_info)
{
list($id,$field_values) = each($items_info);
$user_object->SetFieldsFromHash($field_values);
$user_object->setID($id);
$user_object->setLogin();
}
$require_affiliate = ($this->Application->GetVar('RegisterAsAffiliate') == 'on');
if($require_affiliate && !$this->Application->GetVar('AgreeToAffiliateTerms') )
{
$this->Application->SetVar('MustAgreeToTerms', 1);
$event->MasterEvent->status = erFATAL;
}
if($require_affiliate && !$this->Application->GetVar('SSN') )
{
$this->Application->SetVar('SSNRequiredError', 1);
$event->MasterEvent->status = erFATAL;
}
if( ($event->MasterEvent->status == erFATAL) && $items_info ) $user_object->Validate();
}
/**
* [AFTER HOOK] to u:OnCreate
*
* @param kEvent $event
*/
function OnRegisterAsAffiliate(&$event)
{
if($this->Application->GetVar('RegisterAsAffiliate') != 'on' || $event->MasterEvent->status != erSUCCESS)
{
return;
}
$object =& $event->getObject( Array('skip_autoload' => true) );
$sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
WHERE IsPrimary = 1';
$affiliate_plan = $this->Conn->GetOne($sql);
$object->SetDBField('PortalUserId', $this->Application->GetVar('u.current_id'));
$object->SetDBField('Status', 2);
$object->SetDBField('AffiliatePlanId', $affiliate_plan);
$object->SetDBField('SSN', $this->Application->GetVar('SSN'));
$object->SetDBField('Comments', $this->Application->GetVar('Comments'));
$object->SetDBField('PaymentTypeId', $this->Application->GetVar('PaymentTypeId'));
$object->Create();
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTER', $this->Application->GetVar('u.current_id'));
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTER');
}
function OnBecomeAffiliate(&$event)
{
if(!$this->Application->GetVar('AgreeToAffiliateTerms'))
{
$this->Application->SetVar('MustAgreeToTerms', 1);
$event->status = erFATAL;
}
if(!$this->Application->GetVar('SSN'))
{
$this->Application->SetVar('SSNRequiredError', 1);
$event->status = erFATAL;
}
if($event->status == erFATAL)
{
return;
}
$object =& $event->getObject( Array('skip_autoload' => true) );
$sql = 'SELECT AffiliatePlanId FROM '.$this->Application->getUnitOption('ap', 'TableName').'
WHERE IsPrimary = 1';
$affiliate_plan = $this->Conn->GetOne($sql);
$object->SetDBField('PortalUserId', $this->Application->RecallVar('user_id'));
$object->SetDBField('Status', 2);
$object->SetDBField('AffiliatePlanId', $affiliate_plan);
$object->SetDBField('SSN', $this->Application->GetVar('SSN'));
$object->SetDBField('Comments', $this->Application->GetVar('Comments'));
$object->SetDBField('PaymentTypeId', $this->Application->GetVar('PaymentTypeId'));
$object->Create();
if($next_template = $this->Application->GetVar('next_template'))
{
$event->redirect = $next_template;
}
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTER', $this->Application->RecallVar('user_id'));
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTER');
}
function OnChangePaymentType(&$event)
{
$user_id = $this->Application->RecallVar('user_id');
$object =& $event->getObject( Array('skip_autoload' => true) );
$object->Load( Array('PortalUserId' => $user_id) );
$object->SetDBField('Comments', $this->Application->GetVar('Comments'));
$object->SetDBField('PaymentTypeId', $this->Application->GetVar('PaymentTypeId'));
$object->Update();
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.PAYMENT.TYPE.CHANGED', $user_id);
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.PAYMENT.TYPE.CHANGED');
$event->redirect = $this->Application->GetVar('next_template');
$event->status = erSUCCESS;
}
/**
* If new payments made, then send email about that
*
* @param kEvent $event
*/
function OnBeforeDeleteFromLive(&$event)
{
$payment_object =& $this->Application->recallObject('apayments', 'apayments', Array('skip_autoload' => true) );
$id = $event->getEventParam('id');
$ap_table = $this->Application->getUnitOption('apayments', 'TableName');
$sql = 'SELECT AffiliatePaymentId FROM '.$ap_table.' WHERE AffiliateId = '.$id;
$live_ids = $this->Conn->GetCol($sql);
$sql = 'SELECT AffiliatePaymentId FROM '.$payment_object->TableName.' WHERE AffiliateId = '.$id;
$temp_ids = $this->Conn->GetCol($sql);
$new_ids = array_diff($temp_ids, $live_ids);
foreach($new_ids as $payment_id)
{
$payment_object->Load($payment_id);
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.PAYMENT', $payment_object->GetDBField('PortalUserId'));
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.PAYMENT');
}
$object =& $event->getObject();
$passed_id = $event->getEventParam('id');
if( $object->GetID() != $passed_id )
{
$object->Load($passed_id);
}
$sql = 'SELECT Status FROM '.$this->Application->getUnitOption( $event->Prefix, 'TableName' ).' WHERE '.$object->IDField.' = '.$object->GetID();
$old_status = $this->Conn->GetOne($sql);
if( $old_status == 2 && $object->GetDBField('Status') == 1 )
{
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTRATION.APPROVED', $object->GetDBField('PortalUserId'));
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.APPROVED');
}
}
/**
* Resets statistics (accumulated amount & items sold) for affiliates based on ResetInterval in their plan
*
* @param kEvent $event
* @author Alex
*/
function OnResetStatistics(&$event)
{
$intervals = Array(86400 => 'la_day', 604800 => 'la_week', 2628000 => 'la_month', 7884000 => 'la_quartely', 31536000 => 'la_year');
$affil_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$ap_table = $this->Application->getUnitOption('ap', 'TableName');
$sql = 'SELECT AffiliateId
FROM '.$affil_table.' a
LEFT JOIN '.$ap_table.' ap ON a.AffiliatePlanId = ap.AffiliatePlanId';
$base_time = adodb_mktime();
$where_clause = Array();
foreach($intervals as $interval_length => $interval_description)
{
$start_timestamp = $this->getPeriodStartTS($base_time, $interval_length);
$where_clause[] = 'ap.ResetInterval = '.$interval_length.' AND LastOrderDate < '.$start_timestamp;
}
$sql .= ' WHERE ('.implode(') OR (', $where_clause).')';
$affiliate_ids = $this->Conn->GetCol($sql);
- if( $this->Application->isDebugMode() )
- {
+ if ($affiliate_ids && defined('DEBUG_MODE') && DEBUG_MODE && $this->Application->isDebugMode()) {
$this->Application->Debugger->appendHTML('Affiliates Pending Totals Reset: ');
print_pre($affiliate_ids);
}
$sql = 'UPDATE '.$affil_table.' SET AccumulatedAmount = 0, ItemsSold = 0, LastOrderDate = %s WHERE AffiliateId IN (%s)';
if($affiliate_ids) $this->Conn->Query( sprintf($sql, $base_time, implode(',', $affiliate_ids) ) );
}
/**
* Returns calendar period start timestamp based on current timestamp ($base_time) and $period_length
*
* @param int $base_time
* @param int $period_length
* @return int
* @author Alex
*/
function getPeriodStartTS($base_time, $period_length)
{
switch($period_length)
{
case 86400: // day
$start_timestamp = adodb_mktime(0,0,0, adodb_date('m', $base_time), adodb_date('d', $base_time), adodb_date('Y', $base_time) );
break;
case 604800: // week
$day_seconds = 86400;
$first_week_day = $this->Application->ConfigValue('FirstDayOfWeek');
$morning = adodb_mktime(0,0,0, adodb_date('m', $base_time), adodb_date('d', $base_time), adodb_date('Y', $base_time) );
$week_day = adodb_date('w', $morning);
if($week_day == $first_week_day)
{
// if it is already first week day, then don't search for previous week day
$day_diff = 0;
}
else
{
// this way, because sunday is 0, but not 7 as it should be
$day_diff = $week_day != 0 ? $week_day - $first_week_day: 7 - $first_week_day;
}
$start_timestamp = $morning - $day_diff * $day_seconds;
break;
case 2628000: // month
$start_timestamp = adodb_mktime(0,0,0, adodb_date('m', $base_time), 1, adodb_date('Y', $base_time) );
break;
case 7884000: // quartal
$first_quartal_month = (ceil( adodb_date('m', $base_time) / 3)-1)*3 + 1;
$start_timestamp = adodb_mktime(0,0,0, $first_quartal_month, 1, adodb_date('Y', $base_time) );
break;
case 31536000:
$start_timestamp = adodb_mktime(0,0,0,1,1, adodb_date('Y', $base_time) );
break;
}
return $start_timestamp;
}
function iterateItems(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = erFAIL;
return;
}
$object =& $event->getObject( Array('skip_autoload' => true) );
$ids = $this->StoreSelectedIDs($event);
if($ids)
{
$status_field = array_shift( $this->Application->getUnitOption($event->Prefix,'StatusField') );
foreach($ids as $id)
{
$object->Load($id);
switch ($event->Name)
{
case 'OnMassApprove':
$object->SetDBField($status_field, 1);
break;
case 'OnMassDecline':
$object->SetDBField($status_field, 0);
break;
case 'OnMassMoveUp':
$object->SetDBField('Priority', $object->GetDBField('Priority') + 1);
break;
case 'OnMassMoveDown':
$object->SetDBField('Priority', $object->GetDBField('Priority') - 1);
break;
}
if( $object->Update() )
{
switch ($event->Name)
{
case 'OnMassApprove':
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTRATION.APPROVED', $object->GetDBField('PortalUserId'));
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.APPROVED');
break;
case 'OnMassDecline':
$email_event_user =& $this->Application->EmailEventUser('AFFILIATE.REGISTRATION.DENIED', $object->GetDBField('PortalUserId'));
$email_event_admin =& $this->Application->EmailEventAdmin('AFFILIATE.REGISTRATION.DENIED');
break;
}
$event->status=erSUCCESS;
$event->redirect_params = Array('opener' => 's'); //stay!
}
else
{
$event->status=erFAIL;
$event->redirect=false;
break;
}
}
}
}
/**
* Checks that user in affiliate record matches current user
* (non permission-based)
*
* @param kEvent $event
* @return bool
*/
function checkItemStatus(&$event)
{
if ($this->Application->isAdminUser) {
return true;
}
$object =& $event->getObject();
if (!$object->isLoaded()) {
return true;
}
return $object->GetDBField('PortalUserId') == $this->Application->RecallVar('user_id');
}
}
\ No newline at end of file
Index: branches/5.1.x/install/install_data.sql
===================================================================
--- branches/5.1.x/install/install_data.sql (revision 13184)
+++ branches/5.1.x/install/install_data.sql (revision 13185)
@@ -1,585 +1,515 @@
-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');
+# Section "in-commerce:contacts":
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_CompanyName', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_CompanyName', 'text', NULL, NULL, 10.01, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_StoreName', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_StoreName', 'text', NULL, NULL, 10.02, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Name', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_ContactName', 'text', NULL, NULL, 10.03, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Phone', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Phone', 'text', NULL, NULL, 10.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Fax', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Fax', 'text', NULL, NULL, 10.05, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Email', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Email', 'text', NULL, NULL, 10.06, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Contacts_Additional', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ContactsGeneral', 'la_text_Additional', 'textarea', NULL, NULL, 10.07, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine1', 'text', NULL, NULL, 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', '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 ConfigurationValues VALUES(DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 30.05, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1);
+
+# Section "in-commerce:general":
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RequireLoginBeforeCheckout', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_orders_RequireLogin', 'checkbox', NULL, NULL, 10.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Allow_Order_Different_Types', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_AllowOrderDifferentTypes', 'checkbox', NULL, NULL, 10.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Enable_Backordering', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_EnableBackordering', 'checkbox', NULL, NULL, 10.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Process_Backorders_Auto', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_ProcessBackorderingAuto', 'checkbox', NULL, NULL, 10.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Next_Order_Number', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_orders_NextOrderNumber', 'text', NULL, NULL, 10.05, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Order_Number_Format_P', '6', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_OrderMainNumberDigits', 'text', NULL, NULL, 10.06, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Order_Number_Format_S', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_OrderSecNumberDigits', 'text', NULL, NULL, 10.07, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RecurringChargeInverval', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_RecurringChargeInverval', 'text', NULL, NULL, 10.08, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AutoProcessRecurringOrders', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_AutoProcessRecurringOrders', 'checkbox', NULL, NULL, 10.09, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.1, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL, NULL, 10.11, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank,3=la_EuropeanCentralBank,1=la_BankOfLatvia', 20.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session,2=la_opt_PermanentCookie', 40.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal', 50, 0, 1);
+
+# Section "in-commerce:output":
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.01, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MinPopRating', '4', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MinPopRating', 'text', NULL, NULL, 10.06, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MinPopVotes', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MinPopVotes', 'text', NULL, NULL, 10.07, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.1, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 20.02, 1, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 20.02, 2, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_ItemTemplate', 'in-commerce/designs/detail', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 40.02, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_MaxImageCount', '5', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 50.01, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_ThumbnailImageWidth', '120', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 50.02, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_ThumbnailImageHeight', '120', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 50.03, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_FullImageWidth', '450', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 50.04, 0, 0);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_FullImageHeight', '450', 'In-Commerce', 'in-commerce:output', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 50.05, 0, 0);
+
+# Section "in-commerce:search":
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_ShowMultiple_products', '1', 'In-Commerce', 'in-commerce:search', 'la_config_ShowMultiple', 'la_Text_MultipleShow', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Keyword_products', '70', 'In-Commerce', 'in-commerce:search', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Pop_products', '10', 'In-Commerce', 'in-commerce:search', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Rating_products', '10', 'In-Commerce', 'in-commerce:search', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Increase_products', '30', 'In-Commerce', 'in-commerce:search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1);
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, 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