Jump to content

Sql, Add Specific Prices For All Items


Recommended Posts

Hello,

 

i want add specific prices for all items in my store.

 

For sample, i want add 2% of discount if you buys 5 or more, 5% if you buys 10 or more, ...

 

i've few catalog rules, but in table `product_discount` i cant see it, on it appears, specific prices for specific customer groups, but i cant see specific prices indicated over few items.

 

in wich table are stored specific prices and catalog rules?  

 

Eplanation: this, is because i've a problem with discounts.

 

if i've a rule that says that if you purchases more than 5 you have one 2% discount, if i add a item with specific price (for sample 20% off), if you adds more than 5 discount is only 2%.

 

For it i need change my policy, and delete catalog rules and define specific prices individually, for it i want any sql to make it directly not manually. thanks.

Edited by espacioled (see edit history)
Link to comment
Share on other sites

No it has it they all have it since I remember back in 1.4 I use specific prices on all my products.

It is definitely there, make sure that when viewing the tables you see all of them my database shows 250 tables on page one you have to go to page 2 to see the rest.

 

 

if your tables have a different prefix say pr_ it will be    pr_specific_price.

Edited by tdr170 (see edit history)
Link to comment
Share on other sites

No it has it they all have it since I remember back in 1.4 I use specific prices on all my products.

It is definitely there, make sure that when viewing the tables you see all of them my database shows 250 tables on page one you have to go to page 2 to see the rest.

 

 

if your tables have a different prefix say pr_ it will be    pr_specific_price.

 

thanks, sorry, but i havent this table.

Link to comment
Share on other sites

Have you added any specific prices from the BO, if not add one to the first product and see if you have it.

 

Its almost not possible that it does not exist since when you install Prestashop the demo products have specific prices added to them.

 

I have 4 installs they all have it 1.6.0.6 1.6.0.14 and 1.6.1.4

 

 

I even looked at a 1.6.0.6 that does not use specific prices at all and it also has it this table is installed by default and is where the specific price for products is installed of this I am 100% positive.

 

 

--
-- Table structure for table `ps_specific_price`
--
 
DROP TABLE IF EXISTS `ps_specific_price`;
CREATE TABLE IF NOT EXISTS `ps_specific_price` (
  `id_specific_price` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_specific_price_rule` int(11) unsigned NOT NULL,
  `id_cart` int(11) unsigned NOT NULL,
  `id_product` int(10) unsigned NOT NULL,
  `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
  `id_shop_group` int(11) unsigned NOT NULL,
  `id_currency` int(10) unsigned NOT NULL,
  `id_country` int(10) unsigned NOT NULL,
  `id_group` int(10) unsigned NOT NULL,
  `id_customer` int(10) unsigned NOT NULL,
  `id_product_attribute` int(10) unsigned NOT NULL,
  `price` decimal(20,6) NOT NULL,
  `from_quantity` mediumint(8) unsigned NOT NULL,
  `reduction` decimal(20,6) NOT NULL,
  `reduction_type` enum('amount','percentage') NOT NULL,
  `from` datetime NOT NULL,
  `to` datetime NOT NULL,
  PRIMARY KEY (`id_specific_price`),
  KEY `id_product` (`id_product`,`id_shop`,`id_currency`,`id_country`,`id_group`,`id_customer`,`from_quantity`,`from`,`to`),
  KEY `from_quantity` (`from_quantity`),
  KEY `id_specific_price_rule` (`id_specific_price_rule`),
  KEY `id_cart` (`id_cart`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
-- --------------------------------------------------------
Link to comment
Share on other sites

que query is
 

INSERT INTO `'._DB_PREFIX_.'specific_price` (
`id_specific_price` ,
`id_specific_price_rule` ,
`id_cart` ,
`id_product` ,
`id_shop` ,
`id_shop_group` ,
`id_currency` ,
`id_country` ,
`id_group` ,
`id_customer` ,
`id_product_attribute` ,
`price` ,
`from_quantity` ,
`reduction` ,
`reduction_type` ,
`from` ,
`to`
)
VALUES (
 
);'
 
you must fill all values with your own
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...