1
Answers
Vote up!
0
Vote down!

Color Fancy Attributes with Facet API

I'm looking for a way to display colors in my facet as colored squares as opposed to simple link text.
Like it's displayed in my add to cart form.

Asked by: heyyo
on March 14, 2013

1 Answer

Vote up!
2
Vote down!

Funny how we never thought of that! Unfortunately, it's going to require a bit of custom code. To show the color blocks we add the "blocks" as descriptions using hook_form_alter() and use javascript to hide the actual radio form part and make the descriptions clickable.

Bojan Zivanovic
Answer by: Bojan Zivanovic
Posted: Mar 14, 2013

Comments

I've added this request as a feature request on the main commerce_search_api module.

http://drupal.org/node/1943150 ... I hear there may be some movement on this request soon (no promises, but the Kickstart 2 lead really like this idea!)

- Josh Miller on March 14, 2013

Thanks a lot. The patch already provided is great.

- heyyo on March 17, 2013

But I don't succeed to make it work. I don't see any extra widget display in my facet's display settings. I just applyed the patch provided. Any idea, what else I missed ?

- heyyo on March 18, 2013

I should note for historical purposes that the new widget became a part of Commerce Search API 7.x-1.1

- Bojan Zivanovic on March 21, 2013