[+] BO : now you can choose type of attribute group (select , color, radio)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8691 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur
2011-09-21 14:29:32 +00:00
parent 5bc5979e2d
commit 8b6ec916e0
15 changed files with 204 additions and 146 deletions
+1 -1
View File
@@ -91,6 +91,7 @@ CREATE TABLE `PREFIX_attribute` (
CREATE TABLE `PREFIX_attribute_group` (
`id_attribute_group` int(10) unsigned NOT NULL auto_increment,
`is_color_group` tinyint(1) NOT NULL default '0',
`group_type` ENUM('select', 'radio', 'color') NOT NULL DEFAULT 'select',
`position` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id_attribute_group`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
@@ -1176,7 +1177,6 @@ CREATE TABLE `PREFIX_product` (
`id_manufacturer` int(10) unsigned default NULL,
`id_tax_rules_group` int(10) unsigned NOT NULL,
`id_category_default` int(10) unsigned default NULL,
`id_color_default` int(10) unsigned default NULL,
`on_sale` tinyint(1) unsigned NOT NULL default '0',
`online_only` tinyint(1) unsigned NOT NULL default '0',
`ean13` varchar(13) default NULL,
+1 -1
View File
@@ -285,7 +285,7 @@ INSERT INTO `PREFIX_category_lang` (`id_category`, `id_lang`, `name`, `descripti
INSERT INTO `PREFIX_category_product` (`id_category`, `id_product`, `position`) VALUES
(1, 1, 0),(1, 2, 1),(1, 6, 2),(1, 7, 3),(2, 1, 0),(2, 2, 1),(2, 7, 2),(3, 8, 0),(3, 9, 1),(4, 5, 0),(4, 6, 1);
INSERT INTO `PREFIX_attribute_group` (`id_attribute_group`, `is_color_group`) VALUES (1, 0),(2, 1),(3, 0);
INSERT INTO `PREFIX_attribute_group` (`id_attribute_group`, `is_color_group`) VALUES (1, 0, 'select'),(2, 1, 'color'),(3, 0, 'select');
INSERT INTO `PREFIX_attribute_group_group_shop` (`id_attribute_group`, `id_group_shop`) (SELECT `id_attribute_group`, 1 FROM `PREFIX_attribute_group`);
INSERT INTO `PREFIX_attribute_group_lang` (`id_attribute_group`, `id_lang`, `name`, `public_name`) VALUES
(1, 1, 'Disk space', 'Disk space'),(1, 2, 'Capacité', 'Capacité'),(2, 1, 'Color', 'Color'),(2, 2, 'Couleur', 'Couleur'),(3, 1, 'ICU', 'Processor'),
+4
View File
@@ -149,3 +149,7 @@ ALTER TABLE `PREFIX_product_download` ADD `id_product_attribute` INT( 10 ) UNSIG
ALTER TABLE `PREFIX_product_download` ADD `is_shareable` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `active`;
ALTER TABLE `PREFIX_attribute_group` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `PREFIX_attribute_group` ADD `group_type` ENUM('select', 'radio', 'color') NOT NULL DEFAULT 'select';
UPDATE `PREFIX_attribute_group` SET `group_type`='color' WHERE `is_color_group` = 1;
ALTER TABLE `PREFIX_product` DROP `id_color_default`;