From c90a3f69e675c26c2d956bcf6f866dd07e49d28d Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 24 Feb 2014 13:56:04 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=EC=83=81=ED=92=88=20=EC=84=A4=EC=A0=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configform.php | 25 ++++++++++++ adm/shop_admin/configformupdate.php | 4 ++ install/gnuboard5shop.sql | 4 ++ install/install_db.php | 6 +++ mobile/shop/item.php | 16 ++++---- mobile/shop/iteminfo.php | 18 +++++---- mobile/skin/shop/basic/item.form.skin.php | 2 +- .../shop/basic/iteminfo.relation.skin.php | 2 +- mobile/skin/shop/basic/relation.10.skin.php | 38 +++++++++---------- 9 files changed, 80 insertions(+), 35 deletions(-) diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index cf3dcd338..36cd57c31 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -55,6 +55,15 @@ if(!isset($default['de_shop_layout_use'])) { sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` ADD `de_shop_layout_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_root_index_use` ", true); } + +// 모바일 관련상품 설정 필드추가 +if(!isset($default['de_mobile_rel_list_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_mobile_rel_list_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_rel_img_height`, + ADD `de_mobile_rel_list_skin` varchar(255) NOT NULL DEFAULT '' AFTER `de_mobile_rel_list_use`, + ADD `de_mobile_rel_img_width` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_rel_list_skin`, + ADD `de_mobile_rel_img_height` int(11) NOT NULL DEFAULT ' 0' AFTER `de_mobile_rel_img_width`", true); +} ?>
@@ -764,6 +773,22 @@ if(!isset($default['de_shop_layout_use'])) { > + + 모바일 관련상품출력 + + + + + + + + + + > + + 검색상품출력 diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index e91235647..af4f1c40b 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -97,6 +97,10 @@ $sql = " update {$g5['g5_shop_default_table']} de_rel_list_mod = '$de_rel_list_mod', de_rel_img_width = '$de_rel_img_width', de_rel_img_height = '$de_rel_img_height', + de_mobile_rel_list_use = '$de_mobile_rel_list_use', + de_mobile_rel_list_skin = '$de_mobile_rel_list_skin', + de_mobile_rel_img_width = '$de_mobile_rel_img_width', + de_mobile_rel_img_height = '$de_mobile_rel_img_height', de_search_list_skin = '$de_search_list_skin', de_search_list_mod = '$de_search_list_mod', de_search_list_row = '$de_search_list_row', diff --git a/install/gnuboard5shop.sql b/install/gnuboard5shop.sql index c3c4db78e..e41334bd1 100644 --- a/install/gnuboard5shop.sql +++ b/install/gnuboard5shop.sql @@ -239,6 +239,10 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` ( `de_rel_list_mod` int(11) NOT NULL DEFAULT '0', `de_rel_img_width` int(11) NOT NULL DEFAULT '0', `de_rel_img_height` int(11) NOT NULL DEFAULT '0', + `de_mobile_rel_list_use` tinyint(4) NOT NULL DEFAULT '0', + `de_mobile_rel_list_skin` varchar(255) NOT NULL DEFAULT '', + `de_mobile_rel_img_width` int(11) NOT NULL DEFAULT '0', + `de_mobile_rel_img_height` int(11) NOT NULL DEFAULT '0', `de_search_list_skin` varchar(255) NOT NULL DEFAULT '', `de_search_list_mod` int(11) NOT NULL DEFAULT '0', `de_search_list_row` int(11) NOT NULL DEFAULT '0', diff --git a/install/install_db.php b/install/install_db.php index b9d91b7d5..27bb04c3a 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -302,9 +302,15 @@ if($g5_shop_install) { de_hope_date_after = '3', de_baesong_content = '배송 안내 입력전입니다.', de_change_content = '교환/반품 안내 입력전입니다.', + de_rel_list_use = '1', + de_rel_list_skin = 'relation.10.skin.php', de_rel_list_mod = '3', de_rel_img_width = '$simg_width', de_rel_img_height = '$simg_height', + de_mobile_rel_list_use = '1', + de_mobile_rel_list_skin = 'relation.10.skin.php', + de_mobile_rel_img_width = '$simg_width', + de_mobile_rel_img_height = '$simg_height', de_search_list_skin = 'list.10.skin.php', de_search_img_width = '$simg_width', de_search_img_height = '$simg_height', diff --git a/mobile/shop/item.php b/mobile/shop/item.php index b5015d75b..48f548ec1 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -105,13 +105,15 @@ $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_i $row = sql_fetch($sql); $item_qa_count = $row['cnt']; -// 관련상품의 개수를 얻음 -$sql = " select count(*) as cnt - from {$g5['g5_shop_item_relation_table']} a - left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') - where a.it_id = '{$it['it_id']}' "; -$row = sql_fetch($sql); -$item_relation_count = $row['cnt']; +if ($default['de_rel_list_use']) { + // 관련상품의 개수를 얻음 + $sql = " select count(*) as cnt + from {$g5['g5_shop_item_relation_table']} a + left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') + where a.it_id = '{$it['it_id']}' "; + $row = sql_fetch($sql); + $item_relation_count = $row['cnt']; +} // 상품품절체크 $is_soldout = is_soldout($it['it_id']); diff --git a/mobile/shop/iteminfo.php b/mobile/shop/iteminfo.php index ad968d03c..919f948b2 100644 --- a/mobile/shop/iteminfo.php +++ b/mobile/shop/iteminfo.php @@ -40,13 +40,15 @@ $sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_i $row = sql_fetch($sql); $item_qa_count = $row['cnt']; -// 관련상품의 개수를 얻음 -$sql = " select count(*) as cnt - from {$g5['g5_shop_item_relation_table']} a - left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') - where a.it_id = '{$it['it_id']}' "; -$row = sql_fetch($sql); -$item_relation_count = $row['cnt']; +if ($default['de_rel_list_use']) { + // 관련상품의 개수를 얻음 + $sql = " select count(*) as cnt + from {$g5['g5_shop_item_relation_table']} a + left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') + where a.it_id = '{$it['it_id']}' "; + $row = sql_fetch($sql); + $item_relation_count = $row['cnt']; +} function pg_anchor($info) { global $default; @@ -60,7 +62,9 @@ function pg_anchor($info) {
  • >상품문의
  • >배송정보
  • >교환정보
  • +
  • >관련상품
  • +
  • 상품문의
  • 배송정보
  • 교환정보
  • - +
  • 관련상품
  • diff --git a/mobile/skin/shop/basic/iteminfo.relation.skin.php b/mobile/skin/shop/basic/iteminfo.relation.skin.php index 7ae3118fe..cb27414c5 100644 --- a/mobile/skin/shop/basic/iteminfo.relation.skin.php +++ b/mobile/skin/shop/basic/iteminfo.relation.skin.php @@ -11,7 +11,7 @@ add_stylesheet('', set_mobile(true); $list->set_query($sql); $list->set_view('sns', true); diff --git a/mobile/skin/shop/basic/relation.10.skin.php b/mobile/skin/shop/basic/relation.10.skin.php index 7807b304b..7783eed73 100644 --- a/mobile/skin/shop/basic/relation.10.skin.php +++ b/mobile/skin/shop/basic/relation.10.skin.php @@ -5,22 +5,16 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 add_stylesheet('', 0); ?> + + list_mod >= 2) { // 1줄 이미지 : 2개 이상 - if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 - else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 - else $sct_last = ''; - } else { // 1줄 이미지 : 1개 - $sct_last = 'sct_clear'; - } - - if ($i == 1) { +for ($i=0; $row=sql_fetch_array($result); $i++) { + if ($i == 0) { if ($this->css) { - echo "