Edit file File name : webasyst.sql Content : SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `webasyst402` -- -- -------------------------------------------------------- -- -- Table structure for table `crm_adhoc_group` -- CREATE TABLE `crm_adhoc_group` ( `adhoc_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, PRIMARY KEY (`contact_id`,`adhoc_id`), KEY `adhoc_id` (`adhoc_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_call` -- CREATE TABLE `crm_call` ( `id` int(11) NOT NULL AUTO_INCREMENT, `direction` enum('IN','OUT') NOT NULL, `status_id` enum('PENDING','CONNECTED','DROPPED','REDIRECTED','FINISHED','VOICEMAIL') DEFAULT 'PENDING', `create_datetime` datetime NOT NULL, `finish_datetime` datetime DEFAULT NULL, `plugin_id` varchar(64) NOT NULL, `plugin_call_id` varchar(255) NOT NULL, `plugin_gateway` varchar(255) DEFAULT NULL, `plugin_user_number` varchar(255) DEFAULT NULL, `plugin_client_number` varchar(255) DEFAULT NULL, `plugin_record_id` varchar(255) DEFAULT NULL, `notification_sent` tinyint(4) NOT NULL DEFAULT '0', `deal_id` int(11) DEFAULT NULL, `client_contact_id` int(11) DEFAULT NULL, `user_contact_id` int(11) DEFAULT NULL, `duration` int(11) NOT NULL DEFAULT '0', `comment` text, PRIMARY KEY (`id`), KEY `status_id` (`status_id`), KEY `call_id` (`plugin_id`,`plugin_call_id`), KEY `client_contact_id` (`client_contact_id`), KEY `user_contact_id` (`user_contact_id`), KEY `deal_id` (`deal_id`), KEY `notification_sent` (`notification_sent`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_call_params` -- CREATE TABLE `crm_call_params` ( `call_id` int(11) NOT NULL, `name` varchar(32) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`call_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_company` -- CREATE TABLE `crm_company` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `phone` varchar(255) DEFAULT NULL, `address` text, `tax_name` varchar(255) DEFAULT NULL, `tax_options` text, `logo` varchar(10) DEFAULT NULL, `template_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `crm_company` -- INSERT INTO `crm_company` VALUES (1, '[[site_name]]', NULL, NULL, NULL, NULL, NULL, 1, 0); -- -------------------------------------------------------- -- -- Table structure for table `crm_company_params` -- CREATE TABLE `crm_company_params` ( `company_id` int(11) NOT NULL, `template_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`company_id`,`template_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_contact_tags` -- CREATE TABLE `crm_contact_tags` ( `contact_id` int(11) NOT NULL, `tag_id` int(11) NOT NULL, PRIMARY KEY (`contact_id`,`tag_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_conversation` -- CREATE TABLE `crm_conversation` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `source_id` int(11) NOT NULL, `type` enum('EMAIL','IM') NOT NULL, `contact_id` int(11) NOT NULL, `user_contact_id` int(11) NOT NULL DEFAULT '0', `deal_id` int(11) DEFAULT NULL, `summary` varchar(255) DEFAULT NULL, `last_message_id` int(11) DEFAULT NULL, `count` int(11) NOT NULL DEFAULT '0', `is_closed` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `source_id` (`source_id`), KEY `contact_id` (`contact_id`), KEY `user_contact_id` (`user_contact_id`), KEY `deal_id` (`deal_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_currency` -- CREATE TABLE `crm_currency` ( `code` char(3) NOT NULL, `rate` decimal(15,8) NOT NULL DEFAULT '1.00000000', `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `crm_currency` -- INSERT INTO `crm_currency` VALUES ('USD', '1.00000000', 0); -- -------------------------------------------------------- -- -- Table structure for table `crm_deal` -- CREATE TABLE `crm_deal` ( `id` int(11) NOT NULL AUTO_INCREMENT, `creator_contact_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `reminder_datetime` datetime DEFAULT NULL, `funnel_id` int(11) NOT NULL, `stage_id` int(11) NOT NULL, `status_id` enum('OPEN','WON','LOST') NOT NULL DEFAULT 'OPEN', `name` varchar(255) NOT NULL, `description` text, `expected_date` date DEFAULT NULL, `closed_datetime` datetime DEFAULT NULL, `amount` decimal(15,4) DEFAULT NULL, `currency_id` char(3) DEFAULT NULL, `currency_rate` decimal(15,8) DEFAULT NULL, `contact_id` int(11) NOT NULL, `user_contact_id` int(11) NOT NULL DEFAULT '0', `lost_id` int(11) DEFAULT NULL, `lost_text` varchar(255) DEFAULT NULL, `source_id` int(11) DEFAULT NULL, `external_id` varchar(255) DEFAULT NULL, `last_message_id` int(11) DEFAULT NULL, `last_log_id` bigint(20) DEFAULT NULL, `last_log_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `funnel_id` (`funnel_id`), KEY `stage_id` (`stage_id`), KEY `user_contact_id` (`user_contact_id`), KEY `lost_id` (`lost_id`), KEY `contact_id` (`contact_id`), KEY `source_id` (`source_id`), KEY `external_id` (`external_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_deal_lost` -- CREATE TABLE `crm_deal_lost` ( `id` int(11) NOT NULL AUTO_INCREMENT, `funnel_id` int(11) NOT NULL DEFAULT '0', `name` varchar(255) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `funnel_id` (`funnel_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; -- -- Dumping data for table `crm_deal_lost` -- INSERT INTO `crm_deal_lost` VALUES (1, 0, 'Rival was preferred', 0), (2, 0, 'Junk lead', 1), (3, 0, 'Not interested', 2), (4, 0, 'Maybe in the future', 3), (5, 0, 'Product is not required', 4), (6, 0, 'Product does not satisfy', 5), (7, 0, 'Price is too high', 6); -- -------------------------------------------------------- -- -- Table structure for table `crm_deal_params` -- CREATE TABLE `crm_deal_params` ( `deal_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text, PRIMARY KEY (`deal_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_deal_participants` -- CREATE TABLE `crm_deal_participants` ( `deal_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, `role_id` enum('USER','CLIENT') NOT NULL, `label` varchar(64) DEFAULT NULL, `create_datetime` datetime NOT NULL DEFAULT '2017-10-24 00:00:00', PRIMARY KEY (`deal_id`,`contact_id`,`role_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_deal_stages` -- CREATE TABLE `crm_deal_stages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `deal_id` int(11) NOT NULL, `stage_id` int(11) NOT NULL, `in_datetime` datetime NOT NULL, `out_datetime` datetime DEFAULT NULL, `minutes` int(11) DEFAULT NULL, `overdue_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `deal_id` (`deal_id`), KEY `stage_id` (`stage_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_file` -- CREATE TABLE `crm_file` ( `id` int(11) NOT NULL AUTO_INCREMENT, `creator_contact_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `contact_id` int(11) NOT NULL, `size` int(11) NOT NULL, `ext` varchar(10) DEFAULT NULL, `name` varchar(255) NOT NULL, `comment` text, `source_type` enum('MESSAGE','NOTE','FILE') NOT NULL DEFAULT 'FILE', PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_form` -- CREATE TABLE `crm_form` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `create_datetime` datetime NOT NULL, `contact_id` int(11) NOT NULL, `locale` varchar(5) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `crm_form` -- INSERT INTO `crm_form` VALUES (1, 'Subscription form', '[[regtime]]', 0, 'en_US'); -- -------------------------------------------------------- -- -- Table structure for table `crm_form_params` -- CREATE TABLE `crm_form_params` ( `form_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text, PRIMARY KEY (`form_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `crm_form_params` -- INSERT INTO `crm_form_params` VALUES (1, 'widget_container', 'dialog'), (1, 'widget_header', 'Send inquiry'), (1, 'widget_display_fab', '1'), (1, 'widget_display_fab_color', '#52cc8f'), (1, 'widget_display_fab_text', 'Subscribe'), (1, 'widget_display_fab_icon', 'fas fa-concierge-bell'), (1, 'widget_display_timeout', '0'), (1, 'max_width', '600'), (1, 'fields_space', '16'), (1, 'caption_space', '8'), (1, 'caption_width', '20'), (1, 'after_submit', 'html'), (1, 'button', '{"captionplace":"","width":"auto","caption":"Submit"}'), (1, 'widget_domains', '["[[softurl_no_http_]]"]'), (1, 'widget_path', '{"[[softurl_no_http_]]":[""]}'), (1, 'source_id', '1'), (1, 'confirm_mail_subject', 'Please confirm your email'), (1, 'after_antispam_confirm', 'text'), (1, '_version', '2'), (1, 'create_deal', '0'), (1, 'fields', 'a:4:{i:0;a:16:{s:2:"id";s:9:"firstname";s:4:"name";s:9:"Firstname";s:4:"type";s:12:"NameSubfield";s:7:"caption";s:9:"Firstname";s:5:"field";a:0:{}s:8:"is_multi";b:0;s:16:"placeholder_need";b:1;s:15:"form_field_type";s:7:"contact";s:14:"person_enabled";b:1;s:15:"company_enabled";b:0;s:8:"required";s:0:"";s:15:"required_always";b:0;s:7:"checked";i:1;s:12:"captionplace";s:4:"left";s:11:"placeholder";s:0:"";s:3:"uid";s:11:"firstname_1";}i:1;a:16:{s:2:"id";s:8:"lastname";s:4:"name";s:8:"Lastname";s:4:"type";s:12:"NameSubfield";s:7:"caption";s:8:"Lastname";s:5:"field";a:0:{}s:8:"is_multi";b:0;s:16:"placeholder_need";b:1;s:15:"form_field_type";s:7:"contact";s:14:"person_enabled";b:1;s:15:"company_enabled";b:0;s:8:"required";s:0:"";s:15:"required_always";b:0;s:7:"checked";i:1;s:12:"captionplace";s:4:"left";s:11:"placeholder";s:0:"";s:3:"uid";s:10:"lastname_1";}i:2;a:16:{s:2:"id";s:5:"email";s:4:"name";s:5:"Email";s:4:"type";s:5:"Email";s:7:"caption";s:5:"Email";s:5:"field";a:0:{}s:8:"is_multi";b:0;s:16:"placeholder_need";b:1;s:15:"form_field_type";s:7:"contact";s:14:"person_enabled";b:1;s:15:"company_enabled";b:0;s:8:"required";s:0:"";s:15:"required_always";b:0;s:7:"checked";i:1;s:12:"captionplace";s:4:"left";s:11:"placeholder";s:0:"";s:3:"uid";s:7:"email_1";}i:3;a:16:{s:2:"id";s:5:"phone";s:4:"name";s:5:"Phone";s:4:"type";s:5:"Phone";s:7:"caption";s:5:"Phone";s:5:"field";a:0:{}s:8:"is_multi";b:0;s:16:"placeholder_need";b:1;s:15:"form_field_type";s:7:"contact";s:14:"person_enabled";b:1;s:15:"company_enabled";b:0;s:8:"required";s:0:"";s:15:"required_always";b:0;s:7:"checked";i:1;s:12:"captionplace";s:4:"left";s:11:"placeholder";s:0:"";s:3:"uid";s:7:"phone_1";}}'), (1, 'confirm_mail_body', '<p>Please follow this link to confirm your registration: <a href="{CONFIRM_URL}">{CONFIRM_URL}</a>.<br>Thank you!</p>'), (1, 'html_after_submit', '<p style="text-align: center"><img src="[[relativeurl]]/wa-apps/crm/img/success.svg"></p>\n<p style="text-align: center">Thanks for subscribing!</p>'), (1, 'after_antispam_confirm_text', '<p style="text-align: center"><img src="[[relativeurl]]/wa-apps/crm/img/success.svg"></p>\n<p style="text-align: center">Confirmed</p>'), (1, 'antibot_honey_pot', 'a:3:{s:16:"empty_field_name";[[empty_field_name]]s:17:"filled_field_name";[[filled_field_name]]s:18:"filled_field_value";[[filled_field_value]]}'), (1, 'messages', 'a:2:{i:0;a:3:{s:4:"tmpl";s:147:"{SEPARATOR}Thanks for subscribing!{SEPARATOR}\n<p>We shall reply to you as soon as possible.</p>\n<p>Thank you!</p>\n<p>--</p>\n<p>{$company_name}</p>\n";s:2:"to";a:1:{s:6:"client";i:1;}s:14:"is_smarty_tmpl";b:1;}i:1;a:3:{s:4:"tmpl";s:417:"{SEPARATOR}Application received{SEPARATOR}\n<p>Application received.</p>\n\n<p>\n {rtrim($wa->url(true), ''/'')}{$wa_backend_url}crm/contact/{$customer.id|escape}\n</p>\n\n<p>\n Firstname: {$customer.firstname|escape}<br>\n Lastname: {$customer.lastname|escape}<br>\n Email: {$customer->get(''email'', ''default'')|escape}<br>\n Phone: {$customer->get(''phone'', ''default'')|escape}\n</p>\n\n<p>--</p>\n\n<p>{$company_name}</p>";s:2:"to";a:1:{[[ser_admin_email]]i:1;}s:14:"is_smarty_tmpl";b:1;}}'); -- -------------------------------------------------------- -- -- Table structure for table `crm_funnel` -- CREATE TABLE `crm_funnel` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `icon` varchar(255) DEFAULT NULL, `color` varchar(13) NOT NULL, `open_color` varchar(13) NOT NULL, `close_color` varchar(13) NOT NULL, `is_archived` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `crm_funnel` -- INSERT INTO `crm_funnel` VALUES (1, 'Sales', 0, NULL, '#6bb532', '#dcedcf', '#6bb532', 0); -- -------------------------------------------------------- -- -- Table structure for table `crm_funnel_stage` -- CREATE TABLE `crm_funnel_stage` ( `id` int(11) NOT NULL AUTO_INCREMENT, `funnel_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `number` int(11) NOT NULL, `limit_hours` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `funnel_number` (`funnel_id`,`number`), KEY `funnel_id` (`funnel_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; -- -- Dumping data for table `crm_funnel_stage` -- INSERT INTO `crm_funnel_stage` VALUES (1, 1, 'Lead In', 1, NULL), (2, 1, 'Needs Defining', 2, NULL), (3, 1, 'Working with objections', 3, NULL), (4, 1, 'Proposal Making', 4, NULL), (5, 1, 'Conditions Approval', 5, NULL); -- -------------------------------------------------------- -- -- Table structure for table `crm_invoice` -- CREATE TABLE `crm_invoice` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `number` varchar(16) DEFAULT NULL, `invoice_date` date NOT NULL, `creator_contact_id` int(11) NOT NULL, `company_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, `due_days` int(11) NOT NULL DEFAULT '0', `due_date` date DEFAULT NULL, `amount` decimal(15,4) NOT NULL, `currency_id` char(3) NOT NULL, `currency_rate` decimal(15,8) NOT NULL, `tax_name` varchar(255) DEFAULT NULL, `tax_percent` decimal(5,2) NOT NULL DEFAULT '0.00', `tax_type` enum('INCLUDE','APPEND','NONE') NOT NULL DEFAULT 'NONE', `tax_amount` decimal(15,4) NOT NULL DEFAULT '0.0000', `discount_percent` decimal(5,2) NOT NULL DEFAULT '0.00', `discount_amount` decimal(15,4) NOT NULL DEFAULT '0.0000', `summary` varchar(255) DEFAULT NULL, `comment` text, `recurrent_id` int(11) DEFAULT NULL, `state_id` enum('PENDING','PAID','REFUNDED','ARCHIVED','DRAFT','PROCESSING') NOT NULL DEFAULT 'DRAFT', `payment_datetime` datetime DEFAULT NULL, `deal_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `company_id` (`company_id`), KEY `contact_id` (`contact_id`), KEY `state_id` (`state_id`), KEY `deal_id` (`deal_id`), KEY `recurrent_id` (`recurrent_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_invoice_items` -- CREATE TABLE `crm_invoice_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `invoice_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `price` decimal(15,4) NOT NULL, `quantity` decimal(15,4) NOT NULL, `product_id` varchar(255) DEFAULT NULL, `tax_type` enum('INCLUDE','APPEND','NONE') NOT NULL DEFAULT 'NONE', `tax_percent` decimal(5,2) NOT NULL DEFAULT '0.00', PRIMARY KEY (`id`), KEY `invoice_id` (`invoice_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_invoice_params` -- CREATE TABLE `crm_invoice_params` ( `invoice_id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`invoice_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_invoice_recurrent` -- CREATE TABLE `crm_invoice_recurrent` ( `id` int(11) NOT NULL AUTO_INCREMENT, `origin_invoice_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `number_template` varchar(32) DEFAULT NULL, `interval_unit` enum('DAY','WEEK','MONTH','YEAR') NOT NULL, `interval_value` int(11) NOT NULL, `counter` int(11) NOT NULL DEFAULT '0', `stop_on_non_payment` int(11) NOT NULL, `non_paid_count` int(11) NOT NULL DEFAULT '0', `last_invoice_id` int(11) DEFAULT NULL, `last_datetime` datetime DEFAULT NULL, `next_date` date NOT NULL, `end_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_log` -- CREATE TABLE `crm_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `actor_contact_id` int(11) NOT NULL, `action` varchar(50) NOT NULL, `contact_id` int(11) NOT NULL, `object_id` int(11) DEFAULT NULL, `object_type` enum('CONTACT','DEAL','INVOICE','REMINDER','NOTE','FILE','CALL','EMAIL','MESSAGE','ORDER_LOG') NOT NULL, `before` varchar(255) DEFAULT NULL, `after` varchar(255) DEFAULT NULL, `params` text, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `object_type` (`object_type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_message` -- CREATE TABLE `crm_message` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `creator_contact_id` int(11) NOT NULL, `transport` enum('EMAIL','SMS','IM') NOT NULL DEFAULT 'EMAIL', `direction` enum('IN','OUT') NOT NULL, `contact_id` int(11) NOT NULL, `deal_id` int(11) DEFAULT NULL, `source_id` int(11) DEFAULT NULL, `subject` varchar(255) DEFAULT NULL, `body` mediumtext NOT NULL, `from` varchar(255) DEFAULT NULL, `to` varchar(255) NOT NULL, `original` tinyint(4) NOT NULL DEFAULT '0', `event` varchar(64) DEFAULT NULL, `conversation_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `creator_contact_id` (`creator_contact_id`), KEY `contact_id` (`contact_id`), KEY `deal_id` (`deal_id`), KEY `conversation_id` (`conversation_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_message_attachments` -- CREATE TABLE `crm_message_attachments` ( `message_id` int(11) NOT NULL, `file_id` int(11) NOT NULL, UNIQUE KEY `message_file` (`message_id`,`file_id`), KEY `message_id` (`message_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_message_params` -- CREATE TABLE `crm_message_params` ( `message_id` int(11) NOT NULL DEFAULT '0', `name` varchar(255) NOT NULL, `value` text, PRIMARY KEY (`message_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_message_read` -- CREATE TABLE `crm_message_read` ( `message_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, PRIMARY KEY (`message_id`,`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_message_recipients` -- CREATE TABLE `crm_message_recipients` ( `message_id` int(11) NOT NULL, `destination` varchar(255) NOT NULL, `type` enum('TO','CC','BCC','FROM') NOT NULL DEFAULT 'CC', `name` varchar(255) DEFAULT NULL, `contact_id` int(11) DEFAULT NULL, PRIMARY KEY (`message_id`,`destination`), KEY `contact_id` (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_note` -- CREATE TABLE `crm_note` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `creator_contact_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, `content` text, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_note_attachments` -- CREATE TABLE `crm_note_attachments` ( `note_id` int(11) NOT NULL, `file_id` int(11) NOT NULL, UNIQUE KEY `note_file` (`note_id`,`file_id`), KEY `note_id` (`note_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_notification` -- CREATE TABLE `crm_notification` ( `id` int(11) NOT NULL AUTO_INCREMENT, `event` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `transport` enum('email','sms','http','reminder') NOT NULL DEFAULT 'email', `status` tinyint(1) NOT NULL, `subject` varchar(255) DEFAULT NULL, `body` text, `recipient` varchar(255) NOT NULL DEFAULT 'client', `sender` varchar(255) NOT NULL DEFAULT 'system', `company_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `event` (`event`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ; -- -- Dumping data for table `crm_notification` -- INSERT INTO `crm_notification` VALUES (1, 'invoice.issue', 'Invoice issued', 'email', 1, 'New invoice No. {$invoice.number} issued for you by {$company.name}', '<p>Dear Sirs,</p>\n<p>Invoice No. {$invoice.number|escape} has been issued for you by {$company.name|escape}.</p>\n\n<p>Invoice No.: {$invoice.number|escape}<br>\nAmount: {wa_currency($invoice.amount, $invoice.currency_id)}<br>\nInvoice date: {$invoice.invoice_date|wa_date}</p>\n\n<p>Invoice items:</p>\n<ol>\n{foreach $invoice.items as $item}\n<li>{$item.name|escape} x {$item.quantity}</li>\n{/foreach}\n</ol>\n\n<p>\nLink to view invoice online:<br>\n<a href="{$link}">{$link}</a>\n</p>\n\n<p>\n–-<br>\n{$wa->accountName()|escape}<br>\n{$wa->domainUrl()}\n</p>\n', 'client', 'system', NULL), (2, 'invoice.payment', 'Invoice payment', 'email', 1, 'Received payment for invoice No. {$invoice.number} from {$company.name}', '<p>Dear Sirs,</p>\n<p>Your payment for invoice No. {$invoice.number|escape} issued by {$company.name|escape} has been received.</p>\n<p>Thank you!</p>\n\n<p>Invoice No.: {$invoice.number|escape}<br>\nAmount: {wa_currency($invoice.amount, $invoice.currency_id)}<br>\nInvoice date: {$invoice.invoice_date|wa_date}</p>\n\n<p>Invoice items:</p>\n<ol>\n{foreach $invoice.items as $item}\n<li>{$item.name|escape} x {$item.quantity}</li>\n{/foreach}\n</ol>\n\n<p>\nLink to view invoice online:<br>\n<a href="{$link}">{$link}</a>\n</p>\n\n<p>\n–-<br>\n{$wa->accountName()|escape}<br>\n{$wa->domainUrl()}\n</p>\n', 'client', 'system', NULL), (3, 'invoice.cancel', 'Invoice canceled', 'email', 1, 'Canceled invoice No. {$invoice.number} from {$company.name}', '<p>Dear Sirs,</p>\n<p>Invoice No. {$invoice.number|escape} issued for you by {$company.name|escape} has been canceled.</p>\n\n<p>Invoice No.: {$invoice.number|escape}<br>\nAmount: {wa_currency($invoice.amount, $invoice.currency_id)}<br>\nInvoice date: {$invoice.invoice_date|wa_date}</p>\n\n<p>Invoice items:</p>\n<ol>\n{foreach $invoice.items as $item}\n<li>{$item.name|escape} x {$item.quantity}</li>\n{/foreach}\n</ol>\n\n<p>\n–-<br>\n{$wa->accountName()|escape}<br>\n{$wa->domainUrl()}\n</p>\n', 'client', 'system', NULL), (4, 'invoice.expire', 'Invoice expired', 'email', 1, 'Invoice {$invoice.number} has expired', '<p>Dear Sirs,</p>\n<p>Invoice No. {$invoice.number|escape} issued for you by {$company.name|escape} has been expired.</p>\n\n<p>Invoice No.: {$invoice.number|escape}<br>\nAmount: {wa_currency($invoice.amount, $invoice.currency_id)}<br>\nInvoice date: {$invoice.invoice_date|wa_date}</p>\n\n<p>Invoice items:</p>\n<ol>\n{foreach $invoice.items as $item}\n<li>{$item.name|escape} x {$item.quantity}</li>\n{/foreach}\n</ol>\n\n<p>\n–-<br>\n{$wa->accountName()|escape}<br>\n{$wa->domainUrl()}\n</p>\n', 'client', 'system', NULL), (5, 'deal.stage_overdue', 'Stage time limit expired for deal', 'email', 1, 'responsible', '<p>\n {waDateTime::format(''datetime'')} expired the time limit of deal “<a href="{$deal.url}">{$deal.name|escape}</a>”\n to remain on stage “{$deal.stage.name|escape}” of funnel “{$deal.funnel.name|escape}”\n ({_w(''%d hour'', ''%d hours'', $deal.limit_hours)}).\n</p>\n<p>\n <b>Deal details</b><br>\n Customer: {$customer.name|escape}{if !empty($customer.company)}, {$customer.company|escape}{/if}<br>\n Description: {$deal.description_sanitized}<br>\n Estimated amount: {$deal.amount|wa_format_amount_currency:$deal.currency_id}<br>\n Estimated closing date: {$deal.expected_date|wa_date}<br>\n</p>\n\n--<br>\n<p>\n --<br>\n {$wa->accountName()|escape}<br>\n {$wa->domainUrl()}\n</p>\n', 'Stage time limit expired for deal', 'system', NULL), (6, 'deal.create', 'Deal created', 'email', 1, 'responsible', '<p>\n {$deal.create_datetime|wa_datetime} new deal\n “<a href="{$deal.url}">{$deal.name|escape}</a>” was created\n on stage “{$deal.stage.name|escape}” of funnel “{$deal.funnel.name|escape}”.\n</p>\n<p>\n <b>Deal details</b><br>\n Customer: {$customer.name|escape}{if !empty($customer.company)}, {$customer.company|escape}{/if}<br>\n Description: {$deal.description_sanitized}<br>\n Estimated amount: {$deal.amount|wa_format_amount_currency:$deal.currency_id}<br>\n Estimated closing date: {$deal.expected_date|wa_date}<br>\n</p>\n\n--<br>\n<p>\n --<br>\n {$wa->accountName()|escape}<br>\n {$wa->domainUrl()}\n</p>\n', 'Deal created', 'system', NULL), (7, 'deal.move', 'Deal moved to another stage', 'email', 1, 'responsible', '<p>\n {$deal.create_datetime|wa_datetime} deal\n “<a href="{$deal.url}">{$deal.name|escape}</a>”\n was moved from stage “{$deal.before_stage.name|escape}” of funnel “{$deal.before_funnel.name|escape}”\n to stage “{$deal.stage.name|escape}” of funnel “{$deal.funnel.name|escape}”.\n</p>\n<p>\n <b>Deal details</b><br>\n Customer: {$customer.name|escape}{if !empty($customer.company)}, {$customer.company|escape}{/if}<br>\n Description: {$deal.description_sanitized}<br>\n Estimated amount: {$deal.amount|wa_format_amount_currency:$deal.currency_id}<br>\n Estimated closing date: {$deal.expected_date|wa_date}<br>\n Responsible: {$responsible.name|escape}\n</p>\n\n--<br>\n<p>\n --<br>\n {$wa->accountName()|escape}<br>\n {$wa->domainUrl()}\n</p>\n', 'Deal moved to another stage', 'system', NULL), (8, 'deal.won', 'Deal won', 'email', 1, 'responsible', '<p>\n {waDateTime::format(''datetime'')} deal\n “<a href="{$deal.url}">{$deal.name|escape}</a>”\n in funnel “{$deal.funnel.name|escape}” was won.\n Responsible: {$responsible.name|escape}.\n</p>\n<p>\n <b>Deal details</b><br>\n Customer: {$customer.name|escape}{if !empty($customer.company)}, {$customer.company|escape}{/if}<br>\n Description: {$deal.description_sanitized}<br>\n Total amount of invoices paid by customer: {$deal.amount|wa_format_amount_currency:$deal.currency_id}\n</p>\n\n--<br>\n<p>\n --<br>\n {$wa->accountName()|escape}<br>\n {$wa->domainUrl()}\n</p>\n', 'Deal won', 'system', NULL), (9, 'deal.lost', 'Deal lost', 'email', 1, 'responsible', '<p>\n {waDateTime::format(''datetime'')} deal\n “<a href="{$deal.url}">{$deal.name|escape}</a>”\n in funnel “{$deal.funnel.name|escape}” was lost.\n Responsible: {$responsible.name|escape}.\n</p>\n<p>\n <b>Deal details</b><br>\n Customer: {$customer.name|escape}{if !empty($customer.company)}, {$customer.company|escape}{/if}<br>\n Description: {$deal.description_sanitized}<br>\n Estimated amount: {$deal.amount|wa_format_amount_currency:$deal.currency_id}\n Estimated closing date: {$deal.expected_date|wa_datetime}\n</p>\n\n--<br>\n<p>\n --<br>\n {$wa->accountName()|escape}<br>\n {$wa->domainUrl()}\n</p>\n', 'Deal lost', 'system', NULL), (10, 'deal.restore', 'Deal reopened', 'email', 1, 'responsible', '<p>\n {waDateTime::format(''datetime'')}\n {if $deal.status_id == crmDealModel::STATUS_WON}won{else}lost{/if} deal\n “<a href="{$deal.url}">{$deal.name|escape}</a>” was reopened\n on stage “{$deal.stage.name|escape}” in funnel “{$deal.funnel.name|escape}”.\n</p>\n<p>\n <b>Deal details</b><br>\n Customer: {$customer.name|escape}{if !empty($customer.company)}, {$customer.company|escape}{/if}<br>\n Description: {$deal.description_sanitized}<br>\n Estimated amount: {$deal.amount|wa_format_amount_currency:$deal.currency_id}\n Estimated closing date: {$deal.expected_date|wa_datetime}\n Responsible: {$responsible.name|escape}.\n</p>\n\n--<br>\n<p>\n --<br>\n {$wa->accountName()|escape}<br>\n {$wa->domainUrl()}\n</p>\n', 'Deal reopened', 'system', NULL); -- -------------------------------------------------------- -- -- Table structure for table `crm_notification_params` -- CREATE TABLE `crm_notification_params` ( `notification_id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`notification_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_payment` -- CREATE TABLE `crm_payment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `plugin` varchar(32) NOT NULL, `name` varchar(255) NOT NULL, `description` text, `logo` text, `status` tinyint(1) NOT NULL DEFAULT '1', `sort` int(11) NOT NULL, `company_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `plugin_company` (`plugin`,`company_id`), KEY `company_id` (`company_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_payment_settings` -- CREATE TABLE `crm_payment_settings` ( `id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_pbx` -- CREATE TABLE `crm_pbx` ( `plugin_id` varchar(64) NOT NULL, `plugin_user_number` varchar(132) NOT NULL, PRIMARY KEY (`plugin_id`,`plugin_user_number`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_pbx_params` -- CREATE TABLE `crm_pbx_params` ( `plugin_id` varchar(64) NOT NULL, `plugin_user_number` varchar(132) NOT NULL, `name` varchar(32) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`plugin_id`,`plugin_user_number`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_pbx_users` -- CREATE TABLE `crm_pbx_users` ( `plugin_id` varchar(64) NOT NULL, `plugin_user_number` varchar(132) NOT NULL, `contact_id` int(11) NOT NULL, PRIMARY KEY (`plugin_id`,`plugin_user_number`,`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_recent` -- CREATE TABLE `crm_recent` ( `user_contact_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, `is_pinned` tinyint(4) NOT NULL DEFAULT '0', `view_datetime` datetime NOT NULL, PRIMARY KEY (`user_contact_id`,`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_reminder` -- CREATE TABLE `crm_reminder` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `creator_contact_id` int(11) NOT NULL, `contact_id` int(11) DEFAULT NULL, `user_contact_id` int(11) NOT NULL, `due_date` date DEFAULT NULL, `due_datetime` datetime DEFAULT NULL, `complete_datetime` datetime DEFAULT NULL, `content` text, `report` text, `type` enum('MEETING','CALL','MESSAGE','OTHER') NOT NULL DEFAULT 'OTHER', `push_sent` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `type` (`type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_segment` -- CREATE TABLE `crm_segment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(32) NOT NULL, `name` varchar(255) DEFAULT NULL, `hash` text, `sort` int(11) NOT NULL DEFAULT '0', `create_datetime` datetime NOT NULL, `contact_id` int(11) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `count` int(11) NOT NULL DEFAULT '0', `icon` varchar(255) DEFAULT NULL, `category_id` int(11) DEFAULT NULL, `archived` tinyint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `category_id` (`category_id`), KEY `type` (`type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_segment_count` -- CREATE TABLE `crm_segment_count` ( `segment_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`segment_id`,`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `crm_source` -- CREATE TABLE `crm_source` ( `id` int(11) NOT NULL AUTO_INCREMENT, `creator_contact_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `type` enum('EMAIL','FORM','SHOP','SPECIAL','IM') NOT NULL DEFAULT 'SPECIAL', `provider` varchar(64) DEFAULT NULL, `name` varchar(255) NOT NULL, `funnel_id` int(11) DEFAULT NULL, `stage_id` int(11) DEFAULT NULL, `responsible_contact_id` int(11) DEFAULT NULL, `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `crm_source` -- INSERT INTO `crm_source` VALUES (1, 0, '[[regtime]]', 'FORM', '', 'Subscription form', NULL, NULL, NULL, 1); -- -------------------------------------------------------- -- -- Table structure for table `crm_source_params` -- CREATE TABLE `crm_source_params` ( `source_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text, PRIMARY KEY (`source_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `crm_source_params` -- INSERT INTO `crm_source_params` VALUES (1, 'form_id', '1'), (1, 'locale', 'en_US'); -- -------------------------------------------------------- -- -- Table structure for table `crm_tag` -- CREATE TABLE `crm_tag` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `color` varchar(13) DEFAULT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_temp` -- CREATE TABLE `crm_temp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `hash` varchar(255) NOT NULL DEFAULT '', `data` longtext NOT NULL, `create_datetime` datetime NOT NULL, PRIMARY KEY (`id`), KEY `hash` (`hash`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `crm_template` -- CREATE TABLE `crm_template` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `content` text NOT NULL, `origin_id` int(11) DEFAULT NULL, `style_version` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; -- -- Dumping data for table `crm_template` -- INSERT INTO `crm_template` VALUES (1, 'Variant A', '{$_logo = "{$wa_app_static_url}img/crm.svg?v={$wa->version()}"}\n{if !empty($company.logo_url)}\n {$_logo = $company.logo_url}\n{/if}\n\n{if !empty($company.invoice_options) && !empty($company.invoice_options.headers_color)}\n {$_color = $company.invoice_options.headers_color}\n{/if}\n\n<div class="c-front-invoice-block type-1">\n <div class="c-header c-text-center">\n <div class="c-logo">\n <img src="{$_logo}" alt="">\n </div>\n\n <p class="c-date c-color-gray">[`Invoice`] [`#`]{$invoice.number|escape} [`issued on`] {$invoice.invoice_date|wa_date}</p>\n\n <p class="c-price"{if !empty($_color)} style="color: {$_color|escape};"{/if}>{$invoice.amount|wa_format_amount_currency:$invoice.currency_id}</p>\n\n {$pay_button}\n\n <div class="c-details">\n <div class="c-recipient">\n <p class="c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Provider`]</p>\n <p>\n {ifempty($company.name, $invoice.company_id)|escape}{if !empty($company.address)},\n {$company.address|escape|nl2br}{/if}{if !empty($company.phone)},\n {$company.phone|escape}{/if}\n </p>\n </div>\n\n <div class="c-payer">\n <p class="c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Billed To`]</p>\n <p>\n {$_city = $customer->get(''address:city'', ''default'')}\n {if $customer.company}{$customer.company|escape}{else}{$customer.name|escape}{/if}{if $_city},\n {$_city|escape}\n {/if}\n </p>\n </div>\n </div>\n </div>\n <div class="c-items">\n <table>\n <thead>\n <tr>\n <th class="c-text-left c-h-mobile c-font-bold c-pr-10 fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>№</th>\n <th class="c-text-left c-text-nowrap c-font-bold c-pr-30 fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Product or service`]</th>\n <th class="c-h-mobile c-text-nowrap c-font-bold c-text-right c-pr-30 fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Qty`]</th>\n <th class="c-h-mobile c-font-bold c-text-right c-pr-30 fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Price`]</th>\n <th class="c-text-nowrap c-font-bold c-text-right fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Amount`] ({$invoice.currency_id})</th>\n </tr>\n </thead>\n <tbody>\n {$_subtotal = 0}\n {foreach $invoice.items as $_item}\n <tr>\n {$_item_total = ($_item.quantity * $_item.price)}\n <td class="c-h-mobile c-align-top c-pr-10 c-pt-12">{$_item@iteration}</td>\n <td class="c-pr-30 c-pt-12">\n <span data-order="{$_item@iteration}.">{$_item.name|escape}</span>\n <span class="c-d-mobile c-color-gray">{$_item.price|wa_format} x {$_item.quantity|wa_format}</span>\n </td>\n <td class="c-h-mobile c-text-nowrap c-align-top c-text-right c-pr-30 c-pt-12">{$_item.quantity|wa_format}</td>\n <td class="c-h-mobile c-text-nowrap c-align-top c-text-right c-pr-30 c-pt-12">{$_item.price|wa_format}</td>\n <td class="c-text-nowrap c-align-top c-text-right c-pt-12">{$_item_total|wa_format}</td>\n {$_subtotal = $_subtotal + $_item_total}\n </tr>\n {/foreach}\n </tbody>\n </table>\n </div>\n <hr>\n <div class="c-total">\n <table>\n <tr>\n <td class="c-color-gray c-pr-30 fs-16">[`Subtotal`]</td>\n <td>{$_subtotal|wa_format}</td>\n </tr>\n {if ($invoice.tax_type != "NONE")}\n {$_type = ""}\n {if ($invoice.tax_type == "INCLUDE")}\n {$_type = "[`including`]"}\n {/if}\n\n {$_name = "[`tax`]"}\n {if !empty($invoice.tax_name)}\n {$_name = $invoice.tax_name}\n {/if}\n <tr>\n <td class="c-color-gray c-pr-30 c-pt-12 fs-16">\n {if !empty($_type)}{$_type} {/if}{$_name|escape} {$invoice.tax_percent|escape}%\n </td>\n <td class="c-pt-12">\n {$invoice.tax_amount|wa_format}\n </td>\n </tr>\n {/if}\n <tr>\n <td class="c-color-gray c-pr-30 c-pt-12 fs-16">[`Total`]</td>\n <td class="c-font-bold c-pt-12"{if !empty($_color)} style="color: {$_color|escape};"{/if}>{$invoice.amount|wa_format_amount_currency:$invoice.currency_id}</td>\n </tr>\n </table>\n </div>\n {if !empty($invoice.comment)}\n <div class="c-comment">\n <p class="c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Comment`]</p>\n <p>{$invoice.comment}</p>\n </div>\n {/if}\n</div>\n', 1, 2), (2, 'Variant B', '{$_logo = "{$wa_app_static_url}img/crm.svg?v={$wa->version()}"}\n{if !empty($company.logo_url)}\n {$_logo = $company.logo_url}\n{/if}\n\n<div class="c-front-invoice-block type-2">\n <div class="c-header">\n <div class="c-logo">\n <img src="{$_logo}" alt="">\n </div>\n\n <div class="c-header-wrapper">\n <div class="c-info">\n <p class="c-color-gray c-my-0 c-mb-8 fs-16">[`Invoice`]</p>\n <p class="c-date c-my-0">[`#`]{$invoice.number|escape} [`issued on`] {$invoice.invoice_date|wa_date}</p>\n\n <p class="c-price">{$invoice.amount|wa_format_amount_currency:$invoice.currency_id}</p>\n\n {$pay_button}\n </div>\n\n <div class="c-details">\n <div class="c-recipient">\n <p class="c-color-gray fs-16">[`Provider`]</p>\n <p>\n {ifempty($company.name, $invoice.company_id)|escape}{if !empty($company.address)},\n {$company.address|escape|nl2br}{/if}{if !empty($company.phone)},\n {$company.phone|escape}{/if}\n </p>\n </div>\n\n <div class="c-payer">\n <p class="c-color-gray fs-16">[`Billed To`]</p>\n <p>\n {$_city = $customer->get(''address:city'', ''default'')}\n {if $customer.company}{$customer.company|escape}{else}{$customer.name|escape}{/if}{if $_city},\n {$_city|escape}\n {/if}\n </p>\n </div>\n {if !empty($invoice.comment)}\n <div class="c-comment">\n <p class="c-color-gray fs-16">[`Comment`]</p>\n <p>{$invoice.comment}</p>\n </div>\n {/if}\n </div>\n </div>\n\n </div>\n <div class="c-items">\n <table>\n <thead>\n <tr>\n <th class="c-text-left c-h-mobile c-color-gray c-pr-10 fs-16">№</th>\n <th class="c-text-left c-text-nowrap c-color-gray c-pr-30 fs-16">[`Product or service`]</th>\n <th class="c-h-mobile c-text-nowrap c-color-gray c-text-right c-pr-30 fs-16">[`Qty`]</th>\n <th class="c-h-mobile c-color-gray c-text-right c-pr-30 fs-16">[`Price`]</th>\n <th class="c-text-nowrap c-color-gray c-text-right fs-16">[`Amount`] ({$invoice.currency_id})</th>\n </tr>\n </thead>\n <tbody>\n {$_subtotal = 0}\n {foreach $invoice.items as $_item}\n <tr>\n {$_item_total = ($_item.quantity * $_item.price)}\n <td class="c-h-mobile c-align-top c-pr-10 c-pt-12">{$_item@iteration}</td>\n <td class="c-pr-30 c-pt-12">\n <span data-order="{$_item@iteration}.">{$_item.name|escape}</span>\n <span class="c-d-mobile c-color-gray">{$_item.price|wa_format} x {$_item.quantity|wa_format}</span>\n </td>\n <td class="c-h-mobile c-text-nowrap c-align-top c-text-right c-pr-30 c-pt-12">{$_item.quantity|wa_format}</td>\n <td class="c-h-mobile c-text-nowrap c-align-top c-text-right c-pr-30 c-pt-12">{$_item.price|wa_format}</td>\n <td class="c-text-nowrap c-align-top c-text-right c-pt-12">{$_item_total|wa_format}</td>\n {$_subtotal = $_subtotal + $_item_total}\n </tr>\n {/foreach}\n </tbody>\n </table>\n </div>\n <hr>\n <div class="c-total">\n <table>\n <tr>\n <td class="c-color-gray c-pr-30 fs-16">[`Subtotal`]</td>\n <td>{$_subtotal|wa_format}</td>\n </tr>\n {if ($invoice.tax_type != "NONE")}\n {$_type = ""}\n {if ($invoice.tax_type == "INCLUDE")}\n {$_type = "[`including`]"}\n {/if}\n\n {$_name = "[`tax`]"}\n {if !empty($invoice.tax_name)}\n {$_name = $invoice.tax_name}\n {/if}\n <tr>\n <td class="c-color-gray c-pr-30 c-pt-12 fs-16">\n {if !empty($_type)}{$_type} {/if}{$_name|escape} {$invoice.tax_percent|escape}%\n </td>\n <td class="c-pt-12">{$invoice.tax_amount|wa_format}</td>\n </tr>\n {/if}\n <tr>\n <td class="c-color-gray c-pr-30 c-pt-12 fs-16">[`Total`]</td>\n <td class="c-font-bold c-pt-12">{$invoice.amount|wa_format_amount_currency:$invoice.currency_id}</td>\n </tr>\n </table>\n </div>\n</div>\n', 2, 2), (3, 'Variant C', '{if !empty($company.invoice_options) && !empty($company.invoice_options.headers_color)}\n {$_color = $company.invoice_options.headers_color}\n{/if}\n\n<div class="c-front-invoice-block type-3">\n <div class="c-header">\n <div class="c-header-wrapper">\n <p class="c-my-0 c-mb-8 c-font-bold">[`Invoice`]</p>\n {$pay_button}\n </div>\n\n <div class="c-details">\n\n <div class="c-payer">\n <p class="c-color-gray c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Billed To`]</p>\n <p>\n {$_city = $customer->get(''address:city'', ''default'')}\n {if $customer.company}{$customer.company|escape}{else}{$customer.name|escape}{/if}{if $_city},\n {$_city|escape}\n {/if}\n </p>\n </div>\n\n <div class="c-date c-text-nowrap">\n <p class="c-color-gray c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Created`]</p>\n <p>{$invoice.invoice_date|wa_date}</p>\n </div>\n\n <div class="c-number c-text-nowrap">\n <p class="c-color-gray c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Invoice`]</p>\n <p>[`#`]{$invoice.number|escape}</p>\n </div>\n\n <div class="c-price c-text-nowrap c-text-right">\n <p class="c-color-gray c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Amount`] ({$invoice.currency_id})</p>\n <p class="c-font-bold">{$invoice.amount|wa_format_amount_currency:$invoice.currency_id}</p>\n </div>\n\n </div>\n\n <div class="c-recipient">\n <p class="c-color-gray c-font-bold fs-16">[`Provider`]</p>\n <p>\n {ifempty($company.name, $invoice.company_id)|escape}{if !empty($company.address)},\n {$company.address|escape|nl2br}{/if}{if !empty($company.phone)},\n {$company.phone|escape}{/if}\n </p>\n </div>\n\n </div>\n <div class="c-items">\n <table>\n <thead>\n <tr>\n <th class="c-text-left c-h-mobile c-color-gray c-pr-10 c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>№</th>\n <th class="c-text-left c-text-nowrap c-color-gray c-pr-30 c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Product or service`]</th>\n <th class="c-h-mobile c-text-nowrap c-color-gray c-text-right c-pr-30 c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Qty`]</th>\n <th class="c-h-mobile c-color-gray c-text-right c-pr-30 c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Price`]</th>\n <th class="c-text-nowrap c-color-gray c-text-right c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Amount`] ({$invoice.currency_id})</th>\n </tr>\n </thead>\n <tbody>\n {$_subtotal = 0}\n {foreach $invoice.items as $_item}\n <tr>\n {$_item_total = ($_item.quantity * $_item.price)}\n <td class="c-h-mobile c-align-top c-pr-10 c-pt-12">{$_item@iteration}</td>\n <td class="c-pr-30 c-pt-12">\n <span data-order="{$_item@iteration}.">{$_item.name|escape}</span>\n <span class="c-d-mobile c-color-gray">{$_item.price|wa_format} x {$_item.quantity|wa_format}</span>\n </td>\n <td class="c-h-mobile c-text-nowrap c-align-top c-text-right c-pr-30 c-pt-12">{$_item.quantity|wa_format}</td>\n <td class="c-h-mobile c-text-nowrap c-align-top c-text-right c-pr-30 c-pt-12">{$_item.price|wa_format}</td>\n <td class="c-text-nowrap c-align-top c-text-right c-pt-12">{$_item_total|wa_format}</td>\n {$_subtotal = $_subtotal + $_item_total}\n </tr>\n {/foreach}\n </tbody>\n </table>\n </div>\n <hr>\n <div class="c-total">\n <table>\n <tr>\n <td class="c-pr-30 fs-16 c-color-gray">[`Subtotal`]</td>\n <td>{$_subtotal|wa_format}</td>\n </tr>\n {if ($invoice.tax_type != "NONE")}\n {$_type = ""}\n {if ($invoice.tax_type == "INCLUDE")}\n {$_type = "[`including`]"}\n {/if}\n\n {$_name = "[`tax`]"}\n {if !empty($invoice.tax_name)}\n {$_name = $invoice.tax_name}\n {/if}\n <tr>\n <td class="c-pr-30 c-pt-12 fs-16 c-color-gray">\n {if !empty($_type)}{$_type} {/if}{$_name|escape} {$invoice.tax_percent|escape}%\n </td>\n <td class="c-pt-12">\n {$invoice.tax_amount|wa_format}\n </td>\n </tr>\n {/if}\n <tr>\n <td class="c-pr-30 c-pt-12 fs-16 c-color-gray">[`Total`]</td>\n <td class="c-font-bold c-pt-12">{$invoice.amount|wa_format_amount_currency:$invoice.currency_id}</td>\n </tr>\n </table>\n </div>\n {if !empty($invoice.comment)}\n <div class="c-comment">\n <p class="c-color-gray c-font-bold fs-16"{if !empty($_color)} style="color: {$_color|escape};"{/if}>[`Comment`]</p>\n <p>{$invoice.comment}</p>\n </div>\n {/if}\n</div>\n', 3, 2); -- -------------------------------------------------------- -- -- Table structure for table `crm_template_params` -- CREATE TABLE `crm_template_params` ( `template_id` int(11) NOT NULL, `code` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `placeholder` varchar(255) DEFAULT NULL, `type` enum('STRING','COLOR','NUMBER','IMAGE') NOT NULL DEFAULT 'STRING', `sort` int(11) NOT NULL, PRIMARY KEY (`template_id`,`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `crm_template_params` -- INSERT INTO `crm_template_params` VALUES (1, 'button_color', 'Button color', '#cc5252', 'COLOR', 1), (1, 'headers_color', 'Headers color', '#cc5252', 'COLOR', 2), (1, 'bg_color', 'Background color', '#f3f5fa', 'COLOR', 3), (1, 'bg_image', 'Background image', '', 'IMAGE', 4), (2, 'button_color', 'Button color', '#cc5252', 'COLOR', 1), (2, 'bg_color', 'Background color', '#f3f5fa', 'COLOR', 2), (2, 'bg_image', 'Background image', '', 'IMAGE', 3), (3, 'button_color', 'Button color', '#cc5252', 'COLOR', 1), (3, 'headers_color', 'Headers color', '#cc5252', 'COLOR', 2), (3, 'bg_color', 'Background color', '#f3f5fa', 'COLOR', 3), (3, 'bg_image', 'Background image', '', 'IMAGE', 4); -- -------------------------------------------------------- -- -- Table structure for table `crm_vault` -- CREATE TABLE `crm_vault` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `color` varchar(13) DEFAULT NULL, `sort` int(11) NOT NULL DEFAULT '0', `create_datetime` datetime NOT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `crm_vault` -- INSERT INTO `crm_vault` VALUES (1, 'VIP', NULL, 0, '[[regtime]]', 0); -- -------------------------------------------------------- -- -- Table structure for table `shop_abtest` -- CREATE TABLE `shop_abtest` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `create_datetime` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_abtest_variants` -- CREATE TABLE `shop_abtest_variants` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `abtest_id` int(11) unsigned NOT NULL, `code` varchar(16) NOT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `antest_code` (`abtest_id`,`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_affiliate_transaction` -- CREATE TABLE `shop_affiliate_transaction` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `contact_id` int(11) unsigned NOT NULL, `create_datetime` datetime NOT NULL, `order_id` int(11) unsigned DEFAULT NULL, `amount` decimal(15,4) NOT NULL, `balance` decimal(15,4) NOT NULL, `comment` text, `type` varchar(32) DEFAULT NULL, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_api_courier` -- CREATE TABLE `shop_api_courier` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `enabled` int(1) NOT NULL DEFAULT '1', `contact_id` int(11) DEFAULT NULL, `create_datetime` datetime NOT NULL, `orders_processed` int(11) NOT NULL DEFAULT '0', `note` text, `api_token` varchar(32) DEFAULT NULL, `api_pin` varchar(32) DEFAULT NULL, `api_pin_expire` datetime DEFAULT NULL, `api_last_use` datetime DEFAULT NULL, `all_storefronts` int(1) NOT NULL DEFAULT '1', `rights_order_edit` int(11) NOT NULL DEFAULT '0', `rights_customer_edit` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_api_courier_storefronts` -- CREATE TABLE `shop_api_courier_storefronts` ( `courier_id` int(11) NOT NULL, `storefront` varchar(255) NOT NULL, KEY `courier` (`courier_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_cart_items` -- CREATE TABLE `shop_cart_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(32) DEFAULT NULL, `contact_id` int(11) DEFAULT NULL, `product_id` int(11) NOT NULL, `sku_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `quantity` decimal(15,3) NOT NULL DEFAULT '1.000', `type` enum('product','service') NOT NULL DEFAULT 'product', `service_id` int(11) DEFAULT NULL, `service_variant_id` int(11) DEFAULT NULL, `parent_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `code` (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_category` -- CREATE TABLE `shop_category` ( `id` int(11) NOT NULL AUTO_INCREMENT, `left_key` int(11) DEFAULT NULL, `right_key` int(11) DEFAULT NULL, `depth` int(11) NOT NULL DEFAULT '0', `parent_id` int(11) NOT NULL DEFAULT '0', `name` varchar(255) DEFAULT NULL, `meta_title` varchar(255) DEFAULT NULL, `meta_keywords` text, `meta_description` text, `type` int(1) NOT NULL DEFAULT '0', `url` varchar(255) DEFAULT NULL, `full_url` varchar(255) DEFAULT NULL, `count` int(11) NOT NULL DEFAULT '0', `description` mediumtext, `conditions` text, `create_datetime` datetime NOT NULL, `edit_datetime` datetime DEFAULT NULL, `filter` text, `sort_products` varchar(32) DEFAULT NULL, `include_sub_categories` tinyint(1) NOT NULL DEFAULT '0', `status` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `url` (`parent_id`,`url`(245)), UNIQUE KEY `full_url` (`full_url`(250)), KEY `ns_keys` (`left_key`,`right_key`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_category_og` -- CREATE TABLE `shop_category_og` ( `category_id` int(11) NOT NULL, `property` varchar(255) NOT NULL, `content` text NOT NULL, PRIMARY KEY (`category_id`,`property`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_category_params` -- CREATE TABLE `shop_category_params` ( `category_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`category_id`,`name`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_category_products` -- CREATE TABLE `shop_category_products` ( `product_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`category_id`,`product_id`), KEY `product_category` (`product_id`,`category_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_category_routes` -- CREATE TABLE `shop_category_routes` ( `category_id` int(11) NOT NULL, `route` varchar(255) NOT NULL, PRIMARY KEY (`category_id`,`route`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_checkout_flow` -- CREATE TABLE `shop_checkout_flow` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(32) DEFAULT NULL, `contact_id` int(11) DEFAULT NULL, `date` date DEFAULT NULL, `year` smallint(6) DEFAULT NULL, `quarter` smallint(6) DEFAULT NULL, `month` smallint(6) DEFAULT NULL, `step` tinyint(2) NOT NULL DEFAULT '0', `description` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_contact_category_discount` -- CREATE TABLE `shop_contact_category_discount` ( `category_id` int(10) unsigned NOT NULL, `discount` decimal(15,4) NOT NULL, PRIMARY KEY (`category_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_coupon` -- CREATE TABLE `shop_coupon` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `code` varchar(32) NOT NULL, `type` varchar(3) NOT NULL, `limit` int(11) DEFAULT NULL, `used` int(11) NOT NULL DEFAULT '0', `value` decimal(15,4) DEFAULT NULL, `url` text, `comment` text, `expire_datetime` datetime DEFAULT NULL, `create_datetime` datetime NOT NULL, `create_contact_id` int(11) unsigned NOT NULL DEFAULT '0', `products_hash` text, PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_currency` -- CREATE TABLE `shop_currency` ( `code` char(3) NOT NULL, `rate` decimal(18,10) NOT NULL DEFAULT '1.0000000000', `rounding` decimal(8,2) DEFAULT NULL, `round_up_only` int(11) NOT NULL DEFAULT '1', `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `shop_currency` -- INSERT INTO `shop_currency` VALUES ('USD', '1.0000000000', NULL, 1, 0); -- -------------------------------------------------------- -- -- Table structure for table `shop_customer` -- CREATE TABLE `shop_customer` ( `contact_id` int(11) unsigned NOT NULL, `total_spent` decimal(15,4) NOT NULL DEFAULT '0.0000', `affiliate_bonus` decimal(15,4) NOT NULL DEFAULT '0.0000', `number_of_orders` int(11) unsigned NOT NULL DEFAULT '0', `last_order_id` int(11) unsigned DEFAULT NULL, `source` varchar(255) DEFAULT NULL, PRIMARY KEY (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_customers_filter` -- CREATE TABLE `shop_customers_filter` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `hash` text, `create_datetime` datetime NOT NULL, `contact_id` int(11) NOT NULL, `mass_edit` int(11) DEFAULT NULL, `icon` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_discount_by_sum` -- CREATE TABLE `shop_discount_by_sum` ( `type` varchar(32) NOT NULL, `sum` decimal(15,4) NOT NULL, `discount` decimal(15,4) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_expense` -- CREATE TABLE `shop_expense` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(16) NOT NULL, `name` varchar(255) NOT NULL, `storefront` varchar(255) DEFAULT NULL, `start` date NOT NULL, `end` date NOT NULL, `amount` decimal(15,4) NOT NULL, `color` varchar(7) DEFAULT NULL, `note` text, PRIMARY KEY (`id`), KEY `start_end` (`start`,`end`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature` -- CREATE TABLE `shop_feature` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) DEFAULT NULL, `code` varchar(64) NOT NULL, `status` enum('public','hidden','private') NOT NULL DEFAULT 'public', `name` varchar(255) DEFAULT NULL, `type` varchar(255) DEFAULT NULL, `selectable` int(11) NOT NULL, `multiple` int(11) NOT NULL, `count` int(10) unsigned NOT NULL DEFAULT '0', `available_for_sku` int(11) DEFAULT NULL, `default_unit` varchar(255) DEFAULT NULL, `builtin` int(11) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature_values_color` -- CREATE TABLE `shop_feature_values_color` ( `id` int(11) NOT NULL AUTO_INCREMENT, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `code` mediumint(8) unsigned DEFAULT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `values` (`feature_id`,`value`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature_values_dimension` -- CREATE TABLE `shop_feature_values_dimension` ( `id` int(11) NOT NULL AUTO_INCREMENT, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `value` double NOT NULL, `unit` varchar(255) NOT NULL, `type` varchar(16) NOT NULL, `value_base_unit` double NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `feature_id` (`feature_id`,`value`,`unit`(230),`type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature_values_double` -- CREATE TABLE `shop_feature_values_double` ( `id` int(11) NOT NULL AUTO_INCREMENT, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `value` double NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `values` (`feature_id`,`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature_values_range` -- CREATE TABLE `shop_feature_values_range` ( `id` int(11) NOT NULL AUTO_INCREMENT, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `begin` double DEFAULT NULL, `end` double DEFAULT NULL, `unit` varchar(255) NOT NULL, `type` varchar(16) NOT NULL, `begin_base_unit` double DEFAULT NULL, `end_base_unit` double DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `feature_id` (`feature_id`,`begin`,`end`,`unit`(225),`type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature_values_text` -- CREATE TABLE `shop_feature_values_text` ( `id` int(11) NOT NULL AUTO_INCREMENT, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `value` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_feature_values_varchar` -- CREATE TABLE `shop_feature_values_varchar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `value` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `values` (`feature_id`,`value`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_filter` -- CREATE TABLE `shop_filter` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(10) unsigned DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `creator_contact_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `creator_contact_id` (`creator_contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_filter_rules` -- CREATE TABLE `shop_filter_rules` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `filter_id` int(10) unsigned NOT NULL, `rule_type` varchar(255) NOT NULL, `rule_params` longtext, `rule_group` int(11) NOT NULL DEFAULT '0', `open_interval` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `filter_id` (`filter_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_followup` -- CREATE TABLE `shop_followup` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `delay` int(10) unsigned NOT NULL, `first_order_only` tinyint(3) unsigned NOT NULL DEFAULT '1', `same_state_id` tinyint(4) DEFAULT '0', `subject` text NOT NULL, `body` text NOT NULL, `last_cron_time` datetime NOT NULL, `from` varchar(32) DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `transport` enum('email','sms') NOT NULL DEFAULT 'email', `state_id` varchar(32) DEFAULT 'paid', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_followup_sources` -- CREATE TABLE `shop_followup_sources` ( `followup_id` int(11) NOT NULL, `source` varchar(510) DEFAULT NULL, KEY `followup_id` (`followup_id`), KEY `source` (`source`(190)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_importexport` -- CREATE TABLE `shop_importexport` ( `id` int(11) NOT NULL AUTO_INCREMENT, `plugin` varchar(64) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `name` varchar(255) DEFAULT NULL, `description` text, `config` text, PRIMARY KEY (`id`), UNIQUE KEY `id` (`plugin`,`id`,`sort`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_notification` -- CREATE TABLE `shop_notification` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL, `event` varchar(64) NOT NULL, `transport` enum('email','sms','http') NOT NULL DEFAULT 'email', `status` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `event` (`event`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=16 ; -- -- Dumping data for table `shop_notification` -- INSERT INTO `shop_notification` VALUES (1, 'Order was placed (Customer)', 'order.create', 'email', 1), (2, 'Order was placed (Store admin)', 'order.create', 'email', 1), (3, 'Order was confirmed and accepted for processing (Customer)', 'order.process', 'email', 1), (4, 'Order was shipped (Customer)', 'order.ship', 'email', 1), (5, 'Order was deleted (Customer)', 'order.delete', 'email', 1), (6, 'A comment was added for the order (Customer)', 'order.comment', 'email', 1), (7, 'Shipping details changed (Customer)', 'order.editshippingdetails', 'email', 1), (8, 'Order was settled (Customer)', 'order.settle', 'email', 1), (9, 'Order was refunded (Customer)', 'order.refund', 'email', 1), (10, 'Order was edited (Customer)', 'order.edit', 'email', 1), (11, 'Order was re-opened (Customer)', 'order.restore', 'email', 1), (12, 'Order was marked as completed (Customer)', 'order.complete', 'email', 1), (13, 'Message was sent (Customer)', 'order.message', 'email', 1), (14, 'Callback (Customer)', 'order.callback', 'email', 1), (15, 'Order was paid (Customer)', 'order.pay', 'email', 1); -- -------------------------------------------------------- -- -- Table structure for table `shop_notification_params` -- CREATE TABLE `shop_notification_params` ( `notification_id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`notification_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `shop_notification_params` -- INSERT INTO `shop_notification_params` VALUES (1, 'to', 'customer'), (1, 'description', 'Order placed by a customer or created by an administrator in backend.'), (1, 'subject', 'New order {$order.id}'), (1, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_products_bg = "#ffffff"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n ">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="[`https://www.webasyst.com`]" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color:#444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">[`Order status`]</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color:#444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- LIST -->\n <tr>\n <td bgcolor="{$_products_bg}">\n </td>\n <td bgcolor="{$_products_bg}" style="">\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n {$subtotal = 0}\n {foreach $order.items as $item}\n {$_border_style = "border: 0;"}\n {$_is_service = ($item.type == "service")}\n {if $item@index > 0}\n {$_border_style = "border: solid {$_border_color}; border-width: 1px 0 0;"}\n {/if}\n <tr>\n <td width="40" style="padding: 8px 4px 8px 0; {$_border_style}">\n {if !$_is_service && !empty($item.product.image.crop_url)}\n <img src="{$item.product.image.crop_url}" alt="" style="width: 48px; height: 48px; vertical-align: middle;">\n {else}\n <img src="{$wa_app_static_url}img/image-dummy-small.png" style="width: 48px; height: 48px;">\n {/if}\n </td>\n <td style="padding: 8px 0 8px 4px; {$_border_style}">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size: {if $_is_service}12{else}14{/if}px;\n line-height:18px;\n ">\n {if !$_is_service}\n <a href="{$item.product.frontend_url|default:''javascript:void(0);''}" style="text-decoration: none;" {if !empty($item.product.frontend_url)}target="_blank"{/if}>\n <font>{if $_is_service}+ {/if}{$item.name|escape}</font>\n {if !empty($item.sku_code)} <font style="color: #89a; font-size: 0.8em;">{$item.sku_code|escape}</font>{/if}\n </a>\n {else}\n {if $_is_service}+ {/if}{$item.name|escape}\n {if !empty($item.sku_code)} <font style="color: #89a; font-size: 0.8em;">{$item.sku_code|escape}</font>{/if}\n {/if}\n {if !empty($item.download_link)}<a href="{$item.download_link}"><strong>Download</strong></a>{/if}\n </p>\n </td>\n <td style="padding: 8px 4px 8px 4px; white-space: nowrap; text-align: right; {$_border_style}">\n <font style="color:#89a;">{wa_currency($item.price, $order.currency)} ×</font> \n <span style="color:#444">{$item.quantity}</span>\n </td>\n <td style="padding: 8px 0 8px 8px; white-space: nowrap; text-align: right; {$_border_style}">\n <font style="font-weight: bold;color: #444;">{wa_currency($item.price * $item.quantity, $order.currency)}</font>\n </td>\n </tr>\n {$subtotal = $subtotal + $item.price * $item.quantity}\n {/foreach}\n </table>\n </td>\n <td bgcolor="{$_products_bg}"></td>\n </tr>\n <tr>\n <td></td>\n <td style="padding: 20px 0; border-bottom: 1px solid {$_border_color}">\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; text-align: right;color: #444;">\n <tr>\n <td style="padding: 8px 0;">Subtotal</td>\n <td style="white-space: nowrap; width: 20%; padding: 8px 0 8px 8px;">{wa_currency($subtotal, $order.currency)}</td>\n </tr>\n {if !empty((float)$order.discount)}\n <tr>\n <td style="padding: 8px 0;">Discount</td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">− {wa_currency($order.discount, $order.currency)}</td>\n </tr>\n {/if}\n <tr>\n <td style="padding: 8px 0;">Shipping</td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">\n {if empty((float)$order.shipping)}\n [`free`]\n {else}\n {wa_currency($order.shipping, $order.currency)}\n {/if}\n </td>\n </tr>\n {if !empty($order.tax)}\n <tr>\n <td style="padding: 8px 0;">Tax</td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">{wa_currency($order.tax, $order.currency)}</td>\n </tr>\n {/if}\n <tr style="color:#222;">\n <td style="padding: 8px 0;">\n <h3 style="font-size:18px;margin:0;">Total</h3>\n </td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">\n <h3 style="font-size:18px;margin:0;">{wa_currency($order.total, $order.currency)}</h3>\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- DETAILS -->\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0 0;">\n {if strlen($customer->get(''email'', ''default''))}\n <p style="margin: 10px 0 0;color: #444;">\n [`Email`]: {$customer->get(''email'', ''default'')|escape}\n </p>\n {/if}\n {if strlen($customer->get(''phone'', ''default''))}\n <p style="margin: 10px 0 0;color: #444;">\n [`Phone`]: {$customer->get(''phone'', ''default'')|escape}\n </p>\n {/if}\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {if $order.comment}\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0 0;">\n <h3>Comment to the order</h3>\n <p style="margin: 10px 0 0;color: #444;">\n <pre style="white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;">{$order.comment|escape}</pre>\n </p>\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {/if}\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0;">\n <b style="color:#222;">\n {if !empty($order.params.shipping_name)}\n <font style="color: #9ab;">Shipping —</font> {$order.params.shipping_name}\n {else}\n <font style="color: #9ab;">Shipping</font>\n {/if}\n </b>\n <p style="margin: 10px 0 0;">\n {$customer.name|escape}<br>{$shipping_address}\n </p>\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {if !empty($order.params.payment_name)}\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0;">\n <b style="color:#222;">\n <font style="color: #9ab;">Payment —</font> {$order.params.payment_name}\n </b>\n <p style="margin: 10px 0 0;color: #444;">{$customer.name|escape}<br>{$billing_address}</p>\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {/if}\n\n <!-- BONUS POINTS -->\n {if $is_affiliate_enabled}\n <tr>\n <td style="background: {$_bonus_background};"></td>\n <td height="50" align="center" style="background: {$_bonus_background}; padding: 16px 0;">\n {if $add_affiliate_bonus}\n <p style="\n font-style:normal;\n font-variant:normal;\n font-size:16px;\n line-height:16px;\n margin: 0;\n color:#000;\n ">\n <b>{sprintf("[`This order will add +%s points to your affiliate bonus.`]", round($add_affiliate_bonus, 2))}</b>\n </p>\n <p style="margin: 16px 0 0;color:#444;">\n {if $signup_url}\n [`Registered customers apply for affiliate bonuses and discounts on future orders.`]\n <a href="{$signup_url}" target="_blank">[`Create permanent user account`]</a>\n {else}\n {sprintf(''[`When this order is paid, your affiliate bonus will be increased to %s.`]'', round($customer.affiliate_bonus + $add_affiliate_bonus, 2))}\n {/if}\n </p>\n\n {/if}\n </td>\n <td style="background: {$_bonus_background}"></td>\n </tr>\n {else}\n <br>\n <br>\n {/if}\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="[`https://www.shop-script.com`]" style="color: #89a; text-decoration: none;" target="_blank">[`Sent via Shop-Script app`]</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (2, 'to', 'admin'), (2, 'description', 'Order placed by a customer or created by an administrator in backend.'), (2, 'subject', 'New order {$order.id}'), (2, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_products_bg = "#ffffff"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n ">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="[`https://www.webasyst.com`]" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color:#444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">[`Order status`]</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color:#444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- LIST -->\n <tr>\n <td bgcolor="{$_products_bg}">\n </td>\n <td bgcolor="{$_products_bg}" style="">\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n {$subtotal = 0}\n {foreach $order.items as $item}\n {$_border_style = "border: 0;"}\n {$_is_service = ($item.type == "service")}\n {if $item@index > 0}\n {$_border_style = "border: solid {$_border_color}; border-width: 1px 0 0;"}\n {/if}\n <tr>\n <td width="40" style="padding: 8px 4px 8px 0; {$_border_style}">\n {if !$_is_service && !empty($item.product.image.crop_url)}\n <img src="{$item.product.image.crop_url}" alt="" style="width: 48px; height: 48px; vertical-align: middle;">\n {else}\n <img src="{$wa_app_static_url}img/image-dummy-small.png" style="width: 48px; height: 48px;">\n {/if}\n </td>\n <td style="padding: 8px 0 8px 4px; {$_border_style}">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size: {if $_is_service}12{else}14{/if}px;\n line-height:18px;\n ">\n {if !$_is_service}\n <a href="{$item.product.frontend_url|default:''javascript:void(0);''}" style="text-decoration: none;" {if !empty($item.product.frontend_url)}target="_blank"{/if}>\n <font>{if $_is_service}+ {/if}{$item.name|escape}</font>\n {if !empty($item.sku_code)} <font style="color: #89a; font-size: 0.8em;">{$item.sku_code|escape}</font>{/if}\n </a>\n {else}\n {if $_is_service}+ {/if}{$item.name|escape}\n {if !empty($item.sku_code)} <font style="color: #89a; font-size: 0.8em;">{$item.sku_code|escape}</font>{/if}\n {/if}\n {if !empty($item.download_link)}<a href="{$item.download_link}"><strong>Download</strong></a>{/if}\n </p>\n </td>\n <td style="padding: 8px 4px 8px 4px; white-space: nowrap; text-align: right; {$_border_style}">\n <font style="color:#89a;">{wa_currency($item.price, $order.currency)} ×</font> \n <span style="color:#444">{$item.quantity}</span>\n </td>\n <td style="padding: 8px 0 8px 8px; white-space: nowrap; text-align: right; {$_border_style}">\n <font style="font-weight: bold;color: #444;">{wa_currency($item.price * $item.quantity, $order.currency)}</font>\n </td>\n </tr>\n {$subtotal = $subtotal + $item.price * $item.quantity}\n {/foreach}\n </table>\n </td>\n <td bgcolor="{$_products_bg}"></td>\n </tr>\n <tr>\n <td></td>\n <td style="padding: 20px 0; border-bottom: 1px solid {$_border_color}">\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; text-align: right;color: #444;">\n <tr>\n <td style="padding: 8px 0;">Subtotal</td>\n <td style="white-space: nowrap; width: 20%; padding: 8px 0 8px 8px;">{wa_currency($subtotal, $order.currency)}</td>\n </tr>\n {if !empty((float)$order.discount)}\n <tr>\n <td style="padding: 8px 0;">Discount</td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">− {wa_currency($order.discount, $order.currency)}</td>\n </tr>\n {/if}\n <tr>\n <td style="padding: 8px 0;">Shipping</td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">\n {if empty((float)$order.shipping)}\n [`free`]\n {else}\n {wa_currency($order.shipping, $order.currency)}\n {/if}\n </td>\n </tr>\n {if !empty($order.tax)}\n <tr>\n <td style="padding: 8px 0;">Tax</td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">{wa_currency($order.tax, $order.currency)}</td>\n </tr>\n {/if}\n <tr style="color:#222;">\n <td style="padding: 8px 0;">\n <h3 style="font-size:18px;margin:0;">Total</h3>\n </td>\n <td style="white-space: nowrap; padding: 8px 0 8px 8px;">\n <h3 style="font-size:18px;margin:0;">{wa_currency($order.total, $order.currency)}</h3>\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- DETAILS -->\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0 0;">\n {if strlen($customer->get(''email'', ''default''))}\n <p style="margin: 10px 0 0;color: #444;">\n [`Email`]: {$customer->get(''email'', ''default'')|escape}\n </p>\n {/if}\n {if strlen($customer->get(''phone'', ''default''))}\n <p style="margin: 10px 0 0;color: #444;">\n [`Phone`]: {$customer->get(''phone'', ''default'')|escape}\n </p>\n {/if}\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {if $order.comment}\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0 0;">\n <h3>Comment to the order</h3>\n <p style="margin: 10px 0 0;color: #444;">\n <pre style="white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;">{$order.comment|escape}</pre>\n </p>\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {/if}\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0;">\n <b style="color:#222;">\n {if !empty($order.params.shipping_name)}\n <font style="color: #9ab;">Shipping —</font> {$order.params.shipping_name}\n {else}\n <font style="color: #9ab;">Shipping</font>\n {/if}\n </b>\n <p style="margin: 10px 0 0;">\n {$customer.name|escape}<br>{$shipping_address}\n </p>\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {if !empty($order.params.payment_name)}\n <tr>\n <td style="border: 0;">\n </td>\n <td style="border: 0; padding: 16px 0;">\n <b style="color:#222;">\n <font style="color: #9ab;">Payment —</font> {$order.params.payment_name}\n </b>\n <p style="margin: 10px 0 0;color: #444;">{$customer.name|escape}<br>{$billing_address}</p>\n </td>\n <td style="border: 0;">\n </td>\n </tr>\n {/if}\n\n <!-- BONUS POINTS -->\n {if $is_affiliate_enabled}\n <tr>\n <td style="background: {$_bonus_background};"></td>\n <td height="50" align="center" style="background: {$_bonus_background}; padding: 16px 0;">\n {if $add_affiliate_bonus}\n <p style="\n font-style:normal;\n font-variant:normal;\n font-size:16px;\n line-height:16px;\n margin: 0;\n color:#000;\n ">\n <b>{sprintf("[`This order will add +%s points to your affiliate bonus.`]", round($add_affiliate_bonus, 2))}</b>\n </p>\n <p style="margin: 16px 0 0;color:#444;">\n {if $signup_url}\n [`Registered customers apply for affiliate bonuses and discounts on future orders.`]\n <a href="{$signup_url}" target="_blank">[`Create permanent user account`]</a>\n {else}\n {sprintf(''[`When this order is paid, your affiliate bonus will be increased to %s.`]'', round($customer.affiliate_bonus + $add_affiliate_bonus, 2))}\n {/if}\n </p>\n\n {/if}\n </td>\n <td style="background: {$_bonus_background}"></td>\n </tr>\n {else}\n <br>\n <br>\n {/if}\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="[`https://www.shop-script.com`]" style="color: #89a; text-decoration: none;" target="_blank">[`Sent via Shop-Script app`]</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (3, 'to', 'customer'), (3, 'description', 'Execution of “Process” action in backend.'), (3, 'subject', 'Order {$order.id} has been confirmed'), (3, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\nfont-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\nletter-spacing:normal;\ntext-indent:0;\ntext-transform:none;\nword-spacing:0;\nborder-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight: normal;width:180px;\n display:block;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer->get("name", "html")}</p>\n <p>Your order {$order.id} has been confirmed and accepted for processing.</p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (4, 'to', 'customer'), (4, 'description', 'Execution of “Sent” action in backend.'), (4, 'subject', 'Order {$order.id} has been sent out!'); INSERT INTO `shop_notification_params` VALUES (4, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\nfont-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\nletter-spacing:normal;\ntext-indent:0;\ntext-transform:none;\nword-spacing:0;\nborder-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color:#89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color:#444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color:#444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer->get("name", "html")}</p>\n <p>Your order {$order.id} has been shipped!</p>\n {if !empty($action_data.params.tracking_number)}\n <p>The shipment tracking number is <strong>{$action_data.params.tracking_number|escape}</strong></p>\n {/if}\n {if !empty($action_data.params.tracking_number) && !empty($shipping_plugin)}\n {$tracking = $shipping_plugin->tracking($action_data.params.tracking_number)}\n {if $tracking}\n <p>{$tracking}</p>\n {/if}\n {/if}\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color:#444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color:#444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (5, 'to', 'customer'), (5, 'description', 'Execution of “Delete” action in backend.'), (5, 'subject', 'Order {$order.id} has been canceled'), (5, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\nfont-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\nletter-spacing:normal;\ntext-indent:0;\ntext-transform:none;\nword-spacing:0;\nborder-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} has been canceled. If you want your order to be re-opened, please contact us.</p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color:#444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color:#444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (6, 'to', 'customer'), (6, 'description', 'Adding of a comment to an order in backend.'), (6, 'subject', 'A comment was added to your order {$order.id}'), (6, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display:block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>{sprintf(\n ''%s:<br><strong style="white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;">%s</strong>''\n sprintf_wp(''Administrator has added a comment to your order %s'', $order.id),\n $action_data.text\n )}</p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (7, 'to', 'customer'), (7, 'description', 'Editing of order shipping details in backend.'), (7, 'subject', 'Shipping details of your order {$order.id} have been changed'), (7, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>{sprintf(_w("Administrator has changed the shipping details of your order %s as follows:<br><strong>%s</strong>"), $order.id, $action_data.text|nl2br)}</p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (8, 'to', 'customer'), (8, 'description', 'Merging of an order without an ID, which was paid via a mobile terminal, with another order in backend.'), (8, 'subject', 'Your order {$order.id} has been settled'), (8, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n {if empty($action_data.params[''workflow.settle_target_id'']) || $action_data.params[''workflow.settle_target_id''] == shopHelper::decodeOrderId($order.id)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>{if !empty($action_data.params[''workflow.settle_target_id''])}\n {if $action_data.params[''workflow.settle_target_id''] == shopHelper::decodeOrderId($order.id)}\n {sprintf(_w(''Administrator has settled your unsettled order %s.''), $order.id)}\n {else}\n {sprintf(_w(''Administrator has settled your unsettled order %s by merging it with order %s.''), $order.id, shopHelper::encodeOrderId($action_data.params[''workflow.settle_target_id'']))}\n {/if}\n {else}\n {sprintf(_w(''Administrator has merged your order %s with an unsettled order.''), $order.id)}\n {/if}</p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (9, 'to', 'customer'), (9, 'description', 'Execution of “Refund” action in backend.'), (9, 'subject', 'Order {$order.id} has been updated'); INSERT INTO `shop_notification_params` VALUES (9, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (10, 'to', 'customer'), (10, 'description', 'Saving of changes made in an edited order in backend.'), (10, 'subject', 'Order {$order.id} has been updated'), (10, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (11, 'to', 'customer'), (11, 'description', 'Execution of “Restore” action in backend.'), (11, 'subject', 'Order {$order.id} has been updated'), (11, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (12, 'to', 'customer'), (12, 'description', 'Execution of “Mark as Completed” action in backend.'), (12, 'subject', 'Order {$order.id} has been updated'), (12, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (13, 'to', 'customer'), (13, 'description', 'Sending of a message to a customer by an administrator in backend.'), (13, 'subject', 'Order {$order.id} has been updated'), (13, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (14, 'to', 'customer'), (14, 'description', 'Registration of an automatic callback from a payment gateway; e.g., to update the order status. Depending on the callback result, additionally action “Paid” may be called afterwards.'), (14, 'subject', 'Order {$order.id} has been updated'); INSERT INTO `shop_notification_params` VALUES (14, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'), (15, 'to', 'customer'), (15, 'description', 'Execution of “Paid” action manually in backend or automatically by a callback from a payment gateway.'), (15, 'subject', 'Order {$order.id} has been updated'), (15, 'body', '{strip}\n\n{$_background_color = "#f3f5fa"}\n{$_bonus_background = "#fea"}\n{$_button_background = "#f3c200"}\n{$_border_color = "rgba(0, 20, 80, 0.1)"}\n\n<table cellspacing="0" border="0" cellpadding="0" width="100%" bgcolor="{$_background_color}" style="\n font-family:-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Oxygen-Sans, Ubuntu, Cantarell, ''Helvetica Neue'', sans-serif;\n letter-spacing:normal;\n text-indent:0;\n text-transform:none;\n word-spacing:0;\n border-collapse:collapse\n">\n <tr>\n <td style="padding: 20px;">\n <table width="600" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; width: 600px !important;margin:auto;">\n <tr>\n <td width="20" style="width:20px !important;"></td>\n <td valign="middle" align="left" height="55" style="height: 55px;">\n <a href="https://www.webasyst.com" style="text-decoration: none;"><img src="{$wa->url(true)}wa-apps/shop/img/webasyst.png" alt="Webasyst" width="103" height="23" style="border: 0;"></a>\n </td>\n <td valign="middle" align="right" height="55" style="color: #89a; height: 55px;">\n {$wa->shop->settings("name")}\n </td>\n <td width="20" style="width:20px !important;"></td>\n </tr>\n </table>\n <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="\n width: 600px !important;\n background-color:#fff;\n border-radius: 12px;\n margin:auto;\n overflow: hidden;\n ">\n\n <!-- HEADER -->\n <tr>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n <td height="70" align="center" valign="middle" style="border: solid {$_border_color}; border-width: 0 0 1px 0;">\n <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100% !important;">\n <tr>\n <td>\n <font style="font-weight: bold; font-size: 20px; margin: 0 12px 0 0;"><b>{$order.id}</b></font>\n <font style="color: #89a;">{$order.create_datetime|wa_date:''humandate''}</font>\n </td>\n <td style="text-align: right;">\n <font style="{if !empty($order.style)}{$order.style}{/if}">{$status}</font>\n </td>\n </tr>\n </table>\n </td>\n <td width="50" style="width:50px !important; border: solid {$_border_color}; border-width: 0 0 1px 0;"></td>\n </tr>\n\n <!-- STATUS -->\n <tr>\n <td></td>\n <td>\n <table cellspacing="0" border="0" cellpadding="0" width="100%" style="border-collapse:collapse">\n <tr>\n <td>\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0 0;\n text-align:center;\n ">Thank you for shopping at {$wa->shop->settings("name")}!</p>\n <p align="center" style="margin: 20px 0;">\n <a href="{$order_url}" style="\n display: block;\n text-decoration:none;\n font-style:normal;\n font-variant:normal;\n font-size:16px;line-height:40px;\n color:#000;font-weight:normal;width:180px;\n background: {$_button_background};\n border-radius: 10px;\n " target="_blank">Order status</a>\n </p>\n {if !empty($order.params.auth_pin)}\n <p style="\n color: #444;\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:14px;\n line-height:16px;\n margin: 20px 0;\n text-align:center;\n text-transform: uppercase;\n ">\n PIN: <b>{$order.params.auth_pin}</b>\n </p>\n {/if}\n </td>\n </tr>\n </table>\n </td>\n <td></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td bgcolor="{$_bonus_background}"></td>\n <td bgcolor="{$_bonus_background}" style="padding: 12px 0 12px 0;">\n <p>Hi {$customer.name|escape}</p>\n <p>Your order {$order.id} status has been updated to <strong>{$status}</strong></p>\n </td>\n <td bgcolor="{$_bonus_background}"></td>\n </tr>\n\n <!-- TEXT -->\n <tr>\n <td></td>\n <td style="padding: 24px 0 36px 0;">\n <h3 style="margin: 0;">Contact info</h3>\n {if strlen($wa->shop->settings("email"))}\n <p style="margin: 10px 0 0;color: #444;">\n Email: <a href="mailto:{$wa->shop->settings("email")}">{$wa->shop->settings("email")}</a>\n </p>\n {/if}\n {if strlen($wa->shop->settings("phone"))}\n <p style="margin: 10px 0 0;color: #444;">\n Phone: {$wa->shop->settings("phone")}\n </p>\n {/if}\n </td>\n <td></td>\n </tr>\n </table>\n\n <!-- BOTTOM SITE INFORMATION -->\n <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">\n <tr>\n <td valign="middle" align="center" height="45">\n <p style="\n font-style:normal;\n font-variant:normal;\n font-weight:normal;\n font-size:13px;\n line-height:16px;\n color: #89a;\n margin: 20px 0 0;\n ">\n <a href="https://www.shop-script.com" style="color: #89a; text-decoration: none;" target="_blank">Sent via Shop-Script app</a>\n </p>\n </td>\n </tr>\n </table>\n\n </td>\n </tr>\n</table>\n\n{/strip}\n'); -- -------------------------------------------------------- -- -- Table structure for table `shop_notification_sources` -- CREATE TABLE `shop_notification_sources` ( `notification_id` int(11) NOT NULL, `source` varchar(510) DEFAULT NULL, KEY `notification_id` (`notification_id`), KEY `source` (`source`(190)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_order` -- CREATE TABLE `shop_order` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) DEFAULT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime DEFAULT NULL, `state_id` varchar(32) NOT NULL DEFAULT 'new', `total` decimal(15,4) NOT NULL, `currency` char(3) NOT NULL, `rate` decimal(15,8) NOT NULL DEFAULT '1.00000000', `tax` decimal(15,4) NOT NULL DEFAULT '0.0000', `shipping` decimal(15,4) NOT NULL DEFAULT '0.0000', `discount` decimal(15,4) NOT NULL DEFAULT '0.0000', `assigned_contact_id` int(11) DEFAULT NULL, `paid_year` smallint(6) DEFAULT NULL, `paid_quarter` smallint(6) DEFAULT NULL, `paid_month` smallint(6) DEFAULT NULL, `paid_date` date DEFAULT NULL, `paid_datetime` datetime DEFAULT NULL, `auth_date` date DEFAULT NULL, `is_first` tinyint(1) NOT NULL DEFAULT '0', `unsettled` tinyint(1) NOT NULL DEFAULT '0', `comment` text, `courier_contact_id` int(11) DEFAULT NULL, `shipping_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `state_id` (`state_id`), KEY `contact_id` (`contact_id`), KEY `shipping_datetime` (`shipping_datetime`), KEY `paid_date` (`paid_date`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_order_items` -- CREATE TABLE `shop_order_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `product_id` int(11) NOT NULL, `sku_id` int(11) NOT NULL, `sku_code` varchar(255) NOT NULL DEFAULT '', `type` enum('product','service') NOT NULL, `service_id` int(11) DEFAULT NULL, `service_variant_id` int(11) DEFAULT NULL, `price` decimal(15,4) NOT NULL, `quantity` decimal(15,3) NOT NULL, `quantity_denominator` int(10) unsigned NOT NULL DEFAULT '1', `parent_id` int(11) DEFAULT NULL, `stock_id` int(11) DEFAULT NULL, `virtualstock_id` int(11) DEFAULT NULL, `stock_unit_id` int(11) NOT NULL DEFAULT '0', `purchase_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `total_discount` decimal(15,4) NOT NULL DEFAULT '0.0000', `tax_percent` decimal(7,4) DEFAULT NULL, `tax_included` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `order_type` (`order_id`,`type`), KEY `product_order` (`product_id`,`order_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_order_item_codes` -- CREATE TABLE `shop_order_item_codes` ( `order_id` int(11) NOT NULL, `order_item_id` int(11) NOT NULL, `code_id` int(11) DEFAULT NULL, `code` varchar(64) NOT NULL, `value` text NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', KEY `order_id` (`order_id`), KEY `order_item_id` (`order_item_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_order_log` -- CREATE TABLE `shop_order_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(11) NOT NULL, `contact_id` int(11) DEFAULT NULL, `action_id` varchar(32) NOT NULL, `datetime` datetime NOT NULL, `before_state_id` varchar(32) NOT NULL, `after_state_id` varchar(32) NOT NULL, `text` text, PRIMARY KEY (`id`), KEY `order_id` (`order_id`), KEY `datetime` (`datetime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_order_log_params` -- CREATE TABLE `shop_order_log_params` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(11) NOT NULL, `log_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`order_id`,`log_id`,`name`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_order_params` -- CREATE TABLE `shop_order_params` ( `order_id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`order_id`,`name`), KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_page` -- CREATE TABLE `shop_page` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) DEFAULT NULL, `domain` varchar(255) DEFAULT NULL, `route` varchar(255) DEFAULT NULL, `name` varchar(255) NOT NULL, `title` varchar(255) NOT NULL DEFAULT '', `url` varchar(255) DEFAULT NULL, `full_url` varchar(255) DEFAULT NULL, `content` mediumtext NOT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `create_contact_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `status` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_page_params` -- CREATE TABLE `shop_page_params` ( `page_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`page_id`,`name`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_plugin` -- CREATE TABLE `shop_plugin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(255) NOT NULL, `plugin` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `description` text NOT NULL, `logo` text NOT NULL, `status` int(11) NOT NULL, `sort` int(11) NOT NULL, `options` text, PRIMARY KEY (`id`), KEY `type` (`type`(250)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=6 ; -- -- Dumping data for table `shop_plugin` -- INSERT INTO `shop_plugin` VALUES (1, 'shipping', 'courier', 'Courier', 'Shipping is restricted to the specific country and region only. Shipping rate is calculated based on either total amount or weight of the shipment.', '[[relativeurl]]/wa-plugins/shipping/courier/img/courier.png', 0, -1, '[]'), (2, 'shipping', 'dummy', 'Free shipping by courier', '', '', 1, -2, '[]'), (3, 'shipping', 'sd', 'Pickup point', 'Order pickup point available to customers from specified localities or region.', '[[relativeurl]]/wa-plugins/shipping/sd/img/sd-60x32.png', 0, -3, '[]'), (4, 'shipping', 'worldwide', 'Worldwide', 'Reliable international delivery tailored to local conditions.', '[[relativeurl]]/wa-plugins/shipping/worldwide/img/worldwide.png', 0, -4, '[]'), (5, 'shipping', 'boxberry', 'Yandex Delivery (Boxberry)', 'Real-time shipping quotes with <a href="https://boxberry.ru/">Yandex Delivery</a> (Boxberry) service.', '[[relativeurl]]/wa-plugins/shipping/boxberry/img/boxberry60x32.png', 0, -5, '[]'); -- -------------------------------------------------------- -- -- Table structure for table `shop_plugin_settings` -- CREATE TABLE `shop_plugin_settings` ( `id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` mediumtext NOT NULL, PRIMARY KEY (`id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_presentation` -- CREATE TABLE `shop_presentation` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(10) unsigned DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `creator_contact_id` int(11) NOT NULL, `use_datetime` datetime DEFAULT NULL, `sort_column_id` int(10) unsigned DEFAULT NULL, `sort` int(11) NOT NULL DEFAULT '0', `sort_order` enum('asc','desc') NOT NULL DEFAULT 'asc', `view` enum('table','table_extended','thumbs') NOT NULL DEFAULT 'table', `rows_on_page` int(11) NOT NULL DEFAULT '30', `browser` varchar(64) DEFAULT NULL, `filter_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `creator_contact_id` (`creator_contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_presentation_columns` -- CREATE TABLE `shop_presentation_columns` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `presentation_id` int(10) unsigned NOT NULL, `column_type` varchar(64) NOT NULL, `width` int(11) DEFAULT NULL, `data` text, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `presentation_id` (`presentation_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product` -- CREATE TABLE `shop_product` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `summary` text, `meta_title` varchar(255) DEFAULT NULL, `meta_keywords` text, `meta_description` text, `description` mediumtext, `contact_id` int(11) DEFAULT NULL, `create_datetime` datetime NOT NULL, `edit_datetime` datetime DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', `type_id` int(11) DEFAULT NULL, `image_id` int(11) DEFAULT NULL, `image_filename` varchar(255) NOT NULL DEFAULT '', `video_url` varchar(255) DEFAULT NULL, `sku_id` int(11) DEFAULT NULL, `ext` varchar(10) DEFAULT NULL, `url` varchar(255) DEFAULT NULL, `rating` decimal(3,2) NOT NULL DEFAULT '0.00', `price` decimal(15,4) NOT NULL DEFAULT '0.0000', `compare_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `currency` char(3) DEFAULT NULL, `min_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `max_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `tax_id` int(11) DEFAULT NULL, `count` decimal(15,3) DEFAULT NULL, `count_denominator` int(10) unsigned NOT NULL DEFAULT '1', `order_multiplicity_factor` decimal(9,3) NOT NULL DEFAULT '1.000', `stock_unit_id` int(11) NOT NULL DEFAULT '0', `base_unit_id` int(11) NOT NULL DEFAULT '0', `stock_base_ratio` decimal(16,8) unsigned NOT NULL DEFAULT '1.00000000', `order_count_min` decimal(15,3) unsigned NOT NULL DEFAULT '1.000', `order_count_step` decimal(15,3) unsigned NOT NULL DEFAULT '1.000', `base_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000', `min_base_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000', `max_base_price` decimal(15,4) unsigned NOT NULL DEFAULT '0.0000', `cross_selling` tinyint(1) DEFAULT NULL, `upselling` tinyint(1) DEFAULT NULL, `rating_count` int(11) NOT NULL DEFAULT '0', `total_sales` decimal(15,4) NOT NULL DEFAULT '0.0000', `category_id` int(11) DEFAULT NULL, `badge` text, `sku_type` tinyint(1) NOT NULL DEFAULT '0', `base_price_selectable` decimal(15,4) NOT NULL DEFAULT '0.0000', `compare_price_selectable` decimal(15,4) NOT NULL DEFAULT '0.0000', `purchase_price_selectable` decimal(15,4) NOT NULL DEFAULT '0.0000', `sku_count` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `url` (`url`(250)), KEY `total_sales` (`total_sales`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_code` -- CREATE TABLE `shop_product_code` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(64) NOT NULL, `name` varchar(255) NOT NULL, `icon` varchar(255) DEFAULT NULL, `logo` varchar(255) DEFAULT NULL, `protected` tinyint(1) DEFAULT '0', `plugin_id` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_features` -- CREATE TABLE `shop_product_features` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) NOT NULL, `sku_id` int(11) DEFAULT NULL, `feature_id` int(11) NOT NULL, `feature_value_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `feature` (`product_id`,`sku_id`,`feature_id`,`feature_value_id`), KEY `feature_product` (`feature_id`,`feature_value_id`,`product_id`,`sku_id`), KEY `product_feature` (`product_id`,`feature_id`,`feature_value_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_features_selectable` -- CREATE TABLE `shop_product_features_selectable` ( `product_id` int(11) NOT NULL, `feature_id` int(11) NOT NULL, `value_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`product_id`,`feature_id`,`value_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_images` -- CREATE TABLE `shop_product_images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) NOT NULL, `upload_datetime` datetime NOT NULL, `edit_datetime` datetime DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `sort` int(11) NOT NULL DEFAULT '0', `width` int(5) NOT NULL DEFAULT '0', `height` int(5) NOT NULL DEFAULT '0', `size` int(11) DEFAULT NULL, `filename` varchar(255) NOT NULL DEFAULT '', `original_filename` varchar(255) DEFAULT NULL, `ext` varchar(10) DEFAULT NULL, `badge_type` int(4) DEFAULT NULL, `badge_code` text, PRIMARY KEY (`id`), KEY `product_id` (`product_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_og` -- CREATE TABLE `shop_product_og` ( `product_id` int(11) NOT NULL, `property` varchar(255) NOT NULL, `content` text NOT NULL, PRIMARY KEY (`product_id`,`property`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_pages` -- CREATE TABLE `shop_product_pages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) DEFAULT NULL, `name` varchar(255) NOT NULL, `title` varchar(255) NOT NULL DEFAULT '', `url` varchar(255) DEFAULT NULL, `content` mediumtext NOT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `create_contact_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `status` tinyint(1) NOT NULL DEFAULT '0', `keywords` text, `description` text, PRIMARY KEY (`id`), KEY `product_id` (`product_id`,`url`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_params` -- CREATE TABLE `shop_product_params` ( `product_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`product_id`,`name`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_related` -- CREATE TABLE `shop_product_related` ( `product_id` int(11) NOT NULL, `type` enum('cross_selling','upselling') NOT NULL, `related_product_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`product_id`,`type`,`related_product_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_reviews` -- CREATE TABLE `shop_product_reviews` ( `id` int(11) NOT NULL AUTO_INCREMENT, `left_key` int(11) DEFAULT NULL, `right_key` int(11) DEFAULT NULL, `depth` int(11) NOT NULL DEFAULT '0', `parent_id` int(11) NOT NULL DEFAULT '0', `product_id` int(11) NOT NULL, `review_id` int(11) NOT NULL DEFAULT '0', `datetime` datetime NOT NULL, `status` enum('approved','deleted','moderation') NOT NULL DEFAULT 'approved', `title` varchar(64) DEFAULT NULL, `text` text, `rate` decimal(3,2) DEFAULT NULL, `contact_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(50) DEFAULT NULL, `email` varchar(50) DEFAULT NULL, `images_count` int(11) DEFAULT '0', `site` varchar(100) DEFAULT NULL, `auth_provider` varchar(100) DEFAULT NULL, `ip` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `status` (`status`), KEY `parent_id` (`parent_id`), KEY `product_id` (`product_id`,`review_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_reviews_images` -- CREATE TABLE `shop_product_reviews_images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `review_id` int(11) DEFAULT NULL, `product_id` int(11) DEFAULT NULL, `upload_datetime` datetime NOT NULL, `edit_datetime` datetime DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `sort` int(11) DEFAULT '0', `width` int(5) DEFAULT '0', `height` int(5) DEFAULT '0', `size` int(11) DEFAULT NULL, `filename` varchar(255) DEFAULT NULL, `original_filename` varchar(255) DEFAULT NULL, `ext` varchar(10) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_services` -- CREATE TABLE `shop_product_services` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) NOT NULL, `sku_id` int(11) DEFAULT NULL, `service_id` int(11) NOT NULL, `service_variant_id` int(11) NOT NULL, `price` decimal(15,4) DEFAULT NULL, `primary_price` decimal(15,4) DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `product_id` (`product_id`,`sku_id`,`service_id`,`service_variant_id`), KEY `service_id` (`service_id`,`service_variant_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_skus` -- CREATE TABLE `shop_product_skus` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) NOT NULL, `sku` varchar(255) NOT NULL, `sort` int(11) NOT NULL, `name` varchar(255) NOT NULL DEFAULT '', `image_id` int(11) DEFAULT NULL, `price` decimal(15,4) NOT NULL DEFAULT '0.0000', `primary_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `purchase_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `compare_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `count` decimal(15,3) DEFAULT NULL, `available` tinyint(1) NOT NULL DEFAULT '1', `status` tinyint(1) NOT NULL DEFAULT '1', `stock_base_ratio` decimal(16,8) unsigned DEFAULT NULL, `order_count_min` decimal(15,3) unsigned DEFAULT NULL, `order_count_step` decimal(15,3) unsigned DEFAULT NULL, `dimension_id` int(11) DEFAULT NULL, `file_name` varchar(255) NOT NULL DEFAULT '', `file_size` int(11) NOT NULL DEFAULT '0', `file_description` text, `virtual` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `product_id` (`product_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_stocks` -- CREATE TABLE `shop_product_stocks` ( `sku_id` int(11) NOT NULL, `stock_id` int(11) NOT NULL DEFAULT '0', `product_id` int(11) NOT NULL, `count` decimal(15,3) NOT NULL, PRIMARY KEY (`sku_id`,`stock_id`), KEY `product_id` (`product_id`,`sku_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_stocks_log` -- CREATE TABLE `shop_product_stocks_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) NOT NULL, `sku_id` int(11) NOT NULL, `stock_id` int(11) DEFAULT NULL, `stock_name` varchar(255) DEFAULT NULL, `before_count` decimal(15,3) DEFAULT NULL, `after_count` decimal(15,3) DEFAULT NULL, `diff_count` decimal(15,3) DEFAULT NULL, `type` varchar(32) NOT NULL, `description` text, `datetime` datetime NOT NULL, `order_id` int(11) DEFAULT NULL, `transfer_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `product_id` (`product_id`,`sku_id`), KEY `stock_id` (`stock_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_product_tags` -- CREATE TABLE `shop_product_tags` ( `product_id` int(11) NOT NULL, `tag_id` int(11) NOT NULL, PRIMARY KEY (`product_id`,`tag_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_promo` -- CREATE TABLE `shop_promo` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` text, `enabled` tinyint(1) NOT NULL DEFAULT '1', `consider_end_orders` tinyint(1) NOT NULL DEFAULT '1', `text_id` varchar(64) DEFAULT NULL, `note` text, `start_datetime` datetime DEFAULT NULL, `finish_datetime` datetime DEFAULT NULL, `author_contact_id` int(11) DEFAULT NULL, `create_datetime` datetime DEFAULT NULL, `update_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_promo_orders` -- CREATE TABLE `shop_promo_orders` ( `order_id` int(10) unsigned NOT NULL, `promo_id` int(11) unsigned NOT NULL, PRIMARY KEY (`order_id`,`promo_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_promo_routes` -- CREATE TABLE `shop_promo_routes` ( `promo_id` int(10) unsigned NOT NULL, `storefront` varchar(255) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`storefront`(245),`promo_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_promo_rules` -- CREATE TABLE `shop_promo_rules` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `promo_id` int(10) unsigned NOT NULL, `rule_type` varchar(32) NOT NULL, `rule_params` longtext, PRIMARY KEY (`id`), KEY `promo_id` (`promo_id`), KEY `rule_type` (`rule_type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_push_client` -- CREATE TABLE `shop_push_client` ( `contact_id` int(11) NOT NULL, `client_id` varchar(64) NOT NULL, `shop_url` varchar(255) NOT NULL, `type` varchar(255) NOT NULL DEFAULT '', `api_token` varchar(32) DEFAULT NULL, `create_datetime` datetime DEFAULT NULL, UNIQUE KEY `client` (`client_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_sales` -- CREATE TABLE `shop_sales` ( `hash` varchar(32) NOT NULL, `date` date NOT NULL, `name` varchar(255) NOT NULL DEFAULT '', `order_count` int(11) NOT NULL DEFAULT '0', `sales` float NOT NULL DEFAULT '0', `shipping` float NOT NULL DEFAULT '0', `tax` float NOT NULL DEFAULT '0', `purchase` float NOT NULL DEFAULT '0', `cost` float NOT NULL DEFAULT '0', `new_customer_count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`hash`,`name`(216),`date`), KEY `hash_date` (`hash`,`date`), KEY `date` (`date`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_sales_channel` -- CREATE TABLE `shop_sales_channel` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `description` text, `wa_channel_id` varchar(32) DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '0', `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_sales_channel_params` -- CREATE TABLE `shop_sales_channel_params` ( `channel_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`channel_id`,`name`(245)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_search_index` -- CREATE TABLE `shop_search_index` ( `word_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `weight` int(11) NOT NULL, PRIMARY KEY (`product_id`,`word_id`), KEY `word` (`word_id`,`product_id`,`weight`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_search_word` -- CREATE TABLE `shop_search_word` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`(250)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_service` -- CREATE TABLE `shop_service` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `description` text, `price` decimal(15,4) NOT NULL DEFAULT '0.0000', `currency` char(3) DEFAULT NULL, `variant_id` int(11) NOT NULL, `tax_id` int(11) DEFAULT '0', `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_service_variants` -- CREATE TABLE `shop_service_variants` ( `id` int(11) NOT NULL AUTO_INCREMENT, `service_id` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `price` decimal(15,4) NOT NULL DEFAULT '0.0000', `primary_price` decimal(15,4) NOT NULL DEFAULT '0.0000', `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `service_id` (`service_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_set` -- CREATE TABLE `shop_set` ( `id` varchar(64) NOT NULL, `group_id` int(11) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `rule` varchar(32) DEFAULT NULL, `type` int(1) DEFAULT '0', `count` int(11) NOT NULL DEFAULT '0', `sort` int(11) NOT NULL DEFAULT '0', `sort_products` varchar(32) DEFAULT NULL, `create_datetime` datetime NOT NULL, `edit_datetime` datetime DEFAULT NULL, `json_params` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_set_group` -- CREATE TABLE `shop_set_group` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_set_products` -- CREATE TABLE `shop_set_products` ( `set_id` varchar(64) NOT NULL, `product_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`set_id`,`product_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_stock` -- CREATE TABLE `shop_stock` ( `id` int(11) NOT NULL AUTO_INCREMENT, `low_count` int(11) NOT NULL DEFAULT '0', `critical_count` int(11) NOT NULL DEFAULT '0', `sort` int(11) NOT NULL DEFAULT '0', `name` varchar(255) DEFAULT NULL, `public` int(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_stock_rules` -- CREATE TABLE `shop_stock_rules` ( `id` int(11) NOT NULL AUTO_INCREMENT, `sort` int(11) NOT NULL DEFAULT '0', `stock_id` int(11) DEFAULT NULL, `virtualstock_id` int(11) DEFAULT NULL, `rule_type` varchar(255) NOT NULL, `rule_data` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_tag` -- CREATE TABLE `shop_tag` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`(250)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_tax` -- CREATE TABLE `shop_tax` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `included` int(11) NOT NULL DEFAULT '0', `address_type` varchar(8) NOT NULL DEFAULT 'shipping', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_tax_regions` -- CREATE TABLE `shop_tax_regions` ( `tax_id` int(11) NOT NULL, `country_iso3` varchar(3) NOT NULL, `region_code` varchar(8) DEFAULT NULL, `tax_value` decimal(7,4) NOT NULL DEFAULT '0.0000', `tax_name` varchar(255) DEFAULT NULL, `params` text, UNIQUE KEY `tax_country_region` (`tax_id`,`country_iso3`,`region_code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_tax_zip_codes` -- CREATE TABLE `shop_tax_zip_codes` ( `tax_id` int(11) NOT NULL, `zip_expr` varchar(16) NOT NULL, `tax_value` decimal(7,4) NOT NULL DEFAULT '0.0000', `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`tax_id`,`zip_expr`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_transfer` -- CREATE TABLE `shop_transfer` ( `id` int(11) NOT NULL AUTO_INCREMENT, `string_id` varchar(255) DEFAULT NULL, `create_datetime` datetime DEFAULT NULL, `finalize_datetime` datetime DEFAULT NULL, `status` enum('sent','completed','cancelled') NOT NULL DEFAULT 'sent', `stock_id_from` int(11) NOT NULL, `stock_id_to` int(11) NOT NULL, `currency` char(3) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `string_id` (`string_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_transfer_products` -- CREATE TABLE `shop_transfer_products` ( `product_id` int(11) NOT NULL, `sku_id` int(11) NOT NULL, `transfer_id` int(11) NOT NULL, `count` decimal(15,3) NOT NULL DEFAULT '0.000', `price` decimal(15,4) DEFAULT NULL, PRIMARY KEY (`product_id`,`sku_id`,`transfer_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_type` -- CREATE TABLE `shop_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, `sort` int(11) NOT NULL DEFAULT '0', `name` varchar(255) DEFAULT NULL, `icon` varchar(255) DEFAULT NULL, `cross_selling` varchar(64) NOT NULL DEFAULT 'alsobought', `upselling` tinyint(1) NOT NULL DEFAULT '0', `count` int(11) NOT NULL DEFAULT '0', `stock_unit_fixed` int(11) NOT NULL DEFAULT '2', `stock_unit_id` int(11) NOT NULL DEFAULT '0', `base_unit_fixed` int(11) NOT NULL DEFAULT '2', `base_unit_id` int(11) DEFAULT NULL, `stock_base_ratio_fixed` int(11) NOT NULL DEFAULT '2', `stock_base_ratio` decimal(16,8) unsigned NOT NULL DEFAULT '1.00000000', `count_denominator_fixed` int(11) NOT NULL DEFAULT '2', `count_denominator` int(11) unsigned DEFAULT NULL, `order_multiplicity_factor_fixed` int(11) NOT NULL DEFAULT '2', `order_multiplicity_factor` decimal(9,3) DEFAULT NULL, `order_count_min_fixed` int(11) NOT NULL DEFAULT '2', `order_count_min` decimal(15,3) unsigned DEFAULT NULL, `order_count_step_fixed` int(11) NOT NULL DEFAULT '2', `order_count_step` decimal(15,3) unsigned DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_type_codes` -- CREATE TABLE `shop_type_codes` ( `type_id` int(11) NOT NULL, `code_id` int(11) NOT NULL, UNIQUE KEY `type_code` (`type_id`,`code_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_type_features` -- CREATE TABLE `shop_type_features` ( `type_id` int(11) NOT NULL, `feature_id` int(11) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`type_id`,`feature_id`), KEY `feature_id` (`feature_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_type_services` -- CREATE TABLE `shop_type_services` ( `type_id` int(11) NOT NULL, `service_id` int(11) NOT NULL, PRIMARY KEY (`type_id`,`service_id`), KEY `service_id` (`service_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `shop_type_upselling` -- CREATE TABLE `shop_type_upselling` ( `type_id` int(11) NOT NULL, `feature` varchar(32) NOT NULL, `feature_id` int(11) DEFAULT NULL, `cond` varchar(16) NOT NULL, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`type_id`,`feature`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `shop_unit` -- CREATE TABLE `shop_unit` ( `id` int(11) NOT NULL AUTO_INCREMENT, `short_name` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `name2` varchar(255) NOT NULL DEFAULT '', `name5` varchar(255) NOT NULL DEFAULT '', `okei_code` varchar(64) NOT NULL, `storefront_name` varchar(255) NOT NULL DEFAULT '', `sort` int(11) NOT NULL DEFAULT '0', `status` tinyint(1) NOT NULL DEFAULT '1', `builtin` tinyint(1) DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=18 ; -- -- Dumping data for table `shop_unit` -- INSERT INTO `shop_unit` VALUES (1, 'MMT', 'millimeter', '', '', '003', 'mm', 0, 0, 0), (2, 'CMT', 'centimeter', '', '', '004', 'cm', 0, 0, 0), (3, 'MTR', 'meter', '', '', '006', 'm', 0, 0, 0), (4, 'MMK', 'square millimeter', '', '', '050', 'mm²', 0, 0, 0), (5, 'CMK', 'square centimeter', '', '', '051', 'cm²', 0, 0, 0), (6, 'MTK', 'square meter', '', '', '055', 'm²', 0, 0, 0), (7, 'LTR', 'liter', '', '', '112', 'I', 0, 0, 0), (8, 'DMQ', 'cubic decimeter', '', '', '112', 'dm³', 0, 0, 0), (9, 'GRM', 'gram', '', '', '163', 'g', 0, 0, 0), (10, 'KGM', 'kilogram', '', '', '166', 'kg', 0, 0, 0), (11, 'HUR', 'hour', '', '', '356', 'h.', 0, 0, 0), (12, 'PCE', 'piece', '', '', '796', 'pc.', 0, 0, 0), (13, 'FOT', 'pound', '', '', '041', 'lb.', 0, 0, 0), (14, 'ONZ', 'ounce', '', '', '187', 'oz.', 0, 0, 0), (15, 'OZA', 'fluid ounce', '', '', '141', 'fl. oz.', 0, 0, 0), (16, 'FOT', 'foot', '', '', '041', 'ft.', 0, 0, 0), (17, 'FTK', 'square foot', '', '', '073', 'sq. ft.', 0, 0, 0); -- -------------------------------------------------------- -- -- Table structure for table `shop_virtualstock` -- CREATE TABLE `shop_virtualstock` ( `id` int(11) NOT NULL AUTO_INCREMENT, `low_count` int(11) NOT NULL DEFAULT '0', `critical_count` int(11) NOT NULL DEFAULT '0', `sort` int(11) NOT NULL DEFAULT '0', `name` varchar(255) DEFAULT NULL, `public` int(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `shop_virtualstock_stocks` -- CREATE TABLE `shop_virtualstock_stocks` ( `virtualstock_id` int(11) NOT NULL, `stock_id` int(11) NOT NULL, `sort` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `team_calendar_external` -- CREATE TABLE `team_calendar_external` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(50) DEFAULT NULL, `integration_level` enum('subscription','sync','full') NOT NULL DEFAULT 'subscription', `name` varchar(255) NOT NULL, `contact_id` int(11) DEFAULT NULL, `create_datetime` datetime DEFAULT NULL, `calendar_id` int(11) DEFAULT NULL, `native_calendar_id` text, `synchronize_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `calendar_id` (`calendar_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `team_calendar_external_params` -- CREATE TABLE `team_calendar_external_params` ( `calendar_external_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text, PRIMARY KEY (`calendar_external_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `team_event_external` -- CREATE TABLE `team_event_external` ( `id` int(11) NOT NULL AUTO_INCREMENT, `event_id` int(11) NOT NULL, `calendar_external_id` int(11) NOT NULL, `native_event_id` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `event_id_calendar_external_id` (`event_id`,`calendar_external_id`), KEY `calendar_external_id_native_event_id` (`calendar_external_id`,`native_event_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `team_event_external_params` -- CREATE TABLE `team_event_external_params` ( `event_external_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `value` text, PRIMARY KEY (`event_external_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `team_location` -- CREATE TABLE `team_location` ( `group_id` int(11) NOT NULL, `address` varchar(255) DEFAULT NULL, `longitude` varchar(50) DEFAULT NULL, `latitude` varchar(50) DEFAULT NULL, PRIMARY KEY (`group_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_agreement_document` -- CREATE TABLE `wa_agreement_document` ( `id` int(11) NOT NULL AUTO_INCREMENT, `app_id` varchar(64) NOT NULL, `context` varchar(64) NOT NULL, `domain` varchar(64) NOT NULL, `locale` varchar(8) NOT NULL, `document_name` varchar(64) NOT NULL, `document_text` text NOT NULL, PRIMARY KEY (`id`), KEY `app_id_context_domain_document_locale` (`app_id`,`context`,`domain`,`document_name`,`locale`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_agreement_log` -- CREATE TABLE `wa_agreement_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `create_datetime` datetime NOT NULL, `app_id` varchar(64) NOT NULL, `contact_id` int(11) DEFAULT NULL, `ip` varchar(39) DEFAULT NULL, `user_agent` varchar(255) DEFAULT NULL, `context` varchar(64) NOT NULL, `document_name` varchar(64) NOT NULL, `document_id` int(11) DEFAULT NULL, `accept_method` varchar(64) DEFAULT NULL, `domain` varchar(64) NOT NULL, `form_url` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `app_id_context` (`app_id`,`context`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_announcement` -- CREATE TABLE `wa_announcement` ( `id` int(11) NOT NULL AUTO_INCREMENT, `app_id` varchar(32) NOT NULL, `type` varchar(32) DEFAULT NULL, `contact_id` int(11) DEFAULT NULL, `text` text NOT NULL, `data` text, `datetime` datetime NOT NULL, `ttl_datetime` datetime DEFAULT NULL, `is_pinned` tinyint(4) NOT NULL DEFAULT '0', `access` enum('all','limited') NOT NULL DEFAULT 'all', PRIMARY KEY (`id`), KEY `app_datetime` (`datetime`,`app_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_announcement_comments` -- CREATE TABLE `wa_announcement_comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `announcement_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime DEFAULT NULL, `contact_id` int(11) NOT NULL, `text` text, PRIMARY KEY (`id`), KEY `announcement_datetime` (`announcement_id`,`create_datetime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_announcement_reactions` -- CREATE TABLE `wa_announcement_reactions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `announcement_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `contact_id` int(11) NOT NULL, `reaction` varchar(1) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `announcement_reaction_contact` (`announcement_id`,`reaction`,`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_announcement_rights` -- CREATE TABLE `wa_announcement_rights` ( `group_id` int(11) NOT NULL, `announcement_id` int(11) NOT NULL, UNIQUE KEY `group_announcement` (`group_id`,`announcement_id`), KEY `announcement_id` (`announcement_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_api_auth_codes` -- CREATE TABLE `wa_api_auth_codes` ( `code` varchar(32) NOT NULL, `contact_id` int(11) NOT NULL, `client_id` varchar(32) NOT NULL, `scope` text NOT NULL, `expires` datetime NOT NULL, PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_api_tokens` -- CREATE TABLE `wa_api_tokens` ( `contact_id` int(11) NOT NULL, `client_id` varchar(32) NOT NULL, `token` varchar(32) NOT NULL, `scope` text NOT NULL, `create_datetime` datetime NOT NULL, `last_use_datetime` datetime DEFAULT NULL, `expires` datetime DEFAULT NULL, PRIMARY KEY (`token`), UNIQUE KEY `contact_client` (`contact_id`,`client_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_app_settings` -- CREATE TABLE `wa_app_settings` ( `app_id` varchar(64) NOT NULL, `name` varchar(64) NOT NULL, `value` mediumtext NOT NULL, PRIMARY KEY (`app_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_app_settings` -- INSERT INTO `wa_app_settings` VALUES ('webasyst', 'update_time', '1757424981'), ('webasyst', 'locale', 'en_US'), ('webasyst', 'name', '[[site_name]]'), ('webasyst', 'email', '[[admin_email]]'), ('webasyst', 'sender', '[[admin_email]]'), ('installer', 'update_time', '1614683137'), ('shop', 'welcome', '1'), ('shop', 'update_time', '1764871215'), ('crm', 'currency', 'USD'), ('crm', 'update_time', '1763037533'), ('team', 'update_time', '1711701444'), ('shop', 'country', 'usa'), ('shop', 'currency', 'USD'), ('shop', 'use_product_currency', 'true'), ('installer', 'update_counter', ''), ('installer', 'update_counter_timestamp', '[[timestamp]]'), ('installer', 'licenses_data', '{"data":{"baza":[]},"timestamp":[[timestamp]]}'); -- -------------------------------------------------------- -- -- Table structure for table `wa_app_tokens` -- CREATE TABLE `wa_app_tokens` ( `contact_id` int(11) DEFAULT NULL, `app_id` varchar(32) NOT NULL, `type` varchar(32) NOT NULL, `create_datetime` datetime NOT NULL, `expire_datetime` datetime DEFAULT NULL, `token` varchar(32) NOT NULL, `data` text, UNIQUE KEY `token` (`token`), KEY `app` (`app_id`), KEY `contact` (`contact_id`), KEY `expire` (`expire_datetime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_cache` -- CREATE TABLE `wa_cache` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `expires` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `expires` (`expires`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact` -- CREATE TABLE `wa_contact` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(150) NOT NULL, `firstname` varchar(50) NOT NULL DEFAULT '', `middlename` varchar(50) NOT NULL DEFAULT '', `lastname` varchar(50) NOT NULL DEFAULT '', `title` varchar(50) NOT NULL DEFAULT '', `company` varchar(150) NOT NULL DEFAULT '', `jobtitle` varchar(50) NOT NULL DEFAULT '', `company_contact_id` int(11) NOT NULL DEFAULT '0', `is_company` tinyint(1) NOT NULL DEFAULT '0', `is_user` tinyint(1) NOT NULL DEFAULT '0', `is_staff` int(11) NOT NULL DEFAULT '0', `login` varchar(32) DEFAULT NULL, `password` varchar(128) NOT NULL DEFAULT '', `last_datetime` datetime DEFAULT NULL, `sex` enum('m','f') DEFAULT NULL, `birth_day` tinyint(2) unsigned DEFAULT NULL, `birth_month` tinyint(2) unsigned DEFAULT NULL, `birth_year` smallint(4) DEFAULT NULL, `about` text, `photo` int(10) unsigned NOT NULL DEFAULT '0', `create_datetime` datetime NOT NULL, `create_app_id` varchar(32) NOT NULL DEFAULT '', `create_method` varchar(32) NOT NULL DEFAULT '', `create_contact_id` int(11) NOT NULL DEFAULT '0', `locale` varchar(8) NOT NULL DEFAULT '', `timezone` varchar(64) NOT NULL DEFAULT '', `crm_vault_id` bigint(20) NOT NULL DEFAULT '0', `crm_user_id` bigint(20) DEFAULT NULL, `crm_last_log_id` bigint(20) DEFAULT NULL, `crm_last_log_datetime` datetime DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `login` (`login`), KEY `name` (`name`), KEY `is_user` (`is_user`), KEY `is_staff` (`is_staff`), KEY `crm_vault` (`crm_vault_id`), KEY `crm_user` (`crm_user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `wa_contact` -- INSERT INTO `wa_contact` VALUES (1, '[[admin_lname]] [[admin_fname]]', '[[admin_fname]]', '', '[[admin_lname]]', '', '', '', 0, 0, 1, 0, '[[admin_username]]', '[[admin_pass]]', '[[regtime]]', NULL, NULL, NULL, NULL, NULL, 0, '[[regtime]]', 'webasyst', 'install', 0, 'en_US', '', 0, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_auths` -- CREATE TABLE `wa_contact_auths` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, `session_id` varchar(255) NOT NULL, `token` varchar(42) NOT NULL, `login_datetime` datetime DEFAULT NULL, `last_datetime` datetime DEFAULT NULL, `user_agent` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `session_id` (`session_id`), UNIQUE KEY `contact_session_id` (`contact_id`,`session_id`), KEY `contact_id` (`contact_id`), KEY `token` (`token`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `wa_contact_auths` -- -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_calendars` -- CREATE TABLE `wa_contact_calendars` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `bg_color` varchar(7) DEFAULT NULL, `font_color` varchar(7) DEFAULT NULL, `status_bg_color` varchar(7) DEFAULT NULL, `status_font_color` varchar(7) DEFAULT NULL, `icon` varchar(255) DEFAULT NULL, `sort` int(11) NOT NULL DEFAULT '0', `is_limited` tinyint(1) NOT NULL DEFAULT '0', `default_status` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `sort` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; -- -- Dumping data for table `wa_contact_calendars` -- INSERT INTO `wa_contact_calendars` VALUES (1, 'Vacation', '#b8f2ff', '#00819e', '#00c2ed', '#ffffff', 'fas fa-circle', 0, 0, 'on vacation'), (2, 'Business', '#d4dcfc', '#0a2eae', '#718ef7', '#ffffff', 'fas fa-circle', 1, 0, 'in a business trip'), (3, 'Illness', '#fcc197', '#773404', '#f98836', '#ffffff', 'fas fa-circle', 2, 0, 'sick'), (4, 'Meeting', '#ffeab8', '#9e6f00', '#eba400', '#ffffff', 'fas fa-circle', 3, 0, 'at the meeting'), (5, 'Remote', '#e9ccff', '#6500b3', '#bb64ff', '#ffffff', 'fas fa-circle', 4, 0, NULL), (6, 'Other', '#cccccc', '#404040', '#999999', '#ffffff', 'fas fa-circle', 5, 0, NULL); -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_categories` -- CREATE TABLE `wa_contact_categories` ( `category_id` int(11) NOT NULL, `contact_id` int(11) NOT NULL, PRIMARY KEY (`category_id`,`contact_id`), KEY `contact_id` (`contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_category` -- CREATE TABLE `wa_contact_category` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `system_id` varchar(64) DEFAULT NULL, `app_id` varchar(32) DEFAULT NULL, `icon` varchar(255) DEFAULT NULL, `cnt` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `system_id` (`system_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_data` -- CREATE TABLE `wa_contact_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, `field` varchar(32) NOT NULL, `ext` varchar(32) NOT NULL DEFAULT '', `value` varchar(255) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', `status` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `contact_field_sort` (`contact_id`,`field`,`sort`), KEY `contact_id` (`contact_id`), KEY `value` (`value`), KEY `field` (`field`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_data_text` -- CREATE TABLE `wa_contact_data_text` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, `field` varchar(32) NOT NULL, `ext` varchar(32) NOT NULL DEFAULT '', `value` text NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `contact_field_sort` (`contact_id`,`field`,`sort`), KEY `contact_id` (`contact_id`), KEY `field` (`field`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_emails` -- CREATE TABLE `wa_contact_emails` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, `email` varchar(255) NOT NULL, `ext` varchar(32) NOT NULL DEFAULT '', `sort` int(11) NOT NULL DEFAULT '0', `status` enum('unknown','confirmed','unconfirmed','unavailable') NOT NULL DEFAULT 'unknown', PRIMARY KEY (`id`), UNIQUE KEY `contact_sort` (`contact_id`,`sort`), KEY `email` (`email`), KEY `status` (`status`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `wa_contact_emails` -- INSERT INTO `wa_contact_emails` VALUES (1, 1, '[[admin_email]]', '', 0, 'unknown'); -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_events` -- CREATE TABLE `wa_contact_events` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` varchar(255) DEFAULT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `contact_id` int(11) NOT NULL, `calendar_id` int(11) NOT NULL, `summary` varchar(255) NOT NULL, `description` text, `location` varchar(255) DEFAULT NULL, `start` datetime NOT NULL, `end` datetime NOT NULL, `is_allday` tinyint(4) NOT NULL DEFAULT '0', `is_status` tinyint(4) NOT NULL DEFAULT '0', `sequence` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `uid` (`uid`), KEY `contact_id` (`contact_id`), KEY `calendar_id` (`calendar_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_field_values` -- CREATE TABLE `wa_contact_field_values` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_field` varchar(64) NOT NULL, `parent_value` varchar(255) NOT NULL, `field` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `parent_field` (`parent_field`,`parent_value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_files` -- CREATE TABLE `wa_contact_files` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, `purpose` enum('cover','general') NOT NULL DEFAULT 'general', `name` varchar(255) DEFAULT NULL, `sort` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `contact_id` (`contact_id`), KEY `purpose` (`purpose`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_rights` -- CREATE TABLE `wa_contact_rights` ( `group_id` int(11) NOT NULL, `app_id` varchar(32) NOT NULL, `name` varchar(64) NOT NULL, `value` int(11) NOT NULL, PRIMARY KEY (`group_id`,`app_id`,`name`), KEY `name_value` (`name`,`value`,`group_id`,`app_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_contact_rights` -- INSERT INTO `wa_contact_rights` VALUES (-1, 'webasyst', 'backend', 1), (2, 'team', 'backend', 1), (3, 'team', 'backend', 1), (1, 'webasyst', 'backend', 2); -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_settings` -- CREATE TABLE `wa_contact_settings` ( `contact_id` int(11) NOT NULL, `app_id` varchar(32) NOT NULL DEFAULT '', `name` varchar(64) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`contact_id`,`app_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_contact_settings` -- INSERT INTO `wa_contact_settings` VALUES (1, 'webasyst', 'wa_announcement_seen', '[[regtime]]'), (1, 'webasyst', 'dashboard', '1'), (1, 'webasyst', 'idle_since', '[[regtime]]'); -- -------------------------------------------------------- -- -- Table structure for table `wa_contact_waid` -- CREATE TABLE `wa_contact_waid` ( `contact_id` int(11) NOT NULL, `token` text NOT NULL, `webasyst_contact_id` int(11) NOT NULL, `create_datetime` datetime NOT NULL, `login_datetime` datetime DEFAULT NULL, PRIMARY KEY (`contact_id`), UNIQUE KEY `webasyst_contact_id` (`webasyst_contact_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_country` -- CREATE TABLE `wa_country` ( `name` varchar(255) NOT NULL, `iso3letter` varchar(3) NOT NULL, `iso2letter` varchar(2) NOT NULL, `isonumeric` varchar(3) NOT NULL, `fav_sort` int(11) DEFAULT NULL, PRIMARY KEY (`iso3letter`), UNIQUE KEY `isonumeric` (`isonumeric`), UNIQUE KEY `iso2letter` (`iso2letter`), KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_country` -- INSERT INTO `wa_country` VALUES ('Afghanistan', 'afg', 'af', '004', NULL), ('Åland Islands', 'ala', 'ax', '248', NULL), ('Albania', 'alb', 'al', '008', NULL), ('Algeria', 'dza', 'dz', '012', NULL), ('American Samoa', 'asm', 'as', '016', NULL), ('Andorra', 'and', 'ad', '020', NULL), ('Angola', 'ago', 'ao', '024', NULL), ('Anguilla', 'aia', 'ai', '660', NULL), ('Antigua and Barbuda', 'atg', 'ag', '028', NULL), ('Argentina', 'arg', 'ar', '032', NULL), ('Armenia', 'arm', 'am', '051', NULL), ('Aruba', 'abw', 'aw', '533', NULL), ('Australia', 'aus', 'au', '036', NULL), ('Austria', 'aut', 'at', '040', NULL), ('Azerbaijan', 'aze', 'az', '031', NULL), ('Bahamas', 'bhs', 'bs', '044', NULL), ('Bahrain', 'bhr', 'bh', '048', NULL), ('Bangladesh', 'bgd', 'bd', '050', NULL), ('Barbados', 'brb', 'bb', '052', NULL), ('Belarus', 'blr', 'by', '112', NULL), ('Belgium', 'bel', 'be', '056', NULL), ('Belize', 'blz', 'bz', '084', NULL), ('Benin', 'ben', 'bj', '204', NULL), ('Bermuda', 'bmu', 'bm', '060', NULL), ('Bhutan', 'btn', 'bt', '064', NULL), ('Bolivia, Plurinational State of', 'bol', 'bo', '068', NULL), ('Bosnia and Herzegovina', 'bih', 'ba', '070', NULL), ('Botswana', 'bwa', 'bw', '072', NULL), ('Bouvet Island', 'bvt', 'bv', '074', NULL), ('Brazil', 'bra', 'br', '076', NULL), ('British Indian Ocean Territory', 'iot', 'io', '086', NULL), ('Brunei Darussalam', 'brn', 'bn', '096', NULL), ('Bulgaria', 'bgr', 'bg', '100', NULL), ('Burkina Faso', 'bfa', 'bf', '854', NULL), ('Burundi', 'bdi', 'bi', '108', NULL), ('Côte d''Ivoire', 'civ', 'ci', '384', NULL), ('Cambodia', 'khm', 'kh', '116', NULL), ('Cameroon', 'cmr', 'cm', '120', NULL), ('Canada', 'can', 'ca', '124', NULL), ('Cape Verde', 'cpv', 'cv', '132', NULL), ('Cayman Islands', 'cym', 'ky', '136', NULL), ('Central African Republic', 'caf', 'cf', '140', NULL), ('Chad', 'tcd', 'td', '148', NULL), ('Chile', 'chl', 'cl', '152', NULL), ('China', 'chn', 'cn', '156', NULL), ('Christmas Island', 'cxr', 'cx', '162', NULL), ('Cocos (Keeling) Islands', 'cck', 'cc', '166', NULL), ('Colombia', 'col', 'co', '170', NULL), ('Comoros', 'com', 'km', '174', NULL), ('Congo', 'cog', 'cg', '178', NULL), ('Congo, the Democratic Republic of the', 'cod', 'cd', '180', NULL), ('Cook Islands', 'cok', 'ck', '184', NULL), ('Costa Rica', 'cri', 'cr', '188', NULL), ('Croatia', 'hrv', 'hr', '191', NULL), ('Cuba', 'cub', 'cu', '192', NULL), ('Cyprus', 'cyp', 'cy', '196', NULL), ('Czech Republic', 'cze', 'cz', '203', NULL), ('Denmark', 'dnk', 'dk', '208', NULL), ('Djibouti', 'dji', 'dj', '262', NULL), ('Dominica', 'dma', 'dm', '212', NULL), ('Dominican Republic', 'dom', 'do', '214', NULL), ('Ecuador', 'ecu', 'ec', '218', NULL), ('Egypt', 'egy', 'eg', '818', NULL), ('El Salvador', 'slv', 'sv', '222', NULL), ('Equatorial Guinea', 'gnq', 'gq', '226', NULL), ('Eritrea', 'eri', 'er', '232', NULL), ('Estonia', 'est', 'ee', '233', NULL), ('Ethiopia', 'eth', 'et', '231', NULL), ('Falkland Islands (Malvinas)', 'flk', 'fk', '238', NULL), ('Faroe Islands', 'fro', 'fo', '234', NULL), ('Fiji', 'fji', 'fj', '242', NULL), ('Finland', 'fin', 'fi', '246', NULL), ('France', 'fra', 'fr', '250', NULL), ('French Guiana', 'guf', 'gf', '254', NULL), ('French Polynesia', 'pyf', 'pf', '258', NULL), ('French Southern Territories', 'atf', 'tf', '260', NULL), ('Gabon', 'gab', 'ga', '266', NULL), ('Gambia', 'gmb', 'gm', '270', NULL), ('Georgia', 'geo', 'ge', '268', NULL), ('Germany', 'deu', 'de', '276', NULL), ('Ghana', 'gha', 'gh', '288', NULL), ('Gibraltar', 'gib', 'gi', '292', NULL), ('Greece', 'grc', 'gr', '300', NULL), ('Greenland', 'grl', 'gl', '304', NULL), ('Grenada', 'grd', 'gd', '308', NULL), ('Guadeloupe', 'glp', 'gp', '312', NULL), ('Guam', 'gum', 'gu', '316', NULL), ('Guatemala', 'gtm', 'gt', '320', NULL), ('Guinea', 'gin', 'gn', '324', NULL), ('Guinea-Bissau', 'gnb', 'gw', '624', NULL), ('Guyana', 'guy', 'gy', '328', NULL), ('Haiti', 'hti', 'ht', '332', NULL), ('Heard Island and McDonald Islands', 'hmd', 'hm', '334', NULL), ('Holy See (Vatican City State)', 'vat', 'va', '336', NULL), ('Honduras', 'hnd', 'hn', '340', NULL), ('Hong Kong', 'hkg', 'hk', '344', NULL), ('Hungary', 'hun', 'hu', '348', NULL), ('Iceland', 'isl', 'is', '352', NULL), ('India', 'ind', 'in', '356', NULL), ('Indonesia', 'idn', 'id', '360', NULL), ('Iran, Islamic Republic of', 'irn', 'ir', '364', NULL), ('Iraq', 'irq', 'iq', '368', NULL), ('Ireland', 'irl', 'ie', '372', NULL), ('Israel', 'isr', 'il', '376', NULL), ('Italy', 'ita', 'it', '380', NULL), ('Jamaica', 'jam', 'jm', '388', NULL), ('Japan', 'jpn', 'jp', '392', NULL), ('Jordan', 'jor', 'jo', '400', NULL), ('Kazakhstan', 'kaz', 'kz', '398', NULL), ('Kenya', 'ken', 'ke', '404', NULL), ('Kiribati', 'kir', 'ki', '296', NULL), ('Korea, Democratic People''s Republic of', 'prk', 'kp', '408', NULL), ('Korea, Republic of', 'kor', 'kr', '410', NULL), ('Kuwait', 'kwt', 'kw', '414', NULL), ('Kyrgyzstan', 'kgz', 'kg', '417', NULL), ('Lao People''s Democratic Republic', 'lao', 'la', '418', NULL), ('Latvia', 'lva', 'lv', '428', NULL), ('Lebanon', 'lbn', 'lb', '422', NULL), ('Lesotho', 'lso', 'ls', '426', NULL), ('Liberia', 'lbr', 'lr', '430', NULL), ('Libyan Arab Jamahiriya', 'lby', 'ly', '434', NULL), ('Liechtenstein', 'lie', 'li', '438', NULL), ('Lithuania', 'ltu', 'lt', '440', NULL), ('Luxembourg', 'lux', 'lu', '442', NULL), ('Macao', 'mac', 'mo', '446', NULL), ('Macedonia, the former Yugoslav Republic of', 'mkd', 'mk', '807', NULL), ('Madagascar', 'mdg', 'mg', '450', NULL), ('Malawi', 'mwi', 'mw', '454', NULL), ('Malaysia', 'mys', 'my', '458', NULL), ('Maldives', 'mdv', 'mv', '462', NULL), ('Mali', 'mli', 'ml', '466', NULL), ('Malta', 'mlt', 'mt', '470', NULL), ('Marshall Islands', 'mhl', 'mh', '584', NULL), ('Martinique', 'mtq', 'mq', '474', NULL), ('Mauritania', 'mrt', 'mr', '478', NULL), ('Mauritius', 'mus', 'mu', '480', NULL), ('Mayotte', 'myt', 'yt', '175', NULL), ('Mexico', 'mex', 'mx', '484', NULL), ('Micronesia, Federated States of', 'fsm', 'fm', '583', NULL), ('Moldova, Republic of', 'mda', 'md', '498', NULL), ('Monaco', 'mco', 'mc', '492', NULL), ('Mongolia', 'mng', 'mn', '496', NULL), ('Montenegro', 'mne', 'me', '499', NULL), ('Montserrat', 'msr', 'ms', '500', NULL), ('Morocco', 'mar', 'ma', '504', NULL), ('Mozambique', 'moz', 'mz', '508', NULL), ('Myanmar', 'mmr', 'mm', '104', NULL), ('Namibia', 'nam', 'na', '516', NULL), ('Nauru', 'nru', 'nr', '520', NULL), ('Nepal', 'npl', 'np', '524', NULL), ('Netherlands', 'nld', 'nl', '528', NULL), ('Netherlands Antilles', 'ant', 'an', '530', NULL), ('New Caledonia', 'ncl', 'nc', '540', NULL), ('New Zealand', 'nzl', 'nz', '554', NULL), ('Nicaragua', 'nic', 'ni', '558', NULL), ('Niger', 'ner', 'ne', '562', NULL), ('Nigeria', 'nga', 'ng', '566', NULL), ('Niue', 'niu', 'nu', '570', NULL), ('Norfolk Island', 'nfk', 'nf', '574', NULL), ('Northern Mariana Islands', 'mnp', 'mp', '580', NULL), ('Norway', 'nor', 'no', '578', NULL), ('Oman', 'omn', 'om', '512', NULL), ('Pakistan', 'pak', 'pk', '586', NULL), ('Palau', 'plw', 'pw', '585', NULL), ('Palestinian Territory, Occupied', 'pse', 'ps', '275', NULL), ('Panama', 'pan', 'pa', '591', NULL), ('Papua New Guinea', 'png', 'pg', '598', NULL), ('Paraguay', 'pry', 'py', '600', NULL), ('Peru', 'per', 'pe', '604', NULL), ('Philippines', 'phl', 'ph', '608', NULL), ('Pitcairn', 'pcn', 'pn', '612', NULL), ('Poland', 'pol', 'pl', '616', NULL), ('Portugal', 'prt', 'pt', '620', NULL), ('Puerto Rico', 'pri', 'pr', '630', NULL), ('Qatar', 'qat', 'qa', '634', NULL), ('Réunion', 'reu', 're', '638', NULL), ('Romania', 'rou', 'ro', '642', NULL), ('Russian Federation', 'rus', 'ru', '643', 1), ('Rwanda', 'rwa', 'rw', '646', NULL), ('Saint Helena, Ascension and Tristan da Cunha', 'shn', 'sh', '654', NULL), ('Saint Kitts and Nevis', 'kna', 'kn', '659', NULL), ('Saint Lucia', 'lca', 'lc', '662', NULL), ('Saint Pierre and Miquelon', 'spm', 'pm', '666', NULL), ('Saint Vincent and the Grenadines', 'vct', 'vc', '670', NULL), ('Samoa', 'wsm', 'ws', '882', NULL), ('San Marino', 'smr', 'sm', '674', NULL), ('Sao Tome and Principe', 'stp', 'st', '678', NULL), ('Saudi Arabia', 'sau', 'sa', '682', NULL), ('Senegal', 'sen', 'sn', '686', NULL), ('Serbia', 'srb', 'rs', '688', NULL), ('Seychelles', 'syc', 'sc', '690', NULL), ('Sierra Leone', 'sle', 'sl', '694', NULL), ('Singapore', 'sgp', 'sg', '702', NULL), ('Slovakia', 'svk', 'sk', '703', NULL), ('Slovenia', 'svn', 'si', '705', NULL), ('Solomon Islands', 'slb', 'sb', '090', NULL), ('Somalia', 'som', 'so', '706', NULL), ('South Africa', 'zaf', 'za', '710', NULL), ('South Georgia and the South Sandwich Islands', 'sgs', 'gs', '239', NULL), ('Spain', 'esp', 'es', '724', NULL), ('Sri Lanka', 'lka', 'lk', '144', NULL), ('Sudan', 'sdn', 'sd', '736', NULL), ('Suriname', 'sur', 'sr', '740', NULL), ('Svalbard and Jan Mayen', 'sjm', 'sj', '744', NULL), ('Swaziland', 'swz', 'sz', '748', NULL), ('Sweden', 'swe', 'se', '752', NULL), ('Switzerland', 'che', 'ch', '756', NULL), ('Syrian Arab Republic', 'syr', 'sy', '760', NULL), ('Taiwan, Province of China', 'twn', 'tw', '158', NULL), ('Tajikistan', 'tjk', 'tj', '762', NULL), ('Tanzania, United Republic of', 'tza', 'tz', '834', NULL), ('Thailand', 'tha', 'th', '764', NULL), ('Timor-Leste', 'tls', 'tl', '626', NULL), ('Togo', 'tgo', 'tg', '768', NULL), ('Tokelau', 'tkl', 'tk', '772', NULL), ('Tonga', 'ton', 'to', '776', NULL), ('Trinidad and Tobago', 'tto', 'tt', '780', NULL), ('Tunisia', 'tun', 'tn', '788', NULL), ('Turkey', 'tur', 'tr', '792', NULL), ('Turkmenistan', 'tkm', 'tm', '795', NULL), ('Turks and Caicos Islands', 'tca', 'tc', '796', NULL), ('Tuvalu', 'tuv', 'tv', '798', NULL), ('Uganda', 'uga', 'ug', '800', NULL), ('Ukraine', 'ukr', 'ua', '804', 1), ('United Arab Emirates', 'are', 'ae', '784', NULL), ('United Kingdom', 'gbr', 'gb', '826', NULL), ('United States', 'usa', 'us', '840', NULL), ('United States Minor Outlying Islands', 'umi', 'um', '581', NULL), ('Uruguay', 'ury', 'uy', '858', NULL), ('Uzbekistan', 'uzb', 'uz', '860', NULL), ('Vanuatu', 'vut', 'vu', '548', NULL), ('Venezuela, Bolivarian Republic of', 'ven', 've', '862', NULL), ('Viet Nam', 'vnm', 'vn', '704', NULL), ('Virgin Islands, British', 'vgb', 'vg', '092', NULL), ('Virgin Islands, U.S.', 'vir', 'vi', '850', NULL), ('Wallis and Futuna', 'wlf', 'wf', '876', NULL), ('Western Sahara', 'esh', 'eh', '732', NULL), ('Yemen', 'yem', 'ye', '887', NULL), ('Zambia', 'zmb', 'zm', '894', NULL), ('Zimbabwe', 'zwe', 'zw', '716', NULL), ('Abkhazia', 'abh', 'ab', '895', NULL), ('Bonaire, Sint Eustatius and Saba', 'bes', 'bq', '535', NULL), ('Guernsey', 'ggy', 'gg', '831', NULL), ('Jersey', 'jey', 'je', '832', NULL), ('Curaçao', 'cuw', 'cw', '531', NULL), ('Isle of Man', 'imn', 'im', '833', NULL), ('Saint Barthélemy', 'blm', 'bl', '652', NULL), ('Saint Martin (French Part)', 'maf', 'mf', '663', NULL), ('Sint Maarten', 'sxm', 'sx', '534', NULL), ('South Ossetia', 'ost', 'os', '896', NULL), ('South Sudan', 'ssd', 'ss', '728', NULL); -- -------------------------------------------------------- -- -- Table structure for table `wa_dashboard` -- CREATE TABLE `wa_dashboard` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `hash` varchar(32) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `hash` (`hash`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_group` -- CREATE TABLE `wa_group` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `cnt` int(11) NOT NULL DEFAULT '0', `icon` varchar(255) DEFAULT NULL, `sort` int(11) DEFAULT NULL, `type` enum('group','location') NOT NULL DEFAULT 'group', `description` text, PRIMARY KEY (`id`), KEY `name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; -- -- Dumping data for table `wa_group` -- INSERT INTO `wa_group` VALUES (1, 'Administrators', 1, NULL, 0, 'group', NULL), (2, 'My office', 1, NULL, 1, 'location', NULL), (3, 'Remote', 0, NULL, 2, 'location', NULL); -- -------------------------------------------------------- -- -- Table structure for table `wa_log` -- CREATE TABLE `wa_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `app_id` varchar(32) NOT NULL, `contact_id` int(11) NOT NULL, `datetime` datetime NOT NULL, `action` varchar(255) NOT NULL, `subject_contact_id` int(11) DEFAULT NULL, `params` text, PRIMARY KEY (`id`), KEY `contact` (`contact_id`,`id`), KEY `datetime` (`datetime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `wa_log` -- -- -------------------------------------------------------- -- -- Table structure for table `wa_login_log` -- CREATE TABLE `wa_login_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `contact_id` int(11) NOT NULL, `datetime_in` datetime NOT NULL, `datetime_out` datetime DEFAULT NULL, `ip` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`), KEY `contact_datetime` (`contact_id`,`datetime_out`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Dumping data for table `wa_login_log` -- INSERT INTO `wa_login_log` VALUES (1, 1, '[[regtime]]', NULL, '[[clientip]]'); -- -------------------------------------------------------- -- -- Table structure for table `wa_push_subscribers` -- CREATE TABLE `wa_push_subscribers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `provider_id` varchar(64) NOT NULL, `domain` varchar(255) NOT NULL, `create_datetime` datetime NOT NULL, `contact_id` int(11) DEFAULT NULL, `subscriber_data` text NOT NULL, `scope` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `provider_id` (`provider_id`), KEY `domain` (`domain`), KEY `contact_id` (`contact_id`), KEY `create_datetime` (`create_datetime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_region` -- CREATE TABLE `wa_region` ( `country_iso3` varchar(3) NOT NULL, `code` varchar(8) NOT NULL, `name` varchar(255) NOT NULL, `fav_sort` int(11) DEFAULT NULL, `region_center` varchar(255) DEFAULT NULL, PRIMARY KEY (`country_iso3`,`code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_region` -- INSERT INTO `wa_region` VALUES ('usa', 'AL', 'Alabama', NULL, 'Montgomery'), ('usa', 'AK', 'Alaska', NULL, 'Juneau'), ('usa', 'AZ', 'Arizona', NULL, 'Phoenix'), ('usa', 'AR', 'Arkansas', NULL, 'Little Rock'), ('usa', 'CA', 'California', NULL, 'Sacramento'), ('usa', 'CO', 'Colorado', NULL, 'Denver'), ('usa', 'CT', 'Connecticut', NULL, 'Hartford'), ('usa', 'DE', 'Delaware', NULL, 'Dover'), ('usa', 'DC', 'District of Columbia', NULL, 'Washington DC'), ('usa', 'FL', 'Florida', NULL, 'Tallahassee'), ('usa', 'GA', 'Georgia', NULL, 'Atlanta'), ('usa', 'HI', 'Hawaii', NULL, 'Honolulu'), ('usa', 'ID', 'Idaho', NULL, 'Boise'), ('usa', 'IL', 'Illinois', NULL, 'Springfield'), ('usa', 'IN', 'Indiana', NULL, 'Indianapolis'), ('usa', 'IA', 'Iowa', NULL, 'Des Moines'), ('usa', 'KS', 'Kansas', NULL, 'Topeka'), ('usa', 'KY', 'Kentucky', NULL, 'Frankfort'), ('usa', 'LA', 'Louisiana', NULL, 'Baton Rouge'), ('usa', 'ME', 'Maine', NULL, 'Augusta'), ('usa', 'MD', 'Maryland', NULL, 'Annapolis'), ('usa', 'MA', 'Massachusetts', NULL, 'Boston'), ('usa', 'MI', 'Michigan', NULL, 'Lansing'), ('usa', 'MN', 'Minnesota', NULL, 'Saint Paul'), ('usa', 'MS', 'Mississippi', NULL, 'Jackson'), ('usa', 'MO', 'Missouri', NULL, 'Jefferson City'), ('usa', 'MT', 'Montana', NULL, 'Helena'), ('usa', 'NE', 'Nebraska', NULL, 'Lincoln'), ('usa', 'NV', 'Nevada', NULL, 'Carson City'), ('usa', 'NH', 'New Hampshire', NULL, 'Concord'), ('usa', 'NJ', 'New Jersey', NULL, 'Trenton'), ('usa', 'NM', 'New Mexico', NULL, 'Santa Fe'), ('usa', 'NY', 'New York', NULL, 'Albany'), ('usa', 'NC', 'North Carolina', NULL, 'Rayleigh'), ('usa', 'ND', 'North Dakota', NULL, 'Bismarck'), ('usa', 'OH', 'Ohio', NULL, 'Columbus'), ('usa', 'OK', 'Oklahoma', NULL, 'Oklahoma City'), ('usa', 'OR', 'Oregon', NULL, 'Salem'), ('usa', 'PA', 'Pennsylvania', NULL, 'Harrisburg'), ('usa', 'RI', 'Rhode Island', NULL, 'Providence'), ('usa', 'SC', 'South Carolina', NULL, 'Columbia'), ('usa', 'SD', 'South Dakota', NULL, 'Pierre'), ('usa', 'TN', 'Tennessee', NULL, 'Nashville'), ('usa', 'TX', 'Texas', NULL, 'Austin'), ('usa', 'UT', 'Utah', NULL, 'Salt Lake City'), ('usa', 'VT', 'Vermont', NULL, 'Montpelier'), ('usa', 'VA', 'Virginia', NULL, 'Richmond'), ('usa', 'WA', 'Washington', NULL, 'Olympia'), ('usa', 'WV', 'West Virginia', NULL, 'Charleston'), ('usa', 'WI', 'Wisconsin', NULL, 'Madison'), ('usa', 'WY', 'Wyoming', NULL, 'Cheyenne'), ('can', '10', 'Newfoundland', NULL, NULL), ('can', '11', 'Prince Edward Island', NULL, NULL), ('can', '12', 'Nova Scotia', NULL, NULL), ('can', '13', 'New Brunswick', NULL, NULL), ('can', '24', 'Quebec', NULL, NULL), ('can', '35', 'Ontario', NULL, NULL), ('can', '46', 'Manitoba', NULL, NULL), ('can', '47', 'Saskatchewan', NULL, NULL), ('can', '48', 'Alberta', NULL, NULL), ('can', '59', 'British Columbia', NULL, NULL), ('can', '60', 'Yukon', NULL, NULL), ('can', '61', 'Northwest Territories', NULL, NULL), ('can', '62', 'Nunavut', NULL, NULL), ('rus', '01', 'Адыгея республика', NULL, NULL), ('rus', '04', 'Алтай республика', NULL, NULL), ('rus', '22', 'Алтайский край', NULL, NULL), ('rus', '28', 'Амурская область', NULL, NULL), ('rus', '29', 'Архангельская область', NULL, NULL), ('rus', '30', 'Астраханская область', NULL, NULL), ('rus', '02', 'Башкортостан республика', NULL, NULL), ('rus', '31', 'Белгородская область', NULL, NULL), ('rus', '32', 'Брянская область', NULL, NULL), ('rus', '03', 'Бурятия республика', NULL, NULL), ('rus', '33', 'Владимирская область', NULL, NULL), ('rus', '34', 'Волгоградская область', NULL, NULL), ('rus', '35', 'Вологодская область', NULL, NULL), ('rus', '36', 'Воронежская область', NULL, NULL), ('rus', '05', 'Дагестан республика', NULL, NULL), ('rus', '93', 'Донецкая Народная Республика', NULL, NULL), ('rus', '79', 'Еврейская автономная область', NULL, NULL), ('rus', '75', 'Забайкальский край', NULL, NULL), ('rus', '90', 'Запорожская область', NULL, NULL), ('rus', '37', 'Ивановская область', NULL, NULL), ('rus', '06', 'Ингушетия республика', NULL, NULL), ('rus', '38', 'Иркутская область', NULL, NULL), ('rus', '07', 'Кабардино-Балкарская республика', NULL, NULL), ('rus', '09', 'Карачаево-Черкесская республика', NULL, NULL), ('rus', '39', 'Калининградская область', NULL, NULL), ('rus', '08', 'Калмыкия республика', NULL, NULL), ('rus', '40', 'Калужская область', NULL, NULL), ('rus', '41', 'Камчатский край', NULL, NULL), ('rus', '10', 'Карелия республика', NULL, NULL), ('rus', '42', 'Кемеровская область', NULL, NULL), ('rus', '43', 'Кировская область', NULL, NULL), ('rus', '11', 'Коми республика', NULL, NULL), ('rus', '44', 'Костромская область', NULL, NULL), ('rus', '23', 'Краснодарский край', NULL, NULL), ('rus', '24', 'Красноярский край', NULL, NULL), ('rus', '91', 'Крым республика', NULL, NULL), ('rus', '45', 'Курганская область', NULL, NULL), ('rus', '46', 'Курская область', NULL, NULL), ('rus', '47', 'Ленинградская область', NULL, NULL), ('rus', '48', 'Липецкая область', NULL, NULL), ('rus', '94', 'Луганская Народная Республика', NULL, NULL), ('rus', '49', 'Магаданская область', NULL, NULL), ('rus', '12', 'Марий Эл республика', NULL, NULL), ('rus', '50', 'Московская область', NULL, NULL), ('rus', '77', 'Москва', NULL, 'Москва'), ('rus', '13', 'Мордовия республика', NULL, NULL), ('rus', '51', 'Мурманская область', NULL, NULL), ('rus', '83', 'Ненецкий автономный округ', NULL, NULL), ('rus', '52', 'Нижегородская область', NULL, NULL), ('rus', '53', 'Новгородская область', NULL, NULL), ('rus', '54', 'Новосибирская область', NULL, NULL), ('rus', '55', 'Омская область', NULL, NULL), ('rus', '56', 'Оренбургская область', NULL, NULL), ('rus', '57', 'Орловская область', NULL, NULL), ('rus', '58', 'Пензенская область', NULL, NULL), ('rus', '59', 'Пермский край', NULL, NULL), ('rus', '25', 'Приморский край', NULL, NULL), ('rus', '60', 'Псковская область', NULL, NULL), ('rus', '61', 'Ростовская область', NULL, NULL), ('rus', '62', 'Рязанская область', NULL, NULL), ('rus', '63', 'Самарская область', NULL, NULL), ('rus', '78', 'Санкт-Петербург', NULL, 'Санкт-Петербург'), ('rus', '64', 'Саратовская область', NULL, NULL), ('rus', '14', 'Саха (Якутия) республика', NULL, NULL), ('rus', '65', 'Сахалинская область', NULL, NULL), ('rus', '66', 'Свердловская область', NULL, NULL), ('rus', '92', 'Севастополь', NULL, 'Севастополь'), ('rus', '15', 'Северная Осетия-Алания', NULL, NULL), ('rus', '67', 'Смоленская область', NULL, NULL), ('rus', '26', 'Ставропольский край', NULL, NULL), ('rus', '68', 'Тамбовская область', NULL, NULL), ('rus', '16', 'Татарстан республика', NULL, NULL), ('rus', '69', 'Тверская область', NULL, NULL), ('rus', '70', 'Томская область', NULL, NULL), ('rus', '71', 'Тульская область', NULL, NULL), ('rus', '72', 'Тюменская область', NULL, NULL), ('rus', '17', 'Тыва республика', NULL, NULL), ('rus', '18', 'Удмуртская республика', NULL, NULL), ('rus', '73', 'Ульяновская область', NULL, NULL), ('rus', '27', 'Хабаровский край', NULL, NULL), ('rus', '19', 'Хакасия республика', NULL, NULL), ('rus', '86', 'Ханты-Мансийский-Югра автономный округ', NULL, NULL), ('rus', '95', 'Херсонская область', NULL, NULL), ('rus', '74', 'Челябинская область', NULL, NULL), ('rus', '20', 'Чеченская республика', NULL, NULL), ('rus', '21', 'Чувашская республика', NULL, NULL), ('rus', '87', 'Чукотский автономный округ', NULL, NULL), ('rus', '89', 'Ямало-Ненецкий автономный округ', NULL, NULL), ('rus', '76', 'Ярославская область', NULL, NULL), ('ukr', '01', 'Автономна Республіка Крим', NULL, NULL), ('ukr', '02', 'Вінницька область', NULL, NULL), ('ukr', '03', 'Волинська область', NULL, NULL), ('ukr', '04', 'Дніпропетровська область', NULL, NULL), ('ukr', '05', 'Донецька область', NULL, NULL), ('ukr', '06', 'Житомирська область', NULL, NULL), ('ukr', '07', 'Закарпатська область', NULL, NULL), ('ukr', '08', 'Запорізька область', NULL, NULL), ('ukr', '09', 'Івано-Франківська область', NULL, NULL), ('ukr', '10', 'Київська область', NULL, NULL), ('ukr', '11', 'місто Київ', NULL, NULL), ('ukr', '12', 'Кіровоградська область', NULL, NULL), ('ukr', '13', 'Луганська область', NULL, NULL), ('ukr', '14', 'Львівська область', NULL, NULL), ('ukr', '15', 'Миколаївська область', NULL, NULL), ('ukr', '16', 'Одеська область', NULL, NULL), ('ukr', '17', 'Полтавська область', NULL, NULL), ('ukr', '18', 'Рівненська область', NULL, NULL), ('ukr', '19', 'Сумська область', NULL, NULL), ('ukr', '20', 'Тернопільська область', NULL, NULL), ('ukr', '21', 'Харківська область', NULL, NULL), ('ukr', '22', 'Херсонська область', NULL, NULL), ('ukr', '23', 'Хмельницька область', NULL, NULL), ('ukr', '24', 'Черкаська область', NULL, NULL), ('ukr', '25', 'Чернігівська область', NULL, NULL), ('ukr', '26', 'Чернівецька область', NULL, NULL), ('blr', '01', 'Брэсцкая вобласць', NULL, 'Брэст'), ('blr', '02', 'Віцебская вобласць', NULL, 'Віцебск'), ('blr', '03', 'Гомельская вобласць', NULL, 'Гомель'), ('blr', '04', 'Гродзенская вобласць', NULL, 'Гродна'), ('blr', '05', 'Мінская вобласць', NULL, 'Мінск'), ('blr', '06', 'Магілёўская вобласць', NULL, 'Магілёў'), ('blr', '07', 'Мінск', NULL, 'Мінск'), ('kaz', '01', 'Астана', NULL, 'Астана'), ('kaz', '02', 'Алматы', NULL, 'Алматы'), ('kaz', '03', 'Ақмола облысы', NULL, 'Көкшетау'), ('kaz', '04', 'Ақтөбе облысы', NULL, 'Ақтөбе'), ('kaz', '05', 'Алматы облысы', NULL, 'Қонаев'), ('kaz', '06', 'Атырау облысы', NULL, 'Атырау'), ('kaz', '07', 'Батыс Қазақстан облысы', NULL, 'Орал'), ('kaz', '08', 'Жамбыл облысы', NULL, 'Тараз'), ('kaz', '09', 'Қарағанды облысы', NULL, 'Қарағанды'), ('kaz', '10', 'Қостанай облысы', NULL, 'Қостанай'), ('kaz', '11', 'Қызылорда облысы', NULL, 'Қызылорда'), ('kaz', '12', 'Маңғыстау облысы', NULL, 'Ақтау'), ('kaz', '13', 'Түркістан облысы', NULL, 'Түркістан'), ('kaz', '14', 'Павлодар облысы', NULL, 'Павлодар'), ('kaz', '15', 'Солтүстік Қазақстан облысы', NULL, 'Петропавл'), ('kaz', '16', 'Шығыс Қазақстан облысы', NULL, 'Өскемен'), ('kaz', '17', 'Шымкент', NULL, 'Шымкент'), ('kaz', '18', 'Абай облысы', NULL, 'Семей'), ('kaz', '19', 'Жетісу облысы', NULL, 'Талдықорған'), ('kaz', '20', 'Ұлытау облысы', NULL, 'Жезқазған'), ('arm', '01', 'Арагацотнская область', NULL, 'Аштарак'), ('arm', '02', 'Араратская область', NULL, 'Арташат'), ('arm', '03', 'Армавирская область', NULL, 'Армавир'), ('arm', '04', 'Вайоцдзорская область', NULL, 'Ехегнадзор'), ('arm', '05', 'Гехаркуникская область', NULL, 'Гавар'), ('arm', '06', 'Котайкская область', NULL, 'Раздан'), ('arm', '07', 'Лорийская область', NULL, 'Ванадзор'), ('arm', '08', 'Сюникская область', NULL, 'Капан'), ('arm', '09', 'Тавушская область', NULL, 'Иджеван'), ('arm', '10', 'Ширакская область', NULL, 'Гюмри'), ('arm', '11', 'Ереван', NULL, 'Ереван'), ('geo', 'GE-AB', 'Абхазская Автономная Республика', NULL, 'Сухуми'), ('geo', 'GE-SZ', 'Самегрело-Верхняя Сванетия', NULL, 'Зугдиди'), ('geo', 'GE-GU', 'Гурия', NULL, 'Озургети'), ('geo', 'GE-AJ', 'Аджарская Автономная Республика', NULL, 'Батуми'), ('geo', 'GE-RL', 'Рача-Лечхуми и Нижняя Сванетия', NULL, 'Амбролаури'), ('geo', 'GE-IM', 'Имеретия', NULL, 'Кутаиси'), ('geo', 'GE-SJ', 'Самцхе-Джавахетия', NULL, 'Ахалцихе'), ('geo', 'GE-SK', 'Шида-Картли', NULL, 'Гори'), ('geo', 'GE-MM', 'Мцхета-Мтианети', NULL, 'Мцхета'), ('geo', 'GE-KK', 'Квемо-Картли', NULL, 'Рустави'), ('geo', 'GE-KA', 'Кахетия', NULL, 'Телави'), ('geo', 'GE-TB', 'Тбилиси', NULL, 'Тбилиси'), ('chn', '11', 'Beijing', NULL, NULL), ('chn', '12', 'Tianjin', NULL, NULL), ('chn', '13', 'Hebei', NULL, NULL), ('chn', '14', 'Shanxi', NULL, NULL), ('chn', '21', 'Liaoning', NULL, NULL), ('chn', '15', 'Inner Mongolia', NULL, NULL), ('chn', '22', 'Jilin', NULL, NULL), ('chn', '23', 'Heilongjiang', NULL, NULL), ('chn', '34', 'Anhui', NULL, NULL), ('chn', '33', 'Zhejiang', NULL, NULL), ('chn', '36', 'Jiangxi', NULL, NULL), ('chn', '31', 'Shanghai', NULL, NULL), ('chn', '35', 'Fujian', NULL, NULL), ('chn', '32', 'Jiangsu', NULL, NULL), ('chn', '37', 'Shandong', NULL, NULL), ('chn', '46', 'Hainan', NULL, NULL), ('chn', '42', 'Hubei', NULL, NULL), ('chn', '43', 'Hunan', NULL, NULL), ('chn', '41', 'Henan', NULL, NULL), ('chn', '44', 'Guangdong', NULL, NULL), ('chn', '45', 'Guangxi', NULL, NULL), ('chn', '50', 'Chongqing', NULL, NULL), ('chn', '51', 'Sichuan', NULL, NULL), ('chn', '61', 'Shaanxi', NULL, NULL), ('chn', '53', 'Yunnan', NULL, NULL), ('chn', '54', 'Xizang', NULL, NULL), ('chn', '62', 'Gansu', NULL, NULL), ('chn', '52', 'Guizhou', NULL, NULL), ('chn', '64', 'Ningxia', NULL, NULL), ('chn', '63', 'Qinghai', NULL, NULL), ('chn', '65', 'Xinjiang', NULL, NULL), ('ind', '37', 'Andhra Pradesh', NULL, 'Amaravati'), ('ind', '12', 'Arunachal Pradesh', NULL, 'Itanagar'), ('ind', '18', 'Assam', NULL, 'Dispur'), ('ind', '10', 'Bihar', NULL, 'Patna'), ('ind', '22', 'Chhattisgarh', NULL, 'Raipur'), ('ind', '7', 'Delhi', NULL, 'Delhi'), ('ind', '30', 'Goa', NULL, 'Panaji'), ('ind', '24', 'Gujarat', NULL, 'Gandhinagar'), ('ind', '6', 'Haryana', NULL, 'Chandigarh'), ('ind', '2', 'Himachal Pradesh', NULL, 'Shimla'), ('ind', '1', 'Jammu and Kashmir', NULL, 'Srinagar'), ('ind', '20', 'Jharkhand', NULL, 'Ranchi'), ('ind', '29', 'Karnataka', NULL, 'Bengaluru'), ('ind', '32', 'Kerala', NULL, 'Thiruvananthapuram'), ('ind', '31', 'Lakshadweep Islands', NULL, 'Kavaratti'), ('ind', '23', 'Madhya Pradesh', NULL, 'Bhopal'), ('ind', '27', 'Maharashtra', NULL, 'Mumbai'), ('ind', '14', 'Manipur', NULL, 'Imphal'), ('ind', '17', 'Meghalaya', NULL, 'Shillong'), ('ind', '15', 'Mizoram', NULL, 'Aizawl'), ('ind', '13', 'Nagaland', NULL, 'Kohima'), ('ind', '21', 'Odisha', NULL, 'Bhubaneswar'), ('ind', '34', 'Pondicherry', NULL, 'Pondicherry'), ('ind', '3', 'Punjab', NULL, 'Chandigarh'), ('ind', '8', 'Rajasthan', NULL, 'Jaipur'), ('ind', '11', 'Sikkim', NULL, 'Gangtok'), ('ind', '33', 'Tamil Nadu', NULL, 'Chennai'), ('ind', '36', 'Telangana', NULL, 'Hyderabad'), ('ind', '16', 'Tripura', NULL, 'Agartala'), ('ind', '9', 'Uttar Pradesh', NULL, 'Lucknow'), ('ind', '5', 'Uttarakhand', NULL, 'Dehradun'), ('ind', '19', 'West Bengal', NULL, 'Kolkata'), ('aus', '1', 'New South Wales', NULL, 'Sydney'), ('aus', '2', 'Victoria', NULL, 'Melbourne'), ('aus', '3', 'Queensland', NULL, 'Brisbane'), ('aus', '4', 'South Australia', NULL, 'Adelaide'), ('aus', '5', 'Western Australia', NULL, 'Perth'), ('aus', '6', 'Tasmania', NULL, 'Hobart'), ('aus', '7', 'Northern Territory', NULL, 'Darwin'), ('aus', '8', 'Australian Capital Territory', NULL, 'Canberra'), ('aus', '9', 'Other Territories', NULL, NULL), ('deu', '01', 'Schleswig-Holstein', NULL, NULL), ('deu', '02', 'Hamburg', NULL, NULL), ('deu', '03', 'Niedersachsen', NULL, NULL), ('deu', '04', 'Bremen', NULL, NULL), ('deu', '05', 'Nordrhein-Westfalen', NULL, NULL), ('deu', '06', 'Hessen', NULL, NULL), ('deu', '07', 'Rheinland-Pfalz', NULL, NULL), ('deu', '08', 'Baden-Württemberg', NULL, NULL), ('deu', '09', 'Bayern', NULL, NULL), ('deu', '10', 'Saarland', NULL, NULL), ('deu', '11', 'Berlin', NULL, NULL), ('deu', '12', 'Brandenburg', NULL, NULL), ('deu', '13', 'Mecklenburg-Vorpommern', NULL, NULL), ('deu', '14', 'Sachsen', NULL, NULL), ('deu', '15', 'Sachsen-Anhalt', NULL, NULL), ('deu', '16', 'Thueringen', NULL, NULL), ('bel', '11', 'Antwerpen', NULL, NULL), ('bel', '12', 'Mechelen', NULL, NULL), ('bel', '13', 'Turnhout', NULL, NULL), ('bel', '21', 'Brussel-Hoofdstad', NULL, NULL), ('bel', '23', 'Halle-Vilvoorde', NULL, NULL), ('bel', '24', 'Leuven', NULL, NULL), ('bel', '25', 'Nijvel', NULL, NULL), ('bel', '31', 'Brugge', NULL, NULL), ('bel', '32', 'Diksmuide', NULL, NULL), ('bel', '33', 'Ieper', NULL, NULL), ('bel', '34', 'Kortrijk', NULL, NULL), ('bel', '35', 'Oostende', NULL, NULL), ('bel', '36', 'Roeselare', NULL, NULL), ('bel', '37', 'Tielt', NULL, NULL), ('bel', '38', 'Veurne', NULL, NULL), ('bel', '41', 'Aalst', NULL, NULL), ('bel', '42', 'Dendermonde', NULL, NULL), ('bel', '43', 'Eeklo', NULL, NULL), ('bel', '44', 'Gent', NULL, NULL), ('bel', '45', 'Oudenaarde', NULL, NULL), ('bel', '46', 'Sint-Niklaas', NULL, NULL), ('bel', '51', 'Aat', NULL, NULL), ('bel', '52', 'Charleroi', NULL, NULL), ('bel', '53', 'Bergen', NULL, NULL), ('bel', '54', 'Moeskroen', NULL, NULL), ('bel', '55', 'Zinnik', NULL, NULL), ('bel', '56', 'Thuin', NULL, NULL), ('bel', '57', 'Doornik', NULL, NULL), ('bel', '61', 'Hoei', NULL, NULL), ('bel', '62', 'Luik', NULL, NULL), ('bel', '63', 'Verviers', NULL, NULL), ('bel', '64', 'Borgworm', NULL, NULL), ('bel', '71', 'Hasselt', NULL, NULL), ('bel', '72', 'Maaseik', NULL, NULL), ('bel', '73', 'Tongeren', NULL, NULL), ('bel', '81', 'Aarlen', NULL, NULL), ('bel', '82', 'Bastenaken', NULL, NULL), ('bel', '83', 'Marche-en-Famenne', NULL, NULL), ('bel', '84', 'Neufchâteau', NULL, NULL), ('bel', '85', 'Virton', NULL, NULL), ('bel', '91', 'Dinant', NULL, NULL), ('bel', '92', 'Namen', NULL, NULL), ('bel', '93', 'Philippeville', NULL, NULL), ('dnk', '101', 'København', NULL, NULL), ('dnk', '102', 'Frederiksberg', NULL, NULL), ('dnk', '150', 'Københavns Amt', NULL, NULL), ('dnk', '200', 'Frederiksborg Amt', NULL, NULL), ('dnk', '250', 'Roskilde Amt', NULL, NULL), ('dnk', '300', 'Vestsjællands Amt', NULL, NULL), ('dnk', '350', 'Storstrøms Amt', NULL, NULL), ('dnk', '400', 'Bornholms Amt', NULL, NULL), ('dnk', '420', 'Fyns Amt', NULL, NULL), ('dnk', '500', 'Sønderjyllands Amt', NULL, NULL), ('dnk', '550', 'Ribe Amt', NULL, NULL), ('dnk', '600', 'Vejle Amt', NULL, NULL), ('dnk', '650', 'Ringkøbing Amt', NULL, NULL), ('dnk', '700', 'Århus Amt', NULL, NULL), ('dnk', '760', 'Viborg Amt', NULL, NULL), ('dnk', '800', 'Nordjyllands Amt', NULL, NULL), ('fra', '01', 'Ain', NULL, NULL), ('fra', '02', 'Aisne', NULL, NULL), ('fra', '03', 'Allier', NULL, NULL), ('fra', '04', 'Alpes-de-Haute-Provence', NULL, NULL), ('fra', '05', 'Hautes-Alpes', NULL, NULL), ('fra', '06', 'Alpes-Maritimes', NULL, NULL), ('fra', '07', 'Ardèche', NULL, NULL), ('fra', '08', 'Ardennes', NULL, NULL), ('fra', '09', 'Ariège', NULL, NULL), ('fra', '10', 'Aube', NULL, NULL), ('fra', '11', 'Aude', NULL, NULL), ('fra', '12', 'Aveyron', NULL, NULL), ('fra', '13', 'Bouches-du-Rhône', NULL, NULL), ('fra', '14', 'Calvados', NULL, NULL), ('fra', '15', 'Cantal', NULL, NULL), ('fra', '16', 'Charente', NULL, NULL), ('fra', '17', 'Charente-Maritime', NULL, NULL), ('fra', '18', 'Cher', NULL, NULL), ('fra', '19', 'Corrèze', NULL, NULL), ('fra', '21', 'Côte-d''Or', NULL, NULL), ('fra', '22', 'Côtes-du-Nord', NULL, NULL), ('fra', '23', 'Creuse', NULL, NULL), ('fra', '24', 'Dordogne', NULL, NULL), ('fra', '25', 'Doubs', NULL, NULL), ('fra', '26', 'Drôme', NULL, NULL), ('fra', '27', 'Eure', NULL, NULL), ('fra', '28', 'Eure-et-Loir', NULL, NULL), ('fra', '29', 'Finistère', NULL, NULL), ('fra', '30', 'Gard', NULL, NULL), ('fra', '31', 'Haute-Garonne', NULL, NULL), ('fra', '32', 'Gers', NULL, NULL), ('fra', '33', 'Gironde', NULL, NULL), ('fra', '34', 'Hérault', NULL, NULL), ('fra', '35', 'Ille-et-Vilaine', NULL, NULL), ('fra', '36', 'Indre', NULL, NULL), ('fra', '37', 'Indre-et-Loire', NULL, NULL), ('fra', '38', 'Isère', NULL, NULL), ('fra', '39', 'Jura', NULL, NULL), ('fra', '40', 'Landes', NULL, NULL), ('fra', '41', 'Loir-et-Cher', NULL, NULL), ('fra', '42', 'Loire', NULL, NULL), ('fra', '43', 'Haute-Loire', NULL, NULL), ('fra', '44', 'Loire-Atlantique', NULL, NULL), ('fra', '45', 'Loiret', NULL, NULL), ('fra', '46', 'Lot', NULL, NULL), ('fra', '47', 'Lot-et-Garonne', NULL, NULL), ('fra', '48', 'Lozère', NULL, NULL), ('fra', '49', 'Maine-et-Loire', NULL, NULL), ('fra', '50', 'Manche', NULL, NULL), ('fra', '51', 'Marne', NULL, NULL), ('fra', '52', 'Haute-Marne', NULL, NULL), ('fra', '53', 'Mayenne', NULL, NULL), ('fra', '54', 'Meurthe-et-Moselle', NULL, NULL), ('fra', '55', 'Meuse', NULL, NULL), ('fra', '56', 'Morbihan', NULL, NULL), ('fra', '57', 'Moselle', NULL, NULL), ('fra', '58', 'Nièvre', NULL, NULL), ('fra', '59', 'Nord', NULL, NULL), ('fra', '60', 'Oise', NULL, NULL), ('fra', '61', 'Orne', NULL, NULL), ('fra', '62', 'Pas-de-Calais', NULL, NULL), ('fra', '63', 'Puy-de-Dôme', NULL, NULL), ('fra', '64', 'Pyrénées-Atlantiques', NULL, NULL), ('fra', '65', 'Hautes-Pyrénées', NULL, NULL), ('fra', '66', 'Pyrénées-Orientales', NULL, NULL), ('fra', '67', 'Bas-Rhin', NULL, NULL), ('fra', '68', 'Haut-Rhin', NULL, NULL), ('fra', '69', 'Rhône', NULL, NULL), ('fra', '70', 'Haute-Saône', NULL, NULL), ('fra', '71', 'Saône-et-Loire', NULL, NULL), ('fra', '72', 'Sarthe', NULL, NULL), ('fra', '73', 'Savoie', NULL, NULL), ('fra', '74', 'Haute-Savoie', NULL, NULL), ('fra', '75', 'Ville-de-Paris', NULL, NULL), ('fra', '76', 'Seine-Maritime', NULL, NULL), ('fra', '77', 'Seine-et-Marne', NULL, NULL), ('fra', '78', 'Yvelines', NULL, NULL), ('fra', '79', 'Deux-Sèvres', NULL, NULL), ('fra', '80', 'Somme', NULL, NULL), ('fra', '81', 'Tarn', NULL, NULL), ('fra', '82', 'Tarn-et-Garonne', NULL, NULL), ('fra', '83', 'Var', NULL, NULL), ('fra', '84', 'Vaucluse', NULL, NULL), ('fra', '85', 'Vendée', NULL, NULL), ('fra', '86', 'Vienne', NULL, NULL), ('fra', '87', 'Haute-Vienne', NULL, NULL), ('fra', '88', 'Vosges', NULL, NULL), ('fra', '89', 'Yonne', NULL, NULL), ('fra', '90', 'Territoire-de-Belfort', NULL, NULL), ('fra', '91', 'Essonne', NULL, NULL), ('fra', '92', 'Hauts-de-Seine', NULL, NULL), ('fra', '93', 'Seine-Saint-Denis', NULL, NULL), ('fra', '94', 'Val-de-Marne', NULL, NULL), ('fra', '95', 'Val-d''Oise', NULL, NULL), ('fra', '99', 'Monaco', NULL, NULL), ('fra', '2A', 'Corse-du-Sud', NULL, NULL), ('fra', '2B', 'Haute-Corse', NULL, NULL), ('grc', '01', 'Aitolias Kai Akarnanias', NULL, NULL), ('grc', '03', 'Voiotia', NULL, NULL), ('grc', '04', 'Eivoias', NULL, NULL), ('grc', '05', 'Evritania', NULL, NULL), ('grc', '06', 'Fthiotida', NULL, NULL), ('grc', '07', 'Fokida', NULL, NULL), ('grc', '11', 'Argolidos', NULL, NULL), ('grc', '12', 'Arkadias', NULL, NULL), ('grc', '13', 'Ahaia', NULL, NULL), ('grc', '14', 'Ilia', NULL, NULL), ('grc', '15', 'Korinthos', NULL, NULL), ('grc', '16', 'Lakonia', NULL, NULL), ('grc', '17', 'Messinia', NULL, NULL), ('grc', '21', 'Zakinthos', NULL, NULL), ('grc', '22', 'Kerkira (Corfu)', NULL, NULL), ('grc', '23', 'Kefallonia', NULL, NULL), ('grc', '24', 'Lefkada', NULL, NULL), ('grc', '31', 'Arta', NULL, NULL), ('grc', '32', 'Thesprotia', NULL, NULL), ('grc', '33', 'Ioannina', NULL, NULL), ('grc', '34', 'Preveza', NULL, NULL), ('grc', '41', 'Karditsa', NULL, NULL), ('grc', '42', 'Larissa', NULL, NULL), ('grc', '43', 'Magnisias', NULL, NULL), ('grc', '44', 'Trikala', NULL, NULL), ('grc', '51', 'Grevena', NULL, NULL), ('grc', '52', 'Drama', NULL, NULL), ('grc', '53', 'Imathia', NULL, NULL), ('grc', '54', 'Thessaloniki', NULL, NULL), ('grc', '55', 'Kavala', NULL, NULL), ('grc', '56', 'Kastoria', NULL, NULL), ('grc', '57', 'Kilkis', NULL, NULL), ('grc', '58', 'Kozani', NULL, NULL), ('grc', '59', 'Pela', NULL, NULL), ('grc', '61', 'Pieria', NULL, NULL), ('grc', '62', 'Seres', NULL, NULL), ('grc', '63', 'Florina', NULL, NULL), ('grc', '64', 'Halkida', NULL, NULL), ('grc', '65', 'Agion Opos', NULL, NULL), ('grc', '71', 'Evros', NULL, NULL), ('grc', '72', 'Xanthi', NULL, NULL), ('grc', '73', 'Rodopi', NULL, NULL), ('grc', '81', 'Dodekanissa (Dodecanese)', NULL, NULL), ('grc', '82', 'Kiklades (Cyclades)', NULL, NULL), ('grc', '83', 'Lesvos', NULL, NULL), ('grc', '84', 'Samos', NULL, NULL), ('grc', '85', 'Hios', NULL, NULL), ('grc', '91', 'Iraklio', NULL, NULL), ('grc', '92', 'Lasithioi', NULL, NULL), ('grc', '93', 'Rethimno', NULL, NULL), ('grc', '94', 'Hania', NULL, NULL), ('grc', 'A1', 'Athina (Athens)', NULL, NULL), ('grc', 'A2', 'Anatoliki Attiki', NULL, NULL), ('grc', 'A3', 'Ditiki Attiki', NULL, NULL), ('grc', 'A4', 'Peiria', NULL, NULL), ('idn', '11', 'Nanggroe Aceh Darussalam', NULL, NULL), ('idn', '12', 'Sumatera Utara', NULL, NULL), ('idn', '13', 'Sumatera Barat', NULL, NULL), ('idn', '14', 'Riau', NULL, NULL), ('idn', '15', 'Jambi', NULL, NULL), ('idn', '16', 'Sumatera Selatan', NULL, NULL), ('idn', '17', 'Bengkulu', NULL, NULL), ('idn', '18', 'Lampung', NULL, NULL), ('idn', '19', 'Kepulauan Bangka Belitung', NULL, NULL), ('idn', '21', 'Kepulauan Riau', NULL, NULL), ('idn', '31', 'DKI Jakarta', NULL, NULL), ('idn', '32', 'Jawa Barat', NULL, NULL), ('idn', '33', 'Jawa Tengah', NULL, NULL), ('idn', '34', 'DI Yogyakarta', NULL, NULL), ('idn', '35', 'Jawa Timur', NULL, NULL), ('idn', '36', 'Banten', NULL, NULL), ('idn', '51', 'Bali', NULL, NULL), ('idn', '52', 'Nusa Tenggara Barat', NULL, NULL), ('idn', '53', 'Nusa Tenggara Timur', NULL, NULL), ('idn', '61', 'Kalimantan Barat', NULL, NULL), ('idn', '62', 'Kalimantan Tengah', NULL, NULL), ('idn', '63', 'Kalimantan Selatan', NULL, NULL), ('idn', '64', 'Kalimantan Timur', NULL, NULL), ('idn', '71', 'Sulawesi Utara', NULL, NULL), ('idn', '72', 'Sulawesi Tengah', NULL, NULL), ('idn', '73', 'Sulawesi Selatan', NULL, NULL), ('idn', '74', 'Sulawesi Tenggara', NULL, NULL), ('idn', '75', 'Gorontalo', NULL, NULL), ('idn', '76', 'Sulawesi Barat', NULL, NULL), ('idn', '81', 'Maluku', NULL, NULL), ('idn', '82', 'Maluku Utara', NULL, NULL), ('idn', '91', 'Papua Barat', NULL, NULL), ('idn', '94', 'Papua', NULL, NULL), ('irl', '01', 'Carlow', NULL, NULL), ('irl', '02', 'Dublin County Borough', NULL, NULL), ('irl', '03', 'South Dublin', NULL, NULL), ('irl', '04', 'Fingal', NULL, NULL), ('irl', '05', 'Dun Laoghaire-Rathdown', NULL, NULL), ('irl', '06', 'Kildare', NULL, NULL), ('irl', '07', 'Kilkenny', NULL, NULL), ('irl', '08', 'Laoighis', NULL, NULL), ('irl', '09', 'Longford', NULL, NULL), ('irl', '10', 'Louth', NULL, NULL), ('irl', '11', 'Meath', NULL, NULL), ('irl', '12', 'Offaly', NULL, NULL), ('irl', '13', 'Westmeath', NULL, NULL), ('irl', '14', 'Wexford', NULL, NULL), ('irl', '15', 'Wicklow', NULL, NULL), ('irl', '16', 'Clare', NULL, NULL), ('irl', '18', 'Cork County Borough', NULL, NULL), ('irl', '19', 'Cork', NULL, NULL), ('irl', '20', 'Kerry', NULL, NULL), ('irl', '22', 'Limerick County Borough', NULL, NULL), ('irl', '23', 'Limerick', NULL, NULL), ('irl', '24', 'Tipperary North Riding', NULL, NULL), ('irl', '25', 'Tipperay South Riding', NULL, NULL), ('irl', '27', 'Waterford County Borough', NULL, NULL), ('irl', '28', 'Waterford', NULL, NULL), ('irl', '29', 'Galway', NULL, NULL), ('irl', '30', 'Leitrim', NULL, NULL), ('irl', '31', 'Mayo', NULL, NULL), ('irl', '32', 'Roscommon', NULL, NULL), ('irl', '33', 'Sligo', NULL, NULL), ('irl', '34', 'Cavan', NULL, NULL), ('irl', '35', 'Donegal', NULL, NULL), ('irl', '36', 'Monaghan', NULL, NULL), ('irl', '37', 'Galway County Borough', NULL, NULL), ('isr', '01', 'Akko', NULL, NULL), ('isr', '02', 'Ashqelon', NULL, NULL), ('isr', '03', 'Beer Sheva', NULL, NULL), ('isr', '04', 'Gaza Area', NULL, NULL), ('isr', '05', 'Golan', NULL, NULL), ('isr', '06', 'Hadera', NULL, NULL), ('isr', '07', 'Haifa', NULL, NULL), ('isr', '08', 'Jericho', NULL, NULL), ('isr', '09', 'Jerusalem', NULL, NULL), ('isr', '10', 'Kinneret', NULL, NULL), ('isr', '11', 'Petah Tiqwa', NULL, NULL), ('isr', '12', 'Ramla', NULL, NULL), ('isr', '13', 'Rehovot', NULL, NULL), ('isr', '14', 'Sharon', NULL, NULL), ('isr', '15', 'Tel Aviv', NULL, NULL), ('isr', '16', 'Yizreel', NULL, NULL), ('isr', '17', 'Zefat', NULL, NULL), ('ita', '001', 'Torino', NULL, NULL), ('ita', '002', 'Vercelli', NULL, NULL), ('ita', '003', 'Novara', NULL, NULL), ('ita', '004', 'Cuneo', NULL, NULL), ('ita', '005', 'Asti', NULL, NULL), ('ita', '006', 'Alessandria', NULL, NULL), ('ita', '007', 'Valle d''Aosta', NULL, NULL), ('ita', '008', 'Imperia', NULL, NULL), ('ita', '009', 'Savona', NULL, NULL), ('ita', '010', 'Genova', NULL, NULL), ('ita', '011', 'La Spezia', NULL, NULL), ('ita', '012', 'Varese', NULL, NULL), ('ita', '013', 'Como', NULL, NULL), ('ita', '014', 'Sondrio', NULL, NULL), ('ita', '015', 'Milano', NULL, NULL), ('ita', '016', 'Bergamo', NULL, NULL), ('ita', '017', 'Brescia', NULL, NULL), ('ita', '018', 'Pavia', NULL, NULL), ('ita', '019', 'Cremona', NULL, NULL), ('ita', '020', 'Mantova', NULL, NULL), ('ita', '021', 'Bolzano', NULL, NULL), ('ita', '022', 'Trento', NULL, NULL), ('ita', '023', 'Verona', NULL, NULL), ('ita', '024', 'Vicenza', NULL, NULL), ('ita', '025', 'Belluno', NULL, NULL), ('ita', '026', 'Treviso', NULL, NULL), ('ita', '027', 'Venezia', NULL, NULL), ('ita', '028', 'Padova', NULL, NULL), ('ita', '029', 'Rovigo', NULL, NULL), ('ita', '030', 'Udine', NULL, NULL), ('ita', '031', 'Gorizia', NULL, NULL), ('ita', '032', 'Trieste', NULL, NULL), ('ita', '033', 'Piacenza', NULL, NULL), ('ita', '034', 'Parma', NULL, NULL), ('ita', '035', 'Reggio Emilia', NULL, NULL), ('ita', '036', 'Modena', NULL, NULL), ('ita', '037', 'Bologna', NULL, NULL), ('ita', '038', 'Ferrara', NULL, NULL), ('ita', '039', 'Ravenna', NULL, NULL), ('ita', '040', 'Forli-Cesena', NULL, NULL), ('ita', '041', 'Pesaro E Urbino', NULL, NULL), ('ita', '042', 'Ancona', NULL, NULL), ('ita', '043', 'Macerata', NULL, NULL), ('ita', '044', 'Ascoli Piceno', NULL, NULL), ('ita', '045', 'Massa Carrara', NULL, NULL), ('ita', '046', 'Lucca', NULL, NULL), ('ita', '047', 'Pistoia', NULL, NULL), ('ita', '048', 'Firenze', NULL, NULL), ('ita', '049', 'Livorno', NULL, NULL), ('ita', '050', 'Pisa', NULL, NULL), ('ita', '051', 'Arezzo', NULL, NULL), ('ita', '052', 'Siena', NULL, NULL), ('ita', '053', 'Grosseto', NULL, NULL), ('ita', '054', 'Perugia', NULL, NULL), ('ita', '055', 'Terni', NULL, NULL), ('ita', '056', 'Viterbo', NULL, NULL), ('ita', '057', 'Rieti', NULL, NULL), ('ita', '058', 'Roma', NULL, NULL), ('ita', '059', 'Latina', NULL, NULL), ('ita', '060', 'Frosinone', NULL, NULL), ('ita', '061', 'Caserta', NULL, NULL), ('ita', '062', 'Benevento', NULL, NULL), ('ita', '063', 'Napoli', NULL, NULL), ('ita', '064', 'Avellino', NULL, NULL), ('ita', '065', 'Salerno', NULL, NULL), ('ita', '066', 'L''Aquila', NULL, NULL), ('ita', '067', 'Teramo', NULL, NULL), ('ita', '068', 'Pescara', NULL, NULL), ('ita', '069', 'Chieti', NULL, NULL), ('ita', '070', 'Campobasso', NULL, NULL), ('ita', '071', 'Foggia', NULL, NULL), ('ita', '072', 'Bari', NULL, NULL), ('ita', '073', 'Taranto', NULL, NULL), ('ita', '074', 'Brindisi', NULL, NULL), ('ita', '075', 'Lecce', NULL, NULL), ('ita', '076', 'Potenza', NULL, NULL), ('ita', '077', 'Matera', NULL, NULL), ('ita', '078', 'Cosenza', NULL, NULL), ('ita', '079', 'Catanzaro', NULL, NULL), ('ita', '080', 'Reggio Calabria', NULL, NULL), ('ita', '081', 'Trapani', NULL, NULL), ('ita', '082', 'Palermo', NULL, NULL), ('ita', '083', 'Messina', NULL, NULL), ('ita', '084', 'Agrigento', NULL, NULL), ('ita', '085', 'Caltanissetta', NULL, NULL), ('ita', '086', 'Enna', NULL, NULL), ('ita', '087', 'Catania', NULL, NULL), ('ita', '088', 'Ragusa', NULL, NULL), ('ita', '089', 'Siracusa', NULL, NULL), ('ita', '090', 'Sassari', NULL, NULL), ('ita', '091', 'Nuoro', NULL, NULL), ('ita', '092', 'Cagliari', NULL, NULL), ('ita', '093', 'Pordenone', NULL, NULL), ('ita', '094', 'Isernia', NULL, NULL), ('ita', '095', 'Oristano', NULL, NULL), ('ita', '096', 'Biella', NULL, NULL), ('ita', '097', 'Lecco', NULL, NULL), ('ita', '098', 'Lodi', NULL, NULL), ('ita', '099', 'Rimini', NULL, NULL), ('ita', '100', 'Prato', NULL, NULL), ('ita', '101', 'Crotone', NULL, NULL), ('ita', '102', 'Vibo Valentia', NULL, NULL), ('ita', '103', 'Verbano-Cusio-Ossola', NULL, NULL), ('ita', '104', 'Olbia-Tempio', NULL, NULL), ('ita', '105', 'Ogliastra', NULL, NULL), ('ita', '106', 'Medio Campidano', NULL, NULL), ('ita', '107', 'Carbonia-Iglesias', NULL, NULL), ('ita', '888', 'Citta del Vaticano', NULL, NULL), ('ita', '999', 'San Marino', NULL, NULL), ('kor', '11', 'Seoul', NULL, NULL), ('kor', '21', 'Busan', NULL, NULL), ('kor', '22', 'Daegu', NULL, NULL), ('kor', '23', 'Incheon', NULL, NULL), ('kor', '24', 'Gwangju', NULL, NULL), ('kor', '25', 'Daejeon', NULL, NULL), ('kor', '26', 'Ulsan', NULL, NULL), ('kor', '31', 'Gyeonggi-do', NULL, NULL), ('kor', '32', 'Gangwon-do', NULL, NULL), ('kor', '33', 'Chungcheongbuk-do', NULL, NULL), ('kor', '34', 'Chungcheongnam-do', NULL, NULL), ('kor', '35', 'Jeollabuk-do', NULL, NULL), ('kor', '36', 'Jeollanam-do', NULL, NULL), ('kor', '37', 'Gyeongsangbuk-do', NULL, NULL), ('kor', '38', 'Gyeongsangnam-do', NULL, NULL), ('kor', '39', 'Jeju-do', NULL, NULL), ('tur', '01', 'Adana', NULL, NULL), ('tur', '02', 'Adýyaman', NULL, NULL), ('tur', '03', 'Afyonkarahisar', NULL, NULL), ('tur', '04', 'Aðrý', NULL, NULL), ('tur', '05', 'Amasya', NULL, NULL), ('tur', '06', 'Ankara', NULL, NULL), ('tur', '07', 'Antalya', NULL, NULL), ('tur', '08', 'Artvin', NULL, NULL), ('tur', '09', 'Aydýn', NULL, NULL), ('tur', '10', 'Balýkesir', NULL, NULL), ('tur', '11', 'Bilecik', NULL, NULL), ('tur', '12', 'Bingöl', NULL, NULL), ('tur', '13', 'Bitlis', NULL, NULL), ('tur', '14', 'Bolu', NULL, NULL), ('tur', '15', 'Burdur', NULL, NULL), ('tur', '16', 'Bursa', NULL, NULL), ('tur', '17', 'Çanakkale', NULL, NULL), ('tur', '18', 'Çankýrý', NULL, NULL), ('tur', '19', 'Çorum', NULL, NULL), ('tur', '20', 'Denizli', NULL, NULL), ('tur', '21', 'Diyarbakýr', NULL, NULL), ('tur', '22', 'Edirne', NULL, NULL), ('tur', '23', 'Elazýð', NULL, NULL), ('tur', '24', 'Erzincan', NULL, NULL), ('tur', '25', 'Erzurum', NULL, NULL), ('tur', '26', 'Eskiþehir', NULL, NULL), ('tur', '27', 'Gaziantep', NULL, NULL), ('tur', '28', 'Giresun', NULL, NULL), ('tur', '29', 'Gümüþhane', NULL, NULL), ('tur', '30', 'Hakkari', NULL, NULL), ('tur', '31', 'Hatay', NULL, NULL), ('tur', '32', 'Isparta', NULL, NULL), ('tur', '33', 'Mersin', NULL, NULL), ('tur', '34', 'Ýstanbul', NULL, NULL), ('tur', '35', 'Ýzmir', NULL, NULL), ('tur', '36', 'Kars', NULL, NULL), ('tur', '37', 'Kastamonu', NULL, NULL), ('tur', '38', 'Kayseri', NULL, NULL), ('tur', '39', 'Kýrklareli', NULL, NULL), ('tur', '40', 'Kýrþehir', NULL, NULL), ('tur', '41', 'Kocaeli', NULL, NULL), ('tur', '42', 'Konya', NULL, NULL), ('tur', '43', 'Kütahya', NULL, NULL), ('tur', '44', 'Malatya', NULL, NULL), ('tur', '45', 'Manisa', NULL, NULL), ('tur', '46', 'Kahramanmaraþ', NULL, NULL), ('tur', '47', 'Mardin', NULL, NULL), ('tur', '48', 'Muðla', NULL, NULL), ('tur', '49', 'Muþ', NULL, NULL), ('tur', '50', 'Nevþehir', NULL, NULL), ('tur', '51', 'Niðde', NULL, NULL), ('tur', '52', 'Ordu', NULL, NULL), ('tur', '53', 'Rize', NULL, NULL), ('tur', '54', 'Sakarya', NULL, NULL), ('tur', '55', 'Samsun', NULL, NULL), ('tur', '56', 'Siirt', NULL, NULL), ('tur', '57', 'Sinop', NULL, NULL), ('tur', '58', 'Sivas', NULL, NULL), ('tur', '59', 'Tekirdað', NULL, NULL), ('tur', '60', 'Tokat', NULL, NULL), ('tur', '61', 'Trabzon', NULL, NULL), ('tur', '62', 'Tunceli', NULL, NULL), ('tur', '63', 'Þanlýurfa', NULL, NULL), ('tur', '64', 'Uþak', NULL, NULL), ('tur', '65', 'Van', NULL, NULL), ('tur', '66', 'Yozgat', NULL, NULL), ('tur', '67', 'Zonguldak', NULL, NULL), ('tur', '68', 'Aksaray', NULL, NULL), ('tur', '69', 'Bayburt', NULL, NULL), ('tur', '70', 'Karaman', NULL, NULL), ('tur', '71', 'Kýrýkkale', NULL, NULL), ('tur', '72', 'Batman', NULL, NULL), ('tur', '73', 'Þýrnak', NULL, NULL), ('tur', '74', 'Bartýn', NULL, NULL), ('tur', '75', 'Ardahan', NULL, NULL), ('tur', '76', 'Iðdýr', NULL, NULL), ('tur', '77', 'Yalova', NULL, NULL), ('tur', '78', 'Karabük', NULL, NULL), ('tur', '79', 'Kilis', NULL, NULL), ('tur', '80', 'Osmaniye', NULL, NULL), ('tur', '81', 'Düzce', NULL, NULL), ('gbr', 'AB', 'Aberdeen', NULL, NULL), ('gbr', 'AL', 'St Albans', NULL, NULL), ('gbr', 'B', 'Birmingham', NULL, NULL), ('gbr', 'BA', 'Bath', NULL, NULL), ('gbr', 'BB', 'Blackburn', NULL, NULL), ('gbr', 'BD', 'Bradford', NULL, NULL), ('gbr', 'BH', 'Bournemouth', NULL, NULL), ('gbr', 'BL', 'Bolton', NULL, NULL), ('gbr', 'BN', 'Brighton', NULL, NULL), ('gbr', 'BR', 'Bromley', NULL, NULL), ('gbr', 'BS', 'Bristol', NULL, NULL), ('gbr', 'BT', 'Northern Ireland', NULL, NULL), ('gbr', 'CA', 'Carlisle', NULL, NULL), ('gbr', 'CB', 'Cambridge', NULL, NULL), ('gbr', 'CF', 'Cardiff', NULL, NULL), ('gbr', 'CH', 'Chester', NULL, NULL), ('gbr', 'CM', 'Chelmsford', NULL, NULL), ('gbr', 'CO', 'Colchester', NULL, NULL), ('gbr', 'CR', 'Croydon', NULL, NULL), ('gbr', 'CT', 'Canterbury', NULL, NULL), ('gbr', 'CV', 'Coventry', NULL, NULL), ('gbr', 'CW', 'Crewe', NULL, NULL), ('gbr', 'DA', 'Dartford', NULL, NULL), ('gbr', 'DD', 'Dundee', NULL, NULL), ('gbr', 'DE', 'Derby', NULL, NULL), ('gbr', 'DG', 'Dumfries', NULL, NULL), ('gbr', 'DH', 'Durham', NULL, NULL), ('gbr', 'DL', 'Darlington', NULL, NULL), ('gbr', 'DN', 'Doncaster', NULL, NULL), ('gbr', 'DT', 'Dorchester', NULL, NULL), ('gbr', 'DY', 'Dudley', NULL, NULL), ('gbr', 'E', 'London E', NULL, NULL), ('gbr', 'EC', 'London EC', NULL, NULL), ('gbr', 'EH', 'Edinburgh', NULL, NULL), ('gbr', 'EN', 'Enfield', NULL, NULL), ('gbr', 'EX', 'Exeter', NULL, NULL), ('gbr', 'FK', 'Falkirk', NULL, NULL), ('gbr', 'FY', 'Blackpool', NULL, NULL), ('gbr', 'G', 'Glasgow', NULL, NULL), ('gbr', 'GL', 'Gloucester', NULL, NULL), ('gbr', 'GU', 'Guildford', NULL, NULL), ('gbr', 'GY', 'Guernsey', NULL, NULL), ('gbr', 'HA', 'Harrow', NULL, NULL), ('gbr', 'HD', 'Huddersfield', NULL, NULL), ('gbr', 'HG', 'Harrogate', NULL, NULL), ('gbr', 'HP', 'Hemel Hempstead', NULL, NULL), ('gbr', 'HR', 'Hereford', NULL, NULL), ('gbr', 'HS', 'Outer Hebrides', NULL, NULL), ('gbr', 'HU', 'Hull', NULL, NULL), ('gbr', 'HX', 'Halifax', NULL, NULL), ('gbr', 'IC', 'Channel Islands', NULL, NULL), ('gbr', 'IG', 'Ilford', NULL, NULL), ('gbr', 'IM', 'Isle of Man', NULL, NULL), ('gbr', 'IP', 'Ipswich', NULL, NULL), ('gbr', 'IV', 'Inverness', NULL, NULL), ('gbr', 'JE', 'Jersey', NULL, NULL), ('gbr', 'KA', 'Kilmarnock', NULL, NULL), ('gbr', 'KT', 'Kingston upon Thames', NULL, NULL), ('gbr', 'KW', 'Kirkwall', NULL, NULL), ('gbr', 'KY', 'Kirkcaldy', NULL, NULL), ('gbr', 'L', 'Liverpool', NULL, NULL), ('gbr', 'LA', 'Lancaster', NULL, NULL), ('gbr', 'LD', 'Llandrindod Wells', NULL, NULL), ('gbr', 'LE', 'Leicester', NULL, NULL), ('gbr', 'LL', 'Llandudno', NULL, NULL), ('gbr', 'LN', 'Lincoln', NULL, NULL), ('gbr', 'LS', 'Leeds', NULL, NULL), ('gbr', 'LU', 'Luton', NULL, NULL), ('gbr', 'M', 'Manchester', NULL, NULL), ('gbr', 'ME', 'Medway', NULL, NULL), ('gbr', 'MK', 'Milton Keynes', NULL, NULL), ('gbr', 'ML', 'Motherwell', NULL, NULL), ('gbr', 'N', 'London N', NULL, NULL), ('gbr', 'NE', 'Newcastle upon Tyne', NULL, NULL), ('gbr', 'NG', 'Nottingham', NULL, NULL), ('gbr', 'NN', 'Northampton', NULL, NULL), ('gbr', 'NP', 'Newport', NULL, NULL), ('gbr', 'NR', 'Norwich', NULL, NULL), ('gbr', 'NW', 'London NW', NULL, NULL), ('gbr', 'OL', 'Oldham', NULL, NULL), ('gbr', 'OX', 'Oxford', NULL, NULL), ('gbr', 'PA', 'Paisley', NULL, NULL), ('gbr', 'PE', 'Peterborough', NULL, NULL), ('gbr', 'PH', 'Perth', NULL, NULL), ('gbr', 'PL', 'Plymouth', NULL, NULL), ('gbr', 'PO', 'Portsmouth', NULL, NULL), ('gbr', 'PR', 'Preston', NULL, NULL), ('gbr', 'RG', 'Reading', NULL, NULL), ('gbr', 'RH', 'Redhill', NULL, NULL), ('gbr', 'RM', 'Romford', NULL, NULL), ('gbr', 'S', 'Sheffield', NULL, NULL), ('gbr', 'SA', 'Swansea', NULL, NULL), ('gbr', 'SE', 'London SE', NULL, NULL), ('gbr', 'SG', 'Stevenage', NULL, NULL), ('gbr', 'SK', 'Stockport', NULL, NULL), ('gbr', 'SL', 'Slough', NULL, NULL), ('gbr', 'SM', 'Sutton', NULL, NULL), ('gbr', 'SN', 'Swindon', NULL, NULL), ('gbr', 'SO', 'Southampton', NULL, NULL), ('gbr', 'SP', 'Salisbury', NULL, NULL), ('gbr', 'SR', 'Sunderland', NULL, NULL), ('gbr', 'SS', 'Southend-on-Sea', NULL, NULL), ('gbr', 'ST', 'Stoke-on-Trent', NULL, NULL), ('gbr', 'SW', 'London SW', NULL, NULL), ('gbr', 'SY', 'Shrewsbury', NULL, NULL), ('gbr', 'TA', 'Taunton', NULL, NULL), ('gbr', 'TD', 'Galashiels', NULL, NULL), ('gbr', 'TF', 'Telford', NULL, NULL), ('gbr', 'TN', 'Tonbridge', NULL, NULL), ('gbr', 'TQ', 'Torquay', NULL, NULL), ('gbr', 'TR', 'Truro', NULL, NULL), ('gbr', 'TS', 'Cleveland', NULL, NULL), ('gbr', 'TW', 'Twickenham', NULL, NULL), ('gbr', 'UB', 'Southall', NULL, NULL), ('gbr', 'W', 'London W', NULL, NULL), ('gbr', 'WA', 'Warrington', NULL, NULL), ('gbr', 'WC', 'London WC', NULL, NULL), ('gbr', 'WD', 'Watford', NULL, NULL), ('gbr', 'WF', 'Wakefield', NULL, NULL), ('gbr', 'WN', 'Wigan', NULL, NULL), ('gbr', 'WR', 'Worcester', NULL, NULL), ('gbr', 'WS', 'Walsall', NULL, NULL), ('gbr', 'WV', 'Wolverhampton', NULL, NULL), ('gbr', 'YO', 'York', NULL, NULL), ('gbr', 'ZE', 'Lerwick', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `wa_transaction` -- CREATE TABLE `wa_transaction` ( `id` int(11) NOT NULL AUTO_INCREMENT, `plugin` varchar(50) NOT NULL, `app_id` varchar(50) NOT NULL, `merchant_id` varchar(50) DEFAULT NULL, `native_id` varchar(255) NOT NULL, `create_datetime` datetime NOT NULL, `update_datetime` datetime NOT NULL, `type` varchar(20) NOT NULL, `parent_id` int(11) DEFAULT NULL, `order_id` varchar(50) DEFAULT NULL, `part_number` int(11) NOT NULL DEFAULT '0', `customer_id` varchar(50) DEFAULT NULL, `result` varchar(20) NOT NULL, `error` varchar(255) DEFAULT NULL, `state` varchar(20) DEFAULT NULL, `view_data` text, `amount` decimal(20,8) NOT NULL DEFAULT '0.00000000', `currency_id` varchar(3) DEFAULT NULL, PRIMARY KEY (`id`), KEY `plugin` (`plugin`), KEY `app_id` (`app_id`), KEY `merchant_id` (`merchant_id`), KEY `transaction_native_id` (`native_id`), KEY `parent_id` (`parent_id`), KEY `order_id` (`order_id`), KEY `customer_id` (`customer_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_transaction_data` -- CREATE TABLE `wa_transaction_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `transaction_id` int(11) NOT NULL, `field_id` varchar(50) NOT NULL, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `transaction_id` (`transaction_id`), KEY `field_id` (`field_id`), KEY `value` (`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_user_groups` -- CREATE TABLE `wa_user_groups` ( `contact_id` int(11) NOT NULL, `group_id` int(11) NOT NULL, `datetime` datetime DEFAULT NULL, PRIMARY KEY (`contact_id`,`group_id`), KEY `group_id` (`group_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_user_groups` -- INSERT INTO `wa_user_groups` VALUES (1, 2, '[[regtime]]'), (1, 1, '[[regtime]]'); -- -------------------------------------------------------- -- -- Table structure for table `wa_verification_channel` -- CREATE TABLE `wa_verification_channel` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `address` varchar(64) NOT NULL, `type` varchar(64) NOT NULL, `create_datetime` datetime DEFAULT NULL, `system` int(3) NOT NULL, PRIMARY KEY (`id`), KEY `address` (`address`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Dumping data for table `wa_verification_channel` -- INSERT INTO `wa_verification_channel` VALUES (1, 'System templates', '*', 'sms', '[[regtime]]', 0), (2, 'System templates', '[[admin_email]]', 'email', '[[regtime]]', 1); -- -------------------------------------------------------- -- -- Table structure for table `wa_verification_channel_assets` -- CREATE TABLE `wa_verification_channel_assets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `channel_id` int(11) NOT NULL, `address` varchar(64) NOT NULL, `contact_id` int(11) NOT NULL DEFAULT '0', `name` varchar(64) NOT NULL, `value` text, `expires` datetime DEFAULT NULL, `tries` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `channel_address_name` (`channel_id`,`address`,`contact_id`,`name`), KEY `name` (`name`), KEY `expires` (`expires`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `wa_verification_channel_params` -- CREATE TABLE `wa_verification_channel_params` ( `channel_id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `value` text, PRIMARY KEY (`channel_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Table structure for table `wa_widget` -- CREATE TABLE `wa_widget` ( `id` int(11) NOT NULL AUTO_INCREMENT, `widget` varchar(32) NOT NULL, `name` varchar(255) NOT NULL, `contact_id` int(11) NOT NULL, `dashboard_id` int(11) DEFAULT NULL, `create_datetime` datetime NOT NULL, `app_id` varchar(32) NOT NULL, `block` int(11) NOT NULL, `sort` int(11) NOT NULL, `size` char(3) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; -- -- Dumping data for table `wa_widget` -- INSERT INTO `wa_widget` VALUES (1, 'news', 'News', 1, NULL, '[[regtime]]', 'webasyst', 0, 0, '2x2'), (2, 'news', 'News', 1, NULL, '[[regtime]]', 'webasyst', 1, 0, '2x2'), (3, 'clock', 'Clock', 1, NULL, '[[regtime]]', 'webasyst', 2, 0, '2x1'), (4, 'clock', 'Clock', 1, NULL, '[[regtime]]', 'webasyst', 2, 1, '1x1'), (5, 'clock', 'Clock', 1, NULL, '[[regtime]]', 'webasyst', 2, 2, '1x1'), (6, 'news', 'News', 1, NULL, '[[regtime]]', 'webasyst', 3, 0, '2x2'), (7, 'weather', 'Weather', 1, NULL, '[[regtime]]', 'webasyst', 4, 0, '2x2'), (8, 'news', 'News', 1, NULL, '[[regtime]]', 'webasyst', 5, 0, '2x2'); -- -------------------------------------------------------- -- -- Table structure for table `wa_widget_params` -- CREATE TABLE `wa_widget_params` ( `widget_id` int(11) NOT NULL, `name` varchar(32) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`widget_id`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `wa_widget_params` -- INSERT INTO `wa_widget_params` VALUES (1, 'rss_feed', 'http://rss.nytimes.com/services/xml/rss/nyt/InternationalHome.xml'), (2, 'rss_feed', 'http://feeds.washingtonpost.com/rss/world'), (3, 'source', 'local'), (3, 'type', 'round'), (4, 'source', '-4'), (4, 'town', 'New York'), (4, 'type', 'round'), (5, 'source', '1'), (5, 'town', 'London'), (5, 'type', 'round'), (6, 'rss_feed', 'custom'), (6, 'custom_rss_feed', 'http://feeds.feedburner.com/webasystcom'), (7, 'city', 'New York'), (7, 'unit', 'F'), (8, 'rss_feed', 'http://www.theguardian.com/world/rss'), (7, 'weathers', '{"2026-02-17 05":{"New York":{"coord":{"lon":-74.006000000000000227373675443232059478759765625,"lat":40.71430000000000148929757415316998958587646484375},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"base":"stations","main":{"temp":34.27000000000000312638803734444081783294677734375,"feels_like":27.57000000000000028421709430404007434844970703125,"temp_min":31.260000000000001563194018672220408916473388671875,"temp_max":35.5499999999999971578290569595992565155029296875,"pressure":1021,"humidity":80,"sea_level":1021,"grnd_level":1020},"visibility":10000,"wind":{"speed":8.050000000000000710542735760100185871124267578125,"deg":200},"clouds":{"all":75},"dt":1771306768,"sys":{"type":1,"id":4610,"country":"US","sunrise":1771328853,"sunset":1771367567},"timezone":-18000,"id":5128581,"name":"New York","cod":200}}}'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; Save