如果我了解您要完成的工作,我在http://homespun-at-heart.com/product/gracie做了类似的事情。我所做的只是自定义 option_images 模块的 javascript 和预加载功能来更新主产品图像,而不是像默认情况下那样更新 option_image 的图像。
我所做的一个主要缺点是重复的图像存储在服务器上的两个位置,因此分别下载。这是一个按预算完成的小项目,所以我没有自由投入时间“正确”地完成它。但是,如果这就是您所需要的……它可以工作!
在此站点上,我们不会将多个图像直接附加到产品上,而是通过选项图像模块将它们附加到属性上。编写一些js也不会花费很多工作,以便在单击缩略图时更新颜色选择。
更新 1:
我不确定您愿意为这个项目投入多少资金,但正如我考虑过的那样,在我看来,您需要指定哪些属性选项适用于哪些图片。我想象的是,当您在产品上上传图像时,您将能够进行这些选择。
然后,当访问者选择附加到图像的选项或单击缩略图时,选项会更新。
我还没有考虑足够长的时间来可视化界面。也许您的其他一些要求会决定这一点。
更新 2:
在您在下面发表评论后,这里有更多建议。
在您产品的编辑/选项屏幕上,您可以有一个下拉菜单,允许您选择哪些图像适用于哪些特定选项。这将使您能够克服将图像多次上传到服务器的问题。
要做到这一点,需要大量的工作,可能还需要另一个表,或者至少需要在uc_product_options
表中添加一个字段来存储产品和图像之间的关系。我会使用该uc_option_image
模块作为起点。它会给你很多方向来完成所需要的。
What I did to overcome the issue of having the attributes attached to multiple products is have my customer put all the possible colors on the attribute then they select only the ones apply to the specific product. The other option that we considered but vetoed was setting up a lot of different attributes that would roughly correspond to each different product. I forget all the reasons we didn't go this route but some of them are pretty obvious. :-)