Jump to content
Sign in to follow this  
senja

ошибка модуля ps_facetedsearch

Recommended Posts

    private static function getId_featureFilterSubQuery($filter_value, $ignore_join = false)
    {
        if (empty($filter_value)) {
            return array();
        }
        $query_filters = ' AND EXISTS (SELECT * FROM '._DB_PREFIX_.'feature_product fp WHERE fp.id_product = p.id_product AND ';
        foreach ($filter_value as $filter_val) {
            $query_filters .= 'fp.`id_feature_value` = '.(int) $filter_val.' OR ';
        }
        $query_filters = rtrim($query_filters, 'OR ').') ';

        return array('where' => $query_filters);
    }

там нужно скобки поставить

    private static function getId_featureFilterSubQuery($filter_value, $ignore_join = false)
    {
        if (empty($filter_value)) {
            return array();
        }
        $query_filters = ' AND EXISTS (SELECT * FROM '._DB_PREFIX_.'feature_product fp WHERE fp.id_product = p.id_product AND (';
        foreach ($filter_value as $filter_val) {
            $query_filters .= 'fp.`id_feature_value` = '.(int) $filter_val.' OR ';
        }
        $query_filters = rtrim($query_filters, 'OR ').') )';

        return array('where' => $query_filters);
    }

иначе при нескольких условии не правельная выборка

  • Thanks 1

Share this post


Link to post
Share on other sites

Спасибо большое!! 

Пришел сюда именно с этой проблемой. Было странно, нужели никто этого не заметил. Вот человек недавно описал подобную проблему, но там сошлись на том, что виной его тема.

Я же обнаружил это на свеже установленной.

Еще раз благодарю, что разобрались и поделились со всеми! 

Edited by webxtor (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More