From 463485509ed840b098eadcff65d4ca79e3e78a4a Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Thu, 2 Sep 2021 11:19:20 +0300 Subject: [PATCH] update CI matrix (#239) --- .env-dist | 2 +- .github/workflows/ci.yml | 181 ++++++++----------- Makefile | 8 +- composer.json | 5 +- tests/2.3/TestCase.php | 54 ------ tests/{3.0 => 3}/TestCase.php | 0 tests/RoboFile.php | 76 ++++++-- tests/admin/ModelRetailcrmEventAdminTest.php | 7 +- tests/opencart_sample_data.sql | 58 ------ 9 files changed, 141 insertions(+), 250 deletions(-) delete mode 100644 tests/2.3/TestCase.php rename tests/{3.0 => 3}/TestCase.php (100%) delete mode 100644 tests/opencart_sample_data.sql diff --git a/.env-dist b/.env-dist index ab49aff..1739b90 100644 --- a/.env-dist +++ b/.env-dist @@ -14,5 +14,5 @@ OC_EMAIL=you@example.com SERVER_PORT=8080 SERVER_URL=http://localhost -TEST_SUITE=3.0 +TEST_SUITE=3 OPENCART=3.0.2.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a51243d..9a7c7a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,133 +26,96 @@ jobs: strategy: matrix: include: - - php-version: '7.0' - test-suite: '2.3' - oc: '2.3.0.0' - coverage: 1 - - php-version: '7.0' - test-suite: '2.3' - oc: '2.3.0.1' - - php-version: '7.0' - test-suite: '2.3' - oc: '2.3.0.2' - - php-version: '7.1' - test-suite: '2.3' - oc: '2.3.0.0' - - php-version: '7.1' - test-suite: '2.3' - oc: '2.3.0.1' - - php-version: '7.1' - test-suite: '2.3' - oc: '2.3.0.2' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.0.0' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.0.2' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.1.0' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.1.1' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.1.2' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.2.0' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.3.0' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.3.1' - - php-version: '7.0' - test-suite: '3.0' - oc: '3.0.3.2' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.0.0' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.0.2' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.1.0' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.1.1' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.1.2' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.2.0' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.3.0' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.3.1' - - php-version: '7.1' - test-suite: '3.0' - oc: '3.0.3.2' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.0.0' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.0.2' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.1.0' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.1.1' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.1.2' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.2.0' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.3.0' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.3.1' - - php-version: '7.2' - test-suite: '3.0' - oc: '3.0.3.2' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.0.0' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.0.2' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.1.0' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.1.1' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.1.2' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.2.0' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.3.0' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.3.1' - php-version: '7.3' - test-suite: '3.0' + test-suite: '3' oc: '3.0.3.2' + - php-version: '7.3' + test-suite: '3' + oc: '3.0.3.3' + - php-version: '7.3' + test-suite: '3' + oc: '3.0.3.4' + - php-version: '7.3' + test-suite: '3' + oc: '3.0.3.5' + - php-version: '7.3' + test-suite: '3' + oc: '3.0.3.6' + - php-version: '7.3' + test-suite: '3' + oc: '3.0.3.7' + - php-version: '7.3' + test-suite: '3' + oc: '3.0.3.8' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.0.0' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.0.2' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.1.0' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.1.1' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.1.2' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.2.0' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.0' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.1' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.2' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.3' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.4' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.5' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.6' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.7' + - php-version: '7.4' + test-suite: '3' + oc: '3.0.3.8' services: mysql: image: mysql:5.7 diff --git a/Makefile b/Makefile index 80d7a86..664aa44 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,8 @@ delete_archive: before_script: mkdir coverage - composer require --dev beyondit/opencart-test-suite ~$(TEST_SUITE) - composer require --dev opencart/opencart $(OPENCART) - composer setup + composer require --dev beyondit/opencart-test-suite:~$(TEST_SUITE) + composer opencart:install bin/robo --load-from tests/RoboFile.php project:deploy (php -S localhost:80 -t www &) 2> /dev/null > /dev/null sleep 2 @@ -32,8 +31,7 @@ robo_deploy: run: composer require --dev beyondit/opencart-test-suite ~$(TEST_SUITE) - composer require --dev opencart/opencart $(OPENCART) - composer setup + composer opencart:install bin/robo --load-from tests/RoboFile.php project:deploy run_test: run diff --git a/composer.json b/composer.json index efbb36e..84bc6a5 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "@test-catalog", "@test-system" ], - "setup" : "bin/robo --load-from tests/RoboFile.php opencart:setup" + "opencart:install" : "bin/robo --load-from tests/RoboFile.php opencart:install" }, "require": { "ext-json": "*" @@ -33,7 +33,6 @@ "require-dev": { "consolidation/robo": "~1.0", "phpcompatibility/php-compatibility": "^9.3", - "beyondit/opencart-test-suite": "~3.0", - "opencart/opencart": "^3.0" + "beyondit/opencart-test-suite": "~3.0" } } diff --git a/tests/2.3/TestCase.php b/tests/2.3/TestCase.php deleted file mode 100644 index 2a378aa..0000000 --- a/tests/2.3/TestCase.php +++ /dev/null @@ -1,54 +0,0 @@ -load->library('retailcrm/retailcrm'); - - $this->setSetting( - $this->retailcrm->getModuleTitle(), - array( - $this->retailcrm->getModuleTitle() . '_apiversion' => 'v5', - $this->retailcrm->getModuleTitle() . '_order_number' => 1, - $this->retailcrm->getModuleTitle() . '_status' => array( - 1 => 'new' - ), - $this->retailcrm->getModuleTitle() . '_delivery' => array( - 'flat.flat' => 'flat' - ), - $this->retailcrm->getModuleTitle() . '_payment' => array( - 'cod' => 'cod' - ), - $this->retailcrm->getModuleTitle() . '_special_1' => 'special1', - $this->retailcrm->getModuleTitle() . '_special_2' => 'special2', - $this->retailcrm->getModuleTitle() . '_special_3' => 'special3', - $this->retailcrm->getModuleTitle() . '_collector' => array( - 'site_key' => 'RC-XXXXXXXXXX-X', - 'custom_form' => 1, - 'custom' => array( - 'name' => 'Name', - 'email' => 'Email', - 'phone' => 'Phone', - ), - 'form_capture' => 1, - 'period' => 1 - ) - ) - ); - } - - protected function setSetting($code, $data, $store_id = 0) { - $this->db->query("DELETE FROM `" . DB_PREFIX . "setting` WHERE store_id = '" . (int)$store_id . "' AND `code` = '" . $this->db->escape($code) . "'"); - - foreach ($data as $key => $value) { - if (substr($key, 0, strlen($code)) == $code) { - if (!is_array($value)) { - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '" . (int)$store_id . "', `code` = '" . $this->db->escape($code) . "', `key` = '" . $this->db->escape($key) . "', `value` = '" . $this->db->escape($value) . "'"); - } else { - $this->db->query("INSERT INTO " . DB_PREFIX . "setting SET store_id = '" . (int)$store_id . "', `code` = '" . $this->db->escape($code) . "', `key` = '" . $this->db->escape($key) . "', `value` = '" . $this->db->escape(json_encode($value, true)) . "', serialized = '1'"); - } - } - } - } -} diff --git a/tests/3.0/TestCase.php b/tests/3/TestCase.php similarity index 100% rename from tests/3.0/TestCase.php rename to tests/3/TestCase.php diff --git a/tests/RoboFile.php b/tests/RoboFile.php index 13c142c..4192faa 100644 --- a/tests/RoboFile.php +++ b/tests/RoboFile.php @@ -7,6 +7,16 @@ class RoboFile extends \Robo\Tasks use \Robo\Task\Development\loadTasks; use \Robo\Common\TaskIO; + const OPENCART_DOWNLOAD_URL = [ + '3.0.1.2' => 'https://github.com/opencart/opencart/releases/download/3.0.1.2/3.0.1.2-opencart.zip', + '3.0.2.0' => 'https://github.com/opencart/opencart/releases/download/3.0.2.0/3.0.2.0-OpenCart.zip', + '3.0.3.4' => 'https://github.com/opencart/opencart/releases/download/3.0.3.4/opencart-3.0.3.4-core-pre.zip' + ]; + + const OPENCART_ROOT_DIR = [ + '3.0.3.4' => 'opencart-3.0.3.4/upload' + ]; + /** * @var array */ @@ -67,19 +77,21 @@ class RoboFile extends \Robo\Tasks } } - public function opencartSetup() + public function opencartInstall() { - $startUp = getenv('TEST_SUITE') === '2.3' - ? 'catalog/controller/startup/test_startup.php' - : 'admin/controller/startup/test_startup.php'; - $startUpTo = getenv('TEST_SUITE') === '2.3' - ? 'catalog/controller/startup/test_startup.php' - : 'admin/controller/startup/test_startup.php'; + $startUp = 'admin/controller/startup/test_startup.php'; + $startUpTo = 'admin/controller/startup/test_startup.php'; + $version = getenv('OPENCART'); + $ocZip = sprintf('/tmp/opencart-%s.zip', $version); $this->taskDeleteDir($this->root_dir . 'www')->run(); + + file_put_contents($ocZip, file_get_contents($this->getOpencartDownloadUrl($version))); + + $this->_exec(sprintf('unzip %s -d /tmp/opencart', $ocZip)); $this->taskFileSystemStack() ->mirror( - $this->root_dir . 'vendor/opencart/opencart/upload', + $this->getOpencartRootDir($version), $this->root_dir . 'www' ) ->copy( @@ -93,13 +105,31 @@ class RoboFile extends \Robo\Tasks ->chmod($this->root_dir . 'www', 0777, 0000, true) ->run(); - if (getenv('TEST_SUITE') === '3.0') { + if (getenv('TEST_SUITE') === '3') { $this->taskFileSystemStack()->copy( $this->root_dir . 'vendor/beyondit/opencart-test-suite/src/upload/system/library/session/test.php', $this->root_dir . 'www/system/library/session/test.php' )->run(); } + // Openbay was removed in 3.0.3.6 + // Unfortunately, those configs from test suite still require it. + if ( + '3.0.3.4' === getenv('OPENCART') || + version_compare(getenv('OPENCART'), '3.0.3.6', '>=') + ) { + $testConfigFile = $this->root_dir . 'www/system/config/test-config.php'; + $testStartupFile = $this->root_dir . 'www/' . $startUpTo; + $testConfig = file_get_contents($testConfigFile); + $testStartup = file_get_contents($testStartupFile); + + $testConfig = str_ireplace("'openbay'", '', $testConfig); + $testStartup = str_ireplace('$this->registry->set(\'openbay\', new Openbay($this->registry));', '', $testStartup); + + file_put_contents($testConfigFile, $testConfig); + file_put_contents($testStartupFile, $testStartup); + } + // Create new database, drop if exists already try { $conn = new PDO("mysql:host=".$this->opencart_config['db_hostname'], $this->opencart_config['db_username'], $this->opencart_config['db_password']); @@ -192,13 +222,31 @@ EOF; $zip->close(); } + private function getOpencartDownloadUrl(string $version): string + { + if (version_compare($version, '3.0.1.1', '<=')) { + return sprintf('https://github.com/opencart/opencart/releases/download/%s/%s-compiled.zip', $version, $version); + } + + if (array_key_exists($version, self::OPENCART_DOWNLOAD_URL)) { + return self::OPENCART_DOWNLOAD_URL[$version]; + } + + return sprintf('https://github.com/opencart/opencart/releases/download/%s/opencart-%s.zip', $version, $version); + } + + private function getOpencartRootDir(string $version): string + { + if (array_key_exists($version, self::OPENCART_ROOT_DIR)) { + return '/tmp/opencart/' . self::OPENCART_ROOT_DIR[$version]; + } + + return '/tmp/opencart/upload'; + } + private function restoreSampleData($conn) { - if (getenv('TEST_SUITE') === '2.3') { - $sql = file_get_contents($this->root_dir . 'tests/opencart_sample_data.sql'); - } else { - $sql = file_get_contents($this->root_dir . 'tests/opencart_sample_data_3.sql'); - } + $sql = file_get_contents($this->root_dir . 'tests/opencart_sample_data_3.sql'); $conn->exec("USE " . $this->opencart_config['db_database']); diff --git a/tests/admin/ModelRetailcrmEventAdminTest.php b/tests/admin/ModelRetailcrmEventAdminTest.php index 4f65c18..8bd3b70 100644 --- a/tests/admin/ModelRetailcrmEventAdminTest.php +++ b/tests/admin/ModelRetailcrmEventAdminTest.php @@ -10,12 +10,7 @@ class ModelRetailcrmEventAdminTest extends TestCase { parent::setUp(); - if (getenv('TEST_SUITE') === '3.0') { - $eventModel = $this->loadModel('setting/event'); - } else { - $eventModel = $this->loadModel('extension/event'); - } - + $eventModel = $this->loadModel('setting/event'); $eventModel->addEvent(self::CODE, 'test', 'test'); } diff --git a/tests/opencart_sample_data.sql b/tests/opencart_sample_data.sql deleted file mode 100644 index 6285340..0000000 --- a/tests/opencart_sample_data.sql +++ /dev/null @@ -1,58 +0,0 @@ -TRUNCATE TABLE `oc_customer`; -INSERT INTO `oc_customer` (`customer_id`, `customer_group_id`, `store_id`, `language_id`, `firstname`, `lastname`, `email`, `telephone`, `fax`, `password`, `salt`, `cart`, `wishlist`, `newsletter`, `address_id`, `custom_field`, `ip`, `status`, `approved`, `safe`, `token`, `code`, `date_added`) VALUES ('1', '1', '0', '1', 'Test', 'Test', 'test@mail.ru', '+7 (000) 000-00-00', '', 'ed3798da75d6cdd695e99e87a60d587a10aa95ff', '51TalnrgH', '', '', '0', '1', '', '172.21.0.1', '1', '1', '0', '', '', '2018-06-07 13:50:08'); - -TRUNCATE TABLE `oc_address`; -INSERT INTO `oc_address` (`address_id`, `customer_id`, `firstname`, `lastname`, `company`, `address_1`, `address_2`, `city`, `postcode`, `country_id`, `zone_id`, `custom_field`) values (1, 1, 'Test', 'Test', '', 'Address 1', '', 'City', '111111', '176', '99', ''); - -TRUNCATE TABLE `oc_customer_activity`; -TRUNCATE TABLE `oc_customer_group`; -INSERT INTO `oc_customer_group` (`customer_group_id`, `approval`, `sort_order`) VALUES ('1', '0', '1'); -INSERT INTO `oc_customer_group` (`customer_group_id`, `approval`, `sort_order`) VALUES ('2', '0', '1'); -INSERT INTO `oc_customer_group` (`customer_group_id`, `approval`, `sort_order`) VALUES ('3', '0', '0'); - -TRUNCATE TABLE `oc_customer_group_description`; -INSERT INTO `oc_customer_group_description` (`customer_group_id`, `language_id`, `name`, `description`) VALUES ('1', '1', 'Default', 'test'); -INSERT INTO `oc_customer_group_description` (`customer_group_id`, `language_id`, `name`, `description`) VALUES ('2', '1', 'Test2', 'test2'); -INSERT INTO `oc_customer_group_description` (`customer_group_id`, `language_id`, `name`, `description`) VALUES ('3', '1', 'test3', 'test3'); - -TRUNCATE TABLE `oc_customer_history`; -TRUNCATE TABLE `oc_customer_ip`; -INSERT INTO `oc_customer_ip` (`customer_ip_id`, `customer_id`, `ip`, `date_added`) VALUES ('4', '1', '172.21.0.1', '2018-06-07 13:50:29'); - -TRUNCATE TABLE `oc_customer_login`; -TRUNCATE TABLE `oc_customer_online`; -TRUNCATE TABLE `oc_customer_reward`; -TRUNCATE TABLE `oc_customer_search`; -TRUNCATE TABLE `oc_customer_transaction`; -TRUNCATE TABLE `oc_customer_wishlist`; -TRUNCATE TABLE `oc_order`; - -INSERT INTO `oc_order` (`order_id`, `invoice_no`, `invoice_prefix`, `store_id`, `store_name`, `store_url`, `customer_id`, `customer_group_id`, `firstname`, `lastname`, `email`, `telephone`, `fax`, `custom_field`, `payment_firstname`, `payment_lastname`, `payment_company`, `payment_address_1`, `payment_address_2`, `payment_city`, `payment_postcode`, `payment_country`, `payment_country_id`, `payment_zone`, `payment_zone_id`, `payment_address_format`, `payment_custom_field`, `payment_method`, `payment_code`, `shipping_firstname`, `shipping_lastname`, `shipping_company`, `shipping_address_1`, `shipping_address_2`, `shipping_city`, `shipping_postcode`, `shipping_country`, `shipping_country_id`, `shipping_zone`, `shipping_zone_id`, `shipping_address_format`, `shipping_custom_field`, `shipping_method`, `shipping_code`, `comment`, `total`, `order_status_id`, `affiliate_id`, `commission`, `marketing_id`, `tracking`, `language_id`, `currency_id`, `currency_code`, `currency_value`, `ip`, `forwarded_ip`, `user_agent`, `accept_language`, `date_added`, `date_modified`) VALUES ('1', '0', 'INV-2016-00', '0', 'Opencart', 'http://localhost:8000/', '1', '1', 'Test', 'Test', 'test@mail.ru', '+7 (000) 000-00-00', '', '', 'Test', 'Test', '', 'Address', 'Address 2', 'Test', '111111', 'Russian Federation', '176', 'Rostov-na-Donu', '99', '', '[]', 'Cash on delivery', 'cod', 'Test', 'Test', '', 'Address', 'Address 2', 'Test', '111111', 'Russian Federation', '176', 'Rostov-na-Donu', '99', '', '[]', 'Flat Rate', 'flat.flat', 'test comment', '106.0000', '1', '0', '0.0000', '0', '', '1', '1', 'USD', '1.00000000', '172.21.0.1', '', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36', 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7', '2018-06-07 13:51:10', '2018-06-07 13:51:23'); -INSERT INTO `oc_order` (`order_id`, `invoice_no`, `invoice_prefix`, `store_id`, `store_name`, `store_url`, `customer_id`, `customer_group_id`, `firstname`, `lastname`, `email`, `telephone`, `fax`, `custom_field`, `payment_firstname`, `payment_lastname`, `payment_company`, `payment_address_1`, `payment_address_2`, `payment_city`, `payment_postcode`, `payment_country`, `payment_country_id`, `payment_zone`, `payment_zone_id`, `payment_address_format`, `payment_custom_field`, `payment_method`, `payment_code`, `shipping_firstname`, `shipping_lastname`, `shipping_company`, `shipping_address_1`, `shipping_address_2`, `shipping_city`, `shipping_postcode`, `shipping_country`, `shipping_country_id`, `shipping_zone`, `shipping_zone_id`, `shipping_address_format`, `shipping_custom_field`, `shipping_method`, `shipping_code`, `comment`, `total`, `order_status_id`, `affiliate_id`, `commission`, `marketing_id`, `tracking`, `language_id`, `currency_id`, `currency_code`, `currency_value`, `ip`, `forwarded_ip`, `user_agent`, `accept_language`, `date_added`, `date_modified`) VALUES ('2', '0', 'INV-2016-00', '0', 'Opencart', 'http://localhost:8000/', '0', '1', 'Test', 'Test', 'test@mail.ru', '+7 (000) 000-00-00', '', '[]', 'Test', 'Test', '', 'Address', 'Address 2', 'Test', '111111', 'Russian Federation', '176', 'Rostov-na-Donu', '99', '', '[]', 'Cash on delivery', 'cod', 'Test', 'Test', '', 'Address', 'Address 2', 'Test', '111111', 'Russian Federation', '176', 'Rostov-na-Donu', '99', '', '[]', 'Flat Rate', 'flat.flat', 'test comment', '85.0000', '1', '0', '0.0000', '0', '', '1', '1', 'USD', '1.00000000', '172.21.0.1', '', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36', 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7', '2018-06-07 13:53:50', '2018-06-07 13:54:00'); - -TRUNCATE TABLE `oc_order_history`; -INSERT INTO `oc_order_history` (`order_history_id`, `order_id`, `order_status_id`, `notify`, `comment`, `date_added`) VALUES ('19', '2', '1', '0', '', '2018-06-07 13:54:00'); -INSERT INTO `oc_order_history` (`order_history_id`, `order_id`, `order_status_id`, `notify`, `comment`, `date_added`) VALUES ('18', '1', '1', '0', '', '2018-06-07 13:51:23'); - -TRUNCATE TABLE `oc_order_option`; - -INSERT INTO `oc_order_option` (`order_option_id`, `order_id`, `order_product_id`, `product_option_id`, `product_option_value_id`, `name`, `value`, `type`) VALUES ('15', '2', '55', '226', '15', 'Select', 'Red', 'select'); - -TRUNCATE TABLE `oc_order_product`; -INSERT INTO `oc_order_product` (`order_product_id`, `order_id`, `product_id`, `name`, `model`, `quantity`, `price`, `total`, `tax`, `reward`) VALUES ('54', '1', '40', 'iPhone', 'product 11', '1', '101.0000', '101.0000', '18.0000', '20'); -INSERT INTO `oc_order_product` (`order_product_id`, `order_id`, `product_id`, `name`, `model`, `quantity`, `price`, `total`, `tax`, `reward`) VALUES ('55', '2', '30', 'Canon EOS 5D', 'Product 3', '1', '80.0000', '80.0000', '18.0000', '200'); - -TRUNCATE TABLE `oc_order_recurring`; -TRUNCATE TABLE `oc_order_recurring_transaction`; -TRUNCATE TABLE `oc_order_total`; - -INSERT INTO `oc_order_total` (`order_total_id`, `order_id`, `code`, `title`, `value`, `sort_order`) VALUES ('162', '1', 'shipping', 'Flat Rate', '5.0000', '3'); -INSERT INTO `oc_order_total` (`order_total_id`, `order_id`, `code`, `title`, `value`, `sort_order`) VALUES ('161', '1', 'sub_total', 'Sub-Total', '101.0000', '1'); -INSERT INTO `oc_order_total` (`order_total_id`, `order_id`, `code`, `title`, `value`, `sort_order`) VALUES ('164', '2', 'sub_total', 'Sub-Total', '80.0000', '1'); -INSERT INTO `oc_order_total` (`order_total_id`, `order_id`, `code`, `title`, `value`, `sort_order`) VALUES ('165', '2', 'shipping', 'Flat Rate', '5.0000', '3'); -INSERT INTO `oc_order_total` (`order_total_id`, `order_id`, `code`, `title`, `value`, `sort_order`) VALUES ('163', '1', 'total', 'Total', '106.0000', '9'); -INSERT INTO `oc_order_total` (`order_total_id`, `order_id`, `code`, `title`, `value`, `sort_order`) VALUES ('166', '2', 'total', 'Total', '85.0000', '9'); -INSERT INTO `oc_product_special` (`product_id`, `customer_group_id`, `priority`, `price`,`date_start`, `date_end`) values ('42', '2', '1', '110.000', CURDATE(), ADDDATE(CURDATE(),INTERVAL 10 DAY)); -INSERT INTO `oc_product_special` (`product_id`, `customer_group_id`, `priority`, `price`,`date_start`, `date_end`) values ('40', '1', '1', '50.000', CURDATE(), ADDDATE(CURDATE(),INTERVAL 10 DAY)); - -TRUNCATE TABLE `oc_order_voucher`;