• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_linked_goods函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_linked_goods函数的典型用法代码示例。如果您正苦于以下问题:PHP get_linked_goods函数的具体用法?PHP get_linked_goods怎么用?PHP get_linked_goods使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_linked_goods函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: ecs_header

    ecs_header("Location: ./\n");
    exit;
}
$goods_info['goods_name'] = encode_output($goods_info['goods_name']);
$goods_info['goods_brief'] = encode_output($goods_info['goods_brief']);
$goods_info['promote_price'] = encode_output($goods_info['promote_price']);
$goods_info['market_price'] = encode_output($goods_info['market_price']);
$goods_info['shop_price'] = encode_output($goods_info['shop_price']);
$goods_info['shop_price_formated'] = encode_output($goods_info['shop_price_formated']);
$goods_info['goods_number'] = encode_output($goods_info['goods_number']);
$smarty->assign('goods_info', $goods_info);
$shop_price = $goods_info['shop_price'];
$smarty->assign('rank_prices', get_user_rank_prices($goods_id, $shop_price));
// 会员等级价格
$smarty->assign('goods_info2', get_goods_info2($goods_id));
$smarty->assign('related_goods', get_linked_goods($goods_id));
$properties = get_goods_properties($goods_id);
// 获得商品的规格和属性
$smarty->assign('properties', $properties['pro']);
// 商品属性
$smarty->assign('footer', get_footer());
/* 查看商品图片操作 */
if ($act == 'view_img') {
    $smarty->assign('goods_desc', $goods_info['goods_desc']);
    $smarty->display('goods_img.dwt');
    exit;
}
/* 检查是否有商品品牌 */
if (!empty($goods_info['brand_id'])) {
    $brand_name = $db->getOne("SELECT brand_name FROM " . $ecs->table('brand') . " WHERE brand_id={$goods_info['brand_id']}");
    $smarty->assign('brand_name', encode_output($brand_name));
开发者ID:qgz,项目名称:ecshop,代码行数:31,代码来源:goods.php


示例2: ecs_header

 //获得投标记录
 //$repayrecord = get_goods_repay($goods_id);	//获得还款记录
 /* 获取所属大类的名称 */
 /*$sql = 'select a.cat_name from'.$ecs->table("category").' as a,'.$ecs->table("category").' as b where a.cat_id = b.parent_id and b.cat_id='.$goods["cat_id"];
   $goods_row = $db->getRow($sql);
   $goods_row_catname = $goods_row['cat_name'];*/
 if ($goods === false) {
     /* 如果没有找到任何记录则跳回到首页 */
     ecs_header("Location: ./\n");
     exit;
 } else {
     if ($goods['brand_id'] > 0) {
         $goods['goods_brand_url'] = build_uri('brand', array('bid' => $goods['brand_id']), $goods['goods_brand']);
     }
     $shop_price = $goods['shop_price'];
     $linked_goods = get_linked_goods($goods_id);
     $goods['goods_style_name'] = add_style($goods['goods_name'], $goods['goods_name_style']);
     /* 购买该商品可以得到多少钱的红包 */
     if ($goods['bonus_type_id'] > 0) {
         $time = gmtime();
         $sql = "SELECT type_money FROM " . $ecs->table('bonus_type') . " WHERE type_id = '{$goods['bonus_type_id']}' " . " AND send_type = '" . SEND_BY_GOODS . "' " . " AND send_start_date <= '{$time}'" . " AND send_end_date >= '{$time}'";
         $goods['bonus_money'] = floatval($db->getOne($sql));
         if ($goods['bonus_money'] > 0) {
             $goods['bonus_money'] = price_format($goods['bonus_money']);
         }
     }
     $smarty->assign('goods', $goods);
     $smarty->assign('goods_id', $goods['goods_id']);
     $smarty->assign('bid_record', $bidrecord);
     $smarty->assign('promote_end_time', $goods['gmt_end_time']);
     $smarty->assign('categories', get_categories_tree());
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:goods.php


示例3: while

     $db->query($sql);
     $sql = "SELECT 0 AS goods_id, attr_id, attr_value, attr_price " . "FROM " . $ecs->table('goods_attr') . " WHERE goods_id = '{$_REQUEST['goods_id']}' ";
     $res = $db->query($sql);
     while ($row = $db->fetchRow($res)) {
         $db->autoExecute($ecs->table('goods_attr'), addslashes_deep($row), 'INSERT');
     }
 }
 // 扩展分类
 $other_cat_list = array();
 $sql = "SELECT cat_id FROM " . $ecs->table('goods_cat') . " WHERE goods_id = '{$_REQUEST['goods_id']}'";
 $goods['other_cat'] = $db->getCol($sql);
 foreach ($goods['other_cat'] as $cat_id) {
     $other_cat_list[$cat_id] = cat_list(0, $cat_id);
 }
 $smarty->assign('other_cat_list', $other_cat_list);
 $link_goods_list = get_linked_goods($goods['goods_id']);
 // 关联商品
 $group_goods_list = get_group_goods($goods['goods_id']);
 // 配件
 $goods_article_list = get_goods_articles($goods['goods_id']);
 // 关联文章
 /* 商品图片路径 */
 if (isset($GLOBALS['shop_id']) && $GLOBALS['shop_id'] > 10 && !empty($goods['original_img'])) {
     $goods['goods_img'] = get_image_path($_REQUEST['goods_id'], $goods['goods_img']);
     $goods['goods_thumb'] = get_image_path($_REQUEST['goods_id'], $goods['goods_thumb'], true);
 }
 /* 图片列表 */
 $sql = "SELECT * FROM " . $ecs->table('goods_gallery') . " WHERE goods_id = '{$goods['goods_id']}'";
 $img_list = $db->getAll($sql);
 /* 格式化相册图片路径 */
 if (isset($GLOBALS['shop_id']) && $GLOBALS['shop_id'] > 0) {
开发者ID:554119220,项目名称:kjrscrm,代码行数:31,代码来源:goods.php



注:本文中的get_linked_goods函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_linkobjects函数代码示例发布时间:2022-05-15
下一篇:
PHP get_linkage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap