Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Added old price and subscription_onetime columns

givanz5b8125662c3a
diff --git a/install/sql/insert/product/product.sql b/install/sql/insert/product/product.sql
index 8c96af5..20cf35b 100755
--- a/install/sql/insert/product/product.sql
+++ b/install/sql/insert/product/product.sql
@@ -1,21 +1,21 @@
-INSERT INTO `product` (`model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `stock_quantity`, `stock_status_id`, `image`, `manufacturer_id`, `vendor_id`, `requires_shipping`, `price`, `points`, `tax_type_id`, `date_available`, `weight`, `weight_type_id`, `length`, `width`, `height`, `length_type_id`, `subtract_stock`, `minimum_quantity`, `sort_order`, `status`, `type`, `template`, `views`, `created_at`, `updated_at`) VALUES
-('Product 1','','','','','','','',939,7,'product/1-1.jpg',1,1,1,99.0000,200,1,'2023-05-01',146.40000000,2,0.00000000,0.00000000,0.00000000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 2','','','','','','','',999,6,'product/2-1.jpg',2,1,1,279.9900,0,1,'2023-05-01',133.00000000,2,0.00000000,0.00000000,0.00000000,3,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 3','','','','','','','',7,6,'product/3-1.jpg',3,1,1,100.0000,0,1,'2023-05-01',0.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 4','','','','','','','',1000,6,'product/4-1.jpg',0,1,1,80.0000,0,1,'2023-05-01',0.00000000,1,0.00000000,0.00000000,0.00000000,3,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 5','','','','','','','',999,6,'product/5-1.jpg',4,1,1,100.0000,0,1,'2023-05-01',5.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 6','','','','','','','',1000,6,'product/6-1.jpg',0,1,1,200.0000,0,1,'2023-05-01',5.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 7','','','','','','','',1000,6,'product/7-1.jpg',1,1,1,100.0000,0,1,'2023-05-01',5.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 8','','','','','','','',1000,5,'product/8-1.jpg',0,0,1,100.0000,0,1,'2023-05-01',5.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 9','','','','','','','',994,6,'product/9-1.jpg',2,0,1,100.0000,1,1,'2023-05-01',5.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+INSERT INTO `product` (`admin_id`,`model`, `sku`, `upc`, `ean`, `jan`, `isbn`, `mpn`, `location`, `stock_quantity`, `stock_status_id`, `image`, `manufacturer_id`, `vendor_id`, `requires_shipping`, `price`, `old_price`, `points`, `tax_type_id`, `date_available`, `weight`, `weight_type_id`, `length`, `width`, `height`, `length_type_id`, `subtract_stock`, `minimum_quantity`, `sort_order`, `status`, `type`, `template`, `views`, `created_at`, `updated_at`) VALUES
+(1, 'Product 1','','','','','','','',939,7,'product/1-1.jpg',1,1,1,99.00,0, 200,1,'2023-05-01',146.40000000,2,0.0000,0.0000,0.0000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 2','','','','','','','',999,6,'product/2-1.jpg',2,1,1,279.9900,0, 0,1,'2023-05-01',133.0000,2,0.0000,0.0000,0.0000,3,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 3','','','','','','','',7,6,'product/3-1.jpg',3,1,1,100.00,0, 0,1,'2023-05-01',0.0000,1,0.0000,0.0000,0.0000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 4','','','','','','','',1000,6,'product/4-1.jpg',0,1,1,80.00,0, 0,1,'2023-05-01',0.0000,1,0.0000,0.0000,0.0000,3,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 5','','','','','','','',999,6,'product/5-1.jpg',4,1,1,100.00,0, 0,1,'2023-05-01',5.0000,1,0.0000,0.0000,0.0000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 6','','','','','','','',1000,6,'product/6-1.jpg',0,1,1,200.00,0, 0,1,'2023-05-01',5.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 7','','','','','','','',1000,6,'product/7-1.jpg',1,1,1,100.00,0, 0,1,'2023-05-01',5.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 8','','','','','','','',1000,5,'product/8-1.jpg',0,0,1,100.00,0, 0,1,'2023-05-01',5.0000,1,0.0000,0.0000,0.0000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 9','','','','','','','',994,6,'product/9-1.jpg',2,0,1,100.00,0, 1,1,'2023-05-01',5.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('product 10','','','','','','','',970,5,'product/10-1.jpg',3,1,1,101.0000,0,1,'2023-05-01',10.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 11','','','','','','','',977,5,'product/1-1.jpg',4,1,1,100.0000,0,1,'2023-05-01',5.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 12','','','','','','','',990,5,'product/2-1.jpg',1,1,1,100.0000,400,1,'2009-02-04',12.50000000,1,1.00000000,2.00000000,3.00000000,1,1,2,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 13','','','','','','','',929,5,'product/3-1.jpg',2,0,1,500.0000,0,1,'2023-05-01',0.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 14','','','','','','','',1000,5,'product/4-1.jpg',3,1,1,1000.0000,0,1,'2023-05-01',0.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 15','','','','','','','',998,5,'product/5-1.jpg',3,1,1,2000.0000,0,1,'2023-05-01',0.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 16','','','','','','','',1000,5,'product/6-1.jpg',4,1,1,1000.0000,0,1,'2023-05-01',0.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 17','','','','','','','',1000,5,'product/7-1.jpg',5,1,1,100.0000,400,1,'2023-05-01',1.00000000,1,0.00000000,0.00000000,0.00000000,1,0,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 18','test 1','','','','','','test 2',995,5,'product/8-1.jpg',1,1,1,100.0000,0,1,'2009-02-08',1.00000000,1,0.00000000,0.00000000,0.00000000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
-('Product 19','','','','','','','',0,1,'product/9-1.jpg',0,1,1,199.9900,0,1,'2011-04-25',0.00000000,1,0.00000000,0.00000000,0.00000000,1,1,1,1,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00');
+(1, 'Product 10','','','','','','','',970,5,'product/10-1.jpg',3,1,1,101.00,0, 0,1,'2023-05-01',10.0000,1,0.0000,0.0000,0.0000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 11','','','','','','','',977,5,'product/1-1.jpg',4,1,1,100.00,0, 0,1,'2023-05-01',5.0000,1,0.0000,0.0000,0.0000,1,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 12','','','','','','','',990,5,'product/2-1.jpg',1,1,1,100.00,0, 400,1,'2009-02-04',12.50000000,1,1.0000,2.0000,3.0000,1,1,2,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 13','','','','','','','',929,5,'product/3-1.jpg',2,0,1,500.00,0, 0,1,'2023-05-01',0.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 14','','','','','','','',1000,5,'product/4-1.jpg',3,1,1,1000.00,0, 0,1,'2023-05-01',0.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 15','','','','','','','',998,5,'product/5-1.jpg',3,1,1,2000.00,0, 0,1,'2023-05-01',0.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 16','','','','','','','',1000,5,'product/6-1.jpg',4,1,1,1000.00,0, 0,1,'2023-05-01',0.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 17','','','','','','','',0,5,'product/7-1.jpg',5,1,1,100.00,0, 400,1,'2023-05-01',1.0000,1,0.0000,0.0000,0.0000,1,0,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 18','test 1','','','','','','test 2',995,5,'product/8-1.jpg',1,1,1,100.00,120.00, 0,1,'2009-02-08',1.0000,1,0.0000,0.0000,0.0000,2,1,1,0,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00'),
+(1, 'Product 19','','','','','','','',1000,1,'product/9-1.jpg',0,1,1,199.9900,0, 0,1,'2011-04-25',0.0000,1,0.0000,0.0000,0.0000,1,1,1,1,1, 'product', '', 0,'2022-05-01 00:00:00','2022-05-01 00:00:00');
diff --git a/install/sql/mysqli/schema/product/product.sql b/install/sql/mysqli/schema/product/product.sql
index 3e4930b..47330b1 100755
--- a/install/sql/mysqli/schema/product/product.sql
+++ b/install/sql/mysqli/schema/product/product.sql
@@ -2,8 +2,7 @@ DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`product_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
- `admin_id` INT unsigned NOT NULL DEFAULT '0',
- `parent_id` INT UNSIGNED NOT NULL DEFAULT 0,
+ `admin_id` INT unsigned NOT NULL,
`model` varchar(64) NOT NULL DEFAULT '',
`sku` varchar(64) NOT NULL DEFAULT '',
`upc` varchar(12) NOT NULL DEFAULT '',
@@ -11,35 +10,37 @@ CREATE TABLE `product` (
`jan` varchar(13) NOT NULL DEFAULT '',
`isbn` varchar(17) NOT NULL DEFAULT '',
`mpn` varchar(64) NOT NULL DEFAULT '',
- `barcode` varchar(13) NOT NULL DEFAULT '',
+ `barcode` varchar(64) NOT NULL DEFAULT '',
`hs_code` varchar(10) NOT NULL DEFAULT '',
`origin_country` varchar(64) NOT NULL DEFAULT '',
`mid_code` varchar(13) NOT NULL DEFAULT '',
`location` varchar(128) NOT NULL DEFAULT '',
- `stock_quantity` int(4) NOT NULL DEFAULT '0',
+ `stock_quantity` int(4) NOT NULL DEFAULT 1,
`stock_status_id` INT UNSIGNED NOT NULL DEFAULT 1,
`image` varchar(191) NOT NULL DEFAULT '',
`manufacturer_id` INT UNSIGNED NOT NULL DEFAULT 0,
`vendor_id` INT UNSIGNED NOT NULL DEFAULT 0,
- `requires_shipping` tinyint NOT NULL DEFAULT '1',
+ `requires_shipping` tinyint NOT NULL DEFAULT 1,
+ `old_price` decimal(15,4) NOT NULL DEFAULT 0.0000,
`price` decimal(15,4) NOT NULL DEFAULT 0.0000,
- `points` int(8) NOT NULL DEFAULT '0',
+ `points` int(8) NOT NULL DEFAULT 0,
`tax_type_id` INT UNSIGNED NOT NULL DEFAULT 0,
`material` varchar(64) NOT NULL DEFAULT '',
`weight` decimal(15,8) NOT NULL DEFAULT '0.00000000',
- `weight_type_id` INT UNSIGNED NOT NULL DEFAULT '0',
+ `weight_type_id` INT UNSIGNED NOT NULL DEFAULT 0,
`length` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`width` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`height` decimal(15,8) NOT NULL DEFAULT '0.00000000',
- `length_type_id` INT UNSIGNED NOT NULL DEFAULT '0',
+ `length_type_id` INT UNSIGNED NOT NULL DEFAULT 0,
`date_available` date,
`type` varchar(20) NOT NULL DEFAULT 'product',
`template` varchar(191) NOT NULL DEFAULT '',
- `views` INT(5) unsigned NOT NULL DEFAULT '0',
- `subtract_stock` tinyint NOT NULL DEFAULT '1',
- `minimum_quantity` INT UNSIGNED NOT NULL DEFAULT '1',
- `status` tinyint NOT NULL DEFAULT '0',
- `sort_order` INT UNSIGNED NOT NULL DEFAULT '0',
+ `views` INT(5) unsigned NOT NULL DEFAULT 0,
+ `subtract_stock` tinyint NOT NULL DEFAULT 1,
+ `minimum_quantity` INT UNSIGNED NOT NULL DEFAULT 1,
+ `subscription_onetime` tinyint UNSIGNED NOT NULL DEFAULT 1,
+ `status` tinyint NOT NULL DEFAULT 0,
+ `sort_order` INT UNSIGNED NOT NULL DEFAULT 0,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`product_id`),
diff --git a/install/sql/pgsql/schema/product/product.sql b/install/sql/pgsql/schema/product/product.sql
index 715890b..b3b19dd 100755
--- a/install/sql/pgsql/schema/product/product.sql
+++ b/install/sql/pgsql/schema/product/product.sql
@@ -15,16 +15,22 @@ CREATE TABLE product (
"jan" varchar(13) NOT NULL DEFAULT '',
"isbn" varchar(17) NOT NULL DEFAULT '',
"mpn" varchar(64) NOT NULL DEFAULT '',
+ "barcode" varchar(64) NOT NULL DEFAULT '',
+ "hs_code" varchar(10) NOT NULL DEFAULT '',
+ "origin_country" varchar(64) NOT NULL DEFAULT '',
+ "mid_code" varchar(13) NOT NULL DEFAULT '',
"location" varchar(128) NOT NULL DEFAULT '',
- "stock_quantity" int NOT NULL DEFAULT 0,
+ "stock_quantity" int NOT NULL DEFAULT 1,
"stock_status_id" int check ("stock_status_id" >= 0) NOT NULL DEFAULT 0,
"image" varchar(191) NOT NULL DEFAULT '',
"manufacturer_id" int check ("manufacturer_id" >= 0) NOT NULL DEFAULT 0,
"vendor_id" int check ("vendor_id" >= 0) NOT NULL DEFAULT 0,
"requires_shipping" smallint NOT NULL DEFAULT 1,
"price" decimal(15,4) NOT NULL DEFAULT 0.0000,
+ "old_price" decimal(15,4) NOT NULL DEFAULT 0.0000,
"points" int NOT NULL DEFAULT 0,
"tax_type_id" int check ("tax_type_id" >= 0) NOT NULL DEFAULT 0,
+ "material" varchar(64) NOT NULL DEFAULT '',
"weight" decimal(15,8) NOT NULL DEFAULT 0.00000000,
"weight_type_id" int check ("weight_type_id" >= 0) NOT NULL DEFAULT 0,
"length" decimal(15,8) NOT NULL DEFAULT 0.00000000,
@@ -36,6 +42,7 @@ CREATE TABLE product (
"views" int NOT NULL DEFAULT 0,
"subtract_stock" smallint NOT NULL DEFAULT 1,
"minimum_quantity" int check ("minimum_quantity" >= 0) NOT NULL DEFAULT 1,
+ "subscription_onetime" smallint NOT NULL DEFAULT 1,
"type" varchar(20) NOT NULL DEFAULT 'product',
"status" smallint NOT NULL DEFAULT 0,
"sort_order" int check ("sort_order" >= 0) NOT NULL DEFAULT 0,
diff --git a/install/sql/sqlite/schema/product/product.sql b/install/sql/sqlite/schema/product/product.sql
index 509d52b..67b7c90 100755
--- a/install/sql/sqlite/schema/product/product.sql
+++ b/install/sql/sqlite/schema/product/product.sql
@@ -2,7 +2,7 @@ DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`product_id` INTEGER PRIMARY KEY AUTOINCREMENT,
-`admin_id` INT NOT NULL DEFAULT 0,
+`admin_id` INT NOT NULL,
`model` TEXT NOT NULL DEFAULT '',
`sku` TEXT NOT NULL DEFAULT '',
`upc` TEXT NOT NULL DEFAULT '',
@@ -10,16 +10,22 @@ CREATE TABLE `product` (
`jan` TEXT NOT NULL DEFAULT '',
`isbn` TEXT NOT NULL DEFAULT '',
`mpn` TEXT NOT NULL DEFAULT '',
+`barcode` TEXT NOT NULL DEFAULT '',
+`hs_code` TEXT NOT NULL DEFAULT '',
+`origin_country` TEXT NOT NULL DEFAULT '',
`location` TEXT NOT NULL DEFAULT '',
-`stock_quantity` INTEGER NOT NULL DEFAULT 0,
+`mid_code` TEXT NOT NULL DEFAULT '',
+`stock_quantity` INTEGER NOT NULL DEFAULT 1,
`stock_status_id` INT NOT NULL DEFAULT 1,
`image` TEXT NOT NULL DEFAULT '',
`manufacturer_id` INT NOT NULL DEFAULT 0,
`vendor_id` INT NOT NULL DEFAULT 0,
`requires_shipping` TINYINT NOT NULL DEFAULT 1,
`price` decimal(15,4) NOT NULL DEFAULT 0.0000,
+`old_price` decimal(15,4) NOT NULL DEFAULT 0.0000,
`points` INTEGER NOT NULL DEFAULT 0,
`tax_type_id` INT NOT NULL DEFAULT 0,
+`material` TEXT NOT NULL DEFAULT '',
`weight` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`weight_type_id` INT NOT NULL DEFAULT '0',
`length` decimal(15,8) NOT NULL DEFAULT '0.00000000',
@@ -31,6 +37,7 @@ CREATE TABLE `product` (
`views` INTEGER NOT NULL DEFAULT 0,
`subtract_stock` TINYINT NOT NULL DEFAULT 1,
`minimum_quantity` INT NOT NULL DEFAULT 1,
+`subscription_onetime` TINYINT NOT NULL DEFAULT 1,
`type` TEXT NOT NULL DEFAULT 'product',
`status` TINYINT NOT NULL DEFAULT 0,
`sort_order` INT NOT NULL DEFAULT 0,