A-A+

整合WordPress到magento

2011年03月29日 WordPress 暂无评论 阅读 277 次浏览 次
整合Wordpress到magento是需要用到插件的,下面来说下如何整合Wordpress到magento
 
首先到后台,连接到magento content,之后输入下面的key
 
Magento Connect:magento-community/Mage_Blog
 
首先要提醒,Magento和Wordpress都需要安装到同一个数据库上。不然可能会发生比较多的错误,可以用表前缀来区别开。
 
特点:
 
This extension adds the ability to integrate wordpress into magento.
It has adjustable page layout from with in the admin menu. 
Wordpress menu can be set to show in the left column, right column, both or neither. 
A link in the footer can be enabled or disabled.
And the page title can also be set.
Below are instructions on changes that need making to wordpress and magento to enable this extension to work. Copies of these files with the changes already applied are included in the extension. These however should be used with caution. They can be found in the magento base, in a folder called wordpress_module_files.
 
安装步骤:
 
1. find index.php in the root of your magento installation and find the following line of code
require_once $mageFilename;
and add the following after it
define('WP_USE_THEMES', true);
require('./wordpress/wp-blog-header.php');
you will need to be sure that the second line points to the location of your wordpress installation, as it is, it assumes wordpress in installed in the magento directory.
2. in wordpress/wp-settings.php find the following lines of code and remove the & symbol
Line 399
$wp_the_query =& new WP_Query();
Line 414
$wp_rewrite =& new WP_Rewrite();
Line 421
$wp =& new WP();
Line 456
$wp_locale =& new WP_Locale();
also in wordpress/wp-settings.php remove or comment out the following lines
Line 386
// Escape with wpdb.
$_GET = add_magic_quotes($_GET );
$_POST = add_magic_quotes($_POST );
$_COOKIE = add_magic_quotes($_COOKIE);
$_SERVER = add_magic_quotes($_SERVER);
3. In wordpress/wp-includes/l10n.php at line 116
change
function __($text, $domain = 'default') {
return translate($text, $domain);
}
to
if (!function_exists('__')) {
function __($text, $domain = 'default') {
return translate($text, $domain);
}
}
4. now to the wordpress part. copy the theme in wordpress_module_files/wordpress-theme into wordpress\wp-content\themes
5. log into the admin panel of wordpress and click settings. then change the “Blog address (URL)” tohttp://yoursite.com/magento/blog change to fit your site, but leave the blog part. Save settings then Click permalinks. Ensure permalinks are set to default. Finaly goto design and select the magento theme installed in step 4.
6. now go to http://yoursite.com/magento/blog to access the blog. 
 
经过上述步骤,WordPress就添加到了你的magento系统。
 
 
 
 
 
标签:

评论已关闭!

Copyright © 香港虚拟主机_美国虚拟主机_香港服务器_美国服务器租用托管 保留所有权利.   Theme  Ality 蜀ICP备14006632号-1

用户登录