I've run into a strange cart addition problem. The cart adds the dollar value of the last option that adds cost to all non-null attributes below.

Let's say you have a item with a zero-dollar base cost.
Your first attribute is used to set the cost:

Small +$5
Medium +$10
Large +$20

Two additional attributes have several zero-dollar attributes but are required:
Purple ($0)
Red ($0)

Striped ($0)
Polka-dots ($0)

When you select small-purple-striped and add to cart. The value in your cart is not $5 but $45. It adds $20 for each of the two attributes in the subsequent groups. If the second and third attributes are not required, it adds this amount to the total cost only for non-null attributes. So small-null-null is $5 but small-null-striped is $25.

For the product I've discovered this with, I've created a workaround by adding a $0 option item last to the attribute that sets the cost and then hiding that option--but this is far from ideal.


Category:support» bug

It is apparently a bug, but not usage-crippling.

Version:7.x-2.6» 7.x-2.7
Assigned:Unassigned» kilogauss
Status:Active» Fixed

Thank you for the detailed bug report. This really helped me get it fixed quickly. I've added it to a development branch, but the Drupal site is not letting me create a dev release for some reason. I'll try again in the morning. In the meantime you can see the diff here if you want to manually make the code change. It's pretty simple.

Status:Fixed» Closed (fixed)