Повторяются товары на каждой странице Views

Ср, 19/04/2017 - 12:01

При стандартной пагинации, при переходе с одной страницы на другую, повторяются 2 - 3 товара с первых страниц. Все товары уникальны.
Агрегация и дистинкт не помогает. Использовала другие пагинаторы - не помогает

0 Спасибо

Комментарии

Аватар пользователя multpix
1 month 6 дней назад multpix #

Commerce..
Используйте вьюсы на базе поискового индекса,
 search_api в помощь,
и  commerce_kickstart как пример.

0 Спасибо
Аватар пользователя xakd
1 month 6 дней назад xakd #

Агрегацию попробуйте, вон справа Use Aggregation. Иногда помогает
А, уже пробовали. Определили, какое поле сбоит?

0 Спасибо
Аватар пользователя SaltikStar
1 month 4 дня назад SaltikStar #

Что интересно товары повторяются только тогда, когда в запросе стоит LIMIT * OFFSET 0. Когда на страницу вывожу все товары, без включенного дистинкта, все в порядке.

Вы случайно не знаете в каком файле формируется SQL запрос?

Код запроса:

SELECT commerce_product_field_data_field_product.product_id AS commerce_product_field_data_field_product_product_id, node.nid AS nid, node.title AS node_title, node.LANGUAGE AS node_language, commerce_product_field_data_field_product.sku AS commerce_product_field_data_field_product_sku, commerce_product_field_data_field_product__field_data_commerce_price.commerce_price_amount AS commerce_product_field_data_field_product__field_data_commer, 'commerce_product' AS field_data_field_skidka_commerce_product_entity_type, 'commerce_product' AS field_data_field_imgshop_commerce_product_entity_type, 'commerce_product' AS field_data_commerce_price_commerce_product_entity_type, 'node' AS field_data_field_proizvoditel_node_entity_type FROM dr_node node LEFT JOIN dr_field_data_field_product field_data_field_product ON node.nid = field_data_field_product.entity_id AND (field_data_field_product.entity_type = :views_join_condition_8 AND field_data_field_product.deleted = :views_join_condition_9) LEFT JOIN dr_commerce_product commerce_product_field_data_field_product ON field_data_field_product.field_product_product_id = commerce_product_field_data_field_product.product_id LEFT JOIN dr_field_data_field_product commerce_product_field_data_field_product__field_data_field_product ON commerce_product_field_data_field_product.product_id = commerce_product_field_data_field_product__field_data_field_product.field_product_product_id LEFT JOIN dr_node field_product_commerce_product ON commerce_product_field_data_field_product__field_data_field_product.entity_id = field_product_commerce_product.nid LEFT JOIN dr_field_data_commerce_price commerce_product_field_data_field_product__field_data_commerce_price ON commerce_product_field_data_field_product.product_id = commerce_product_field_data_field_product__field_data_commerce_price.entity_id AND (commerce_product_field_data_field_product__field_data_commerce_price.entity_type = :views_join_condition_10 AND commerce_product_field_data_field_product__field_data_commerce_price.deleted = :views_join_condition_11) WHERE (( (node.nid IN (SELECT tn.nid AS nid FROM dr_taxonomy_index tn LEFT OUTER JOIN dr_taxonomy_term_hierarchy th ON th.tid = tn.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th1 ON th.parent = th1.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th2 ON th1.parent = th2.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th3 ON th2.parent = th3.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th4 ON th3.parent = th4.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th5 ON th4.parent = th5.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th6 ON th5.parent = th6.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th7 ON th6.parent = th7.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th8 ON th7.parent = th8.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th9 ON th8.parent = th9.tid LEFT OUTER JOIN dr_taxonomy_term_hierarchy th10 ON th9.parent = th10.tid WHERE ( (tn.tid = :db_condition_placeholder_0) OR (th1.tid = :db_condition_placeholder_1) OR (th2.tid = :db_condition_placeholder_2) OR (th3.tid = :db_condition_placeholder_3) OR (th4.tid = :db_condition_placeholder_4) OR (th5.tid = :db_condition_placeholder_5) OR (th6.tid = :db_condition_placeholder_6) OR (th7.tid = :db_condition_placeholder_7) OR (th8.tid = :db_condition_placeholder_8) OR (th9.tid = :db_condition_placeholder_9) OR (th10.tid = :db_condition_placeholder_10) ))) )AND(( (commerce_product_field_data_field_product.STATUS <> :db_condition_placeholder_11) ))) ORDER BY commerce_product_field_data_field_product__field_data_commer DESC LIMIT 20 OFFSET 0

0 Спасибо
Аватар пользователя multpix
1 month 4 дня назад multpix #

В БД, не в файле.

0 Спасибо