소스코드 문의드립니다.

소스코드 문의드립니다.

QA

소스코드 문의드립니다.

본문

안녕하세요 질문좀드리겠습니다

아래와같이 소스를 넣어봤는데 안되는데 어떻게 해야나요 ㅠㅠ 부탁들겠습니다 


<?
if ($it == 0) {
echo "준비중입니다";
} else {
 <tr class="tr_price">
                    <th scope="row">판매가격</th>
                    <td>
                        <strong><?php echo display_price(get_price($it)); ?></strong>
                        <input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
                    </td>
                </tr>
}
?>

이 질문에 댓글 쓰기 :

답변 5

질문의 다변을 적확이 잘 받으시려면 

이런식을로 올리셔야 잘받을수있습니다 

 

    $sql = " select it_id, it_sc_type, it_sc_method, it_sc_price, it_sc_minimum, it_sc_qty
                from {$g5['g5_shop_item_table']}
                where it_id = '$it_id' ";

    $it = sql_fetch($sql);

<?

if ($it[it_price] == 0) {

echo "준비중입니다";

} else {

 <tr class="tr_price">

                    <th scope="row">판매가격</th>

                    <td>

                        <strong><?php echo display_price(get_price($it)); ?></strong>

                        <input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">

                    </td>

                </tr>

}

?>

다시말하자면 $it 가 무엇인가가 중요하자나요 

무슨기능인지,기능목적이 뭔지, 어떻게 안되는지 좀더 질문이 구체적이어야 할거같네요...

아아..왜안되는지 알거같네요
if ($it == 0) {
  echo "준비중입니다";
}

이거를
if ($it == 0) { ?>
  <tr>
    <th scope="row">판매가격</th>
    <td>
      <strong>준비중입니다.</strong>
    </td>
  </tr>
<?php
}

<tr class="tr_price">
                <th scope="row">판매가격</th>
                <td>
                    <strong><?php echo display_price(get_price($it)); ?></strong>
                    <input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">

                </td>
            </tr>

이부분이 들어가야 합니당 ㅠㅠ

잠시만요 댓글이 좀길어졌네요

일단 조건을 $it으로 하시면안될거같아요 지금 $it으로 출력했더니 array로 출력되더라구요?

 

그럼 $it에서 가격을 따로 출력하는거부터 시작해야될거같습니다.

새로 다시 작성하자면 기존 원본으로 다시 돌리신 후에

 

<tr class="tr_price"> 
  <th scope="row">판매가격</th> 
  <td> 

    <?php (if ($it["it_price"] == 0) { ?>

      <strong>준비중입니다.</strong>

    <php   

    }  else {

      <strong><?php echo display_price(get_price($it)); ?></strong>

      <input type="hidden" id="it_price" value="<?php echo get_price($it); ?>"> 

    }

    ?>
  </td> 
</tr> 

 

 

이렇게 바꿔보세요. 가격들어가는곳만 준비중이라고 띄우면 되는게 맞나요?

답변을 작성하시기 전에 로그인 해주세요.
전체 123,157 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT