상품상세 기본 이미지 세로 크기요.. 채택완료
세로로 긴 상품 이미지가 있습니다. 100px * 700px 정도요

이렇게 보이네요..
리스트에선 가로 세로 사이즈 정해주니 아래처럼 정상으로 보입니다.

가로로 긴 상품은 오른쪽 같이 정상 비율로 잘 보이구요..
상세페이지 기본 이미지 불러오는 코드인데
</p><p>$img = get_it_thumbnail($it['it_img'.$i], $default['de_mimg_width'], $default['de_mimg_height']); </p><p><span style="font-size: 14.6667px;">
이 코드를 아래와 같이 변경하니
</p><p style="font-size: 14.6667px;">$img = get_it_thumbnail($it['it_img'.$i], $default['de_mimg_width']); </p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px; line-height: 22px;">
이렇게 보이네요 ㅠㅠ
이미지 비율은 정상인데
세로가 2000px 이 넘어갑니다. 가로에 맞춘듯 합니다.
세로로 긴 사이즈 정상적으로 보이게 할 수 없는건가요?
상품 이미지에 여백주고 사각으로 만들어 올리면 되지만.. 리스트에서 보기 싫어서 그럽니다. 도와주세요.
영카트 4에선 shop.lib.php 를 아래와 같이 수정해서 사용했는데... 5로 이전 하는게 멀고도 험난하네요 .
</span><span style="font-size: 14.6667px;"> </span></p><p><span style="font-size: 14.6667px; line-height: 22px;">// 이미지를 얻는다</span></p><p><span style="font-size: 14.6667px; line-height: 22px;">function get_image($img, $width=0, $height=0)</span></p><p><span style="font-size: 14.6667px; line-height: 22px;">{</span></p><p><span style="font-size: 14.6667px; line-height: 22px;"><span class="Apple-tab-span" style="white-space:pre"> </span>global $g4, $default;</span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $full_img = "$g4[path]/data/item/$img";</span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> if (file_exists($full_img) && $img) </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> { </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> if (!$width) </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> { </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $size = getimagesize($full_img); </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $width = $size[0]; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $height = $size[1]; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> } </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> //$str = "<img id='$img' src='$g4[url]/data/item/$img' width='$width' height='$height' border='0'>"; -->영카트4 기본코드</span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $str = "<img id='$img' src='$g4[url]/data/item/$img' width='$width' border='0'>"; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> } </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> else </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> { </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $str = "<img id='$img' src='$g4[shop_img_url]/no_image.gif' border='0' "; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> if ($width) </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> //$str .= "width='$width' height='$height'"; </span><span style="font-size: 14.6667px; line-height: 1.5;">-->영카트4 기본코드</span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $str .= "width='$width'"; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> else </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> //$str .= "width='$default[de_mimg_width]' height='$default[de_mimg_height]'"; </span><span style="font-size: 14.6667px; line-height: 1.5;">-->영카트4 기본코드</span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $str .= "width='$default[de_mimg_width]'"; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> $str .= ">"; </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> } </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> </span></p><p><span style="font-size: 14.6667px; line-height: 22px;"> return $str;</span></p><p> </p><p><span style="font-size: 14.6667px; line-height: 22px;">}</span></p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px; line-height: 22px;">
답변 1개
자문자답.. 해결했습니다.
상세페이지 상품 기본 이미지 클릭시 새창으로 뜨는 largeimage.skin.php 소스 코드 가져다 사용 했더니 잘되네요.
item.form.skin.php 상품 이미지 출력 부분
</p><p><span style="font-size: 11pt; line-height: 1.5;"> <!-- 상품이미지 미리보기 시작 { --></span></p><p> <div id="sit_pvi"></p><p> <div id="sit_pvi_big"></p><p> <?php</p><p> $thumbnails = array();</p><p> for($i=1; $i<=10; $i++) {</p><p> if(!$row['it_img'.$i])</p><p> continue;</p><p> </p><p> $file = G5_DATA_PATH.'/item/'.$row['it_img'.$i];</p><p> if(is_file($file)) {</p><p> // 썸네일</p><p> $thumb = get_it_thumbnail($row['it_img'.$i], 60, 60);</p><p> $thumbnails[$i] = $thumb;</p><p> $imageurl = G5_DATA_URL.'/item/'.$row['it_img'.$i];</p><p> ?></p><p> <span></p><p> <img src="<?php echo $imageurl; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>" alt="<?php echo $row['it_name']; ?>" id="largeimage_<?php echo $i; ?>"></p><p> </span></p><p> <?php</p><p> }</p><p> }</p><p> ?></p><p> </div></p><p> </p><p> <?php</p><p> //썸네일</p><p> //$total_count = count($thumbnails);</p><p> //$thumb_count = 0;</p><p> // if($total_count > 0) {</p><p> // echo '<ul>';</p><p> //foreach($thumbnails as $key=>$val) {</p><p> //echo '<li><a href="'.G5_SHOP_URL.'/largeimage.php?it_id='.$it_id.'&no='.$key.'" class="img_thumb">'.$val.'</a></li>';</p><p> //}</p><p> //echo '</ul>';</p><p> //}</p><p> ?></p><p> </div></p><p> <!-- } 상품이미지 미리보기 끝 --></p><p><span style="font-size: 14.6667px; line-height: 1.5;">
썸네일은 사용 안하기에 주석으로 처리했습니다.
item.form.skin.php 상단에 아래 코드 추가
</span> </p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px;">// largeimage.skin.php 코드 복사</span></p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px; line-height: 22px;">$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</span></p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px; line-height: 22px;"> from {$g5['g5_shop_item_table']} where it_id='$it_id' ";</span></p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px; line-height: 22px;">$row = sql_fetch_array(sql_query($sql));</span></p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px; line-height: 1.5;">
</span></p><p><span style="font-size: 14.6667px;">#sit_pvi_big {width:460px; height:460px; padding:5px; display:table-cell; text-align:center; vertical-align:middle; background-color:#FFF; border:1px solid #e9e9e9; }</span></p><p><span style="font-size: 14.6667px; line-height: 1.5;">
결과는 아래와 같이 원하는대로 구현되었습니다.

댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인