Magento升级1.5.1至1.9.1现在无法将商品添加到购物车

时间:2014-12-06 01:56:52

标签: php mysql magento upgrade cart

我升级了Magento平台,除了购物车之外,一切都在管理员和前端工作。这是我的异常日志。

当我尝试将商品添加到购物车时,购物车无法添加产品。

我升级了前端的所有内容,但我使用的是1.5.1数据库,并在salescoupon表中添加了一些列

2014-12-06T00:21:16+00:00 DEBUG (7): Exception message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'primary_coupon.code' in 'having clause',

query was:
SELECT `main_table`.*, `rule_coupons`.`code`, GROUP_CONCAT(extra_coupon.code) AS `extra` FROM `salesrule` AS `main_table`
LEFT JOIN `salesrule_coupon` AS `rule_coupons` ON main_table.rule_id = rule_coupons.rule_id AND rule_coupons.is_primary = 1
LEFT JOIN `salesrule_coupon` AS `extra_coupon` ON extra_coupon.rule_id = main_table.rule_id AND extra_coupon.is_primary IS NULL WHERE (is_active=1) AND (find_in_set(1, website_ids)) AND (find_in_set(0, customer_group_ids)) AND (from_date is null or from_date<='2014-12-05') AND (to_date is null or to_date>='2014-12-05') 
GROUP BY `main_table`.`rule_id` HAVING ( primary_coupon.code IN ('')  OR FIND_IN_SET('', extra))
ORDER BY `sort_order` ASC

Trace:
0 /var/www/vhosts/mymagentowebsite.com/shop/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
1 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
2 /var/www/vhosts/mymagentowebsite.com/shop/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
3 /var/www/vhosts/mymagentowebsite.com/shop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
4 /var/www/vhosts/mymagentowebsite.com/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
5 /var/www/vhosts/mymagentowebsite.com/shop/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
6 /var/www/vhosts/mymagentowebsite.com/shop/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
7 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
8 /var/www/vhosts/mymagentowebsite.com/shop/lib/Varien/Data/Collection/Db.php(566): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
9 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/SalesRule/Model/Validator.php(124): Varien_Data_Collection_Db->load()
10 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/SalesRule/Model/Quote/Freeshipping.php(60): Mage_SalesRule_Model_Validator->init('1', 0, NULL)
11 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Sales/Model/Quote/Address.php(1013): Mage_SalesRule_Model_Quote_Freeshipping->collect(Object(Mage_Sales_Model_Quote_Address))
12 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Sales/Model/Quote.php(1331): Mage_Sales_Model_Quote_Address->collectTotals()
13 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Checkout/Model/Cart.php(458): Mage_Sales_Model_Quote->collectTotals()
14 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Checkout/controllers/CartController.php(223): Mage_Checkout_Model_Cart->save()
15 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->addAction()
16 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('add')
17 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
18 /var/www/vhosts/mymagentowebsite.com/shop/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
19 /var/www/vhosts/mymagentowebsite.com/shop/app/Mage.php(684): Mage_Core_Model_App->run(Array)
20 /var/www/vhosts/mymagentowebsite.com/shop/index.php(87): Mage::run('', 'store')

21 {main}

1 个答案:

答案 0 :(得分:0)