영카트 장바구니에 시중가 할인율 출력 방법문의 채택완료
연탄집개
1개월 전
조회 58
영카트 장바구니에 보면 판매가는 출력이 되는데 시중가 할인율은 출력을 못해서 문의드립니다.
</p>
<p> // $s_cart_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
a.it_id,
a.it_name,
a.ct_price,
a.ct_point,
a.ct_qty,
a.ct_status,
a.ct_send_cost,
a.it_sc_type,
b.ca_id,
b.ca_id2,
b.ca_id3
from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )
where a.od_id = '$s_cart_id' ";
$sql .= " group by a.it_id ";
$sql .= " order by a.ct_id ";
$result = sql_query($sql);</p>
<p>
이부분과
<td class="td_numbig Outfit_R" data-label="판매가"><?php echo number_format($row['ct_price']); ?></td> 이부분을 수정하면 될것 같은데
방법좀 알려주세요`~~~
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
1개월 전
1. b.ca_id3 다음에 추가 ==> 다음처럼 되도록 b.ca_id3, b.it_cust_price
2. 계산
$disc_price = $row['it_cust_price'] - $row['ct_price'];
$disc_percent = number_format(($disc_price / $row['it_cust_price']) *100, 2);
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인