2011-10-08 2 views
1

Magento 확장을 사용하여 색상 견본을 제어하고 있습니다. 또한이 모듈은 카탈로그 목록 축소판을 제어합니다. 크기 조정을 사용하는 경험이 있지만 순간에 작동하지 않는 것 같습니다. 개발자 모드에서 Magento - 제품 미리보기 크기 조정 방법

, 나는 템플릿 경로 힌트를 활성화하며 기본/템플릿/카탈로그/제품/list.phtml (일반 디렉토리)

문제가 /.../는 프론트 엔드에 있다고 하더군요 : 클릭하기 전에 , 이미지는 올바른 크기로 기본 설정됩니다. 그러나 미리보기 이미지를 클릭하면 135x135로 크기가 조정됩니다 (비뚤어지고 낮은 해상도).

내 제품 그리드 list.phtml에 : 나는 올바른 생각하면

<ul class="products-grid"> 
    <?php endif ?> 
     <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>"> 
      <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img id="<?php echo $_product->getId();?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(146,196); ?>" width="146" height="196" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a> 
      <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2> 
      <?php echo $this->getLayout()->createBlock("colorselectorplus/listswatch")->setTemplate("colorselectorplus/listswatches.phtml")->setData('product', $_product)->toHtml(); ?> 
      <?php if($_product->getRatingSummary()): ?> 
      <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?> 
      <?php endif; ?> 
      <?php echo $this->getPriceHtml($_product, true) ?> 

     </li> 
    <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?> 
    </ul> 

이는 이미지가 다른 PHTML에 의해로드의 onclick 그 수를인가

resize(146,196) 

에 의해 제어되어야한다 ?

감사합니다. URL이 필요한지 알려주세요. 나는 저자에 문의 한 enter image description here
enter image description here

(우리가 아직 살 것) 및 FAQ를 참조하십시오. 아직 응답을 듣지 못했습니다.

+0

이 동작을 보려면 좋을 것입니다. 팝업 이미지가 media.phtml 템플릿에로드 될 수 있습니다. – Zifius

+2

색상 견본 확장 프로그램 작성자에게 문의 해 보았습니까? 그들은 이미지 크기 설정에 관한 FAQ를 가지고있을 것입니다. – clockworkgeek

+0

내 카테고리 목록에서 문제의 이미지로 게시물을 업데이트했습니다. – danchet

답변

0

이 수정 프로그램은 우리가 설치 한 모듈과 관련된 로컬 파일에 있습니다. 크기 조정 폭/높이를 편집하는 것만 큼 간단하지만 사용자 친화적 인 영역에는 저장되지 않습니다.

4

동일한 문제가 발생하여 Amasty 지원팀에 문의했습니다. 위의 솔루션은 해결책이 아니기 때문에 그들이 보낸 솔루션입니다.

우리의 색상 견본이 파일에서 이미지 크기를 조정 (라인 78-85) : 응용 프로그램 \ 코드 \ 로컬 \ Amasty \ 컨퍼런스 \ 블록 \ 카탈로그 \ 제품 \보기 \ 타입 \ Configurable.php

$parentProduct = Mage::getModel('catalog/product')->load($simple->getParentId()); 
if($parentProduct){ 
    $confData[$strKey]['parent_image'] =(string)($this->helper('catalog/image')->init($parentProduct, 'small_image')->resize(135)); 
    if(!('no_selection' == $simple->getSmallImage() || '' == $simple->getSmallImage())){ 
     $confData[$strKey]['small_image'] = (string)($this->helper('catalog/image')->init($simple, 'small_image')->resize(135)); 
    } 
    else{ 
     $confData[$strKey]['small_image'] = (string)($this->helper('catalog/image')->init($parentProduct, 'small_image')->resize(135)); 
    } 
} 
+0

게시 해 주셔서 감사합니다. – danchet

+0

어떤 사람들은 사이트를 트롤 할 때 더 나은 시간을 가지지 못합니다. –

+0

이메일을 보내 주셔서 감사합니다 ... '처음으로 포스터'를 검토하는 중이었습니다. 제 편집은 다른 회원들에 의해 검토되었으며 만장일치로 승인되었습니다 - http://stackoverflow.com/review/suggested-edits/2266921을 참조하십시오. 여기에 게시 할 때 코드 형식을 지정하는 것이 일반적인 관행입니다. - 나는 그것에 대해 무례 함을 의미하지 않았습니다. – rog

관련 문제