-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathOpenCart.operations
executable file
·51 lines (42 loc) · 3.67 KB
/
OpenCart.operations
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
Command:
mysqldump --complete-insert --extended-insert=false -uroot -proot opencart > opencart.sql
<action>
mysqldump --complete-insert --extended-insert=false -uroot -proot opencart > opencart2.sql
diff opencart.sql opencart2.sql > opencart.diff
<compare>
rm opencart*
OpenCart:
*/
-- Add category
-- Input data: name=New category
-- Result:
INSERT INTO `oc_category` (`category_id`, `image`, `parent_id`, `top`, `column`, `sort_order`, `status`, `date_added`, `date_modified`) VALUES (62,'',0,0,1,0,1,'2014-04-24 05:17:06','2014-04-24 05:17:06');
INSERT INTO `oc_category_description` (`category_id`, `language_id`, `name`, `description`, `meta_description`, `meta_keyword`) VALUES (62,1,'New category','','','');
INSERT INTO `oc_category_path` (`category_id`, `path_id`, `level`) VALUES (62,62,0);
INSERT INTO `oc_category_to_store` (`category_id`, `store_id`) VALUES (62,0);
-- Add sub-category
-- Input data: name=new one
-- Result:
INSERT INTO `oc_category` (`category_id`, `image`, `parent_id`, `top`, `column`, `sort_order`, `status`, `date_added`, `date_modified`) VALUES (63,'',61,0,1,0,1,'2014-04-24 05:20:03','2014-04-24 05:20:03');
INSERT INTO `oc_category_description` (`category_id`, `language_id`, `name`, `description`, `meta_description`, `meta_keyword`) VALUES (63,1,'new one','','','');
INSERT INTO `oc_category_path` (`category_id`, `path_id`, `level`) VALUES (63,61,0);
INSERT INTO `oc_category_path` (`category_id`, `path_id`, `level`) VALUES (63,63,1);
INSERT INTO `oc_category_to_store` (`category_id`, `store_id`) VALUES (63,0);
-- Add product ( with tree additional images )
-- Input data: name=test product, model=first model,
--
INSERT INTO `oc_product` (`product_id`, `model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `quantity`, `stock_status_id`, `image`, `manufacturer_id`, `shipping`, `price`, `points`, `tax_class_id`, `date_available`, `weight`, `weight_class_id`, `length`, `width`, `height`, `length_class_id`, `subtract`, `minimum`, `sort_order`, `status`, `date_added`, `date_modified`, `viewed`) VALUES (50,'first model','','','','','','','',1,5,'data/demo/canon_logo.jpg',0,1,20.0500,0,0,'2014-04-23',0.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,1,1,'2014-04-24 05:39:53','0000-00-00 00:00:00',0);
INSERT INTO `oc_product_description` (`product_id`, `language_id`, `name`, `description`, `meta_description`, `meta_keyword`, `tag`) VALUES (50,1,'test product','','','','');
INSERT INTO `oc_product_image` (`product_image_id`, `product_id`, `image`, `sort_order`) VALUES (2352,50,'data/demo/cart.png',0);
INSERT INTO `oc_product_image` (`product_image_id`, `product_id`, `image`, `sort_order`) VALUES (2353,50,'data/demo/htc_logo.jpg',0);
INSERT INTO `oc_product_reward` (`product_reward_id`, `product_id`, `customer_group_id`, `points`) VALUES (546,50,1,0);
INSERT INTO `oc_product_to_store` (`product_id`, `store_id`) VALUES (50,0);
-- Change item number
INSERT INTO `oc_product` (`product_id`, `model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `quantity`, `stock_status_id`, `image`, `manufacturer_id`, `shipping`, `price`, `points`, `tax_class_id`, `date_available`, `weight`, `weight_class_id`, `length`, `width`, `height`, `length_class_id`, `subtract`, `minimum`, `sort_order`, `status`, `date_added`, `date_modified`, `viewed`) VALUES (50,'first model','','','','','','','',25,5,'data/demo/canon_logo.jpg',0,1,20.0500,0,0,'2014-04-23',0.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,1,1,'2014-04-24 05:39:53','2014-04-24 05:48:19',0);
-- Remove category
-- ( just don't insert category )
-- Remove item
-- ( just don't insert product )
-- product to category
INSERT INTO `oc_product_to_category` (`product_id`, `category_id`) VALUES (50,61);