영카트 이미지 alt 표기 채택완료
영카트 5.4.1.8 버전을 사용중인데 상품상세정보 이미지에 alt 값이 없어서 /lib/shop.lib.php 파일 496번 라인을 다음과 같이 수정해보았습니다만.. 역시나 표기가 안되네요;; 가능한 방법이 없을까요??
if($thumb) {
$file_url = str_replace(G5_PATH, G5_URL, $filepath.'/'.$thumb);
$str = '';
}
답변 5개
$sql = " select it_id, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
이 다음에
$row = sql_fetch($sql); // 이부분이 빠졌네요
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
네 잘 확인하고 해당하는 부분이 없어서 아래 코드 내에 집어넣어 보았는데도 안됩니다..
// 상품이미지 썸네일 생성
function get_it_thumbnail($img, $width, $height=0, $id='', $is_crop=false)
{
$str = '';
$sql = " select it_id, it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
if ( $replace_tag = run_replace('get_it_thumbnail_tag', $str, $img, $width, $height, $id, $is_crop) ){
return $replace_tag;
}
$file = G5_DATA_PATH.'/item/'.$img;
if(is_file($file))
$size = @getimagesize($file);
if (! (isset($size) && is_array($size)))
return '';
if($size[2] 1 || $size[2] > 3)
return '';
$img_width = $size[0];
$img_height = $size[1];
$filename = basename($file);
$filepath = dirname($file);
if($img_width && !$height) {
$height = round(($width * $img_height) / $img_width);
}
$thumb = thumbnail($filename, $filepath, $filepath, $width, $height, false, $is_crop, 'center', false, $um_value='80/0.5/3');
if($thumb) {
$file_url = str_replace(G5_PATH, G5_URL, $filepath.'/'.$thumb);
$str = '';
}
return $str;
}
다음은 shop.lib.php 전체코드입니다..
댓글을 작성하려면 로그인이 필요합니다.
$sql = " select it_id, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row = sql_fetch($sql);
이부분이 상품정보 이미지를 가져오는 쿼리 입니다.
$sql = " select it_id,it_name, it_img1, it_img2, it_img3, it_img4, it_img5, it_img6, it_img7, it_img8, it_img9, it_img10 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
상품 이름을 정보를 추가해서 쿼리하시면 됩니다.
댓글을 작성하려면 로그인이 필요합니다.
상품이미지 가져오는 쿼리에 it_name을 추가해서 정보를 가져오시고
$str .= ' alt="'.$it_name.'">';
이부분을
$str .= ' alt="'.$row['it_name'].'">';
이렇게 하시면 될 듯 합니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
제작의뢰를 하려해도 대부분 소소한 수정건은 관심이 없으셔서 어찔해야할 지 고민이 됩니다;;
아무튼 다시 한 번 감사의 말씀드립니다~