Index: branches/5.1.x/install/install_data.sql
===================================================================
diff -u -r13441 -r13465
--- branches/5.1.x/install/install_data.sql	(.../install_data.sql)	(revision 13441)
+++ branches/5.1.x/install/install_data.sql	(.../install_data.sql)	(revision 13465)
@@ -10,13 +10,13 @@
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_AddressLine2', 'text', NULL, NULL, 20.02, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_City', 'text', NULL, NULL, 20.03, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_ZIP', 'text', NULL, NULL, 20.04, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 20.05, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 20.05, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_StoreAddress', 'la_State', 'text', NULL, '', 20.06, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine1', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine1', 'text', NULL, NULL, 30.01, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_AddressLine2', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_AddressLine2', 'text', NULL, NULL, 30.02, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_City', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_City', 'text', NULL, NULL, 30.03, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_ZIP', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_ZIP', 'text', NULL, NULL, 30.04, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none,<SQL>SELECT DestName AS OptionName, DestAbbr AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 30.05, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_Country', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_Country', 'select', NULL, '0=lu_none||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 30.05, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Shipping_State', '', 'In-Commerce', 'in-commerce:contacts', 'la_Text_ShippingAddress', 'la_State', 'text', NULL, NULL, 30.06, 0, 1, NULL);
 
 # Section "in-commerce:general":
@@ -32,18 +32,18 @@
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxAddresses', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaxAddresses', 'text', NULL, NULL, 10.1, 0, 0, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_MaskProcessedCreditCards', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Orders', 'la_MaskProcessedCreditCards', 'checkbox', NULL, NULL, 10.11, 0, 0, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AllowOrderingInNonPrimaryCurrency', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_AllowOrderingInNonPrimaryCurrency', 'checkbox', NULL, NULL, 20.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank,3=la_EuropeanCentralBank,1=la_BankOfLatvia', 20.02, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_ExchangeRateSource', '3', 'In-Commerce', 'in-commerce:general', 'la_Text_Currencies', 'la_ExchangeRateSource', 'select', NULL, '2=la_FederalReserveBank||3=la_EuropeanCentralBank||1=la_BankOfLatvia', 20.02, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_DefaultCouponDuration', '14', 'In-Commerce', 'in-commerce:general', 'la_Text_Coupons', 'la_conf_DefaultCouponDuration', 'text', NULL, NULL, 30.01, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_RegisterAsAffiliate', '0', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_register_as_affiliate', 'checkbox', NULL, '', 40.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session,2=la_opt_PermanentCookie', 40.02, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateStorageMethod', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_storage_method', 'radio', NULL, '1=la_opt_Session||2=la_opt_PermanentCookie', 40.02, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_AffiliateCookieDuration', '30', 'In-Commerce', 'in-commerce:general', 'la_Text_Affiliates', 'la_prompt_affiliate_cookie_duration', 'text', NULL, '', 40.03, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary,2=la_opt_PriceCalculationByOptimal', 50, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_PriceBracketCalculation', '1', 'In-Commerce', 'in-commerce:general', 'la_Text_PricingCalculation', 'la_prompt_PriceBracketCalculation', 'radio', NULL, '1=la_opt_PriceCalculationByPrimary||2=la_opt_PriceCalculationByOptimal', 50, 0, 1, NULL);
 
 # Section "in-commerce:output":
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.01, 2, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none,Name=la_fld_Title,SKU=la_fld_SKU,Manufacturer=la_fld_Manufacturer,Price=la_fld_Price,CreatedOn=la_fld_CreatedOn,Modified=la_fld_Modified,Qty=la_fld_Qty,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending,DESC=la_common_Descending', 10.02, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsBy', 'Name', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName CONCAT("cust_" FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_OrderProductsBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.01, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenBy', 'Price', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, '=la_none||Name=la_fld_Title||SKU=la_fld_SKU||Manufacturer=la_fld_Manufacturer||Price=la_fld_Price||CreatedOn=la_fld_CreatedOn||Modified=la_fld_Modified||Qty=la_fld_Qty||<SQL>SELECT Prompt AS OptionName CONCAT("cust_" FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 11) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_OrderProductsThenByDir', 'ASC', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_ThenBy', 'select', NULL, 'ASC=la_common_Ascending||DESC=la_common_Descending', 10.02, 2, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products', 'text', NULL, NULL, 10.03, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Products_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_Perpage_Products_Shortlist', 'text', NULL, NULL, 10.04, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_NewDays', '7', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_DaysToBeNew', 'text', NULL, NULL, 10.05, 0, 1, NULL);
@@ -52,11 +52,11 @@
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Product_MaxHotNumber', '5', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_fld_Product_MaxHotNumber', 'text', NULL, NULL, 10.08, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'products_EditorPicksAboveRegular', '1', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_conf_EditorPicksAboveRegular', 'checkbox', NULL, NULL, 10.09, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'text', '', 'style="width: 50px;"', 10.1, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 10.1, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_RatingDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_prompt_DupRating', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 10.1, 2, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ShowProductImagesInOrders', '0', 'In-Commerce', 'in-commerce:output', 'la_Text_Products', 'la_config_ShowProductImagesInOrders', 'checkbox', NULL, NULL, 10.11, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Reviews', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_config_PerpageReviews', 'text', NULL, NULL, 20.01, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Value', '30', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'text', '', 'style="width: 50px;"', 20.02, 1, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year', 20.02, 2, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'product_ReviewDelay_Interval', '86400', 'In-Commerce', 'in-commerce:output', 'la_Text_Reviews', 'la_prompt_DupReviews', 'select', '', '1=la_opt_Sec||60=la_opt_Min||3600=la_opt_Hour||86400=la_opt_Day||604800=la_opt_Week||2419200=la_opt_Month||29030400=la_opt_Year', 20.02, 2, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers', '10', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers', 'text', NULL, NULL, 30.01, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Comm_Perpage_Manufacturers_Short', '3', 'In-Commerce', 'in-commerce:output', 'la_Text_Manufacturers', 'la_Perpage_Manufacturers_Short', 'text', NULL, NULL, 30.02, 0, 1, NULL);
 INSERT INTO ConfigurationValues VALUES(DEFAULT, 'p_CategoryTemplate', '/in-commerce/designs/section', 'In-Commerce', 'in-commerce:output', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 40.01, 0, 0, NULL);
