[+] Project : Add specific prices to a specific customer

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11364 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
jBreux
2011-12-19 15:31:18 +00:00
parent 42bad872d7
commit 4e810c850c
7 changed files with 182 additions and 22 deletions
+2 -1
View File
@@ -1588,6 +1588,7 @@ CREATE TABLE `PREFIX_specific_price` (
`id_currency` INT UNSIGNED NOT NULL,
`id_country` INT UNSIGNED NOT NULL,
`id_group` INT UNSIGNED NOT NULL,
`id_customer` INT UNSIGNED NOT NULL,
`id_product_attribute` INT UNSIGNED NOT NULL,
`price` DECIMAL(20, 6) NOT NULL,
`from_quantity` mediumint(8) UNSIGNED NOT NULL,
@@ -1596,7 +1597,7 @@ CREATE TABLE `PREFIX_specific_price` (
`from` DATETIME NOT NULL,
`to` DATETIME NOT NULL,
PRIMARY KEY(`id_specific_price`),
KEY (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`),
KEY (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `id_customer`, `from_quantity`, `from`, `to`),
KEY (`id_specific_price_rule`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
+5
View File
@@ -51,6 +51,11 @@ ALTER TABLE `PREFIX_order_invoice` ADD `note` TEXT NOT NULL AFTER `total_wrappin
ALTER TABLE `PREFIX_order_state` ADD `paid` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `shipped`;
UPDATE `PREFIX_order_state` SET `paid` = 1 WHERE `id_order_state` IN (2, 3, 4, 5, 9, 12);
/* SPECIFIC PRICE */
ALTER TABLE `PREFIX_specific_price` ADD `id_customer` INT UNSIGNED NOT NULL AFTER `id_group`;
ALTER TABLE `PREFIX_specific_price` DROP INDEX `id_product` ,
ADD INDEX `id_product` (`id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `id_customer`, `from_quantity`, `from`, `to`);
/************************
* STOCK MANAGEMENT
*************************/