magento问题集2
SQLSTATE[42S02]: Base table or view not found: 1146 Table XXXXXX
安装Galathemes.com theme插件。 首页无法打开,提示SQLSTATE[42S02]: Base table or view not found: 1146 Table “sales_flat_order_item” doesn’t exist”错误
发现MYSQL添加了数据表前缀
需要修改“app/code/local/EM/Bestsellerproducts/Block/” List.php中
将
SELECT DISTINCT SUM( order_items.qty_ordered ) AS `ordered_qty` , `order_items`.`name` AS `order_items_name` , `order_items`.`product_id` AS `entity_id` , `e`.`entity_type_id` , `e`.`attribute_set_id` , `e`.`type_id` , `e`.`sku` , `e`.`has_options` , `e`.`required_options` , `e`.`created_at` , `e`.`updated_at`
FROM `前缀_sales_flat_order_item` AS `order_items`
INNER JOIN `前缀_sales_flat_order` AS `order` ON `order`.entity_id = order_items.order_id
AND `order`.state <> 'canceled'
LEFT JOIN `前缀_catalog_product_entity` AS `e` ON e.entity_id = order_items.product_id
INNER JOIN `前缀_catalog_product_website` AS `product_website` ON product_website.product_id = e.entity_id
AND product_website.website_id = '1'
INNER JOIN `前缀_catalog_category_product_index` AS `cat_index` ON cat_index.product_id = e.entity_id
AND cat_index.store_id =1
AND cat_index.category_id
IN ( ".$strCategories." )
WHERE (
parent_item_id IS NULL
)
GROUP BY `order_items`.`product_id`
HAVING (
SUM( order_items.qty_ordered ) >0
)
ORDER BY `ordered_qty` DESC
LIMIT 0 ,".$this->getLimitCount()."
2处修改。
END
———————以下更新2015年2月10日—————–
如果缺少
Error – SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘example_magento.core_directory_storage’ doesn’t exist.
After upgrading to Magento 1.5, you may get the following error when trying to upload an image using the built-in WYSIWYG interface:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘example_magento.core_directory_storage’ doesn’t exist.
To fix this you need to create the table.
1) Backup your database
2) Using phpMyAdmin or other SQL Manager, run the following SQL update commands:
SET FOREIGN_KEY_CHECKS = 0; CREATE TABLE IF NOT EXISTS `core_directory_storage` (
`directory_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`path` varchar(255) NOT NULL DEFAULT '',
`upload_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`parent_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`directory_id`),
UNIQUE KEY `IDX_DIRECTORY_PATH` (`name`, `path`),
KEY `parent_id` (`parent_id`),
CONSTRAINT `FK_DIRECTORY_PARENT_ID` FOREIGN KEY (`parent_id`)
REFERENCES `core_directory_storage` (`directory_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory storage'; SET FOREIGN_KEY_CHECKS = 1;
Magento产品列表按照日期排序
[magento patch]/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
改为
magento问题集2的更多相关文章
- magento问题集3
MISSING LANGUAGE FILES OR DIRECTORIES A:已经装了俄语包,也是russian目录,在前台也可以用.但是在后台最上面总是显示MISSING LANGUAGE FIL ...
- magento问题集
magento产品页面价格出现2遍 In app\design\frontend\default\default\template\catalog\product\view\type\Simple.p ...
- magento 小问题解决方案集
magento错误 Mage registry key "_singleton/core/resource" already exists解决方法:1.清理magento的var/ ...
- Magento table rates表运费设置
在magento中集成了Table rate表运费,这种运输方式.表运费就是我们自己写个运费表,根据距离和商品重量设置运费,制做成一张csv格式的表,导入到magento中,来实现运费的控制. 在我的 ...
- Redis集群部署
1.1.1redis简介 Redis 是一个开源的使用 ANSI C 语言编写.支持网络.可基于内存亦可持久化的日志 型. Key-Value数据库 1.1.2redis常见使用场景 1.会话缓存(S ...
- Magento创建configurable产品的要点
接着上一篇用API创建可配置的产品Configurable Product说事.Magento的产品类型可分为Simple Product.Group Product.Configurable Pro ...
- magento -- 如何为商品分类(category)添加自定义属性
在magento 中,由于使用了强大的EAV设计方法,我们可以很方便的给商品添加任意数量的属性.然而magento 没有给我们提供给商品分类添 加属性的功能.尽管我们知道magento所采用的EAV设 ...
- magento搜索属性值的设置方法
前台特性(Frontend Properties)在快速搜索中应用(Use in quick search) - 开启此选项,在客户使用Header中的 搜索功能时Magento将搜索所有产品这个At ...
- magento产品eav笔记【持续跟新...】
//magento把产品信息分在子表中,最顶上的表是catalog_product_entity,仅仅包含产品的信息(SKU) //表eav_attribute,这张表在magento里为全部不 同的 ...
随机推荐
- NoSQL你知多少?
1.NoSQL是什么? NoSQL 是 Not Only SQL 的缩写,意即"不仅仅是SQL"的意思,泛指非关系型的数据库.强调Key-Value Stores和文档数据库的优点 ...
- Java JDK的安装以及环境变量的配置
安装并配置完Android SDK之后,本想着可以做个简单的APP应用了,只是依然提示我“请确认Java JDK是否安装”类似的报错,于是又进行了Java JDK的安装以及环境变量的配置. 1.下载地 ...
- 修改WAMPServer中MySql中文乱码的方法
修改MySql的配置文件my.ini,在[client]段落增加:default-character-set=utf8;在[mysqld]段落增加:character_set_server=utf8; ...
- 基于TCP的通信 客户端
#include <WINSOCK2.H> #include <stdio.h> // socket 套接字 #pragma comment (lib,"Ws2_32 ...
- HDU 4888 Redraw Beautiful Drawings(2014 Multi-University Training Contest 3)
题意:给定n*m个格子,每个格子能填0-k 的整数.然后给出每列之和和每行之和,问有没有解,有的话是不是唯一解,是唯一解输出方案. 思路:网络流,一共 n+m+2个点 源点 到行连流量为 所给的 ...
- USB鼠标按键驱动
现象:把USB设备接到PC 1. 右下角弹出"发现android phone" 2. 跳出一个对话框,提示你安装驱动程序 问1. 既然还没有"驱动程序",为何能 ...
- Python的排序
1.reversed() 这个很好理解,reversed英文意思就是:adj. 颠倒的:相反的:(判决等)撤销的 print list(reversed(['dream','a','have','I' ...
- IP数据报的格式
1. IP数据报首部的固定部分中的各字段 ①版本:占4位,指IP协议的版本.通信双方使用的 IP协议版本必须一致.日前广泛使用的 IP协议版本号为 4 (即 IPv4). IPv6 目前还处于起步阶段 ...
- tomcat 详解
首先搞清楚几个概念:Servlet容器与web容器.Servlet容器的主要任务是管理servlet的生命周期,而web容器更准确的说应该叫web服务器,它是来管理和部署web应用的.还有一种服务器叫 ...
- VMWare Workstation 10.0 Preview CN
What's New in the VMware Workstation Technology Preview July 2013 The VMware Workstation team is exc ...