shop.lib.php 에서
// 상품포인트
function get_item_point($it, $io_id='', $trunc=10)
{
global $g5;
$it_point = 0;
if($it['it_point_type'] > 0) {
$it_price = $it['it_price'];
if($it['it_point_type'] == 2 && $io_id) {
$sql = " select io_id, io_price
from {$g5['g5_shop_item_option_table']}
where it_id = '{$it['it_id']}'
and io_id = '$io_id'
and io_type = '0'
and io_use = '1' ";
$opt = sql_fetch($sql);
if($opt['io_id'])
$it_price += $opt['io_price'];
}
$it_point = ceil(($it_price * ($it['it_point'] / 100) / $trunc)) * $trunc;
} else {
$it_point = $it['it_point'];
}
return $it_point;
}
부분에서
$it_point = ceil(($it_price * ($it['it_point'] / 100) / $trunc)) * $trunc;
$trunc를 왜 나눴다가 다시 곱하는걸까요?
답변 1개
답변을 작성하려면 로그인이 필요합니다.