Jump to content

Recommended Posts

We have upgraded to 1.6.1.0 & have hit a problem with Specific pricing not displaying not showing. Here is the error message from debug. I'm hoping someone can help.

 

 

 

 

Key 'id_product_2' doesn't exist in table 'ps_specific_price'

 

 

SELECT *, ( IF (`id_group` = 2, 2, 0) +  IF (`id_country` = 17, 4, 0) +  IF (`id_currency` = 1, 8, 0) +  IF (`id_shop` = 1, 16, 0) +  IF (`id_customer` = 6651, 32, 0)) AS `score`

FROM `ps_specific_price` USE INDEX (id_product_2)

WHERE `id_product` IN (0, 623)

AND `id_product_attribute` IN (0, 0)

AND `id_shop` IN (0, 1)

AND `id_currency` IN (0, 1)

AND `id_country` IN (0, 17)

AND `id_group` IN (0, 2)

AND `id_customer` IN (0, 6651)

AND

(

(`from` = '0000-00-00 00:00:00' OR '2015-07-23 17:25:00' >= `from`)

AND

(`to` = '0000-00-00 00:00:00' OR '2015-07-23 17:25:00' <= `to`)

)

AND id_cart IN (0, 0)

AND IF(`from_quantity` > 1, `from_quantity`, 0) <= 1 ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC, `to` DESC, `from` DESC LIMIT 1

 

at line 765 in file classes/db/Db.php

760. WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
761. }

762. elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

763. {

764. if ($sql)

765. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

766. 

767. throw new PrestaShopDatabaseException($this->getMsgError());

768. }

769. }

770. 

Link to comment
Share on other sites

The error message is saying that a required record does not exist.

Key 'id_product_2' doesn't exist in table 'ps_specific_price'
 

 

 

 

Did you create the specific price BEFORE the upgrade?  In any event, go to this product in the back office and delete the specific price and then re-add it

 

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...