2026, 새로운 도약을 시작합니다.

관련상품 텍스트 수정 채택완료

3b5b6102e348c314ad776347dfd92aa3_1447743607_8541.png

관련상품 relation.10.skin 에서

금액 다음에 들어오는 원 이 텍스트만 따로 색상 지정 및 폰트 크기 또한 알파벳과 다른 폰트를 조정하고 싶습니다.

if ($this->view_it_cust_price || $this->view_it_price) {

        echo "<div class=\"sct_cost\">\n";

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

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

        }

        if ($this->view_it_price) {

            echo display_price(get_price($row), $row['it_tel_inq'])."\n";

        }

        echo "</div>\n";

    }

이곳에서 수정하는것 같은데 수정하는데 있어서 어려움이 많이 있습니다.

it_tel_inq   >>shop.lib.php파일에서  

// 금액 표시

function display_price($price, $tel_inq=false)

{

    if ($tel_inq)

        $price = '전화문의';

    else

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

    return $price;

}

원을 삭제하면 금액 다은에 들어오는 원이 관련상품 뿐만 아니라 상단에 소비자 및 판매가에서도 동일하게 원이 삭제되는것은 확인이 되였는데

이 원만 따로 폰트를 설정하기기가 어렵네요.

답변 2개

채택된 답변
+20 포인트

if ($this->view_it_cust_price || $this->view_it_price) {

        echo "<div class=\"sct_cost\">\n";

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

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

        }

        if ($this->view_it_price) {

            echo display_price2(get_price($row), $row['it_tel_inq'])."\n";

        }

        echo "</div>\n";

    }

// 금액 표시

function display_price2($price, $tel_inq=false)

{

    if ($tel_inq)

        $price = '전화문의';

    else

        $price = number_format($price, 0).'<font>원</font>';

    return $price;

}

이런식이요...

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

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

display_price2 라고 따로 펑션을 만들어 관련 상품부분만 해당 펑션 태우시면 됩니다. 

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

답변에 대한 댓글 1개

평션을 어떻게 추가하죠?

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

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

로그인
🐛 버그신고