增进宣布商品时可自界说一个初始点击数
2016-07-07 14:55 来源:www.chinab4c.com 作者:ecshop专家
先来说增进宣布商品时可自界说一个初始点击数 打开admin/templates/good_info.htm 在吻合的位置插手: <tr> <td class="label">商品点击数:</td> <td><input type="text" name="click_count" value="{$goods.click_count}" size="20" /></td> </tr> 接着打开admin/goods.php,找到 setcookie('ECSCP[last_choose]', $catgory_id . '|' . $brand_id, gmtime() + 86400); 在它的上边增进一段PHP代码,留意是上边 /* 宣布商品时自界说初始化点击数 */ if($_POST['click_count']) { $db->query("UPDATE".$ecs->table('goods')."SET click_count='$_POST[click_count]' WHERE goods_id='{$goods_id}'"); } 完成! 再来说说 增进宣布商品时随机一个初始点击数 打开admin/goods.php,查找并增进如下标亮几个处所即可。 /* 入库 */ if ($is_insert) { $rand = rand(100,500); if ($code == '') { $sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " . "cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " . "promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " . "seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, " . "is_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, rank_integral, suppliers_id, click_count)" . "VALUES ('$_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', '$is_on_sale', '$is_alone_sale', $is_shipping, ". " '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$rank_integral', '$suppliers_id', '$rand')"; } else { $sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " . "cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " . http://fuerdylc621.com http://gaoefsj881.com http://mengtkl891.com "promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " . "seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, is_real, " . "is_on_sale, is_alone_sale, is_shipping, goods_desc, add_time, last_update, goods_type, extension_code, rank_integral, click_count)" . "VALUES ('$_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', 0, '$is_on_sale', '$is_alone_sale', $is_shipping, ". " '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$code', '$rank_integral', '$rand')"; } } 完成! 当你把随机和自界说都改好后,2种都可以行使了。 |
最近更新
常用插件
- ecshop2.7.1打印发货单插件
ecshop2.7.1打印发货单插件介绍:ecshop2.7.1和以前的ecshop版本不一样,ecs...
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
- ecshop二次开发详细页面生
插件介绍: ECSHOP系统,在很多时候,很多商品没有人购买,不但购买的人...
- ecshop分类批量扩展插件
ecshop分类批量扩展插件,这个插件是ecshop插件里面比较核心的插件。我们...
- ecshop商品分类名称增加样
ecshop插件介绍:本插件可以方便在后台管理,为ecshop商品分类名称增加样...
ecshop热门问答
ecshop热门资料
使用ecshop
ecshopECSHOP网站系统
ecshopmiddle
ecshopstring
ecshop图示
ecmall收货地址
ecshop产品名称
ecshop文章、访问、权限
ecshopCompare
ecshopECshop
ecshopEC二次开发
ecmall排行
ecshop属性规格
ecshop折扣率
ecshop多价格购物车
ecshop退出
ecshoptxt
ecshopcoffee
ecshop经常性
ecshop帐号登录
ecshop清单
ecshop超额
ecshop新年
ecshop倒计时效果
ecshop赐教
ecshopJS模块切换
ecshop图片不能上传
ecshop手续费
ecshop搬迁
ecshop订货