테스트 사이트 - 개발 중인 베타 버전입니다

상세페이지 옵션 텍스트 작성 부분이요~ 채택완료

2년 전 조회 2,093

상세페이지 옵션 부분에 작성란을 만들었는데요

입력하고 옵션 선택하고 나오는 빨간 박스 부분에 입력된 값도 같이 넣고 싶은데

어떻게 해야하나요?

이렇게 했는데 안나오더라구요~

 

</p>

<p><?php

if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가</p>

<p>// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨

add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0);

?></p>

<p><?php if($config['cf_kakao_js_apikey']) { ?>

<script src="<a href="https://developers.kakao.com/sdk/js/kakao.min.js"></script>" target="_blank" rel="noopener noreferrer">https://developers.kakao.com/sdk/js/kakao.min.js"></script></a>

<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>

<script>

    // 사용할 앱의 Javascript 키를 설정해 주세요.

    Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");

</script>

<?php } ?></p>

<p><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"></p>

<p>

<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;</p>

<p>                $thumb = get_it_thumbnail($it['it_img'.$i], $thumb_img_w, $thumb_img_h);</p>

<p>                if(!$thumb)

                    continue;</p>

<p>                $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>';

            }

            ?></p>

<p>        <script></p>

<p>        $("#sit_pvi_slide").owlCarousel({

            autoplay: true,

            center: true,

            loop: false,

            nav: true,

            responsiveClass:true,

            items:1

        })

        </script>            

        </div>

        

        <!-- 상품 정보 시작 { --></p>

<p>        <section id="sit_inf" class="sit_con pc-view">

            <h2 class="blind">상품 정보</h2></p>

<p>            <?php if ($it['it_explan']) { // 상품 상세설명 ?></p>

<p>            <div id="sit_inf_explan">

                <?php echo conv_content($it['it_explan'], 1); ?>

            </div>

            <?php } ?></p>

<p>    <div class="tab-cont" >

        <div class=""></p>

<p>            <section class="def-box" >

                <?php include_once(G5_SHOP_PATH.'/itemuse.php'); ?>

            </section></p>

<p>            <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>상품 정보 고시 정보가 올바르게 저장되지 않았습니다.
config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로
변경하신 후 관리자 > 상품정보 수정에서 상품 정보를 다시 저장해주세요. </p>';

                                            }

                                        }

                                    } //if

                                    ?>

                        </div>

                    </li></p>

<p>                    <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></p>

<p>                    <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></p>

<p>                    

                </ul>        

            </div></p>

<p>            <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></p>

<p>        </section>

        <!-- } 상품 정보 끝 -->

    </div></p>

<p>    <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 } ?></p>

<p>            <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 } ?></p>

<p>                <?php if ($it['it_origin']) { ?>

                <tr>

                    <th scope="row">원산지</th>

                    <td><?php echo $it['it_origin']; ?></td>

                </tr>

                <?php } ?></p>

<p>                <?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 } ?></p>

<p>                <?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 } ?></p>

<p>               

                <?php } ?></p>

<p>                <?php

                /* 재고 표시하는 경우 주석 해제

                <tr>

                    <th scope="row">재고수량</th>

                    <td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>

                </tr>

                */

                ?></p>

<p>              <!--  <?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 = '배송비결제';</p>

<p>                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></p>

<p>    <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></p>

<p>                    <!--<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></p>

<p>                    <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 } ?></p>

<p>                    <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 } ?></p>

<p>                        <?php if ($it['it_origin']) { ?>

                        <tr>

                            <th scope="row">원산지</th>

                            <td><?php echo $it['it_origin']; ?></td>

                        </tr>

                        <?php } ?></p>

<p>                        <?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 } ?></p>

<p>                        <?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 } ?></p>

<p>                       

                        <?php } ?></p>

<p>                        <?php

                        /* 재고 표시하는 경우 주석 해제

                        <tr>

                            <th scope="row">재고수량</th>

                            <td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>

                        </tr>

                        */

                        ?></p>

<p>                      <!--  <?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 = '배송비결제';</p>

<p>                        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></p>

<p>            <!--mobile-->

            <div class="scroll_show mo-view"></p>

<p>                </p>

<p>                <?php

                if($option_item) {

                ?></p>

<p>                <section class="sit_option">

                    <table class="sit_op_sl">

                    <colgroup>

                        <col class="grid_2">

                        <col>

                    </colgroup>

                    <tbody></p>

<p>                     <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></p>

<p>                    <?php // 선택옵션

                    echo $option_item;

                    ?>

                    </tbody>

                    </table>

                </section>

                

                </p>

<p>

                <?php

                }

                ?></p>

<p> </p>

<p>

   &

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트

저걸 저장시키는 DB 필드명이 뭔가요?

DB에도 hu_1이라는 필드가 추가 되어잇고..

item 관련 DB Insert 나 Update 문에도 해당 필드명이 추가가 되어있으신가요?

로그인 후 평가할 수 있습니다

답변에 대한 댓글 3개

db는 등록 안되어 있어요~
카트 업데이트 부분에는 추가되어 있어요~
https://sir.kr/yc5_skin/1231?sca=%EA%B8%B0%ED%83%80&page=2 이거 참고했습니다~
DB 에 필드도 없는걸 어떻게 저장 시키고 관리자에서 보여주실것인지...
다른방법이 있는걸까요??

직접 다운 받아 확인해본 봐로는 cartupdate.php 의 326번째 줄 보면
$io_value=$io_value."가로:".$hu_1."*새로:".$hu_2."=".$hu_3;
값이 존재 합니다.

이걸 가져다 쓰시는건 문제가 되지 않지만 왜 어떻게 이러게 썼는지를 모르신다면 그냥 의뢰하심이 정신건강에 이로우실것으로 판단됩니다.

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인

전체 질문 목록

🐛 버그신고