
질문과 답변
제품 가격 표시 부분 질문 드립니다.
- 이전글담당자님 이거 확인좀 해주세요 제발..2025.10.14
- 다음글메인페이지 모듈이 이상하네요2025.10.13
댓글목록



질문을 잘못이해를했습니다. 다시 알려드립니다.
상품 금액만 표기가 안되게 하려면
/lib/shop.lib.php 파일 617라인의 function get_price($it) 함수를 아래와같이 수정해주세요.
기존
function get_price($it)
{
global $member;
if ($it['it_tel_inq']) return '전화문의';
$price = $it['it_price'];
return (int)$price;
}
수정
function get_price($it)
{
global $member;
if ($it['it_tel_inq']) return '전화문의';
// 가격이 0이면 출력하지 않음
if (empty($it['it_price']) || (int)$it['it_price'] === 0)
return '';
$price = $it['it_price'];
return (int)$price;
}
감사합니다.
2025-10-14 18:59




추가회신 드립니다.
기존 it_price함수는 원복하시고 바로 위에있는
display_price 함수를 아래와같이 수정하시면 되겠습니다.
기존
function display_price($price, $tel_inq=false)
{
if ($tel_inq)
$price = '전화문의';
else
$price = number_format($price, 0).'원';
return $price;
}
수정
function display_price($price, $tel_inq=false)
{
if ($tel_inq) {
$price = '전화문의';
} else if ($price == 0) {
$price = '';
} else {
$price = number_format($price, 0).'원';
}
return $price;
}
이렇게 하시면 메인과 상품 목록쪽 모두 상품 금액이 0인 경우에
표기되지않습니다!
감사합니다.
2025-10-14 20:43


