我们知道在ecshop某些产品销售之后,销售量高的产品销售出去之后,能形成销售排行,ecshop的销售排行必须保持两个条件,首先是ecshop的商品必须库存足够,其次商品该商品必须上架的. 我们分析如何在ecshop销售排行调用促销价格和市场价格,首先找到ecshop中的lib_goods.php中的函数function get_top10($cats = ''),先检索商品市场价格,g.market_price,其次获取促销价格和促销的开始和结束时间g.promote_start_date,…
/*首页调用指定分类下的销售排行*/ function get_cats_top10($cat = '') { $sql = 'SELECT cat_id, cat_name ' . 'FROM ' . $GLOBALS['ecs']->table('category') . "WHERE parent_id = '$cat' ORDER BY sort_order ASC, cat_id ASC LIMIT 3"; $res = $GLOBALS['db']->getAl…
首先调用的标签代码如下: {pc:content action=”sitehits” siteid=”4″ num=”10″ order=”views DESC” cache=”3600″} {loop $data $r} {$r[title]} {/loop} {/pc} 另外我们还需要修改 phpcms 里模型代码以适用其上面的调用标签,打开 phpcms\modules\content\classes\content_tag.class.php 文件,在里面添加一个函数,代码如下: /**…
需求很简单,能够创建销售订单,在行项目里添加产品,带出价格来,同时把总价显示在销售订单抬头区域. 如下图所示: 下面是具体配置. Business Configuration里,点击Sales Order的配置: 新建一个document type,maintenance mode设为internal,意思是使用internal pricing,这样不和ERP的pricing做集成. Products工作中心,Price Lists视图,创建一个新的price list: 维护Scale,这个S…
看到标题有的人觉得这个很复杂,其实这个没那么复杂,直接用下面的方法,就可以在ECSHOP的任意页面调用商品属性. 一)打开includes\lib_insert.php文件,在最后面增加一个函数: function insert_attr($arr) { static $static_res = NULL; $aid= isset($arr['aid'])?$arr['aid']:0; $gid= isset($arr['gid'])?$arr['gid']:0; if($aid==0) ret…
调用文章列表,需要修改对应的程序,修改index.php或者arctical_cat.php文件在$smarty->assign('new_articles', index_get_new_articles());下面增加$smarty->assign('class_articles_4', index_get_class_articles(4,6)); // 分类调用文章//4就是文章分类ID,其中6是调用数量$smarty->assign('class_articles_5', in…
举例如首页调用方法:1.先打开index.php文件找到以下代码:$smarty->assign('new_articles', index_get_new_articles()); // 最新文章在它下面增加以下://调用方法$smarty->assign('class_articles_4', index_get_class_articles(4,6)); // 分类调用文章//调用多个就修改传进去的参数,以及模板接收的变量,其中上面的4就是文章分类ID,其中6是调用数量$smarty-&…
<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script> <link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" /> {insert_scripts files="…
找到lib_goods.php第147行,代码 $sql = 'SELECT g.goods_id, g.goods_name, g.shop_price,g.goods_thumb, SUM(og.goods_number) as goods_number ' . 1.替换一下代码 $sql = 'SELECT g.goods_id, g.goods_name, g.shop_price,g.promote_price,g.goods_thumb, SUM(og.goods_number) a…
1.在ecs_category 表 添加 template 字段 可以在后台运行sql语句:alter table `ecs_category` Add column template text NOT NULL AFTER `style` 前缀自己改 2.打开admin/templates/category_info.htm 文件,分类的样式表文件 的下一行,加放以下代码 搜索:javascript:showNotice('noticeGoodsSN') 找到:大概在128行 <tr>   …