diff --git a/css/default_shop.css b/css/default_shop.css index f435fbe93..6f8575fb8 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -558,7 +558,7 @@ input.required:focus {padding:3px 3px 4px;border:0;background:#21272e !important #sit_ex h2 {margin:0 0 10px} /* 상품 상세보기 - 관련상품 */ -#sit_rel {margin:0 0 10px;padding:10px 10px 20px} +#sit_rel {margin:0 0 10px;padding:10px 10px 0} #sit_rel h2 {margin:0 0 10px} /* 공지사항 및 커뮤니티 새글 */ diff --git a/shop/item.php b/shop/item.php index 34a100420..a60b39422 100644 --- a/shop/item.php +++ b/shop/item.php @@ -477,24 +477,26 @@ else

관련상품

- + + $sql = " select b.* + from {$g4['shop_item_relation_table']} a + left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id) + where a.it_id = '{$it['it_id']}' + and b.it_use='1' "; + $result = sql_query($sql); + $num = @mysql_num_rows($result); + if ($num) + include G4_SHOP_PATH.'/maintype10.inc.php'; + else + echo '이 상품과 관련된 상품이 없습니다.'; + ?> +