存档

2008年11月 的存档

oscommerce到zencart迁移

2008年11月26日

先安装zencart,假设所有oscommerce表的表名是以osc开头的

I had no products in the Zen Cart Database so I imported the id fields. If you installed the sample data or entered any products then this probably won’t work. If you wish to reset any tables and delete the items try using TRUNCATE in MySQL. This worked for version 2.2 of osCommerce and 1.3.7 of Zen Cart.

  1. Back up the old osCommerce Database and all the files on the Web Server. (I mean it)
  2. Log into phpMyadmin for the osCommerce Database and export any tables that begin with osc_categories* or osc_products*
  3. Log into phpMyAdmin on the destination MySQL Server and import all those tables.

INSERT INTO categories SELECT *, 1 FROM osc_categories;
INSERT INTO categories_description SELECT *, ” FROM osc_categories_description;
INSERT INTO products_attributes (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix) SELECT * FROM osc_products_attributes;
INSERT INTO products_attributes_download SELECT * FROM osc_products_attributes_download;
INSERT INTO products_description SELECT * FROM osc_products_description;
INSERT INTO products_notifications SELECT * FROM osc_products_notifications;
INSERT INTO products_options (products_options_id, language_id, products_options_name) SELECT * FROM osc_products_options;
INSERT INTO products_options_values SELECT *, 0 FROM osc_products_options_values;
INSERT INTO products_options_values_to_products_options SELECT * FROM products_options_values_to_products_options;
INSERT INTO products_to_categories SELECT * FROM osc_products_to_categories;
INSERT INTO products (products_id, products_quantity, products_model, products_image, products_price, products_date_added, products_last_modified, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_ordered) SELECT * FROM osc_products;

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

电子商务

WP PageNavi安装和使用

2008年11月25日

WP Pagenavi

  默认安装的Wordpress在操作大量文章时候,使用“上一篇”和“下一篇”进行页面导航,不是很易用。WP Pagenavi则可以让你在文章上增加页码来链接多个页面,这将使浏览多文章页面的时候更加容易. 下载汉化版wp pagenavi后用其中的mo文件覆盖即可。

使用: 打开 /wp-content/themes/<YOUR THEME NAME>/footer.php(或者其他文件如 index.php)插入的代码<?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?> ,在你的index.php文件中找到原来的翻页代码,应该在index.php的<?php endwhile; ?>后面,比如我原来的是:
<div class="navigation">
<span class="previous-entries"><?php next_posts_link('Previous Entries') ?></span> <span class="next-entries"><?php previous_posts_link('Next Entries') ?></span>
</div>

直接全部覆盖了就行了,比如我的修改为:
<div class="navigation">
<?php wp_pagenavi() ?>
</div>

到 “WP-Admin -> Options -> PageNavi” 配置 WP-PageNavi 插件的参数
3.1.翻页文本内容
Text For Number Of Pages 总页数
Text For Current Page 当前页
Text For Page 页数
Text For First Post 首页
Text For Last Post 尾页
Text For Next Post 下一页
Text For Previous Post 上一页
Text For Next … 下
Text For Previous … 上
3.2.翻页显示选项
Page Navigation Style 普通(横排列表)和下拉(Drop Down List)
Number Of Many Pages To Show 直接显示页的数量
Always Show Page Navigation 是否总是显示翻页功能

升级方法

  1. 禁用 WP-PageNavi 插件
  2. 打开 wp-content/plugins 文件夹
  3. 上传并覆盖文件夹 pagenavi
  4. 删除文件 pagenavi.php
  5. 激活 WP-PageNavi 插件
VN:F [1.9.22_1171]
Rating: 6.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

软件和工具