Voici le CSV pour importer mes t-shirts. 5 tailles et 3 couleurs différentes. La taille XXL coute 1,40 $ de plus. Les couleurs gris et noir coutent 3,50 $ de plus.
Et le code SQL pour une base solide et propre.
-- -------------------------------------------------------
-- Delete all products (and not categories) from database.
-- -------------------------------------------------------
TRUNCATE TABLE `tosdq_hikashop_product`;
ALTER TABLE `tosdq_hikashop_product` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_price`;
ALTER TABLE `tosdq_hikashop_price` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_product_category`;
ALTER TABLE `tosdq_hikashop_product_category` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_product_related`;
ALTER TABLE `tosdq_hikashop_product_related` AUTO_INCREMENT=0;
-- TRUNCATE TABLE `tosdq_hikashop_order`;
-- ALTER TABLE `tosdq_hikashop_order` AUTO_INCREMENT=0;
-- TRUNCATE TABLE `tosdq_hikashop_order_product`;
-- ALTER TABLE `tosdq_hikashop_order_product` AUTO_INCREMENT=0;
-- TRUNCATE TABLE `tosdq_hikashop_history`;
-- ALTER TABLE `tosdq_hikashop_history` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_file`;
ALTER TABLE `tosdq_hikashop_file` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_variant`;
ALTER TABLE `tosdq_hikashop_variant` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_cart`;
ALTER TABLE `tosdq_hikashop_cart` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_cart_product`;
ALTER TABLE `tosdq_hikashop_cart_product` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_category`;
ALTER TABLE `tosdq_hikashop_category` AUTO_INCREMENT=0;
TRUNCATE TABLE `tosdq_hikashop_characteristic`;
ALTER TABLE `tosdq_hikashop_characteristic` AUTO_INCREMENT=0;
-- -----------------------------
-- Contenu de la table tosdq_hikashop_category
-- -----------------------------
INSERT INTO tosdq_hikashop_category VALUES(1, 0, 'root', 'ROOT', '', 0, 0, 1, 101, 0, 'root', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(2, 1, 'product', 'Produits', '', 1, 0, 32, 100, 1, 'product', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(3, 1, 'tax', 'taxation category', '', 1, 2, 2, 5, 1, 'tax', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(4, 3, 'tax', 'Taxes par défaut', '', 1, 1, 3, 4, 2, 'default_tax', 0, 1380638268, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(5, 1, 'status', 'order status', '', 1, 3, 6, 17, 1, 'status', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(6, 5, 'status', 'created', 'When a customer finishes a checkout, an order is created with the status created', 1, 1, 7, 8, 2, 'created', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(7, 5, 'status', 'confirmed', 'When the payment is confirmed or that the payment is done at delivery the order becomes confirmed', 1, 2, 9, 10, 2, 'confirmed', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(8, 5, 'status', 'cancelled', 'When an order is cancelled before receiving a payment', 1, 3, 11, 12, 2, 'cancelled', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(9, 5, 'status', 'refunded', 'When an order is cancelled after receiving a payment', 1, 4, 13, 14, 2, 'refunded', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(10, 5, 'status', 'shipped', 'When an order has been shipped', 1, 5, 15, 16, 2, 'shipped', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(11, 1, 'manufacturer', 'manufacturer', '', 1, 5, 18, 31, 1, 'manufacturer', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(12, 10, 'manufacturer', 'Vistaprint', '', 1, 0, 19, 20, 2, 'manufacturer_1374107457_826202999', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(13, 10, 'manufacturer', 'ASAP-Cheques', '', 1, 0, 21, 22, 2, 'manufacturer_1374135890_364163554', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(14, 10, 'manufacturer', 'La Page PT', '', 1, 0, 23, 24, 2, 'manufacturer_1374135890_290873177', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(15, 10, 'manufacturer', 'Estampes Panco', '', 1, 0, 25, 26, 2, 'manufacturer_1374135891_1678450908', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(16, 10, 'manufacturer', 'MH Duplication', '', 1, 0, 27, 28, 2, 'manufacturer_1374135891_921409332', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(100, 2, 'product', 'Options', '', 0, 11, 33, 42, 2, 'product_1374707946_723967691', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(200, 2, 'product', 'Aimants', '', 1, 2, 43, 44, 2, 'product_1374707946_17069664', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(300, 2, 'product', 'Articles de correspondance', '', 1, 3, 45, 50, 2, 'product_1374750783_1084776913', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(301, 300, 'product', 'Enveloppes', '', 1, 1, 46, 47, 3, 'product_1374750783_1368258272', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(400, 2, 'product', 'Articles promos', '', 1, 4, 51, 56, 2, 'product_1374750783_1769705403', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(401, 400, 'product', 'Coques pour iPhone', '', 1, 0, 52, 53, 3, 'product_1374750783_878293034', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(402, 400, 'product', 'Tasses', '', 1, 0, 54, 55, 3, 'product_1374750783_599404382', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(500, 2, 'product', 'Autocollants', '', 1, 5, 56, 57, 2, 'product_1374750783_274791861', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(600, 2, 'product', 'Cartes d\'affaires', '', 1, 6, 58, 61, 2, 'product_1374750783_1883104926', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(700, 2, 'product', 'Chèques', '', 1, 7, 62, 67, 2, 'product_1374750783_1699241570', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(701, 700, 'product', 'Chèques affaires', '', 1, 0, 63, 64, 3, 'product_1374750783_1846310500', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(702, 700, 'product', 'Chèques personnels', '', 1, 0, 65, 66, 3, 'product_1374750783_24064266', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(750, 2, 'product', 'Fichiers et documents téléchargeables', '', 1, 8, 68, 69, 2, 'product_1376653920_324517040', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(800, 2, 'product', 'Grands formats', '', 1, 9, 70, 77, 2, 'product_1374750783_2084228103', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(801, 800, 'product', 'Affiches', '', 1, 0, 71, 72, 3, 'product_1374750783_1290401133', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(802, 800, 'product', 'Banderoles', '', 1, 0, 73, 74, 3, 'product_1374750783_342573373', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(803, 800, 'product', 'Pancartes', '', 1, 0, 75, 76, 3, 'product_1374750783_735163377', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(900, 2, 'product', 'Impressions', '', 1, 10, 78, 79, 2, 'product_1374750784_1635621759', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1000, 2, 'product', 'Supports promos', '', 1, 12, 80, 83, 2, 'product_1374750784_1187914433', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1100, 2, 'product', 'Tampons encreurs', '', 1, 13, 84, 91, 2, 'product_1374750784_843018378', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1101, 1100, 'product', 'Recharges', '', 1, 0, 85, 86, 3, 'product_1374750784_1131964339', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1102, 1100, 'product', 'Tampons gros travaux', '', 1, 0, 87, 88, 3, 'product_1374750784_1399483163', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1103, 1100, 'product', 'Tampons verts', '', 1, 0, 89, 90, 3, 'product_1374750784_24364447', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1200, 2, 'product', 'Vêtements et accessoires', '', 1, 14, 92, 97, 2, 'product_1374750784_108395499', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1201, 1200, 'product', 'Sacs en toile', '', 1, 1, 93, 94, 3, 'product_1374750784_87726417', 0, 0, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1202, 11, 'manufacturer', 'Estampes Ray', '', 1, 0, 29, 30, 2, 'manufacturer_1379353366_1867419725', 1379353366, 1379353366, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1203, 2, 'product', 'Accessoires pour Mac', '', 1, 1, 98, 99, 2, 'product_1379611411_348153714', 1379611411, 1380296423, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1204, 100, 'product', 'Versos imprimés', '', 1, 1, 34, 35, 3, 'product_1379677004_167788455', 1379677004, 1379755607, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1205, 100, 'product', 'Encres', '', 1, 2, 36, 37, 3, 'product_1379679126_235824990', 1379679126, 1379679126, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1206, 100, 'product', 'Versos aimantés', '', 1, 3, 38, 39, 3, 'product_1379755586_1954122879', 1379755586, 1379755588, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1207, 100, 'product', 'Matériels', '', 1, 4, 40, 41, 3, 'product_1379756277_1732964486', 1379756277, 1379756307, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1210, 1000, 'product', 'Options supports promos', '', 0, 1, 81, 82, 3, 'product_1380310652_1665651492', 1380310652, 1380620427, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1211, 300, 'product', 'Options articles de correspondance', '', 0, 2, 48, 49, 3, 'product_1380387672_702346745', 1380387672, 1380409523, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1212, 600, 'product', 'Options cartes d\'affaires', '', 0, 1, 59, 60, 3, 'product_1380409502_154759486', 1380409502, 1380409515, 'all', 0, '', '', '', '', '', '', '');
INSERT INTO tosdq_hikashop_category VALUES(1213, 1200, 'product', 'Options vêtements et accessoires', '', 0, 2, 95, 96, 3, 'product_1380474186_645095099', 1380474186, 1380474304, 'all', 0, '', '', '', '', '', '', '');
-- -------------------------------------------------------
-- Insertion des fichiers de catgories dans la database
-- -------------------------------------------------------
-- file_id, file_name, file_description, file_path, filte_type, file_ref_id, file_free_download, file_ordering, file_limit
INSERT INTO tosdq_hikashop_file VALUES( 200, 'Aimants', '', 'Aimants.jpg', 'category', 200, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 300, 'Articles_de_correspondance', '', 'Articles_de_correspondance.jpg', 'category', 300, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 301, 'Enveloppes', '', 'Enveloppes.jpg', 'category', 301, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 400, 'Articles_promos', '', 'Articles_promos.jpg', 'category', 400, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 401, 'Coques_pour_iphone', '', 'Coques_pour_iphone.jpg', 'category', 401, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 402, 'Tasses', '', 'Tasses.jpg', 'category', 402, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 500, 'Autocollants', '', 'Autocollants.jpg', 'category', 500, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 600, 'Cartes_d_affaires', '', 'Cartes_d_affaires.jpg', 'category', 600, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 700, 'Cheques', '', 'Cheques.jpg', 'category', 700, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 701, 'Cheques_affaires', '', 'Cheques_affaires.jpg', 'category', 701, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 702, 'Cheques_personnels', '', 'Cheques_personnels.jpg', 'category', 702, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 750, 'Fichiers', '', 'Fichiers.jpg', 'category', 750, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 800, 'Grands_formats', '', 'Grands_formats.jpg', 'category', 800, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 801, 'Affiches', '', 'Affiches.jpg', 'category', 801, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 802, 'Banderoles', '', 'Banderoles.jpg', 'category', 802, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 803, 'Pancartes', '', 'Pancartes.jpg', 'category', 803, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 900, 'Impressions', '', 'Impressions.jpg', 'category', 900, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1000, 'Supports_promos', '', 'Supports_promos.jpg', 'category', 1000, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1100, 'Tampons_encreurs', '', 'Tampons_encreurs.jpg', 'category', 1100, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1101, 'Recharges', '', 'Recharges.jpg', 'category', 1101, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1102, 'Tampons_encreurs_gros_travaux', '', 'Tampons_encreurs_gros_travaux.jpg', 'category', 1102, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1103, 'Tampons_encreurs_verts', '', 'Tampons_encreurs_verts.jpg', 'category', 1103, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1200, 'Vetements_et_accessoires', '', 'Vetements_et_accessoires.jpg', 'category', 1200, 1, 0, 0);
INSERT INTO tosdq_hikashop_file VALUES( 1201, 'Sacs_en_toile', '', 'Sacs_en_toile.jpg', 'category', 1201, 1, 0, 0);
-- -----------------------------
-- Contenu de la table tosdq_hikashop_characteristic
-- -----------------------------
INSERT INTO tosdq_hikashop_characteristic VALUES(10, 0, 'Tailles', 'tailles', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(11, 10, 'Petit', 'petit', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(12, 10, 'Moyen', 'moyen', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(13, 10, 'Grand', 'grand', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(14, 10, 'Très grand', 'tres_grand', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(15, 10, 'Très très grand (+ 1,40 $)', 'tres_tres_grand', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(20, 0, 'Couleurs', 'couleurs', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(21, 20, 'Blanc', 'blanc', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(22, 20, 'Gris cendré (+ 3,50 $)', 'gris', 0);
INSERT INTO tosdq_hikashop_characteristic VALUES(23, 20, 'Noir (+ 3,50 $)', 'noir', 0);