묻고답하기
섬네일 오류
2018.12.05 01:28
마켓플레이스 물품 등록 후 섬네일이 보이지 않아 코드 찾아보니 아래 빨간색부분인데,
modules/marketplace/skins/default/list.html
<td class="bd_thmb">
<div style="position:relative">
<span class="mp-condition-badge mp-condition-badge-small mp-{$document->getItemCondition()}">{$condition_list[$document->getItemCondition()]->short_name}</span>
<img src="{$document->getThumbnail(118,77)}" />
</div>
</td>
아래 코드(modules/marketplace/marketplace.item.php)의 파란색부분과 관련있는 것 같은 데 어떻게 수정하면 될 지 고견 부탁합니다.
function getThumbnail($width = 80, $height = 0, $thumbnail_type = '')
{
// Return false if the document doesn't exist
if(!$this->get('thumbnails_srl')) return;
// If not specify its height, create a square
if(!$height) $height = $width;
// Get thumbnai_type information from document module's configuration
if(!in_array($thumbnail_type, array('crop','ratio')))
{
$config = $GLOBALS['__document_config__'];
if(!$config)
{
$oDocumentModel = getModel('document');
$config = $oDocumentModel->getDocumentConfig();
$GLOBALS['__document_config__'] = $config;
}
$thumbnail_type = $config->thumbnail_type;
}
// Define thumbnail information
$thumbnail_path = sprintf('files/marketplace/thumbnails/%s',getNumberingPath($this->get('thumbnails_srl'), 3));
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, $width, $height, $thumbnail_type);
$thumbnail_url = Context::getRequestUri().$thumbnail_file;
https://busan-in.com/used_market
$document->getThumbnail(118, 77, 'crop');
thumnail type 을 지정해주어야 할 것 같습니다.