- 정보공유
[영카트팁] 옵션이 없는 상품을 장바구니에 담을때 중복으로 상품명 출력되는것 수정.
/lib/shop.lib.php 파일의 약 1083 번째줄 print_item_options 함수.
$sql = " select ct_option, ct_qty, io_price
from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and od_id = '$cart_id' order by io_type asc, ct_id asc ";
$result = sql_query($sql);
$str = '';
for($i=0; $row=sql_fetch_array($result); $i++) {
if($i == 0)
$str .= '<ul>'.PHP_EOL;
$price_plus = '';
if($row['io_price'] >= 0)
$price_plus = '+';
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 ('.$price_plus.display_price($row['io_price']).')</li>'.PHP_EOL;
}
를 아래와 같이 수정.
$sql = " select ct_option, ct_qty, io_price, io_id
from {$g5['g5_shop_cart_table']} where it_id = '$it_id' and od_id = '$cart_id' order by io_type asc, ct_id asc ";
$result = sql_query($sql);
$str = '';
for($i=0; $row=sql_fetch_array($result); $i++) {
if($i == 0)
$str .= '<ul>'.PHP_EOL;
$price_plus = '';
if($row['io_price'] >= 0)
$price_plus = '+';
if ($row['io_id']) {
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 ('.$price_plus.display_price($row['io_price']).')</li>'.PHP_EOL;
}
}