Hello,
Is there a way to use the colorpicker cck field as an attribute for a product? Is there any other recommended way to allow buyers to pick a desired color for a product ?
Thanks a lot!
|
Ubercart |
|
|
|
||
|
Fri, 09/25/2009 - 15:29
Hello, Is there a way to use the colorpicker cck field as an attribute for a product? Is there any other recommended way to allow buyers to pick a desired color for a product ? Thanks a lot!
Re: Colorpicker field as attribute
No attributes are not built using cck fields, so you are limited to the field types that are avilable in ubercart. Its an interesting idea and will probably be something that could be explode when ubercart moved to D7 which has the new field api. You can add a blank text field as an attribute and with a little jquery you could add a color picker to that form item so it returns you a RGB number. I'm curious as to what type of product are you selling that you wan to be able to pick from that many colors? The main use of picking colors is when you have 6 different colors of shirt and just specify each one and have them in a drop down list.
Re: Re: Colorpicker field as attribute
Thank you, I have searched as you advised and found a possible solution here. Still, the drupal cck colorpicker looks more usable to me. I will "merge" them The store is selling custom gift boxes, on which the font color and background of the label can be picked.
Re: Re: Re: Colorpicker field as attribute
The colorpicker module has a form element type for adding color pickers to forms using the form api, so you could do exactly as the example you linked to and use a hook_form_alter() function to change an attributes field from a textfield to the colorpicker element.
Could you build a module of it please
Hi, I have a solution (it will cost me 20 euro), using native color attribute (http://www.ubercart.org/project/uc_color_attribute), see for solution: http://dev.luketarplin.com/node/2 greetings, Martijn |
|