修复Magento错误 catalogsearch_fulltext is marked as crashed and should be repaired

Magento 版本: Magento v1.6.0
问题描述:

a:5:{i:0;s:124:”SQLSTATE[HY000]: General error: 145 Table ‘./nsellfr2013/catalogsearch_fulltext’ is marked as crashed and should be repaired”;i:1;s:3879:”

症状:Index Management 中 Catalog Search Index 状态提示为: processing 无法更新

修复步骤:

用管理员账号登陆MySQL服务器命令窗口

mysql -uroot -p
#输入密码
use 出问题的数据库

再执行

REPAIR TABLE catalogsearch_fulltext;

如果修复成功,则有如下提示

+————————————+——–+———-+———-+
| Table | Op | Msg_type | Msg_text |
+————————————+——–+———-+———-+
| nsellfr2013.catalogsearch_fulltext | repair | status | OK |
+————————————+——–+———-+———-+
1 row in set (0.71 sec)

问题解决

Magento 使用Memcached 提升性能

Memcached 安装教程:
CentOS 6 下Memcached-1.4.13的安装,启动和关闭等
详细教程: http://hxq0506.iteye.com/blog/1388971

Memcached 下载地址 http://memcached.org/

libevent-2.0.19-stable.tar.gz 下载地址: http://libevent.org/

Magento使用Memcache做缓存和Session
http://koda.iteye.com/blog/1477227

http://www.atomicpages.net/blog/2012/04/11/fixing-cant-get-filling-percentage-magento-error/

Improving the File Cache Backend
http://magebase.com/magento-tutorials/improving-the-file-cache-backend/

Magento免费插件2

8, Search Autocomplete and Suggest

Ajax 自动搜索结果,并有搜索建议。搜索出的结果含图片,可以包含商品名,描述等信息。
后台可以自定义样式。对提升用户体验有帮助
http://www.magentocommerce.com/magento-connect/search-autocomplete-8858.html
Platform: Community
Compatible with: 1.3, 1.4, 1.4.1.1, 1.4.2, 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7
Key: http://connect20.magentocommerce.com/community/Searchautocomplete

7, SEO Friendly Categories

简单的说就是将嵌套目录的URL改为根目录下的url,较少URL的目录层级,缩短URL。
对于目录嵌套很多,产品丰富的站来说,次插件必备

seo friendly categories

seo friendly categories


http://www.magentocommerce.com/magento-connect/seo-friendly-categories-7026.html
Platform: Community
Compatible with: 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7
KEY: http://connect20.magentocommerce.com/community/activo_categoryurlseo

6, BankPayment

银行转账也叫 Bank Transfer / Wire Transfer / Bank Deposit Payment Instructions
http://www.magentocommerce.com/magento-connect/bankpayment.html
KEY: http://connect20.magentocommerce.com/community/BankPayment

Bank Transfer

Bank Transfer


Bank prepayment module which notifies the buyer to which bank account he has to transfer the money.

安装完后,进入 System -> Configuration -> Sales -> Payment Methods -> Bank Prepayment 设置相关选项:

BIC = SWIFE Code
IBAN = International Bank Account Number 中国的银行没有IBAN代码,或者你可以联系银行的客户外币计算部门询问。
SWIFT是“Society Worldwide Interbank Financial Telecommunication环球同业银行金融电讯协会”的英文简称。

支持:
Platform: Community
Compatible with: 1.4, 1.4.1.1, 1.4.2, 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7

Platform: Enterprise
Compatible with: 1.8.0.0, 1.9.0.0, 1.9.1.0, 1.9.2.0, 1.10, 1.11, 1.11.1, 1.12

5, 关联产品管理 自动设置交叉、热卖、相关产品

(1), Related Products Manager

自动关联产品插件,推荐级别:五星
关联产品管理 自动设置交叉、热卖、相关产品,一键设置,非常方便
Automatically generate related products, up-sells, and cross-sells for your entire catalog with one click.
Related Products Manager
http://www.magentocommerce.com/magento-connect/related-proudcts-manager-7301.html
KEY: http://connect20.magentocommerce.com/community/CommerceStack_Recommender

Platform: Community
Compatible with: 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7

(2), 可以自定义指定产品的批量关联销售插件

导入产品关联,交叉销售,热卖推荐关系
URL:http://www.magentocommerce.com/magento-connect/itib-mass-import-product-relations-upsell-and-cross-sell.html
KEY2: http://connect20.magentocommerce.com/community/ITIB_MassImportProductRelations
KEY1: magento-community/ITIB_MassImportProductRelations

4, 产品颜色选择插件

(1), Color Swatches for Custom Options

KEY: http://connect20.magentocommerce.com/community/easyswatches
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/12356/s/custom-options-color-swatches-9680/
Magento 产品颜色切换按钮
Platform: Community
兼容:Compatible with: 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7

Key features

Color swatches are applicable to all store products
Displaying color sets as dropdown, checkbox, radio buttons and multiple select
Uploading thumbnail images for color options
Defining the size of thumbnail images
Showing color values with text captions and price amount

(2), Gala Color Swatches Free

颜色切换插件2
URL:http://www.magentocommerce.com/magento-connect/gala-color-swatches-free-9787.html
KEY1:magento-community/Gala_Colorswatches
KEY2:http://connect20.magentocommerce.com/community/Gala_Colorswatches
Gala Color Swatches Free
Platform: Community
Compatible with: 1.4.1.1, 1.4.2, 1.5, 1.6, 1.6.1, 1.6.2.0

3, 价格符号调整插件

Price Display Format
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/11946/s/price-display-format-7907/
KEY:http://connect20.magentocommerce.com/community/ECGiken_Price

Platform: Community
Compatible with: 1.6.1, 1.6.2.0

2, ShippingEasy

http://www.magentocommerce.com/magento-connect/catalog/product/view/id/11925/s/shippingeasy-8697/
KEY: http://connect20.magentocommerce.com/community/shippingeasy_shipping_method

Platform: Community
Compatible with: 1.6, 1.6.1, 1.6.2.0

A free order-fulfilment system that saves you time and money on shipping.

1, 这个运费插件非常赞,可以为Magento设置多个自定义运费的运输方式

WebShopApps MatrixRate – #1 Multiple Table Rates Extension
http://www.magentocommerce.com/magento-connect/webshopapps-matrixrate-1-multiple-table-rates-extension-certified-bug-free.html
KEY1: magento-community/Auctionmaid_Matrxrate
KEY2: http://connect20.magentocommerce.com/community/Auctionmaid_Matrxrate

可以设置多重运费,及其运输方式的运费表
运费表
适应平台,兼容所有版本
Platform: Magento Go
Platform: Community 免费开源版
Compatible with: 1.2, 1.3, 1.4, 1.4.1.1, 1.4.2, 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7

Magento 企业版
Platform: Enterprise
Compatible with: 1.3.2.4, 1.7.0.0, 1.7.1.0, 1.8.0.0, 1.9.0.0, 1.9.1.0, 1.9.2.0, 1.10, 1.11, 1.11.1, 1.12

教你如何给Magento打补丁

操作环境:CentOS Linux
Magento 版本: CE v1.6.2

先将工作目录切换到您的Magento安装的根目录下,然后执行

第一步:备份,记得备份
如果你的安装目录在 magento下,那你就在magento目录同级目录里新建个backup 目录

mkdir -p backup
cp -r magento/* backup

注意,备份的文件必须放在Magento 的根目录以外,以防万一

第二步:下载Magento的补丁到Magento程序的根目录下。本文以最新的 2012-7-5 的Zend XMLRPC 函数库补丁为例。

温馨提示:记得点上面的链接去选择适合您当前版本的补丁。
本文的补丁适合Magento CE 1.5.0.0-1.7.0.1

wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/CE_1.5.0.0-1.7.0.1.patch

第三步:切换到Magento安装的根目录,执行打补丁命令

patch -p0 -i CE_1.5.0.0-1.7.0.1.patch

如果执行命令成功,则会有如下提示:

patching file lib/Zend/XmlRpc/Response.php
patching file lib/Zend/XmlRpc/Request.php

至此Magento的补丁已经安装好。

多学一点:打补丁的命令解释

patch -p0 -i name_of_the_patch_file

参数 name_of_the_patch_file 指补丁文件名

如果你想撤销刚才的补丁,让文件恢复到打补丁之前的状态该怎么办,执行如下命令即可

patch -p0 -R -i name_of_the_patch_file

本文参考来源:How to apply a patch to Magento

修改Magento 支持ImageMagick

Magento uses a GD2 library function called imagejpeg() to cache your product images. Unfortunately, the imagejpeg() function will always cause a slight degradation in image quality (yes, even if you specify 100% quality).

If you need razor sharp, crystal clear images for your store like I did (selling artwork), here’s a solution for you.

Step One: Install ImageMagick on your server (some hosts already have this installed).

Step Two: Install the IMagick pecl php extension.

Note: Directions for step one and step two: http://valokuva.org/?page_id=50

Step Three: Copy lib/Varien/Image/Adapter/Gd2.php to app/code/local/Varien/Image/Adapter/Gd2.php

mkdir -p app/code/local/Varien/Image/Adapter
cp lib/Varien/Image/Adapter/Gd2.php app/code/local/Varien/Image/Adapter

Step Four: In the Gd2.php file, in the save() function comment out

call_user_func_array($this->_getCallback("output"), $functionParameters);

This is the where Magento calls the imagejpeg() function. Yuck.
Now add the following code just below the commented out line.

$source_file = $this->_fileSrcPath. "/".$this->_fileSrcName;
$image_info = getimagesize($source_file);
$im = new Imagick();
$im->readImage($source_file);

//check to see if image needs to be resized (eg. thumbnails)
if ($image_info[0] != $this->_imageSrcWidth) {
     $im->thumbnailImage($this->_imageSrcWidth, $this->_imageSrcHeight);
}
$im->writeImage($fileName);

That’s it! This will create razor sharp product images and thumbnails.

Refrence: http://www.magentocommerce.com/boards/viewreply/299873/