本文整理汇总了PHP中get_group_goods函数的典型用法代码示例。如果您正苦于以下问题:PHP get_group_goods函数的具体用法?PHP get_group_goods怎么用?PHP get_group_goods使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_group_goods函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: clear_cache_files
clear_cache_files();
make_json_result($opt);
} elseif ($_REQUEST['act'] == 'drop_group_goods') {
include_once ROOT_PATH . 'includes/cls_json.php';
$json = new JSON();
check_authz_json('goods_manage');
$fittings = $json->decode($_GET['drop_ids']);
$arguments = $json->decode($_GET['JSON']);
$goods_id = $arguments[0];
$price = $arguments[1];
$sql = "DELETE FROM " . $ecs->table('group_goods') . " WHERE parent_id='{$goods_id}' AND " . db_create_in($fittings, 'goods_id');
if ($goods_id == 0) {
$sql .= " AND admin_id = '{$_SESSION['admin_id']}'";
}
$db->query($sql);
$arr = get_group_goods($goods_id);
$opt = array();
foreach ($arr as $val) {
$opt[] = array('value' => $val['goods_id'], 'text' => '[套餐' . $val['group_id'] . ']' . $val['goods_name'], 'data' => '');
}
clear_cache_files();
make_json_result($opt);
} elseif ($_REQUEST['act'] == 'get_article_list') {
include_once ROOT_PATH . 'includes/cls_json.php';
$json = new JSON();
$filters = (array) $json->decode(json_str_iconv($_GET['JSON']));
$where = " WHERE cat_id > 0 ";
if (!empty($filters['title'])) {
$keyword = trim($filters['title']);
$where .= " AND title LIKE '%" . mysql_like_quote($keyword) . "%' ";
}
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:goods.php
示例2: while
$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) {
foreach ($img_list as $key => $gallery_img) {
$gallery_img[$key]['img_url'] = get_image_path($gallery_img['goods_id'], $gallery_img['img_original'], false, 'gallery');
开发者ID:554119220,项目名称:kjrscrm,代码行数:31,代码来源:goods.php
注:本文中的get_group_goods函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论