doufei1988 2015-11-02 03:19
浏览 58

Magento - 图像和可配置样本的恒定产品尺寸

I am a newbie in using Magento. Currently, I am trying to set a constant product image grid (500px x 500 px) for the product detail page. Some of my products images are taken in square and rectangular shapes so I need to resize them to fit into the grid as well. Here is one of my product detail page:

http://www.kukubird.co.uk/kukubird-new-girls-ladies-large-dachshund-cartoon-designs-purse-wallet.html

I tried to set the grid height on css file but got no luck to achieve the result I want (Seems that Magento keeps updating the css files frequently).

Any advices or guidance would be much appreciated. Thank you very much!


UPDATE 02: It seems that I finally set the image grid to be constant by adjusting a css file:

.img-box-style1 .product-image {
    border:1px solid #eee;
    padding:5px;
    height: 500px;
}

However, I could not manage to resize the product image after clicking a colour swatch. Any advices or guidance for this?


UPDATE 02: Thanks partypete25 for the reply. We have tried to resize the image using CSS but it seems that we need more than that. Currently, the Magento takes the swatch thumbnail image and resize it on the product grid image. This caused a low quality image gallery. So perhaps we need to amend the template file/php to achieve what we want. Any guidance?


UPDATE 03: Hi all, this is just to update that our problem has been resolved. We have integrated a simple plug-in to achieve what we need. Thanks everyone for giving out their precious opinions.

</div>
  • 写回答

1条回答 默认 最新

  • dongshiqin1352 2015-11-02 04:42
    关注

    Is this for the images that are appearing smaller (narrower) than the product image grid?

    Try adding this to your css:

    .product-image-gallery .gallery-image {
      min-width: 100%;
    }
    

    Note: this will affect the appearance of image quality depending on how much it is being enlarged.

    评论

报告相同问题?

悬赏问题

  • ¥15 数学的三元一次方程求解
  • ¥20 iqoo11 如何下载安装工程模式
  • ¥15 本题的答案是不是有问题
  • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 蓝桥杯单片机第十三届第一场,整点继电器吸合,5s后断开出现了问题