2014-03-04 3 views
0
<?php 
for ($i = 0; $i < $count_images; $i++) 
    { 
    $image = $this->product->images[$i]; 
?> 
    <li> 
     <a href="javascript:void(0)" onClick="change(<?php echo $image->file_url; ?>)"><?php echo $image->displayMediaThumb('class="product-image"style="cursor: pointer"',false,""); ?></a> 
    </li> 
<?php } ?> 

<script type="text/javascript"> 
    function change(url) 
    { 
     alert(url); 
    }  
</script> 

내가 사용자가 썸네일virtuemart는

+0

확인이 링크를 클릭하면 큰 그림에 표시된 이미지를 변경하려면

http://www.walkswithme.net 큰 그림으로 미리보기를 얻을 javascriptto/joomla-virtuemart-product-image-zoom –

답변

0
 in components/com_virtuemart/views/product_details/default_images.php  

      if (!empty($this->product->images)) 
      { 
      $image = $this->product->images[0]; 
     ?> 
      <div class="main-image"> 

     <?php 
    echo $image->displayMediaFull('id="product_image"',true,"rel='vm-additional- images'"); 
?> 

    <div class="clear"></div> 
     </div> 







       <script type="text/javascript"> 
       function change(url) 
       { 
        document.getElementById('product_image').src=url; 
       }   
       </script>