SET sql_mode = 'ALLOW_INVALID_DATES';

#INSERT INTO `row_status` (`row_status_id`, `row_status_name`, `products_status`) VALUES (3, 'Blocked Status', '3');
CREATE TABLE IF NOT EXISTS `customers_away_basket` LIKE `customers_basket`;

UPDATE `zones` SET `zone_name` = 'Baden-Württemberg' WHERE `zones`.`zone_id` = 1329; 
UPDATE `admin_menus` SET `parent_id` = '9' WHERE `admin_menus`.`menu_id` = 408; 
UPDATE `admin_menus` SET `parent_id` = '9' WHERE `admin_menus`.`menu_id` = 207; 
UPDATE `admin_menus` SET `parent_id` = '4' WHERE `admin_menus`.`menu_id` = 85; 

UPDATE `configuration` SET `configuration_group_id` = '923' WHERE `configuration`.`configuration_id` = 334; 

ALTER TABLE `categories` ADD `categories_image_3` VARCHAR(64) NOT NULL AFTER `concert_date_unix`; 
ALTER TABLE `categories` ADD `categories_image_4` VARCHAR(64) NOT NULL AFTER `categories_image_3`; 

UPDATE `configuration` SET `configuration_value` = '1000' WHERE `configuration`.`configuration_id` = 37; 
UPDATE `configuration` SET `configuration_value` = 'jpeg,jpg,png,gif' WHERE `configuration`.`configuration_id` = 213; 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1053, 'Design Stage Name', 'DESIGN_STAGE_NAME', 'Stage', 'Design Stage Name Overlay', 923, 2, '2020-05-12 04:06:02', NULL, NULL, NULL),
(1054, 'Design Snap', 'DESIGN_SNAP', '2', 'Design Snap for mouse movements', 923, 4, '2020-05-12 04:06:02', NULL, NULL, 'tep_cfg_select_option(array(\"1\",\"2\",\"3\",\"4\",\"5\", \"10\", \"15\",\"20\",\"25\",\"30\",\"35\",\"40\",\"50\"),');
UPDATE `configuration` SET `configuration_value` = 'yes' WHERE `configuration`.`configuration_id` = 1049; 

INSERT INTO `admin_files` (`admin_files_id`, `admin_files_name`, `admin_files_is_boxes`, `admin_files_to_boxes`, `admin_groups_id`, `admin_files_type`, `admin_files_help_id`, `admin_new_group_id`) VALUES (1219, 'orders_only_data.php', '0', '0', '1', 'D', 'D', NULL);

UPDATE `configuration` SET `configuration_key` = 'INSTAGRAM_ID',`configuration_title` = 'Instagram ID' WHERE `configuration`.`configuration_id` = 225; 
UPDATE `admin_menus` SET `menu_pos` = '1' WHERE `admin_menus`.`menu_id` = 11; 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1055, 'Set Conditions at Payment', 'PAYMENT_SET_TERMS', 'no', 'If you require a strict reminder and checkbox with terms or conditions AFTER selecting payment method and before moving to the confirmation page. Possible to remind customers about a COVID pass for example ', 917, 150, '2020-08-12 03:33:56', NULL, NULL, 'tep_cfg_select_option(array(\'yes\', \'no\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1056, 'Ticket Background from left', 'BG_IMAGE_LEFT', '0', 'Adjustment to move the ticket background image from the left side', 920, 26, '2010-01-01', '2010-01-01', NULL, NULL),
(1057, 'Ticket Background from top', 'BG_IMAGE_TOP', '0', 'Adjustment to move the ticket background image from the uppermost top', 920, 26, '2010-01-01', '2010-01-01', NULL, NULL),
(1058, 'Ticket Background Width', 'BG_IMAGE_WIDTH', '180', 'Width of your ticket background image, 180 is full width default settings', 920, 24, '2010-01-01', '2010-01-01', NULL, NULL),
(1059, 'Ticket Background Height', 'BG_IMAGE_HEIGHT', '70', 'Height of your ticket background image, 70 is full height default  settings', 920, 25, '2010-01-01', '2010-01-01', NULL, NULL);

UPDATE `admin_menus` SET `filename` = 'barcodes_export.php' WHERE `admin_menus`.`menu_id` = 424; 
UPDATE `admin_files` SET `admin_files_name` = 'barcodes_export.php' WHERE `admin_files`.`admin_files_id` = 1209; 

DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 281;

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1060, 'Display Featured Categories on HOMEPAGE', 'SHOW_MAINPAGE_FEATURED_CATEGORIES', 'true', 'Show Featured Categories on Home Page or disable here', 19, 20, '2010-01-01', '2010-01-01', NULL, 'tep_cfg_select_option(array(\"true\", \"false\"),');

UPDATE `configuration` SET `configuration_title` = 'Display Featured Categories under Event Pages' WHERE `configuration`.`configuration_id` = 935; 
UPDATE `configuration` SET `configuration_title` = 'Display Featured Categories Page' WHERE `configuration`.`configuration_id` = 227; 
UPDATE `configuration` SET `configuration_description` = 'Display Featured Categories Page from Menu' WHERE `configuration`.`configuration_id` = 227; 
UPDATE `configuration` SET `sort_order` = '1' WHERE `configuration`.`configuration_id` = 227; 
UPDATE `configuration` SET `sort_order` = '2' WHERE `configuration`.`configuration_id` = 935; 
UPDATE `configuration` SET `sort_order` = '3' WHERE `configuration`.`configuration_id` = 1127; 

DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 7;
UPDATE `configuration` SET `configuration_description` = 'Using some CINEMA set up (for CINE project by DEV)' WHERE `configuration`.`configuration_id` = 949; 

UPDATE `configuration` SET `configuration_description` = 'Enable More Menu Listing -Venue,Date,Time. ONLY for Left Column Categories InfoBox' WHERE `configuration`.`configuration_id` = 247; 

UPDATE `configuration` SET `configuration_description` = 'Enable Subcategory count to calculate remaining seats available or count of reserved seats in the category. For Seat Plans with Sub Categories' WHERE `configuration`.`configuration_id` = 257; 

UPDATE `configuration` SET `configuration_description` = 'Add extra fields at checkout payment.Configurable in includes/languages/english.php' WHERE `configuration`.`configuration_id` = 253; 

UPDATE `configuration` SET `configuration_value` = '1' WHERE `configuration`.`configuration_id` = 954; 

UPDATE `configuration` SET `configuration_description` = 'Set the maximum number of tickets per order. Zero = unlimited. Do NOT use with GIFT voucher feature.' WHERE `configuration`.`configuration_id` = 254; 

INSERT INTO `admin_files` (`admin_files_id`, `admin_files_name`, `admin_files_is_boxes`, `admin_files_to_boxes`, `admin_groups_id`, `admin_files_type`, `admin_files_help_id`, `admin_new_group_id`) VALUES (NULL, 'barcodes_export.php', '0', '0', '1', 'D', 'D', NULL);

INSERT INTO `email_messages` (`message_id`, `message_send`, `message_subject`, `message_reply_to`, `message_text`, `message_format`, `message_type`) VALUES
(11, '', 'Contact Us', 'contactus', '<section id=\"contact\">\r\n<div class=\"container\">\r\n        <div class=\"form\">\r\n            <div class=\"row\">\r\n              <div class=\"form-group col-md-6\">\r\n                %%Name Text Box%%\r\n              </div>\r\n              <div class=\"form-group col-md-6 mt-3 mt-md-0\">\r\n                 %%Email Text Box%%\r\n              </div>\r\n            </div>\r\n            <div class=\"form-group mt-3\">\r\n              %%Comments Text Box%%\r\n            </div>\r\n            <div class=\"text-center\">%%Continue Button%%</div>\r\n        </div>\r\n      </div>\r\n    </section><!-- End Contact Section -->\r\n </form>\r\n', '', 'HCF');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1061, 'Display Contact Form on HOMEPAGE', 'SHOW_MAINPAGE_CONTACT_FORM', 'false', 'Show Contact Form at the bottom of the HOMEPAGE', 917, 20, '2010-01-01', '2020-01-01', NULL, 'tep_cfg_select_option(array(\"true\", \"false\"),');

ALTER TABLE `categories` ADD `bg_height` INT(11) NOT NULL AFTER `categories_image_4`; 
ALTER TABLE `products` CHANGE `products_s` `products_sx` DECIMAL(8,2) NOT NULL DEFAULT '0.00'; 
ALTER TABLE `products` ADD `products_sy` DECIMAL(8,2) NOT NULL AFTER `products_sx`; 
ALTER TABLE `products` CHANGE `products_sy` `products_sy` DECIMAL(8,2) NOT NULL DEFAULT '0.00'; 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1062, 'Set ALL Price Headings', 'ALL_INVOICE_HEADINGS', 'yes', 'If you want only the products price itemized in the totals, remove the sub-pricing totals here.', 927, 150, '2020-08-12 03:33:56', NULL, NULL, 'tep_cfg_select_option(array(\'yes\', \'no\'),');

DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1032;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1033;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1034;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1035;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1036;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1037;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1038;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1039;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1040;
DELETE FROM `admin_menus_description` WHERE `admin_menus_description`.`menu_id` = 427;
DELETE FROM `admin_menus` WHERE `admin_menus`.`menu_id` = 427;
DELETE FROM `configuration_group` WHERE `configuration_group`.`configuration_group_id` = 928;

ALTER TABLE `template` CHANGE `container_border` `container_border` CHAR(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; 
ALTER TABLE `template` CHANGE `site_width` `site_width` VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; 
ALTER TABLE `template` CHANGE `include_column_left` `include_column_left` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; 
ALTER TABLE `template` CHANGE `include_column_right` `include_column_right` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; 
ALTER TABLE `template` CHANGE `header_banner` `header_banner` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL; 
ALTER TABLE `template` CHANGE `show_page_descriptions` `show_page_descriptions` CHAR(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; 
ALTER TABLE `template` CHANGE `cart_in_header` `cart_in_header` VARCHAR(6) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'yes'; 
INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1063, 'Enable Ticket Holder Name Form', 'FORM_TICKETHOLDER_NAME', 'no', 'If you require your customers to enter a name for each ticket holder this is very basic option at checkout confirmation.', 917, 150, '2020-08-12 03:33:56', NULL, NULL, 'tep_cfg_select_option(array(\'yes\', \'no\'),');

ALTER TABLE `categories` ADD `categories_advance_fee` DECIMAL(15,4) NOT NULL DEFAULT '0.0000' AFTER `bg_height`; 

UPDATE `configuration` SET `configuration_value` = 'false' WHERE `configuration`.`configuration_id` = 61; 

DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1044;

ALTER TABLE `orders_products` ADD `ticketholder_name` VARCHAR(128) NOT NULL AFTER `products_date_available`;

ALTER TABLE `address_book` ADD `entry_customer_phone` VARCHAR(32) NOT NULL AFTER `entry_customer_email`; 
ALTER TABLE `orders` ADD `delivery_phone` VARCHAR(32) NOT NULL AFTER `delivery_country`; 
ALTER TABLE `orders` ADD `billing_phone` VARCHAR(32) NOT NULL AFTER `billing_country`; 
UPDATE `configuration` SET `configuration_title` = 'Billing Telephone' WHERE `configuration`.`configuration_id` = 61; 
UPDATE `configuration` SET `configuration_title` = 'Show GA products SOLD OUT (Out of  Stock)' WHERE `configuration`.`configuration_id` = 924; 
UPDATE `configuration` SET `configuration_description` = 'Show GA products with SOLD OUT button ( if status =0 and quantity=0) or HIDE products from listing altogether' WHERE `configuration`.`configuration_id` = 924; 

INSERT INTO `infobox_configuration` (`template_id`, `infobox_id`, `infobox_file_name`, `infobox_define`, `infobox_display`, `display_in_column`, `location`, `sort_order`, `last_modified`, `date_added`, `box_heading`, `box_template`) VALUES
(5, 93, 'languages.php', 'BOX_HEADING_LANGUAGES', 'no', 'left', 0, 6, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Languages', 'infobox'),
(5, 94, 'manufacturer_info.php', 'BOX_HEADING_MANUFACTURER_INFO', 'no', 'left', 0, 7, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Manufacturers Info', 'infobox'),
(5, 95, 'manufacturers.php', 'BOX_HEADING_MANUFACTURERS', 'no', 'left', 1, 8, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Manufacturers', 'infobox'),
(5, 96, 'order_history.php', 'BOX_HEADING_CUSTOMER_ORDERS', 'no', 'left', 0, 9, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Order History', 'infobox'),
(5, 97, 'search.php', 'BOX_HEADING_SEARCH', 'no', 'left', 3, 12, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Quick Find', 'infobox'),
(5, 98, 'shopping_cart.php', 'BOX_HEADING_SHOPPING_CART', 'no', 'left', 0, 1, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Shopping Cart', 'infobox'),
(5, 99, 'specials.php', 'BOX_HEADING_SPECIALS', 'no', 'left', 0, 14, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Specials', 'infobox'),
(5, 100, 'whats_new.php', 'BOX_HEADING_WHATS_NEW', 'no', 'left', 0, 16, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Latest products', 'infobox'),
(5, 101, 'theme_select.php', 'BOX_HEADING_TEMPLATE_SELECT', 'no', 'left', 0, 18, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Select Template', 'infobox'),
(5, 102, 'featured.php', 'BOX_HEADING_FEATURED', 'no', 'left', 0, 4, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Featured Products', 'infobox'),
(5, 103, 'best_sellers.php', 'BOX_HEADING_BESTSELLERS', 'no', 'left', 13, 1, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Best Sellers', 'infobox'),
(5, 104, 'categories.php', 'BOX_HEADING_CATEGORIES', 'yes', 'left', 1, 2, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Our Shows', 'infobox'),
(5, 105, 'currencies.php', 'BOX_HEADING_CURRENCIES', 'no', 'left', 0, 3, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Currencies', 'infobox'),
(5, 106, 'information.php', 'BOX_HEADING_INFORMATION', 'yes', 'left', 2, 5, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Information', 'infobox'),
(5, 107, 'loginbox.php', 'BOX_HEADING_LOGIN', 'no', 'left', 0, 22, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Login', 'infobox'),
(5, 108, 'wallet.php', 'BOX_HEADING_WALLET', 'no', 'left', 0, 6, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'My Wallet', 'infobox'),
(5, 109, 'featured_categories.php', 'BOX_HEADING_FEATURED_CATEGORIES', 'no', 'left', 0, 4, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Featured Events', 'infobox'),
(5, 110, 'donate.php', 'BOX_HEADING_DONATE', 'no', 'left', 0, 0, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Donate', 'infobox'),
(5, 111, 'banner.php', 'BOX_HEADING_BANNER', 'no', 'left', 0, 0, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Banner', 'infobox'),
(5, 112, 'box_office.php', 'BOX_HEADING_BOX_OFFICE', 'no', 'left', 1, 0, '2001-01-20 00:00:00', '2021-04-20 00:00:00', 'Box Office', 'infobox');
INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1064, 'Close the login page', 'CLOSE_LOGIN', 'no', 'Close the login page so nobody can access.', 917, 160, '2020-08-12 03:33:56', NULL, NULL, 'tep_cfg_select_option(array(\'yes\', \'no\'),'),
(1065, 'Hide Choose Billing Address for customers', 'HIDE_CUSTOMER_BILLING_ADDRESS', 'yes', 'Hide Choose Billing Address at Checkout. Unhide this for customers at the front end', 917, 1, '2020-01-01', '2020-01-01', NULL, 'tep_cfg_select_option(array(\'yes\', \'no\'),');
ALTER TABLE `template` CHANGE `box_width_left` `box_width_left` VARCHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; 
UPDATE `template` SET `box_width_left` = 'no',`show_page_descriptions`='no' WHERE `template`.`template_id` = 2;
UPDATE `template` SET `box_width_left` = 'no',`show_page_descriptions`='no' WHERE `template`.`template_id` = 3; 
UPDATE `template` SET `box_width_left` = 'no',`show_page_descriptions`='no',`show_topbar` = 'no',`show_header_pane` = 'yes' WHERE `template`.`template_id` = 4; 
UPDATE `template` SET `box_width_left` = 'no',`show_page_descriptions`='no' WHERE `template`.`template_id` = 5;  
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 1046;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 924;
DELETE FROM `configuration` WHERE `configuration`.`configuration_id` = 953;

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1046, 'UNIX expire date or date AND time', 'EXPIRE_DATE_TIME', 'date_&_time', 'date & time : When you want to expire categories by date and time e.g when using date plus session time 1pm =1300. date: Date only AND use \'Categories Hour of Expiry\' in relation to your timezone setting. e.g 8pm = 20 hours after midnight.', 929, 1, '2020-08-12 03:33:56', NULL, NULL, 'tep_cfg_select_option(array(\'date_&_time\', \'date\'),'),
(953, 'Allow full category expiry', 'ALLOW_CATEGORY_EXPIRY', 'no', 'Allow full category de-activation with expiry of categories', 929, 29, '2010-01-01', '2010-01-01', NULL, 'tep_cfg_select_option(array(\"yes\", \"no\"),');

INSERT INTO `sql_queries` VALUES('osconcert_v9_0_5.sql',NOW());

INSERT INTO `sql_queries` VALUES('osconcert_v9_0_5.sql',NOW());