News:

Support the VirtueMart project and become a member

Main Menu

Setup colour image selection custom fields

Started by w2kr, February 25, 2012, 00:41:39 AM

Previous topic - Next topic

w2kr

What I want is a colour swatch for the user to select the colour they want the product in.
So each colour selection will be a unique image with radio select
Can someone provide me the step to do this.
I can see the custom field type "image" in the custom field setup .
But where do I setup the path to the image to display for each colour.
I assume that once I have each colour image setup as a custom field then I group then by using a custom field "colour" as their parent and can add the parent custom field to the product.
Thanks for help with this.

w2kr

After some playing I have it working.
Steps.
add your colour swatch images via the Shop-> Media Files.   I actually change the thumbnail setting to be the same size as what I was uploaded
Next created a custom Field of image type in my case "colour" and set it's "cart attribute" setting to yes
Then in the product I added the custom field "colour" and in the drop down list I could see the images that I had added for the swatches.  I keep repeating this step until all colour image fields were added.
Then some adjustments to the layout css to make them fit in a row and on the category layout as well.

Help still required.
How do I add a name to each swatch image like "ruby red"
Still need to add them indivually to each product so have not got a faster method of adding all the colours in one hit. 

nl11883

This post is kind of old but the question keeps popping up in different forums. My situation (VM 2.010 J2.5): I'm building a shop with clothing. I would like to give the buyers to click on a specific color what should result in showing me a new detail page with the same product but in a different color.

Since in this version there is not something really useful available for this purpose, I solved it as follow:

I created one product with the name "Shirt" and added the details for a product called shirt black, sizes etc to it. Did put in in the right category so it is available for ordering. Then I created a new category called Shirts without publishing it. Added my products below there (eg shirt black, shirt green etc) and replaced the thumbnail picture with just a square of 50 by 50 px with the right color. Since the category is not active, they are not showing up in my category view, exactly what I wanted.

Then I made the shirt green as related product of my main product called shirt. Did the same for shirt black (added shirt green) and shirt green (added shirt black).

When I now click on the product shirt, I go to the detail page and see 1 related products (the shirt green). I see it as a color box (the 50 by 50 I uploaded as thumbnail). When I click on the thumbnail, a new detail page is loaded with the green shirt. Below there I can see one related product called shirt black.

I had to update the layout a bit (to get rid of the text related product text and to remove the horizontal line).

I'm not saying this is the most beautiful solution but this is the best I could figure out. Reason why it is not beautiful is that you end up with 2 time the same product, one called shirt and one called shirt black, but it fits the purpose.

Hope this helps. If you need more information, please post below.