· 8 years ago · Jan 04, 2018, 05:54 PM
1
2DROP TABLE IF EXISTS `oc_store`;
3/*!40101 SET @saved_cs_client = @@character_set_client */;
4/*!40101 SET character_set_client = utf8 */;
5CREATE TABLE `oc_store` (
6 `store_id` int(11) NOT NULL AUTO_INCREMENT,
7 `name` varchar(64) NOT NULL,
8 `url` varchar(255) NOT NULL,
9 `ssl` varchar(255) NOT NULL,
10 PRIMARY KEY (`store_id`)
11) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
12/*!40101 SET character_set_client = @saved_cs_client */;
13
14--
15-- Dumping data for table `oc_store`
16--
17
18LOCK TABLES `oc_store` WRITE;
19/*!40000 ALTER TABLE `oc_store` DISABLE KEYS */;
20/*!40000 ALTER TABLE `oc_store` ENABLE KEYS */;
21UNLOCK TABLES;
22
23----------------------------------------------------------------------------------
24// Settings
25$query = $db->query("SELECT * FROM `" . DB_PREFIX . "setting` WHERE store_id = '0' OR store_id = '" . (int)$config->get('config_store_id') . "' ORDER BY store_id ASC");
26
27foreach ($query->rows as $result) {
28 if (!$result['serialized']) {
29 $config->set($result['key'], $result['value']);
30 } else {
31 $config->set($result['key'], unserialize($result['value']));
32 }
33}
34
35if (!$store_query->num_rows) {
36 $config->set('config_url', HTTP_SERVER);
37 $config->set('config_ssl', HTTPS_SERVER);
38}