【问题标题】:Magento+ Add to cart is not workingMagento+ 添加到购物车不起作用
【发布时间】:2015-08-26 06:06:45
【问题描述】:

当我点击“添加到购物车”按钮时,它不起作用。

此消息“无法将商品添加到购物车。”显示出来。

当我检查日志时,这个异常来了:

Exception message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'website_ids' in 'where clause', query was:
SELECT `main_table`.* FROM `salesrule` AS `main_table` WHERE (is_active=1) AND (find_in_set(1, website_ids)) AND
(find_in_set(0, customer_group_ids)) AND
(main_table.coupon_type = 1) AND
(from_date is null or from_date<='2015-08-20')
AND (to_date is null or to_date>='2015-08-20') ORDER BY `sort_order` ASC 

请给我建议。

谢谢

特里洛克古普塔

【问题讨论】:

  • 您是否正在寻找解决此问题的程序化解决方案?或者您是否正在尝试修复 Magento 错误?

标签: mysql magento


【解决方案1】:

您正在运行非常旧的 Magento 版本或与 Magento 1.7+ 不兼容的代码。

  • Magento 1.1.1 中添加了website_ids*。一些不向后兼容的代码会在低于该版本的版本中引发错误。
  • Magento 1.7.0.0** 中再次删除了该列。为 Magento 1.6 或更早版本编写且尚未与 1.7 兼容的代码也会引发此错误。

*) https://github.com/OpenMage/magento-mirror/blob/d19f0e13d3d2fcbcc2d8fa6073568d5f95442470/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.4-0.7.5.php

**) https://github.com/OpenMage/magento-mirror/blob/e56274a1b0954bc3744392ae8496271087f9445c/app/code/core/Mage/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php

【讨论】:

  • 我使用的是 1.9.2.0 版本。
  • 我又检查了一遍。该列已在 1.7 中删除,请参阅更新的答案
  • 是的,但是上述问题的解决方案是什么。我该如何解决?
  • 查看异常堆栈跟踪以找出导致它的扩展,然后更新(或删除)此扩展
猜你喜欢
  • 1970-01-01
  • 2016-11-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多