ecshop在商品类表页添加类似于精品的自定义字段.docVIP

  • 6
  • 0
  • 约4.78千字
  • 约 4页
  • 2017-06-08 发布于重庆
  • 举报

ecshop在商品类表页添加类似于精品的自定义字段.doc

ecshop在商品类表页添加类似于精品的自定义字段

目前在做自己的博客爱T-blog web开发、分享 与爱T们技术交流 在商品列表页添加自定义字段 爱T-blog 1、首先要修改数据表结构,给表 ecs_goods 增加新字段:other_col, 进入ECSHOP后台 》数据库管理 》SQL查询,输入下面SQL语句,提交。注意如果你的数据表前缀不是ecs_ 请自行修改之 alter table ecs_goods add column other_col varchar 64 ; 2. 打开admin/goods.php 在/* 处理商品数据 */那里 $is_hot isset $_POST[is_hot] ? 1 : 0;(大约803行) $other_col isset $_POST[other_col] ? 1 : 0; 在 /* 入库 */添加 /* 入库 */ if $is_insert if $code $sql 揑NSERT INTO ?. $ecs- table 慻oods? . ? goods_name, goods_name_style, goods_sn, ?. 揷at_id, brand_id, shop_price, market_price, is_promote, promote_price, ?. 損romote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, ?. 搒eller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, other_col,?. 搃s_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, rank_integral, suppliers_id ?. 揤ALUES ?_POST[goods_name]? ?goods_name_style? ?goods_sn? ?catgory_id? ?. 搼$brand_id? ?shop_price? ?market_price? ?is_promote?$promote_price? ? 搼$promote_start_date? ?promote_end_date? ?goods_img? ?goods_thumb? ?original_img? ? 搼$_POST[keywords]? ?_POST[goods_brief]? ?_POST[seller_note]? ?goods_weight? ?goods_number warn_number? ?_POST[integral]? ?give_integral? ?is_best? ?is_new? ?is_hot?$other_col? ?is_on_sale? ?is_alone_sale? $is_shipping, _POST[goods_desc]? 憯 . gmtime . 搼, 憯. gmtime .攽, ?goods_type? ?rank_integral? ?suppliers_id else $sql 揑NSERT INTO ?. $ecs- table 慻oods? . ? goods_name, goods_name_style, goods_sn, ?. 揷at_id, brand_id, shop_price, market_price, is_promote, promote_price, ?. 損romote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, ?. 搒eller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, other_col,is_real, ?. 搃s_on_sale, is_alone_sale, is_shipping, goods_desc, add_t

文档评论(0)

1亿VIP精品文档

相关文档