2
Answers
Vote up!
0
Vote down!

One product attribute, many displays - How?

Hi,

I would like my site users be able to select product sizes by different measurement units such as US, EU, JP, Korea, Centimeters, Inches etc. You can see an example here: http://www.zalora.sg/Origami-Peplum-Dress-122857.html On this site, size numbers update automatically when a different measurement unit is selected. This product basically is available in only 4 sizes but they are displayed in four different sets of size numbers for each of International, UK, EU, US, AUS category. I am hoping to use this site as my reference also: http://www.onlineconversion.com/clothing_shoes_womens.htm, any idea how this type of table can be created using Drupal?

I have spent days trying to figure this out but so far nothing works. Can someone help me with this, please? many thanks.

bb

Asked by: hiyabeh
on November 9, 2013

2 Answers

Vote up!
0
Vote down!

Hi bb,

Look like they are using javascript or similar. You could I think do the same I think but it would take some work and is beyond my skill. If you have a product with different sizes, the default Product Display would give you a drop down select with each of your sizes, say you did international, you would have a drop down with S M L XL

You would need to take the values of the drop down select, (S M L XL or what ever you have) and re-render them as clickable squares, as per the example you have given. Hide (using CSS or whatever) the Drupal Commerce dropdown from the user.

Then code a function that generates the drop down select with the region options (international, UK, EU etc) and make that function alter the value in the list elements / squares created above.

Then make sure that what ever is selected (M, 10, 38 etc) then selects the corresponding value in the now hidden dropdown select so that when the Add to Cart button is clicked, Drupal Commerce knows which to select.

OR

Just label each option with all sizes, for example

I:M, UK:10, EU:30, AUS: 6, US: 10

It makes for a long drop down but you could have explanatory text?

Answer by: pipal
Posted: Nov 10, 2013

Comments

Thanks for your comment, pipal...too bad this is beyond my skills too...although I still think this is a neccesary function as display like this is quite common.

- hiyabeh on November 10, 2013
Vote up!
0
Vote down!

more help please, anyone?

Answer by: hiyabeh
Posted: Nov 12, 2013