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

시중가격과 판매가격 동일할 경우 판매가격만 보이기

· 13년 전 · 147
시중가격과 판매가격이 동일할경우 하나만 보이도록 하는 방법입니다.


1. 목록에서 제어하기
영카트 / shop / list.skin.10.php  24줄

[ 수정전 ]
    if ($row[it_cust_amount] && !$row[it_gallery])
        echo "<tr><td align=center><strike>".display_amount($row[it_cust_amount])."</strike></td></tr>";

[ 수정후 ]
    if ($row[it_cust_amount] && !$row[it_gallery]) {
      if ($row[it_cust_amount] == $row[it_amount] && $member[mb_level] < 2) {
      } elseif ($row[it_amount2] == $row[it_amount] && $member[mb_level] == 2) {
      } elseif ($row[it_amount2] == 0 && $member[mb_level] == 2) {
      } elseif ($row[it_amount3] == $row[it_amount] && $member[mb_level] >= 3) {
      } elseif ($row[it_amount3] == 0 && $member[mb_level] >= 3) {
      } else {
        echo "<tr><td align=center><strike>".display_amount($row[it_cust_amount])."</strike></td></tr>";
  }


2. 상세보기에서 제어하기
영카트 / shop / item.php  252줄

[ 수정전 ]
                <? if ($it[it_cust_amount]) { // 1.00.03  ?>
                <tr height=25>
                    <td>&nbsp;&nbsp;&nbsp; · 시중가격</td>
                    <td align=center>:</td>
                    <td><input type=text name=disp_cust_amount size=12 style='text-align:right; border:none; border-width:0px; font-weight:bold; width:80px; color:#777777; text-decoration:line-through;' readonly value='<?=number_format($it[it_cust_amount])?>'> 원</td>
                </tr>
                <tr><td colspan=3 height=1 background='<?=$g4[shop_img_path]?>/dot_line.gif'></td></tr>
                <? } ?>

[ 수정후 ]
                <?php if ($it[it_cust_amount]) { // 1.00.03 
  if ($it[it_cust_amount] == $it[it_amount] && $member[mb_level] < 2) {
  } elseif ($it[it_amount2] == $it[it_amount] && $member[mb_level] == 2) {
  } elseif ($it[it_amount2] == 0 && $member[mb_level] == 2) {
  } elseif ($it[it_amount3] == $it[it_amount] && $member[mb_level] >= 3) {
  } elseif ($it[it_amount3] == 0 && $member[mb_level] >= 3) {
  } else {
?>
                <tr height=25>
                    <td>&nbsp;&nbsp;&nbsp; · 시중가격</td>
                    <td align=center>:</td>
                    <td><input type=text name=disp_cust_amount size=12 style='text-align:right; border:none; border-width:0px; font-weight:bold; width:80px; color:#777777; text-decoration:line-through;' readonly value='<?=number_format($it[it_cust_amount])?>'> 원</td>
                </tr>
                <tr><td colspan=3 height=1 background='<?=$g4[shop_img_path]?>/dot_line.gif'></td></tr>
                <?php
  }
 } ?>

댓글 작성

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

로그인하기

게시글 목록

번호 제목
1111
1107
1105
1102
1099
1098
1097
1101
1096
1132
1094
1092
1091
1088
1087
1083
1082
1076
1068
1056