| 검색상품출력 |
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 "css}\">\n";
+ echo "css}\">\n";
} else {
- echo "\n";
+ echo "\n";
}
}
@@ -38,6 +32,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "\n";
}
+ if ($this->view_it_icon) {
+ echo "".item_icon($row)." \n";
+ }
+
if ($this->view_it_id) {
echo "<".stripslashes($row['it_id']).">\n";
}
@@ -74,10 +72,6 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
}
- if ($this->view_it_icon) {
- echo "".item_icon($row)." \n";
- }
-
if ($this->view_sns) {
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
@@ -96,8 +90,14 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "\n";
}
-if ($i > 1) echo " \n";
+if ($i > 0) echo " \n";
-if($i == 1) echo "등록된 상품이 없습니다. \n";
+if($i == 0) echo "등록된 상품이 없습니다. \n";
?>
-
\ No newline at end of file
+
+
+
\ No newline at end of file
|