ecshop调用指定广告的方法】的更多相关文章

在include/lib_goods.php文件下面新增:function getads($cat,$num){ $time = gmtime();$sql = "SELECT * FROM " . $GLOBALS['ecs']->table('ad') . " where position_id=".$cat." and start_time <= '" . $time . "' AND end_time >= '…
  在include/lib_goods.php文件下面新增:function getads($cat,$num){$time = gmtime();$sql = "SELECT * FROM " . $GLOBALS['ecs']->table('ad') . " where position_id=".$cat." and start_time <= '" . $time . "' AND end_time >=…
第一步 在系统目录文件找到includes/lib_goods.php  这个文件打开 在此页最底部加入以下函数代码 /** * 首页获取指定分类产品 * * @access public * @param string $cat_id53_best_goods * @param array $cat_id53_best_goods * @return array */ function index_get_cat_id_goods_best_list($cat_id = '', $num =…
原文地址:http://www.ecshoptemplate.com/article-1348.html ECShop中关于广告的调用方法,网上有很多,现在要介绍的不同于其他,根据实际情况选择使用,以首页调用为例: 1.在index.php页面添加调用函数: /* * 调用广告位 */ function index_ad_diy() { $sql = ‘SELECT * FROM ‘ . $GLOBALS['ecs']->table(‘ad’) . ‘ ORDER BY end_time asc…
打开 index.php 添加 fun函数一个,需放在<php与?>中间. /** * 获得指定栏目的文章列表. * @param int $cid 栏目ID * @param int $row 条数 * @return array */ function index_get_articles($cid = 0, $row = 10){ $ta = $GLOBALS['ecs']->table('article'); $tac = $GLOBALS['ecs']->table('a…
未测试 1.includes/lib_goods.php文件.把SQL语句改一下,与category表关联即可 将 $sql = 'SELECT g.goods_id,g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, ' . 改为 $sql = 'SELECT g.goods_id,g.cat_id,c.parent_id,g.goods_name, g.go…
举例如首页调用方法: 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是调用数量 $sm…
package oracle.apps.pon.printing.cp; import java.io.InputStream; import java.io.FileOutputStream; import oracle.jbo.domain.BlobDomain; import oracle.apps.fnd.cp.request.CpContext; import oracle.apps.fnd.cp.request.LogFile; import oracle.apps.fnd.cp.r…
在模板页里首页写上代码:         <?php$children = get_children(16);//此处为产品分类ID$smarty->assign( 'bestGoods16',get_category_recommend_goods('best', $children));?> 然后在模板文件里调用就行了.…
一.在列表页可以用{$goods.goods_thumb}   {$goods.goods_img}调用缩略图和商品图片 就是没有调用原图的下面是修改category.php 总sql语句处替换成下面的部分(把original_img 字段加进去) $sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS o…