博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to Get All Product Images in products list page?
阅读量:4200 次
发布时间:2019-05-26

本文共 1026 字,大约阅读时间需要 3 分钟。

 

 

<!-- Bring in gallery Images    -->

                    <?php $_gallery = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages();  ?>

                    <?php $imgcount = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages()->count();?>

                    <?php if($imgcount >1): ?>

                        <div class="more-views" style="float:left; padding-left:5px; padding-top:0px;">                   

                           <table>

                            <tr>

                            <?php foreach ($_gallery as $_image ):  ?>

                                <td style="display:inline;">

                                     <a href="#" οnclick="popWin('<?php echo $this->helper('catalog/image')->init($_product, 'image', $_image->getFile()); ?>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail', $_image->getFile())->resize(87, 130); ?>" width="87" height="130" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>

                                </td>

                             <?php endforeach;  ?>

                             </tr>

                            </table>

                        </div>

                    <?php endif; ?>

转载地址:http://hrdli.baihongyu.com/

你可能感兴趣的文章
做培训讲师就像做一名导演
查看>>
深圳51testing笔架山一日游
查看>>
《Scrum精髓》审校后记:关于Acceptance Test
查看>>
国产APP自动化测试工具AndroidRobot下载地址
查看>>
QTP与手机测试
查看>>
在QTP中自定义测试对象WinList的Select方法
查看>>
《TestComplete Made Easy》读书笔记
查看>>
LoadRunner如何在脚本运行时修改log设置选项?
查看>>
QC数据库表结构
查看>>
自动化测试工具的3个关键部分
查看>>
测试工具厂商的编程语言什么时候“退休”?
查看>>
资源监控工具 - Hyperic HQ
查看>>
LoadRunner中Concurrent与Simultaneous的区别
查看>>
SiteScope - Agentless监控
查看>>
QTP的智能识别(Smart Identification)过程
查看>>
LoadRunner各协议所需耗费的内存资源表
查看>>
AutomatedQA收购Smart Bear?
查看>>
使用QTP进行WEB页面性能测试
查看>>
LoadRunner的VS.NET 2005插件
查看>>
LoadRunner中如何验证下载的文件大小、统计下载时间、度量下载速度?
查看>>