$it_price 배열이 어디에 있나요???
본문
$it_price 변수값이 고정되어 있는거 같은데
이걸 어디서 변경하나요?
장바구니와 주문내역에
기업회원이었을때 할인율이 적용 된 소계값을 구하려는데
찾을 수가 없네요 ㅠㅠ
cartupdate.php 를 거쳐서 가는 거 같은데
ct_price 컬럼값에 insert 시킬 때 값이 {$it['it_price']}
이 배열을 뽑아오던데 선언 된 위치를 찾지를 못하겠습니다.
아래와 같이 변경 해서 사용 중입니다.
///////////////////////////
shop.lib.php -
function get_price($it){
global $member;
if ($it['it_tel_inq']) return '전화문의';
if($member['mb_1'] == "1"){
//$price = $it['it_price'] - get_b2b_sale_price($it);
$price = $it['it_price'] - ($it['it_price'] * (get_b2b_sale_price($it) / 100));
return (int)$price;
} else {
$price = $it['it_price'];
return (int)$price;
}
}
item.form.skin.php (상품 보기) -
<tr>
<th scope="row">판매가격</th>
<td>
<?php echo display_price($it['it_price']); ?>
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
</td>
</tr>
orderform.sub.php (주문 내역) -
$get_b2b_sale_price = ($member['mb_1'] == "1") ? (int)$row['it_1'] . "%" : "기업회원 전용";
$sell_price = ($member['mb_1'] == "1") ? $sell_price - ($sell_price * ($get_b2b_sale_price / 100)) : $sell_price;
echo number_format($sell_price);
답변 2
cartupdate.php내에
137라인에
// 상품정보
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
에 있으니 참고하세요.
어떻게 cartupdate를 수정하셨는지 여쭤봐도 될까요
답변을 작성하시기 전에 로그인 해주세요.