링크
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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 670 | |
| 662 | |
| 660 | |
| 653 | |
| 652 | |
| 637 | |
| 623 | |
| 622 | |
| 620 | |
| 619 | |
| 618 | |
| 614 | |
| 599 | |
| 598 | |
| 593 | |
| 586 | |
| 583 | |
| 578 | |
| 575 | |
| 572 | |
| 570 | |
| 568 | |
| 566 | |
| 558 | |
| 552 | |
| 551 | |
| 545 | |
| 543 | |
| 531 | |
| 518 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기