20

ECSHOP goods表字段分析

goods_id                         产品id
cat_id                              分类id
goods_sn                       产品编码
goods_name                  产品名称
goods_smallname         产品副名称
goods_name_style        产品名称 风格(加粗,颜色等)
click_count                    点击量
brand_id                        品牌id
provider_name              空
goods_number             库存
goods_weight               产品重量
market_price                市场价格
shop_price                   商店价格
promote_price             促销价格
promote_start_date    促销开始日期
promote_end_date     促销结束日期
warn_number             仓库警告最低数量
keywords                    商品关键词
goods_brief                商品简介
goods_desc               商品描述
goods_thumb            商品缩略图 100*100
goods_img                商品大图  230*230
original_img              商品中图(原始)  100*199
is_real                       是否是实物
extension_code        如果不是实物 则是什么品类
is_on_sale                是否上架
is_alone_sale
is_shipping              是否包运费
integral                    积分实际积分/100
add_time                添加实际
sort_order             ec内部为100 还需查
is_delete               是否是删除状态
is_best                  是否是精品
is_new                  是否是最新
is_hot                   是否是最热
is_promote          是否是促销
bonus_type_id          红包类型id
last_update               最后一次更新时间
goods_type               待验证(商品类型) 可为0
seller_note                空值
give_integral              -1
rank_integral            空
suppliers_id             空
is_check                  空
tb_iid                        空
tb_data                    空

06

点击ECShop自定义导航栏出错提示“……navigator.php on line 382”

PHP Warning: Illegal string offset 'cat_name' in D:\ECShop\admin\navigator.php on line 382
PHP Warning: Illegal string offset 'view_name' in D:\ECShop\admin\navigator.php on line 382

增加对$val的判断力

 

03

ECSHOP 出现 XmlHttpRequest status: [500] Unknow status.解决方法

ECSHOP 出现 XMlHttpRequest status:[500] Unknow status 这个错误

我们怎么解决呢?

我们可以把/admin/templates/top.htm 这个文件中

{insert_scripts files=”../js/transport.js”}和 </head>
之间的代码删除

也就是将下面这段代码删除…

 

02

ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法

安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www\cls_template.php on line 418

解决办法:

打开cls_template.php文件中第418行发现下面这段代码:

$tag_sel = array_shift(explode(' ', $tag));
忘记说了,我的PHP版本是5.4.19,PHP5.3以上默认只能传递具体的变量,而不能通过函数返回值传递,所以这段代码中的explode就得移出来重新赋值了

$tagArr = explode(' ', $tag);
$tag_sel = array_shift($tagArr);

这样之后顶部的报错没了,左侧和底部的报错还需要去ecshop的后台点击清除缓存才能去除。

02

Ecshop安装过程中的问题:cls_image::gd_version()和不支持JPEG

在安装Ecshop的时候,遇到两个问题:

1.Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\X\www\ecshop\install\includes\lib_installer.php on line 31

解决:找到install/includes/lib_installer.php中的第31行   return cls_image::gd_version();然后在找到include/cls_image.php中的678行,发现gd_version()方法未声明静态static,所以会出错。这时候只要:

1)将function gd_version()改成static function gd_version()即可。

2)或者将install/includes/lib_installer.php中的第31行return cls_image::gd_version();改成:

$p = new cls_image();
return $p->gd_version();

2.检测环境的时候提示:是否支持 JPEG是不支持的。

解决:查看发现有libjpeg.lib库,GD2库也有,都加载了,也都正常。查看ecshop源代码发现install/includes/lib_installer.php中第100行,JPEG写成了JPG,正确的应该是:

$jpeg_enabled = ($gd_info['JPEG Support']        === true) ? $_LANG['support'] : $_LANG['not_support'];

为何说Ecshop写错了,因为我打印数组$gd_info的时候,里面的键名是:JPEG Support。而$gd_info数组里的值都是直接调用系统环境变量的。

3.默认时区问题:Warning: date_default_timezone_get(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in D:\X\www\ecshop\install\includes\lib_installer.php on line 225

解决:方法1,将php.ini里是date.timezone前的”;”去掉,改成:date.timezone = PRC;

方法2,在页头使用 ini_set('date.timezone','Asia/Shanghai');

方法3,在页头使用date_default_timezone_set()设置 date_default_timezone_set('PRC'); //东八时区 echo date('Y-m-d H:i:s');