Skip to content

Multiple add to cart forms with different variation types throws exception#758

Merged
bojanz merged 1 commit intodrupalcommerce:8.x-2.xfrom
mglaman:2893182-multiple-add-to-cart-oddball-attributes
Jul 12, 2017
Merged

Multiple add to cart forms with different variation types throws exception#758
bojanz merged 1 commit intodrupalcommerce:8.x-2.xfrom
mglaman:2893182-multiple-add-to-cart-oddball-attributes

Conversation

@mglaman
Copy link
Copy Markdown
Contributor

@mglaman mglaman commented Jul 8, 2017

No description provided.

}

return $current_variation;
$form_state->setValueForElement($element['variation'], $current_variation->id());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not persist. It only sets the value during the validation cycle, which causes test fails.

I think commerce_product_variation_select element is what we need. Handle loadEnabled, filtering access. Displaying attributes and resolving final variant ID. So we do not need to attempt to piece the attributes to a variation within the widget.

@mglaman mglaman force-pushed the 2893182-multiple-add-to-cart-oddball-attributes branch from 567f061 to 9b3aa9e Compare July 10, 2017 20:21
@mglaman mglaman force-pushed the 2893182-multiple-add-to-cart-oddball-attributes branch from 9b3aa9e to c3dc40b Compare July 12, 2017 17:59
@bojanz bojanz merged commit 7b3e725 into drupalcommerce:8.x-2.x Jul 12, 2017
@mglaman mglaman deleted the 2893182-multiple-add-to-cart-oddball-attributes branch July 12, 2017 22:01
nikathone pushed a commit to nikathone/commerce that referenced this pull request Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants