상세페이지 옵션 텍스트 작성 부분이요~
본문
상세페이지 옵션 부분에 작성란을 만들었는데요
입력하고 옵션 선택하고 나오는 빨간 박스 부분에 입력된 값도 같이 넣고 싶은데
어떻게 해야하나요?
<?php echo $it['hu_1']; ?> 이렇게 했는데 안나오더라구요~
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0);
?>
<?php if($config['cf_kakao_js_apikey']) { ?>
<script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
<script>
// 사용할 앱의 Javascript 키를 설정해 주세요.
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
</script>
<?php } ?>
<form name="fitem" action="<?php echo $action_url; ?>" method="post" onsubmit="return fitem_submit(this);">
<input type="hidden" name="it_id[]" value="<?php echo $it['it_id']; ?>">
<input type="hidden" name="sw_direct">
<input type="hidden" name="url">
<div class="info-wrapper">
<div class="left__wrap" >
<div id="sit_ov_wrap" class="mo-view">
<?php
// 이미지(중) 썸네일
$thumb_img = '';
$thumb_img_w = 600; // 넓이
$thumb_img_h = 600; // 높이
for ($i=1; $i<=10; $i++)
{
if(!$it['it_img'.$i])
continue;
$thumb = get_it_thumbnail($it['it_img'.$i], $thumb_img_w, $thumb_img_h);
if(!$thumb)
continue;
$thumb_img .= '<div>';
$thumb_img .= '<a href="'.G5_SHOP_URL.'/largeimage.php?it_id='.$it['it_id'].'&no='.$i.'" class="popup_item_image slide_img" target="_blank">'.$thumb.'</a>';
$thumb_img .= '</div>'.PHP_EOL;
}
if ($thumb_img)
{
echo '<div id="sit_pvi">'.PHP_EOL;
echo '<div id="sit_pvi_slide" class="owl-carousel">'.PHP_EOL;
echo $thumb_img;
echo '</div>'.PHP_EOL;
echo '</div>';
}
?>
<script>
$("#sit_pvi_slide").owlCarousel({
autoplay: true,
center: true,
loop: false,
nav: true,
responsiveClass:true,
items:1
})
</script>
</div>
<!-- 상품 정보 시작 { -->
<section id="sit_inf" class="sit_con pc-view">
<h2 class="blind">상품 정보</h2>
<?php if ($it['it_explan']) { // 상품 상세설명 ?>
<div id="sit_inf_explan">
<?php echo conv_content($it['it_explan'], 1); ?>
</div>
<?php } ?>
<div class="tab-cont" >
<div class="">
<section class="def-box" >
<?php include_once(G5_SHOP_PATH.'/itemuse.php'); ?>
</section>
<section class="def-box" >
<?php include_once(G5_SHOP_PATH.'/itemqa.php'); ?>
</section>
<div id="sit_etc">
<ul id="sit_etc_ol">
<li class="sit_etc_li">
<button type="button" class="sit_use_li_title">
<div class="box-head">
<h4 class="tit">상품정보고시</h4>
<i ><img src="<?php echo G5_THEME_URL; ?>/images/icon/arrow_down_icon.svg"></i>
</div>
</button>
<div id="sit_etc_con_0" class="sit_use_con" >
<?php
if ($it['it_info_value']) { // 상품 정보 고시
$info_data = unserialize(stripslashes($it['it_info_value']));
if(is_array($info_data)) {
$gubun = $it['it_info_gubun'];
$info_array = $item_info[$gubun]['article'];
?>
<table id="sit_inf_open">
<tbody>
<?php
foreach($info_data as $key=>$val) {
$ii_title = $info_array[$key][0];
$ii_value = $val;
?>
<tr>
<th scope="row"><?php echo $ii_title; ?></th>
<td><?php echo $ii_value; ?></td>
</tr>
<?php } //foreach?>
</tbody>
</table>
<!-- 상품정보고시 end -->
<?php
} else {
if($is_admin) {
echo '<p>상품 정보 고시 정보가 올바르게 저장되지 않았습니다.<br>config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로<br>변경하신 후 관리자 > 상품정보 수정에서 상품 정보를 다시 저장해주세요. </p>';
}
}
} //if
?>
</div>
</li>
<li class="sit_etc_li">
<button type="button" class="sit_use_li_title">
<div class="box-head">
<h4 class="tit">배송안내</h4>
<i ><img src="<?php echo G5_THEME_URL; ?>/images/icon/arrow_down_icon.svg"></i>
</div>
</button>
<div id="sit_etc_con_1" class="sit_use_con" >
<?php echo conv_content($default['de_baesong_content'], 1); ?>
</div>
</li>
<li class="sit_etc_li">
<button type="button" class="sit_use_li_title">
<div class="box-head">
<h4 class="tit">교환반품</h4>
<i ><img src="<?php echo G5_THEME_URL; ?>/images/icon/arrow_down_icon.svg"></i>
</div>
</button>
<div id="sit_etc_con_2" class="sit_use_con" >
<?php echo conv_content($default['de_change_content'], 1); ?>
</div>
</li>
</ul>
</div>
<script>
$(function(){
$(".sit_etc_li_title").click(function(){
var $con = $(this).siblings(".sit_etc_con");
if($con.is(":visible")) {
$con.slideUp();
} else {
$(".sit_etc_con:visible").hide();
$con.slideDown(
function() {
// 이미지 리사이즈
$con.viewimageresize2();
}
);
}
});
});
</script>
</div>
</section>
<!-- } 상품 정보 끝 -->
</div>
<div class="scroll_no mo-view" >
<div class="sit_ov_wr">
<?php if($it['it_basic']) { ?><p id="sit_desc"><?php echo $it['it_basic']; ?></p><?php } ?>
<strong id="sit_title"><?php echo stripslashes($it['it_name']); ?></strong>
<div class="price">
<?php echo display_price(get_price($it)); ?>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
</div>
<?php if($is_orderable) { ?>
<p id="sit_opt_info">
상품 선택옵션 <?php echo $option_count; ?> 개, 추가옵션 <?php echo $supply_count; ?> 개
</p>
<?php } ?>
<div class="sit_ov_tbl">
<table >
<colgroup>
<col class="grid_2">
<col>
</colgroup>
<tbody>
<?php if ($it['it_maker']) { ?>
<tr>
<th scope="row">제조사</th>
<td><?php echo $it['it_maker']; ?></td>
</tr>
<?php } ?>
<?php if ($it['it_origin']) { ?>
<tr>
<th scope="row">원산지</th>
<td><?php echo $it['it_origin']; ?></td>
</tr>
<?php } ?>
<?php if ($it['it_brand']) { ?>
<tr>
<th scope="row">브랜드</th>
<td><?php echo $it['it_brand']; ?></td>
</tr>
<?php } ?>
<?php if ($it['it_model']) { ?>
<tr>
<th scope="row">모델</th>
<td><?php echo $it['it_model']; ?></td>
</tr>
<?php } ?>
<?php if (!$it['it_use']) { // 판매가능이 아닐 경우 ?>
<tr>
<th scope="row">판매가격</th>
<td>판매중지</td>
</tr>
<?php } else if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
<tr>
<th scope="row">판매가격 </th>
<td>전화문의</td>
</tr>
<?php } else { // 전화문의가 아닐 경우?>
<?php if ($it['it_cust_price']) { // 1.00.03?>
<tr>
<th scope="row">시중가격</th>
<td><?php echo display_price($it['it_cust_price']); ?></td>
</tr>
<?php } ?>
<?php } ?>
<?php
/* 재고 표시하는 경우 주석 해제
<tr>
<th scope="row">재고수량</th>
<td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>
</tr>
*/
?>
<!-- <?php if ($config['cf_use_point']) { // 포인트 사용한다면 ?>
<tr>
<th scope="row"><label for="disp_point">포인트</label></th>
<td>
<?php
if($it['it_point_type'] == 2) {
echo '구매금액(추가옵션 제외)의 '.$it['it_point'].'%';
} else {
$it_point = get_item_point($it);
echo number_format($it_point).'점';
}
?>
</td>
</tr>
<?php } ?>-->
<!-- <?php
$ct_send_cost_label = '배송비결제';
if($it['it_sc_type'] == 1)
$sc_method = '무료배송';
else {
if($it['it_sc_method'] == 1)
$sc_method = '수령후 지불';
else if($it['it_sc_method'] == 2) {
$ct_send_cost_label = '<label for="ct_send_cost">배송비결제</label>';
$sc_method = '<select name="ct_send_cost" id="ct_send_cost">
<option value="0">주문시 결제</option>
<option value="1">수령후 지불</option>
</select>';
}
else
$sc_method = '주문시 결제';
}
?>
<tr>
<th><?php echo $ct_send_cost_label; ?></th>
<td><?php echo $sc_method; ?></td>
</tr>-->
<?php if($it['it_buy_min_qty']) { ?>
<tr>
<th>최소구매수량</th>
<td><?php echo number_format($it['it_buy_min_qty']); ?> 개</td>
</tr>
<?php } ?>
<?php if($it['it_buy_max_qty']) { ?>
<tr>
<th>최대구매수량</th>
<td><?php echo number_format($it['it_buy_max_qty']); ?> 개</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<div id="right__wrap" class="">
<div class="sit_ov_height">
<section id="sit_ov" class="2017_renewal_itemform static">
<div class="btn_buy_wr"><button type="button" class="op_btn">옵션선택하기 <i class="fa fa-angle-double-up" aria-hidden="true"></i></button> </div>
<h2>상품간략정보 및 구매기능</h2>
<div class="scroll_no pc-view" >
<div class="sit_ov_wr">
<?php if($it['it_basic']) { ?><p id="sit_desc"><?php echo $it['it_basic']; ?></p><?php } ?>
<strong id="sit_title"><?php echo stripslashes($it['it_name']); ?></strong>
<div class="price">
<?php echo display_price(get_price($it)); ?>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
</div>
<!--<div class="get_item_memo">
<label for="it_option_1" class="label-title">입력1</label>
<span><input type="text" name="ct_memo1" required class="frm_input"></span>
</div>
<div class="get_item_memo">
<label for="it_option_1" class="label-title">입력2</label>
<span><input type="text" name="ct_memo2" required class="frm_input"></span>
</div>-->
<?php if($is_orderable) { ?>
<p id="sit_opt_info">
상품 선택옵션 <?php echo $option_count; ?> 개, 추가옵션 <?php echo $supply_count; ?> 개
</p>
<?php } ?>
<div class="sit_ov_tbl">
<table >
<colgroup>
<col class="grid_2">
<col>
</colgroup>
<tbody>
<?php if ($it['it_maker']) { ?>
<tr>
<th scope="row">제조사</th>
<td><?php echo $it['it_maker']; ?></td>
</tr>
<?php } ?>
<?php if ($it['it_origin']) { ?>
<tr>
<th scope="row">원산지</th>
<td><?php echo $it['it_origin']; ?></td>
</tr>
<?php } ?>
<?php if ($it['it_brand']) { ?>
<tr>
<th scope="row">브랜드</th>
<td><?php echo $it['it_brand']; ?></td>
</tr>
<?php } ?>
<?php if ($it['it_model']) { ?>
<tr>
<th scope="row">모델</th>
<td><?php echo $it['it_model']; ?></td>
</tr>
<?php } ?>
<?php if (!$it['it_use']) { // 판매가능이 아닐 경우 ?>
<tr>
<th scope="row">판매가격</th>
<td>판매중지</td>
</tr>
<?php } else if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
<tr>
<th scope="row">판매가격 </th>
<td>전화문의</td>
</tr>
<?php } else { // 전화문의가 아닐 경우?>
<?php if ($it['it_cust_price']) { // 1.00.03?>
<tr>
<th scope="row">시중가격</th>
<td><?php echo display_price($it['it_cust_price']); ?></td>
</tr>
<?php } ?>
<?php } ?>
<?php
/* 재고 표시하는 경우 주석 해제
<tr>
<th scope="row">재고수량</th>
<td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>
</tr>
*/
?>
<!-- <?php if ($config['cf_use_point']) { // 포인트 사용한다면 ?>
<tr>
<th scope="row"><label for="disp_point">포인트</label></th>
<td>
<?php
if($it['it_point_type'] == 2) {
echo '구매금액(추가옵션 제외)의 '.$it['it_point'].'%';
} else {
$it_point = get_item_point($it);
echo number_format($it_point).'점';
}
?>
</td>
</tr>
<?php } ?>-->
<!-- <?php
$ct_send_cost_label = '배송비결제';
if($it['it_sc_type'] == 1)
$sc_method = '무료배송';
else {
if($it['it_sc_method'] == 1)
$sc_method = '수령후 지불';
else if($it['it_sc_method'] == 2) {
$ct_send_cost_label = '<label for="ct_send_cost">배송비결제</label>';
$sc_method = '<select name="ct_send_cost" id="ct_send_cost">
<option value="0">주문시 결제</option>
<option value="1">수령후 지불</option>
</select>';
}
else
$sc_method = '주문시 결제';
}
?>
<tr>
<th><?php echo $ct_send_cost_label; ?></th>
<td><?php echo $sc_method; ?></td>
</tr>-->
<?php if($it['it_buy_min_qty']) { ?>
<tr>
<th>최소구매수량</th>
<td><?php echo number_format($it['it_buy_min_qty']); ?> 개</td>
</tr>
<?php } ?>
<?php if($it['it_buy_max_qty']) { ?>
<tr>
<th>최대구매수량</th>
<td><?php echo number_format($it['it_buy_max_qty']); ?> 개</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<!--mobile-->
<div class="scroll_show mo-view">
<?php
if($option_item) {
?>
<section class="sit_option">
<table class="sit_op_sl">
<colgroup>
<col class="grid_2">
<col>
</colgroup>
<tbody>
<div class="get_item_memo">
<label for="hu_1" class="label-title">입력</label>
<span><input type="text" name="hu_1" id="hu_1"value='입력1'></span>
<!--<span><input type="text" name="hu_2" id="hu_2"value='입력2'></span>-->
</div>
<?php // 선택옵션
echo $option_item;
?>
</tbody>
</table>
</section>
<?php
}
?>
&
!-->답변 1
저걸 저장시키는 DB 필드명이 뭔가요?
DB에도 hu_1이라는 필드가 추가 되어잇고..
item 관련 DB Insert 나 Update 문에도 해당 필드명이 추가가 되어있으신가요?
답변을 작성하시기 전에 로그인 해주세요.