2.71怎么修改商品点击数随机
2016-07-07 15:03 来源:www.chinab4c.com 作者:ecshop专家
admin/goods.php中看看就知道了 |
回答:
演示地址:www.wm0511.cnwww.zhaohy.net/1 打开: admin/goods.php文件. 查找: 1. if ($is_insert) 2. { 3. if ($code == '') 4. { 5. $sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " . 6. "cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " . 7. "promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " . 8. "seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, " . 9. "is_on_sale, is_alone_sale, goods_desc, add_time, last_update, goods_type, rank_integral)" . 10. "VALUES ('$_POST[goods_name]', '$goods_name_style', '$goods_sn', '$catgory_id', " . 11. "'$brand_id', '$shop_price', '$market_price', '$is_promote','$promote_price', ". 12. "'$promote_start_date', '$promote_end_date', '$goods_img', '$goods_thumb', '$original_img', ". 13. "'$_POST[keywords]', '$_POST[goods_brief]', '$_POST[seller_note]', '$goods_weight', '$goods_number',". 14. " '$warn_number', '$_POST[integral]', '$give_integral', '$is_best', '$is_new', '$is_hot', '$is_on_sale', '$is_alone_sale', ". 15. " '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$rank_integral')"; 16. } 17. else 18. { 19. $sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " . 20. "cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " . 21. "promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " . 22. "seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, is_real, " . 23. "is_on_sale, is_alone_sale, goods_desc, add_time, last_update, goods_type, extension_code, rank_integral)" . 24. "VALUES ('$_POST[goods_name]', '$goods_name_style', '$goods_sn', '$catgory_id', " . 25. "'$brand_id', '$shop_price', '$market_price', '$is_promote','$promote_price', ". 26. "'$promote_start_date', '$promote_end_date', '$goods_img', '$goods_thumb', '$original_img', ". 27. "'$_POST[keywords]', '$_POST[goods_brief]', '$_POST[seller_note]', '$goods_weight', '$goods_number',". 28. " '$warn_number', '$_POST[integral]', '$give_integral', '$is_best', '$is_new', '$is_hot', 0, '$is_on_sale', '$is_alone_sale', ". 29. " '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$code', '$rank_integral')"; 30. } 31. } 32. 复制代码 替换成: 1. 2. if ($is_insert) 3. { 4. $rand = rand(100,500); 5. if ($code == '') 6. { 7. $sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " . 8. "cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " . 9. "promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " . 10. "seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, " . 11. "is_on_sale, is_alone_sale, goods_desc, add_time, last_update, goods_type, rank_integral,click_count)" . 12. "VALUES ('$_POST[goods_name]', '$goods_name_style', '$goods_sn', '$catgory_id', " . 13. "'$brand_id', '$shop_price', '$market_price', '$is_promote','$promote_price', ". 14. "'$promote_start_date', '$promote_end_date', '$goods_img', '$goods_thumb', '$original_img', ". 15. "'$_POST[keywords]', '$_POST[goods_brief]', '$_POST[seller_note]', '$goods_weight', '$goods_number',". 16. " '$warn_number', '$_POST[integral]', '$give_integral', '$is_best', '$is_new', '$is_hot', '$is_on_sale', '$is_alone_sale', ". 17. " '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$rank_integral','$rand')"; 18. } 19. else 20. { 21. $sql = "INSERT INTO " . $ecs->table('goods') . " (goods_name, goods_name_style, goods_sn, " . 22. "cat_id, brand_id, shop_price, market_price, is_promote, promote_price, " . 23. "promote_start_date, promote_end_date, goods_img, goods_thumb, original_img, keywords, goods_brief, " . 24. "seller_note, goods_weight, goods_number, warn_number, integral, give_integral, is_best, is_new, is_hot, is_real, " . 25. "is_on_sale, is_alone_sale, goods_desc, add_time, last_update, goods_type, extension_code, rank_integral,click_count)" . 26. "VALUES ('$_POST[goods_name]', '$goods_name_style', '$goods_sn', '$catgory_id', " . 27. "'$brand_id', '$shop_price', '$market_price', '$is_promote','$promote_price', ". 28. "'$promote_start_date', '$promote_end_date', '$goods_img', '$goods_thumb', '$original_img', ". 29. "'$_POST[keywords]', '$_POST[goods_brief]', '$_POST[seller_note]', '$goods_weight', '$goods_number',". 30. " '$warn_number', '$_POST[integral]', '$give_integral', '$is_best', '$is_new', '$is_hot', 0, '$is_on_sale', '$is_alone_sale', ". 31. " '$_POST[goods_desc]', '" . gmtime() . "', '". gmtime() ."', '$goods_type', '$code', '$rank_integral','$rand')"; 32. } 33. } 复制代码 每次发表新商品,就自动会有点击数了. $rand = rand(100,500); 自己改里面的数值. http://bbs.ecshop.com/viewthread ... s-%3Etable%28%27goo |
最近更新
常用插件
- ecshop2.7.1打印发货单插件
ecshop2.7.1打印发货单插件介绍:ecshop2.7.1和以前的ecshop版本不一样,ecs...
- ecshop商品分类名称增加样
ecshop插件介绍:本插件可以方便在后台管理,为ecshop商品分类名称增加样...
- ecshop分类批量扩展插件
ecshop分类批量扩展插件,这个插件是ecshop插件里面比较核心的插件。我们...
- ecshop二次开发详细页面生
插件介绍: ECSHOP系统,在很多时候,很多商品没有人购买,不但购买的人...
- ecshop二次商品订购人信息
ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的...
ecshop热门问答
ecshop热门资料
ecshopindex
ecshop货到付款
ecshop购物网站
ecshop自定义导航栏
ecshop不负责任
ecshop能力
ecshop小女子
ecshop册页
ecshop不可写错误
ecshop语言管理
ecshop闵行地区
ecshop摄制
ecshop重装系统
ecshop采集
ecshop图片框
ecshop分级
ecshop快递查询
ecshop最低
ecshop华语
ecshop流言板
ajax后台
ecshopU尚网
ecshop动静
ecshophotmail
ecshop技巧
ecshop主场
ecshopTOP10
ecshop404未找到
ecshop公司
ecshop留言板