3
Answers
Vote up!
0
Vote down!

Attributes dropdown reset

Hi All,

I am developing an e-commerce portal using drupal commerce. Everything is fine so far. Now, my client is complaining me that whenever the user selects an attribute in the view product page, the next attribute drop-down value gets reset.

For eg, I am giving three attributes (brand, color, size) for T-shirts. After the client chose values for all the attributes and then changes the value for second attribute color, the third attribute drop-down automatically resets to the first value.

It may be less important. But, my client insists me to get this done.

Please help me out if you have any ideas to achieve this...

Thanks in advance.

Asked by: m.lakshmisundar
on May 25, 2013

3 Answers

Vote up!
1
Vote down!
Answer by: realskorpion
Posted: May 26, 2013

Comments

Many Thanks Realskorpion.. It almost solved my problem..

It works fine with two level product variations I think. If there are three level variations, there is an issue in showing the correct product.
For eg,
Shoe Type Formal
Brand Lee Cooper, Bata
Color Black, Brown

Shoe Type Casual
Brand Puma, Nike
Color Black, Brown

Scenario
------------
Choose in the following order
Formal -> Bata --> Brown --> Casual
Now, the Brand drop-down value is Puma. The Color drop-down value is Brown. But, its showing the Black color shoe image instead of showing the Brown shoe. I hope it takes the default value for the Color drop-down and so showing the Black shoe even the drop-down value been set to Brown.

Have anyone faced this before or am i doing something wrong? Pls suggest.

Thanks again Realskorpion...

- m.lakshmisundar on May 28, 2013
Vote up!
0
Vote down!

Thanks for the response.

I applied the latest patch given in that discussion. But, it works only in two level. If the product has three attributes it shows wrong product image.

My Products
------------------
Shoe type Formal
Brand Lee cooper, Bata
Color Black, Brown

Shoe type Casual
Brand Puma, Nike
Color Black, Brown

Scenario
-------------
Choose
Formal --> Bata --> Brown --> Casual (shoe type)
Now, the third drop-down, i.e Color value is still Brown. But, the product image is showing the Puma Black color shoe image instead of Puma Brown.

I think, it still takes the default color value even the Color drop-down been set to the previous selected value.

Have anyone ever faced this or Am I doing something wrong?

Any help would be greatly appreciated.

Thanks.

Answer by: m.lakshmisundar
Posted: May 29, 2013
Vote up!
0
Vote down!

I have fixed this by adding a 3 line code to that patch.

Thanks to all.... :):)

Answer by: m.lakshmisundar
Posted: May 31, 2013