With two or more variations in a product display, selecting one of the non-default variations won't add it to the cart. The variation seems to get loaded but on "Add to cart" the cart remains empty. The default variation will always be added as expected.

A similar issue occurs on the product edit page when clicking on "Edit" at the variations that are in line collapsed (backoffice). Clicking on the first variation does nothing. Clicking on the second variation expands both variations.

This occurs on every machine and every browser. There are no errors neither in the logs nor in the browser console. I can't pin it to a certain event. I have re-installed core, commerce and the dependencies. Deactivated other modules. I've been searching for two days now and can't find the cause. No idea where to look next.

Maybe someone here has an idea and can point me in a direction.

Thanks
paps.

Comments

BrianLP’s picture

Just did some more investigation. When adding a product to the cart, it gets written to the database in field_data_commerce_order_total .

However, when clicking on "View cart" or "Checkout", all cart content will be erased.

This will not happen, when the product is added from a teaser in a product list view. Cart and Checkout will behave normally then.

Any help or hint appreciated.

rszrama’s picture

Project: Commerce Core » Commerce Kickstart
Version: 7.x-1.10 » 7.x-2.x-dev
Component: Other » Code

Just guessing here based on your description - is this in Commerce Kickstart 2.x?

BrianLP’s picture

I'm on Commerce Kickstart 1. So far I traced it back to the Radioactivity module. Using the feature History Sparklines (graph) seems to be conflicting with content editing. I applied this patch for Radioactivity. https://www.drupal.org/node/2231405

The second thing I found is that after the Kickstart update the field settings of the Product Variation (admin/structure/types/manage –> manage display) were set to "Product discounted" which seems to cause the cart issue. Setting it to "Product" avoids it. https://www.drupal.org/node/2224481 (This is a CK 2 issue so it took me a while to find it.)

These two seem to be unrelated. So far everything seems to be working fine again.

BrianLP’s picture

Status: Active » Closed (fixed)