채택완료

전화문의 체크 시 할인가, 할인률 표시도 사라지게 하는 방법이 있을까요?

2017-02-19 (일) 00:34:10 3,943

관리자 상품관리 페이지에서 '전화문의'를 체크하면 

상품목록에서 판매가격이 자동으로 사라지는 것을 확인했습니다.

그런데, 할인가 표시(echo "<strike>".display_price($row['it_cust_price'])."</strike><br>\n";)의 경우는 없어지지가 않고 그대로 존재하고 있어서요..

또한 할인가 위에 할인률 표시(echo floor(($row['it_cust_price']-$row['it_price'])/$row['it_cust_price']*100)."%\n";)를 해두었는데, 그것 역시도 없어지지가 않고 있습니다.

lib/shop.lib파일에 있는 아래 소스에서 뭔가를 건드려줘야 할 것 같은데, 몇시간째 계속 해메고 있습니다.

// 금액 표시

function display_price($price, $tel_inq=false)

{

    if ($tel_inq)

        $price = '전화문의';

    else

        $price = number_format($price, 0).'원';

    return $price;

}

 

 

 

 

영카트 고수님들의 도움이 절실합니다.ㅠㅠ  도와 주세요~!!!!!  

 

|

답변 3개 / 댓글 3개

채택된 답변
+20 포인트

shop.lib 파일에서 수정할 필요 없이 list.10.skin.php 파일에서

if ($this->view_it_cust_price && $row['it_cust_price']) {

    echo "<strike>".display_price($row['it_cust_price'])."</strike>\n";

 }

여기를 이렇게 수정.

if ($this->view_it_cust_price && $row['it_cust_price'] && !$row['it_tel_inq']) {

    echo "<strike>".display_price($row['it_cust_price'])."</strike>\n";

}

할인율도 같은 방법으로 이렇게..

if (!$row['it_tel_inq']) {

    echo floor(($row['it_cust_price']-$row['it_price'])/$row['it_cust_price']*100)."%\n";

}

답변에 대한 댓글 2개

정말 감사합니다~!! 해결되었습니다.^^

아 저페이지가 상품 리스트 여구나..작은 별님의 답변에 한표

item.form.skin.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']) { ?>

        <tr>

            <th scope="row">시중가격</th>

            <td><?php echo display_price($it['it_cust_price']); ?></td>

        </tr>

        <?php } // 시중가격 끝 ?>

        <tr>

            <th scope="row">시중가격</th>

            <td><?php echo display_price($it['it_cust_price']); ?></td>

        </tr>

에서 <?php echo display_price($it['it_cust_price']); ?> 이부분을 수정 하면될꺼같은데요


답변에 대한 댓글 1개

소중한 답변 너무 감사드립니다^^

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