-2

after I switched from fields to products in the show section of the view, I get several duplicates of the same SKU. I used jquery distinct and product delta variation filter set to 0 to delete any duplicates while using fields in the view.

But now those 2 elements do not help anymore. I get many duplicates for some reason.

SELECT DISTINCT 
            "commerce_product_variation_field_data_commerce_product__variations"."sku" AS "commerce_product_variation_field_data_commerce_product__vari", 
            "commerce_product_variation_field_data_commerce_product__variations"."created" AS "commerce_product_variation_field_data_commerce_product__vari_1",
            "commerce_product_field_data"."title" AS "commerce_product_field_data_title",
            "commerce_product_variation_field_data_commerce_product__variations"."price__number" AS "commerce_product_variation_field_data_commerce_product__vari_2",
            "commerce_product_field_data"."product_id" AS "product_id",
            "commerce_product_variation_field_data_commerce_product__variations"."variation_id" AS "commerce_product_variation_field_data_commerce_product__vari_3"
FROM        {commerce_product_field_data} "commerce_product_field_data"
LEFT JOIN   {commerce_product__variations} "commerce_product__variations" ON commerce_product_field_data.product_id = commerce_product__variations.entity_id AND commerce_product__variations.deleted = '0'
INNER JOIN  {commerce_product_variation_field_data} "commerce_product_variation_field_data_commerce_product__variations" ON commerce_product__variations.variations_target_id = commerce_product_variation_field_data_commerce_product__variations.variation_id
WHERE       ("commerce_product_field_data"."status" = '1') AND ("commerce_product__variations"."delta" = '0')
ORDER BY    "commerce_product_variation_field_data_commerce_product__vari" ASC
LIMIT 30 OFFSET 0

my view

1

0

Your Answer

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

Browse other questions tagged or ask your own question.