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

    protected $_direction           = 'asc';

改为

    protected $_direction           = 'desc';

转载于:https://www.cnblogs.com/focai/p/4484796.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值