Magento에서 제품 이미지 확대를 비활성화하는 방법을 아는 사람이 있습니까?Magento 이미지 줌을 비활성화하는 방법
6
A
답변
6
템플릿 디렉토리 (/ app/design/default/your_theme/template)에서 /catalog/product/view/media.phtml을 수정할 수 있습니다. 은 "다른"부분이 아닌 줌 버전을 출력하면서
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
<p class="product-image product-image-zoom">
<?php
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
</p>
<p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p>
<div class="zoom">
<img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
<div id="track">
<div id="handle"></div>
</div>
<img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
</div>
<script type="text/javascript">
//<![CDATA[
Event.observe(window, 'load', function() {
product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
});
//]]>
</script>
<?php else: ?>
<p class="product-image">
<?php
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
</p>
<?php endif; ?>
첫번째 부분 (는 IF 절 후) 줌 가능한 화상 출력이 이미지를 출력하는 코드이다. 마 젠토를 새로 설치에 마법처럼
<?php
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
작품 : 내가 가장 쉬운 해결책은 if 문을 제거하고 바로 비 줌 버전을 떠나 얻을 생각합니다.
2
해상도가 낮은 이미지를 사용하면 줌을 사용하지 않도록 설정하는 것이 좋습니다. HD 이미지를 보려면 다음 플러그인을 사용해보십시오. http://www.ajax-zoom.com/demo/magento/index.php/chair.html
관련 문제
- 1. 이미지 줌을 사용하여 자바 스크립트?
- 2. Magento 온라인 판매 기능을 비활성화하는 방법은 무엇입니까?
- 3. Magento 이미지 미리 캐시
- 4. magento 제품 이미지 견본
- 5. magento 위젯에 이미지 추가
- 6. 일부 제한에서 줌을 방지합니다
- 7. Magento : Adminhtml 양식의 "이미지"필드
- 8. Magento Checkout - 보안되지 않은 이미지
- 9. as3 : 이벤트 리스너를 비활성화하는 방법
- 10. UIImagePickerController에서 비디오 캡처를 비활성화하는 방법
- 11. C# 키를 비활성화하는 방법
- 12. 폼 인증을 비활성화하는 방법
- 13. 배경 화면을 비활성화하는 방법
- 14. 스크립트에서 RequiredFieldValidator를 비활성화하는 방법
- 15. 모든 버튼을 비활성화하는 방법
- 16. ListView에서 헤더보기를 비활성화하는 방법
- 17. QPushButton을 비활성화하는 방법
- 18. NSTableVIew에서 정렬을 비활성화하는 방법?
- 19. 기본 qpushbutton을 비활성화하는 방법
- 20. 시끄러운 디버그를 비활성화하는 방법?
- 21. combobox에서 optgroup을 비활성화하는 방법
- 22. ScatterView에서 관성을 비활성화하는 방법
- 23. 이미지를 비활성화하는 방법
- 24. E_STRICT를 비활성화하는 방법
- 25. 콘솔 옵션을 비활성화하는 방법
- 26. setOnItemClickListener를 비활성화하는 방법?
- 27. 동적으로 버튼을 비활성화하는 방법
- 28. 동적으로 버튼을 비활성화하는 방법
- 29. BetterAuthorizationSample에서 인증을 비활성화하는 방법?
- 30. asp.net에서 캐시를 비활성화하는 방법?
감사합니다. – mcgrailm