중복상품의 장바구니 목록요..
본문
안녕하세요..
중복된 상품을 장바구니에 넣으면 수량만 추가 변경이 되는것 같은데요..
중복상품이라도 따로 장바구니 목록에 따로 추가는 안되는 건가요?
감사합니다.
답변 1
/shop/cartupdate.php 중
// 동일옵션의 상품이 있으면 수량 더함
$sql2 = " select ct_id, io_type, ct_qty
from {$g5['g5_shop_cart_table']}
where od_id = '$tmp_cart_id'
and it_id = '$it_id'
and io_id = '$io_id'
and ct_status = '쇼핑' ";
$row2 = sql_fetch($sql2);
if($row2['ct_id']) {
// 재고체크
$tmp_ct_qty = $row2['ct_qty'];
if(!$io_id)
$tmp_it_stock_qty = get_it_stock_qty($it_id);
else
$tmp_it_stock_qty = get_option_stock_qty($it_id, $io_id, $row2['io_type']);
if ($tmp_ct_qty + $ct_qty > $tmp_it_stock_qty)
{
alert($io_value." 의 재고수량이 부족합니다.\\n\\n현재 재고수량 : " . number_format($tmp_it_stock_qty) . " 개");
}
$sql3 = " update {$g5['g5_shop_cart_table']}
set ct_qty = ct_qty + '$ct_qty'
where ct_id = '{$row2['ct_id']}' ";
sql_query($sql3);
continue;
}
를 삭제해보세요 ^^
!-->
답변을 작성하시기 전에 로그인 해주세요.