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

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

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


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

댓글 작성

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

로그인하기

게시글 목록

번호 제목
1440
1434
1433
1428
1421
1397
1396
1388
1379
1378
1377
1367
1365
1362
1348
1343
1335
1318
1311
1310