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里为全部不 同的 ...
随机推荐
- Eclipse添加jsp页面后引入java指令报错解决方法
新建jsp页面老提示: Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpS ...
- [转载]SAP BASIS学习手册
原文地址:SAP BASIS学习手册作者:sapren 1:)要用scc4定义一个新的client,同时定义好类型(T,P,D等) 2:)用user/pasword: (sap*/pass) ...
- Codeforces Round #313 (Div. 2) C. Gerald's Hexagon
C. Gerald's Hexagon time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- SqlServer 慢查询分析优化
分三步: 记录慢查询的语句到日志文件 1.首先在SSMS,工具菜单下打开Profiler. 2.输入你用户名密码登陆. 3.常规,勾选保存到文件,选择一个文件路径,设置文件大小,这样可以分文件存储日志 ...
- c# 调用 ShellExecute
using System.Runtime.InteropServices; namespace ConsoleTest{ class Program { public enu ...
- function format_number(srcNumber, n) {
function format_number(srcNumber, n) {var dstNumber = parseFloat(srcNumber);if (isNaN(dstNumber)) {r ...
- WP8.1 Study5:Data binding数据绑定
一.数据绑定 最简单的编程UI控件的方法是写自己的数据来获取和设置控件的属性,e.g. , textBox1.Text = "Hello, world"; 但在复杂的应用程序,这样 ...
- 端午小长假--前端基础学起来03CSS为网页添加样式
定义:用于定义HTML内容在浏览器内的显示样式,如文字大小,颜色,字体 设置样式:将要设置样式的内容用<span></span>样式括起来,然后再head中设置span < ...
- NABCD分析
NABCD——今日事 N(Need):开创的成就系统可以在一定程度上督促用户坚持下来. A(Approach):做一个APP软件,是在android平台构建. B(Benefit):可以逐步改变用户的 ...
- SharePoint开发 - 自定义导航菜单(一)菜单声明与配置
博客地址 http://blog.csdn.net/foxdave 本篇描述自定义sharepoint菜单的一种方式,自定义菜单适用于一些门户等需求的网站 自定义的菜单有自己的数据源,可以是数据表,可 ...