장바구니 상품리스트 썸네일 코드 추가
This commit is contained in:
@ -88,13 +88,23 @@ $sql = " select a.ct_id,
|
||||
b.it_option_use,
|
||||
b.it_supplement_use,
|
||||
b.it_nocoupon,
|
||||
b.it_notax
|
||||
b.it_notax,
|
||||
b.it_img1,
|
||||
b.it_img2,
|
||||
b.it_img3,
|
||||
b.it_img4,
|
||||
b.it_img5,
|
||||
b.it_img6,
|
||||
b.it_img7,
|
||||
b.it_img8,
|
||||
b.it_img9,
|
||||
b.it_img10
|
||||
from {$g4['yc4_cart_table']} as a left join {$g4['yc4_item_table']} as b on ( a.it_id = b.it_id )
|
||||
where $sql_where
|
||||
and a.ct_parent = '0'
|
||||
and a.ct_direct = '$sw_direct' ";
|
||||
|
||||
if($w == "selectedbuy")
|
||||
if($act == "selectedbuy")
|
||||
$sql .= " and a.ct_selected = '1' ";
|
||||
|
||||
if($s_page == "cart.php" || $s_page == "orderform.php")
|
||||
@ -146,14 +156,24 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
$continue_ca_id = $row['ca_id'];
|
||||
}
|
||||
|
||||
// 리스트 썸네일 이미지
|
||||
$filepath = G4_DATA_PATH.'/item/'.$row['it_id'];
|
||||
for($k=1; $k<=10; $k++) {
|
||||
$idx = 'it_img'.$k;
|
||||
if(file_exists($filepath.'/'.$row[$idx]) && is_file($filepath.'/'.$row[$idx])) {
|
||||
$filename = $row[$idx];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($s_page == "cart.php" || $s_page == "orderinquiryview.php") { // 링크를 붙이고
|
||||
$a1 = "<a href='./item.php?it_id={$row['it_id']}'>";
|
||||
$a2 = "</a>";
|
||||
$image = get_it_image($row['it_id']."_s", 50, 50, $row['it_id']);
|
||||
$image = get_it_image($row['it_id'], $filename, 50, 50, $row['it_id']);
|
||||
} else { // 붙이지 않고
|
||||
$a1 = "";
|
||||
$a2 = "";
|
||||
$image = get_it_image($row['it_id']."_s", 50, 50);
|
||||
$image = get_it_image($row['it_id'], $filename, 50, 50);
|
||||
}
|
||||
|
||||
$it_name = $a1 . stripslashes($row['it_name']) . $a2 . '<br />';
|
||||
|
||||
Reference in New Issue
Block a user