링크
http://minsup.kr/bbs/board.php?bo_table=guide&wr_id=3 (388) http://sir.kr/bbs/link.php?bo_table=yc5_tip&wr_id=618&no=2 (258)
영카트5 장바구니에서 상품금액, 수량, 합계는 표시되지만 옵션별 금액합계는 표시되지 않습니다.
옵션별 금액합계를 표시되도록 해보겠습니다.
shop/cart.php
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
을 다음과 같이 변경합니다.
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(IF(io_type = 1, (io_price * ct_qty), (io_price * ct_qty))) as io_price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
그리고 출력할 위치에 <?php echo $sum['io_price']; ?> 를 입력하면 됩니다.
##########
영카트 패치가 많이 밀렸을 땐?
http://minsup.kr/ms-item.php?pds_id=30
##########
옵션별 금액합계를 표시되도록 해보겠습니다.
shop/cart.php
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
을 다음과 같이 변경합니다.
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(IF(io_type = 1, (io_price * ct_qty), (io_price * ct_qty))) as io_price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
$sum = sql_fetch($sql);
그리고 출력할 위치에 <?php echo $sum['io_price']; ?> 를 입력하면 됩니다.
##########
영카트 패치가 많이 밀렸을 땐?
http://minsup.kr/ms-item.php?pds_id=30
##########
댓글 7개
게시글 목록
| 번호 | 제목 |
|---|---|
| 136 | |
| 134 | |
| 131 | |
| 127 | |
| 122 | |
| 119 | |
| 118 | |
| 114 | |
| 110 | |
| 106 | |
| 102 | |
| 97 | |
| 96 | |
| 91 | |
| 85 | |
| 77 | |
| 74 | |
| 69 | |
| 63 | |
| 62 | |
| 57 | |
| 51 | |
| 37 | |
| 33 | |
| 32 | |
| 31 | |
| 25 | |
| 24 | |
| 23 | |
| 22 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기