Magento产品价格重新编制索引错误

时间:2014-01-08 14:58:18

标签: magento product reindex

我正在尝试重新索引产品价格,但会产生以下错误:

2014-01-08T14:35:19+00:00 DEBUG (7): Exception message: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1
Trace: #0 /var/www/vhosts/SITE DIRECTORY/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/SITE DIRECTORY/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/vhosts/SITE DIRECTORY/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/SITE DIRECTORY/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /var/www/vhosts/SITE DIRECTORY/lib/Varien/Db/Adapter/Pdo/Mysql.php(420): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /var/www/vhosts/SITE DIRECTORY/app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php(133): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#6 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Configurable.php(48): OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Configurable->_prepareFinalPriceData()
#7 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(385): Mage_Catalog_Model_Resource_Product_Indexer_Price_Configurable->reindexAll()
#8 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#9 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#11 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#12 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#13 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#14 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /var/www/vhosts/SITE DIRECTORY/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#16 /var/www/vhosts/SITE DIRECTORY/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#17 /var/www/vhosts/SITE DIRECTORY/index.php(87): Mage::run('', 'store')
#18 {main}

我无法在声明“INSERT INTO`ca ...'中看到表名,所以我不太确定发生了什么。

非常感谢

2 个答案:

答案 0 :(得分:8)

我只是禁用了网站dirc / app / etc / modules / OrganicInternet_SimpleConfigurableProducts.xml,重新编制索引并且工作正常,然后再次启用该文件。

答案 1 :(得分:0)

要解决此问题,请转到以下路径中编辑Configurable.php:

  

../应用程序/代码/小区/ OrganicInternet / SimpleConfigurableProducts /目录/型号/资源/ EAV / Mysql4 /产品/索引/价格/ Configurable.php

并添加以下代码:

line 87 ->      'group_price'       => new Zend_Db_Expr('pi.group_price'),
line 88 ->      'base_group_price'  => new Zend_Db_Expr('pi.group_price'),

line 131 ->     'group_price',
line 132 ->     'base_group_price',

请参阅以下网站 http://teition.com/price-indexer-will-not-re-index-in-magento/