views:

76

answers:

3

I have an existing e-commerce application,that allows the admin to upload image of products. As of now,the feature allows only single image upload for a product available in multiple colors.The colors are uploaded as simple csv format by admin. Business requirement has changed and the business wants that on change in dropdown for color of a product the image of the product shown in the catalogue across the application be of the same color as that selected from the dropdown. Please suggest how shall I go about it.

A: 

Since you haven't posted any code. Based on your description, I am assuming that you are using ASP.NET. If this is the case you can use Themes And Skins to achieve this. Just set the skin programmatically depending on the selected default color setting that you have in your database.

ichiban
A: 

You can store the different images with filenames like product.color.ext and when the state of the dropdown changes, append that ending to the filename (e.g., shirt.red.jpg, shirt.blue.jpg, etc.). There are multiple ways to do it, that could be one solution.

Ankit
A: 

I don't understand your question, or what the business requirement is.

It's clear that something should happen when a user changes which item in a drop down is selected. The results of this change are what I don't understand.

Is this like a customer facing page and you want the image to change for that particular customer? Or is this like an administrator page, and you want the image to change for all users of the site (i.e. the drop down classifies metadata that image X is of color Y)?