php - Magento 2:无法将产品添加到购物车
问题描述
从 Magento 1.5 迁移到 Magento 2.2.4 后,无法添加到购物车,它显示“我们现在无法将此商品添加到您的购物车”。
以下是 var/log 目录中的 expection.log 文件
[2018-06-05 09:51:00] main.CRITICAL:SQLSTATE [42S02]:未找到基表或视图:1146 表“hyl-old.salesrule_customer_group”不存在,查询为:
SELECT
`main_table`.*
FROM
`salesrule` AS `main_table`
INNER JOIN `salesrule_website` AS `website`
ON
website.website_id IN('1') AND main_table.rule_id = website.rule_id
INNER JOIN `salesrule_customer_group` AS `customer_group_ids`
ON
main_table.rule_id = customer_group_ids.rule_id AND customer_group_ids.customer_group_id = 0
WHERE
(
from_date IS NULL OR from_date <= '2018-06-05'
) AND(
to_date IS NULL OR to_date >= '2018-06-05'
) AND(`is_active` = '1') AND(`main_table`.`coupon_type` = '1') AND(
(main_table.to_date IS NULL) OR(
main_table.to_date >= '2018-06-05'
)
) AND(`is_active` = '1')
ORDER BY
sort_order ASC
{
"exception" : "[object] (Zend_Db_Statement_Exception(code: 42):
SQLSTATE[42S02] : Base table or view not found: 1146 Table
'hyl-old.salesrule_customer_group' doesn't exist, query was:
SELECT
`main_table`.*
FROM
`salesrule` AS `main_table`
INNER JOIN `salesrule_website` AS `website`
ON
website.website_id IN('1') AND main_table.rule_id = website.rule_id
INNER JOIN `salesrule_customer_group` AS `customer_group_ids`
ON
main_table.rule_id = customer_group_ids.rule_id AND customer_group_ids.customer_group_id = 0
WHERE
(
from_date IS NULL OR from_date <= '2018-06-05'
) AND(
to_date IS NULL OR to_date >= '2018-06-05'
) AND(`is_active` = '1') AND(`main_table`.`coupon_type` = '1') AND(
(main_table.to_date IS NULL) OR(
main_table.to_date >= '2018-06-05'
)
) AND(`is_active` = '1')
ORDER BY
sort_order ASC
at /home/wirw5dhnfutp/public_html/demo/vendor/magento/zendframework1/library/Zend/D
b/Statement/Pdo.php:235, PDOException(code: 42S02): SQLSTATE[42S02]: Base
table or view not found: 1146 Table 'hyl-old.salesrule_customer_group'
doesn't exist at home/wirw5dhnfutp/public_html/demo/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"
} []
解决方案
推荐阅读
- python - Python:如何选择包含一年中特定月份的列?
- wordpress - 如何从小部件区域获取/显示所有小部件?
- javascript - iOS 和 Safari 中的网站滚动到顶部控制/载体栏 - 如何停止?
- azure - 使用 Azure 数据流缓存接收器值动态命名输出文件
- intellij-idea - java.io.IOException:无法运行程序“connect.exe”:CreateProcess 错误=2
- reactjs - 在 laravel 8 中安装 react 时有 91 个软件包正在寻找资金
- html - 如何在固定位置元素中居中元素
- java - 使用 OffSet 处理字符串日期
- excel - 触控板滚动时出现 Excel 冻结窗格问题
- c# - 使用 TFS 2018 与 VS 2019 构建解决方案