Complete demo data with VirtueMart, MembershipPro, and Dolibarr
This commit is contained in:
103
data/demo/virtuemart/custom-fields.sql
Normal file
103
data/demo/virtuemart/custom-fields.sql
Normal file
@@ -0,0 +1,103 @@
|
||||
-- VirtueMart Custom Product Fields
|
||||
-- Version: 1.0.0
|
||||
-- These custom fields add additional product options like size, color, warranty, etc.
|
||||
|
||||
-- Custom Field Types
|
||||
INSERT INTO `#__virtuemart_customs` (`virtuemart_custom_id`, `custom_parent_id`, `virtuemart_vendor_id`, `custom_jplugin_id`, `custom_element`, `admin_only`, `custom_title`, `custom_tip`, `custom_value`, `custom_field_type`, `is_input`, `is_cart_attribute`, `is_list`, `custom_params`, `published`, `ordering`, `shared`, `created_on`, `modified_on`) VALUES
|
||||
-- Size selector
|
||||
(1, 0, 1, 0, '', 0, 'Size', 'Select your size', '', 'S', 1, 1, 1, '', 1, 1, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
-- Color selector
|
||||
(2, 0, 1, 0, '', 0, 'Color', 'Choose your preferred color', '', 'S', 1, 1, 1, '', 1, 2, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
-- Material type
|
||||
(3, 0, 1, 0, '', 0, 'Material', 'Product material', '', 'S', 0, 0, 0, '', 1, 3, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
-- Warranty
|
||||
(4, 0, 1, 0, '', 0, 'Warranty', 'Warranty period', '', 'S', 0, 0, 0, '', 1, 4, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
-- Delivery time
|
||||
(5, 0, 1, 0, '', 0, 'Delivery Time', 'Expected delivery timeframe', '', 'S', 0, 0, 0, '', 1, 5, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
-- Gift wrap option
|
||||
(6, 0, 1, 0, '', 0, 'Gift Wrap', 'Add gift wrapping', '', 'B', 1, 1, 0, '', 1, 6, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
-- Memory/Storage (for electronics)
|
||||
(7, 0, 1, 0, '', 0, 'Storage', 'Storage capacity', '', 'S', 1, 1, 1, '', 1, 7, 0, '2026-01-29 00:00:00', '2026-01-29 00:00:00');
|
||||
|
||||
-- Size Options
|
||||
INSERT INTO `#__virtuemart_customs` (`virtuemart_custom_id`, `custom_parent_id`, `virtuemart_vendor_id`, `custom_value`, `custom_price`, `published`, `ordering`) VALUES
|
||||
(10, 1, 1, 'XS', 0.00, 1, 1),
|
||||
(11, 1, 1, 'S', 0.00, 1, 2),
|
||||
(12, 1, 1, 'M', 0.00, 1, 3),
|
||||
(13, 1, 1, 'L', 0.00, 1, 4),
|
||||
(14, 1, 1, 'XL', 0.00, 1, 5),
|
||||
(15, 1, 1, 'XXL', 0.00, 1, 6);
|
||||
|
||||
-- Color Options
|
||||
INSERT INTO `#__virtuemart_customs` (`virtuemart_custom_id`, `custom_parent_id`, `virtuemart_vendor_id`, `custom_value`, `custom_price`, `published`, `ordering`) VALUES
|
||||
(20, 2, 1, 'Black', 0.00, 1, 1),
|
||||
(21, 2, 1, 'White', 0.00, 1, 2),
|
||||
(22, 2, 1, 'Blue', 0.00, 1, 3),
|
||||
(23, 2, 1, 'Red', 0.00, 1, 4),
|
||||
(24, 2, 1, 'Green', 0.00, 1, 5),
|
||||
(25, 2, 1, 'Gray', 0.00, 1, 6),
|
||||
(26, 2, 1, 'Navy', 0.00, 1, 7),
|
||||
(27, 2, 1, 'Brown', 0.00, 1, 8);
|
||||
|
||||
-- Storage Options (Electronics)
|
||||
INSERT INTO `#__virtuemart_customs` (`virtuemart_custom_id`, `custom_parent_id`, `virtuemart_vendor_id`, `custom_value`, `custom_price`, `published`, `ordering`) VALUES
|
||||
(30, 7, 1, '128GB', 0.00, 1, 1),
|
||||
(31, 7, 1, '256GB', 100.00, 1, 2),
|
||||
(32, 7, 1, '512GB', 200.00, 1, 3),
|
||||
(33, 7, 1, '1TB', 300.00, 1, 4);
|
||||
|
||||
-- Assign Custom Fields to Products
|
||||
-- Clothing products get Size and Color
|
||||
INSERT INTO `#__virtuemart_product_customfields` (`virtuemart_product_id`, `virtuemart_custom_id`, `ordering`, `published`) VALUES
|
||||
-- Men's Shirt
|
||||
(200, 1, 1, 1), -- Size
|
||||
(200, 2, 2, 1), -- Color
|
||||
-- Men's Jeans
|
||||
(201, 1, 1, 1), -- Size
|
||||
(201, 2, 2, 1), -- Color
|
||||
-- Women's Dress
|
||||
(202, 1, 1, 1), -- Size
|
||||
(202, 2, 2, 1), -- Color
|
||||
-- Women's Blouse
|
||||
(203, 1, 1, 1), -- Size
|
||||
(203, 2, 2, 1), -- Color
|
||||
-- Running Shoes
|
||||
(204, 1, 1, 1), -- Size
|
||||
(204, 2, 2, 1), -- Color
|
||||
-- Casual Shoes
|
||||
(205, 1, 1, 1), -- Size
|
||||
(205, 2, 2, 1); -- Color
|
||||
|
||||
-- Electronics products get Storage and Warranty
|
||||
INSERT INTO `#__virtuemart_product_customfields` (`virtuemart_product_id`, `virtuemart_custom_id`, `custom_value`, `ordering`, `published`) VALUES
|
||||
-- Laptops
|
||||
(100, 7, '512GB', 1, 1), -- Storage
|
||||
(100, 4, '2 Year Manufacturer Warranty', 2, 1), -- Warranty
|
||||
(101, 7, '256GB', 1, 1),
|
||||
(101, 4, '1 Year Manufacturer Warranty', 2, 1),
|
||||
-- Smartphones
|
||||
(102, 7, '128GB', 1, 1),
|
||||
(102, 2, '', 2, 1), -- Color option
|
||||
(102, 4, '1 Year Manufacturer Warranty', 3, 1),
|
||||
(103, 7, '256GB', 1, 1),
|
||||
(103, 2, '', 2, 1), -- Color option
|
||||
(103, 4, '1 Year Manufacturer Warranty', 3, 1);
|
||||
|
||||
-- Add Gift Wrap option to all products (optional)
|
||||
INSERT INTO `#__virtuemart_product_customfields` (`virtuemart_product_id`, `virtuemart_custom_id`, `custom_price`, `ordering`, `published`) VALUES
|
||||
(100, 6, 5.99, 99, 1),
|
||||
(101, 6, 5.99, 99, 1),
|
||||
(102, 6, 5.99, 99, 1),
|
||||
(103, 6, 5.99, 99, 1),
|
||||
(104, 6, 5.99, 99, 1),
|
||||
(105, 6, 5.99, 99, 1),
|
||||
(200, 6, 5.99, 99, 1),
|
||||
(201, 6, 5.99, 99, 1),
|
||||
(202, 6, 5.99, 99, 1),
|
||||
(203, 6, 5.99, 99, 1),
|
||||
(204, 6, 5.99, 99, 1),
|
||||
(205, 6, 5.99, 99, 1),
|
||||
(300, 6, 9.99, 99, 1),
|
||||
(301, 6, 5.99, 99, 1),
|
||||
(302, 6, 5.99, 99, 1),
|
||||
(303, 6, 5.99, 99, 1);
|
||||
21
data/demo/virtuemart/featured-products.sql
Normal file
21
data/demo/virtuemart/featured-products.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- VirtueMart Featured Products Configuration
|
||||
-- Version: 1.0.0
|
||||
-- Mark specific products as featured for homepage display
|
||||
|
||||
-- Featured Products
|
||||
-- Set product_special = 1 for featured items
|
||||
UPDATE `#__virtuemart_products` SET `product_special` = 1 WHERE `virtuemart_product_id` IN (
|
||||
102, -- Smartphone Pro 12
|
||||
104, -- Wireless Headphones Pro
|
||||
201, -- Slim Fit Jeans (on sale)
|
||||
203, -- Women's Casual Blouse
|
||||
301 -- Ergonomic Office Chair (on sale)
|
||||
);
|
||||
|
||||
-- Alternative: Create a featured products relation table if your VirtueMart version uses it
|
||||
-- INSERT INTO `#__virtuemart_product_featured` (`virtuemart_product_id`, `ordering`, `published`) VALUES
|
||||
-- (102, 1, 1),
|
||||
-- (104, 2, 1),
|
||||
-- (201, 3, 1),
|
||||
-- (203, 4, 1),
|
||||
-- (301, 5, 1);
|
||||
40
data/demo/virtuemart/manufacturers.sql
Normal file
40
data/demo/virtuemart/manufacturers.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
-- VirtueMart Manufacturers/Brands Sample Data
|
||||
-- Version: 1.0.0
|
||||
|
||||
-- Sample Manufacturers
|
||||
INSERT INTO `#__virtuemart_manufacturers` (`virtuemart_manufacturer_id`, `virtuemart_vendor_id`, `mf_name`, `slug`, `mf_email`, `mf_url`, `published`, `ordering`, `created_on`, `modified_on`) VALUES
|
||||
(1, 1, 'TechBrand Inc.', 'techbrand-inc', 'info@techbrand.example', 'https://techbrand.example', 1, 1, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
(2, 1, 'StyleWear Co.', 'stylewear-co', 'contact@stylewear.example', 'https://stylewear.example', 1, 2, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
(3, 1, 'HomeComfort', 'homecomfort', 'sales@homecomfort.example', 'https://homecomfort.example', 1, 3, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
(4, 1, 'SportsPro', 'sportspro', 'info@sportspro.example', 'https://sportspro.example', 1, 4, '2026-01-29 00:00:00', '2026-01-29 00:00:00'),
|
||||
(5, 1, 'AudioTech', 'audiotech', 'support@audiotech.example', 'https://audiotech.example', 1, 5, '2026-01-29 00:00:00', '2026-01-29 00:00:00');
|
||||
|
||||
-- Manufacturer descriptions
|
||||
INSERT INTO `#__virtuemart_manufacturers_en_gb` (`virtuemart_manufacturer_id`, `mf_desc`, `metadesc`, `metakey`) VALUES
|
||||
(1, '<p>Leading technology manufacturer providing cutting-edge electronics and computer equipment.</p>', 'Technology manufacturer, electronics, computers', 'technology, electronics, computers'),
|
||||
(2, '<p>Fashion brand offering stylish and comfortable clothing for men, women, and children.</p>', 'Fashion brand, clothing, apparel', 'fashion, clothing, style'),
|
||||
(3, '<p>Home furniture and decor solutions for modern living spaces.</p>', 'Home furniture, decor, modern living', 'furniture, home, decor'),
|
||||
(4, '<p>Professional sports equipment and athletic gear for all levels.</p>', 'Sports equipment, athletic gear', 'sports, fitness, equipment'),
|
||||
(5, '<p>Premium audio equipment manufacturer specializing in headphones and speakers.</p>', 'Audio equipment, headphones, speakers', 'audio, headphones, sound');
|
||||
|
||||
-- Link Products to Manufacturers
|
||||
INSERT INTO `#__virtuemart_product_manufacturers` (`virtuemart_product_id`, `virtuemart_manufacturer_id`) VALUES
|
||||
-- Electronics
|
||||
(100, 1), -- Laptop by TechBrand
|
||||
(101, 1),
|
||||
(102, 1), -- Smartphone by TechBrand
|
||||
(103, 1),
|
||||
(104, 5), -- Headphones by AudioTech
|
||||
(105, 5),
|
||||
-- Clothing
|
||||
(200, 2), -- Shirt by StyleWear
|
||||
(201, 2),
|
||||
(202, 2),
|
||||
(203, 2),
|
||||
(204, 4), -- Shoes by SportsPro
|
||||
(205, 2),
|
||||
-- Home & Garden
|
||||
(300, 3), -- Furniture by HomeComfort
|
||||
(301, 3),
|
||||
(302, 3),
|
||||
(303, 3);
|
||||
58
data/demo/virtuemart/product-variants.sql
Normal file
58
data/demo/virtuemart/product-variants.sql
Normal file
@@ -0,0 +1,58 @@
|
||||
-- VirtueMart Product Variants (Child Products)
|
||||
-- Version: 1.0.0
|
||||
-- Create product variations for size, color, storage, etc.
|
||||
|
||||
-- Example: Smartphone with different storage capacities as child products
|
||||
-- Parent Product: Smartphone Pro 12 (102)
|
||||
|
||||
-- Child Products for Smartphone Pro 12
|
||||
INSERT INTO `#__virtuemart_products` (`virtuemart_product_id`, `virtuemart_vendor_id`, `product_parent_id`, `product_sku`, `product_gtin`, `product_mpn`, `product_weight`, `product_weight_uom`, `product_in_stock`, `low_stock_notification`, `product_available_date`, `product_special`, `published`, `created_on`) VALUES
|
||||
-- 128GB variant (this is the default already created as 102)
|
||||
-- 256GB variant
|
||||
(102256, 1, 102, 'PHONE-001-256', '1234567890225', 'PH-PRO-12-256', 0.19, 'kg', 75, 15, '2026-01-01 00:00:00', 1, 1, '2026-01-29 00:00:00'),
|
||||
-- 512GB variant
|
||||
(102512, 1, 102, 'PHONE-001-512', '1234567890325', 'PH-PRO-12-512', 0.19, 'kg', 60, 15, '2026-01-01 00:00:00', 1, 1, '2026-01-29 00:00:00');
|
||||
|
||||
-- Descriptions for variants
|
||||
INSERT INTO `#__virtuemart_products_en_gb` (`virtuemart_product_id`, `product_name`, `slug`) VALUES
|
||||
(102256, 'Smartphone Pro 12 - 256GB', 'smartphone-pro-12-256gb'),
|
||||
(102512, 'Smartphone Pro 12 - 512GB', 'smartphone-pro-12-512gb');
|
||||
|
||||
-- Pricing for variants
|
||||
INSERT INTO `#__virtuemart_product_prices` (`virtuemart_product_price_id`, `virtuemart_product_id`, `virtuemart_shoppergroup_id`, `product_price`, `product_currency`, `created_on`) VALUES
|
||||
(103, 102256, 0, 899.99, 47, '2026-01-29 00:00:00'),
|
||||
(104, 102512, 0, 999.99, 47, '2026-01-29 00:00:00');
|
||||
|
||||
-- Example: T-Shirt with different sizes and colors as variants
|
||||
-- Parent Product: Men's Shirt (200)
|
||||
|
||||
-- Color variants
|
||||
INSERT INTO `#__virtuemart_products` (`virtuemart_product_id`, `virtuemart_vendor_id`, `product_parent_id`, `product_sku`, `product_mpn`, `product_weight`, `product_weight_uom`, `product_in_stock`, `low_stock_notification`, `published`, `created_on`) VALUES
|
||||
-- White variant
|
||||
(200002, 1, 200, 'MENS-SHIRT-001-WHT', 'MS-CS-WHT-M', 0.3, 'kg', 45, 10, 1, '2026-01-29 00:00:00'),
|
||||
-- Black variant
|
||||
(200003, 1, 200, 'MENS-SHIRT-001-BLK', 'MS-CS-BLK-M', 0.3, 'kg', 55, 10, 1, '2026-01-29 00:00:00');
|
||||
|
||||
INSERT INTO `#__virtuemart_products_en_gb` (`virtuemart_product_id`, `product_name`, `slug`) VALUES
|
||||
(200002, 'Classic Men\'s Shirt - White', 'classic-mens-shirt-white'),
|
||||
(200003, 'Classic Men\'s Shirt - Black', 'classic-mens-shirt-black');
|
||||
|
||||
INSERT INTO `#__virtuemart_product_prices` (`virtuemart_product_price_id`, `virtuemart_product_id`, `virtuemart_shoppergroup_id`, `product_price`, `product_currency`, `created_on`) VALUES
|
||||
(105, 200002, 0, 49.99, 47, '2026-01-29 00:00:00'),
|
||||
(106, 200003, 0, 49.99, 47, '2026-01-29 00:00:00');
|
||||
|
||||
-- Link variants to same categories as parent
|
||||
INSERT INTO `#__virtuemart_product_categories` (`virtuemart_product_id`, `virtuemart_category_id`, `ordering`) VALUES
|
||||
(102256, 11, 3),
|
||||
(102512, 11, 4),
|
||||
(200002, 20, 3),
|
||||
(200003, 20, 4);
|
||||
|
||||
-- Variant attributes (size, color, etc.)
|
||||
INSERT INTO `#__virtuemart_product_customfields` (`virtuemart_product_id`, `virtuemart_custom_id`, `custom_value`, `ordering`, `published`) VALUES
|
||||
-- Smartphone variants get storage specification
|
||||
(102256, 7, '256GB', 1, 1),
|
||||
(102512, 7, '512GB', 1, 1),
|
||||
-- Shirt variants get color specification
|
||||
(200002, 2, 'White', 1, 1),
|
||||
(200003, 2, 'Black', 1, 1);
|
||||
36
data/demo/virtuemart/stock-management.sql
Normal file
36
data/demo/virtuemart/stock-management.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- VirtueMart Stock Management Sample Data
|
||||
-- Version: 1.0.0
|
||||
-- Configure stock levels, tracking, and low stock notifications
|
||||
|
||||
-- Update stock levels (already set in products.sql, but here for reference)
|
||||
-- Low stock products (for testing notifications)
|
||||
UPDATE `#__virtuemart_products` SET
|
||||
`product_in_stock` = 5,
|
||||
`low_stock_notification` = 10
|
||||
WHERE `virtuemart_product_id` = 300; -- Sofa (low stock)
|
||||
|
||||
UPDATE `#__virtuemart_products` SET
|
||||
`product_in_stock` = 8,
|
||||
`low_stock_notification` = 15
|
||||
WHERE `virtuemart_product_id` = 103; -- Smartphone Max
|
||||
|
||||
-- Out of stock examples (for testing)
|
||||
-- UPDATE `#__virtuemart_products` SET
|
||||
-- `product_in_stock` = 0,
|
||||
-- `product_availability` = 'Out of Stock - Ships in 2-3 weeks'
|
||||
-- WHERE `virtuemart_product_id` = 999;
|
||||
|
||||
-- Stock notification settings (global configuration)
|
||||
-- These would typically be set in VirtueMart configuration, not via SQL
|
||||
-- But included here for reference
|
||||
|
||||
-- Stock history tracking (if enabled)
|
||||
-- INSERT INTO `#__virtuemart_product_stock_history` (`virtuemart_product_id`, `stock_level`, `stock_change`, `reason`, `user_id`, `created_on`) VALUES
|
||||
-- (100, 50, 0, 'Initial stock', 1, '2026-01-29 00:00:00'),
|
||||
-- (101, 35, 0, 'Initial stock', 1, '2026-01-29 00:00:00');
|
||||
|
||||
-- Inventory tracking by warehouse (if multi-warehouse is enabled)
|
||||
-- INSERT INTO `#__virtuemart_product_warehouses` (`virtuemart_product_id`, `virtuemart_warehouse_id`, `stock_level`) VALUES
|
||||
-- (100, 1, 30), -- Main warehouse
|
||||
-- (100, 2, 20), -- Secondary warehouse
|
||||
-- (101, 1, 35);
|
||||
Reference in New Issue
Block a user