I use Drupal Commerce version 8.x-2.15. I have a multilingual Drupal site with multiple languages based on domain.

mystic.com -> EN language mystic.eu -> NL language


I added relationships:

(order_items: Order item) Product variation
(Product variation) Product

To get the image_field available to show a thumbnail in my cart form. This works fine.

After I added those relationships and I add one product to my shopping cart and I see now the number of times that I translated my product back in the shopping cart, like: My product My product My product My product

(so above product is translated into 4 languages).

I've fixed this by adding a filter to the view:

Product: Translation language Is one of Content language selected for page

It looks like this is working but I see now 2 values (see screenshot) enter image description here

It doubled the added product. But the price and quantity shows 1.

  • Did you add any contextual filters? You've checked that you're combining variations in the cart? – TonyTheFerg Nov 28 '19 at 19:11
  • @TonyTheFerg I have a contextual filter Order: ID. How do I check combining variations in the cart? – meez Nov 28 '19 at 20:50
  • Make sure to check that the product variation is set to Combine order items containing the same product variation.. This is under Manage Displayfor the product-type in question. @ admin/commerce/config/product-types/YOUR-PRODUCT-TYPE/edit/display. For the Variations field, click the settings icon to the right, and ensure that Combine order items containing the same product variation. is checked. – TonyTheFerg Nov 28 '19 at 22:30

In the commerce_cart _form view under Advanced, edit the Query Settings, and set it to DISTINCT.

|improve this answer|||||
  • This is already set in Manage Display... – meez Nov 28 '19 at 21:03
  • Is your contextual filter default as it came? – TonyTheFerg Nov 28 '19 at 21:07
  • Also have you tested removing relationship requirements? (not the relationship itself, but the requirement of it) – TonyTheFerg Nov 28 '19 at 21:15
  • I am not sure. It's set to Provide default value type Fixed – meez Nov 28 '19 at 21:16
  • ok. that should be fine then – TonyTheFerg Nov 28 '19 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.