UPDATE CustomField SET Heading = 'la_Text_CustomFields' WHERE Type = 11;
UPDATE ConfigurationAdmin SET prompt = 'la_Text_MultipleShow' WHERE VariableName = 'Search_ShowMultiple_products';

DELETE FROM ConfigurationAdmin WHERE VariableName = 'SearchRel_Keyword_products';
UPDATE ConfigurationAdmin SET prompt = 'la_text_keyword', VariableName = 'SearchRel_Keyword_products' WHERE VariableName = 'SearchRel_DefaultKeyword_products';
UPDATE ConfigurationAdmin SET prompt = 'la_text_popularity', VariableName = 'SearchRel_Pop_products' WHERE VariableName = 'SearchRel_DefaultPop_products';
UPDATE ConfigurationAdmin SET prompt = 'la_prompt_Rating', VariableName = 'SearchRel_Rating_products' WHERE VariableName = 'SearchRel_DefaultRating_products';

DELETE FROM ConfigurationValues WHERE VariableName = 'SearchRel_Keyword_products';
UPDATE ConfigurationValues SET VariableName = 'SearchRel_Keyword_products' WHERE VariableName = 'SearchRel_DefaultKeyword_products';
UPDATE ConfigurationValues SET VariableName = 'SearchRel_Pop_products' WHERE VariableName = 'SearchRel_DefaultPop_products';
UPDATE ConfigurationValues SET VariableName = 'SearchRel_Rating_products' WHERE VariableName = 'SearchRel_DefaultRating_products';

INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_products', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 1);
INSERT INTO ConfigurationValues VALUES ('SearchRel_Increase_products', '30', 'In-Commerce', 'in-commerce:search');

UPDATE SearchConfig SET ForeignField = NULL, JoinClause = NULL WHERE ForeignField = 'CustomMetaData.Value';

CREATE TABLE ProductsCustomData (CustomDataId int(11) NOT NULL auto_increment, ResourceId int(10) unsigned NOT NULL default '0', PRIMARY KEY  (CustomDataId));

ALTER TABLE Products ADD COLUMN ShippingMode tinyint(1) NOT NULL default '0', ADD COLUMN ShippingLimitation text NOT NULL default '';
ALTER TABLE OrderItems ADD COLUMN SplitShippingGroup int(11) NOT NULL default '0', ADD COLUMN PackageNum int(11) NOT NULL default '0';
ALTER TABLE Orders ADD COLUMN ShippingGroupOption tinyint(4) NOT NULL default '0';

INSERT INTO ConfigurationAdmin VALUES ('p_CategoryTemplate', 'la_section_Templates', 'la_fld_CategoryTemplate', 'text', '', '', 1, 0);
INSERT INTO ConfigurationAdmin VALUES ('p_ItemTemplate', 'la_section_Templates', 'la_fld_ItemTemplate', 'text', '', '', 1, 0);

INSERT INTO ConfigurationValues VALUES ('p_CategoryTemplate', 'in-commerce/store/category', 'In-Commerce', 'in-commerce:output');
INSERT INTO ConfigurationValues VALUES ('p_ItemTemplate', 'in-commerce/product/details', 'In-Commerce', 'in-commerce:output');

UPDATE Modules SET Version = '1.0.7' WHERE Name = 'In-Commerce';