向 magento 中的产品添加不同的缩略图大小
我有一家销售眼镜、服装等的 magento 商店。问题是我希望我的眼镜有 300px X 100px 的缩略图,而衣服有 300px X 300px 的缩略图。
我可以想到一些可能采取的不同路线,但我不确定每条路线对我商店的可升级性有何影响。 (目前使用 Magento 1.4.2,因为我对 1.5.x 还没有信心)
路线 1)向产品添加额外的图像尺寸
所以这条路线我会以某种方式在管理中向我的产品添加额外的图像区域和每个产品都有一个眼镜尺寸的拇指和一个衣服尺寸的拇指。
路线 2)根据属性集更改缩略图大小
我会在图像大小调整脚本中放置某种 case 语句,以根据产品使用的属性集更改缩略图的大小。
如果有人对如何实现这一点有任何其他想法,我们将不胜感激!
I have a magento store that sells glasses, clothing etc. The problem is that i would like my glasses to have thumbnails that are say 300px X 100px and the clothes to have thumbnails that are 300px X 300px.
I can think of a few different routes I might take but I am unsure of the implications each route would have on the upgradeablity of my store. (currently using Magento 1.4.2 as i dont yet have faith in 1.5.x)
Route 1) Adding Extra image sizes to products
So this route I would somehow add an extra image to my products in the admin area and each product would have a glasses size thumb and a clothing size thumb.
Route 2) Altering the thumbnail size depending on attribute set
I would put some sort of a case statement in the image resizing script to change the size of the thumnail depending on the attribute set the product is using.
If anyone has any other ideas on how this might be accomplished it would be greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于此类商店来说,为每种产品(眼镜和服装)使用不同的属性集是一个非常好的主意。不过,您也可以尝试使用单独的属性来提及产品类型(在
glasses
和clothing
之间)。关于图像大小调整,我找到了一个非常易于使用的脚本,其代码如下:-
您肯定需要对要提供的不同尺寸进行一些调整,但这仍然是一段非常好的代码( 可在此处使用),这保存了我的多次回来。
希望有帮助。
Using different Attribute Set for each of the products (glasses & clothing) is a very good idea for this sort of store. However, you can also try for a separate attribute mentioning the type of product (between
glasses
&clothing
).Regarding the image resizing, I have found a very easy to use script, whose code is as below:-
You will definitely need to do some tweaking regarding the different dimensions which you want to provide, but still it's a very good piece of code (available here), which has saved my back many-a-times.
Hope it helps.