$this->dao->orderby('uv.i_items DESC');$this->dao->orderby('b.pk_i_id DESC');
// GET ALL SELLERSpublic function getSellers($enabled = -1, $verified = -1, $type = -1, $limit = array(), $pattern = '', $city = '', $category = '', $order = 'RANDOM', $ids = array()) { $this->dao->select('b.*'); $this->dao->from($this->getTable_bp() . ' as b'); if($enabled <> -1) { $this->dao->where('b.b_enabled', $enabled); } if($verified <> -1) { $this->dao->where('b.b_verified', $verified); } if($type <> -1) { $this->dao->where('b.i_type', $type); } if($order == 'RANDOM' && is_array($ids) && !empty($ids)) { $ids = implode(',', $ids); $this->dao->where('b.pk_i_id in (' . $ids . ')'); } if($order == 'NEW') { $this->dao->orderby('b.pk_i_id DESC'); } if($order == 'ITEMS') { $this->dao->join($this->getTable_user() . ' as uv', '(b.fk_i_user_id = uv.pk_i_id)', 'INNER'); $this->dao->orderby('uv.i_items DESC'); }
$this->dao->orderby('b.pk_i_id DESC');
Have you cleared the cache and CDN?
Strange, the changes are not showing up.
$this->dao->orderby('rand()','b.pk_i_id');
Quote from: Ivan Kataev on October 26, 2022, 11:39:38 AMStrange, the changes are not showing up.Thanks for asking this question and Thanks to MB Themes for showing the path.Even I was thinking this for a while but forgot to ask this question here.So, if you are using Epsilon theme you can try the following as I am not sure if it works with any other themes.Replace this codeCode: [Select] $this->dao->orderby('b.pk_i_id DESC');With this codeCode: [Select] $this->dao->orderby('rand()','b.pk_i_id');
Quote from: Brandso on October 27, 2022, 07:10:38 PMQuote from: Ivan Kataev on October 26, 2022, 11:39:38 AMStrange, the changes are not showing up.Thanks for asking this question and Thanks to MB Themes for showing the path.Even I was thinking this for a while but forgot to ask this question here.So, if you are using Epsilon theme you can try the following as I am not sure if it works with any other themes.Replace this codeCode: [Select] $this->dao->orderby('b.pk_i_id DESC');With this codeCode: [Select] $this->dao->orderby('rand()','b.pk_i_id');This also works in Delta. But only in the widget on the main page. On the company page sorting from old to new.
if($order == 'NEW') { $this->dao->orderby('rand()','b.pk_i_id'); }
if($order == '') { $this->dao->orderby('rand()','b.pk_i_id'); }
Quote from: Ivan Kataev on October 28, 2022, 06:37:38 AMQuote from: Brandso on October 27, 2022, 07:10:38 PMQuote from: Ivan Kataev on October 26, 2022, 11:39:38 AMStrange, the changes are not showing up.Thanks for asking this question and Thanks to MB Themes for showing the path.Even I was thinking this for a while but forgot to ask this question here.So, if you are using Epsilon theme you can try the following as I am not sure if it works with any other themes.Replace this codeCode: [Select] $this->dao->orderby('b.pk_i_id DESC');With this codeCode: [Select] $this->dao->orderby('rand()','b.pk_i_id');This also works in Delta. But only in the widget on the main page. On the company page sorting from old to new.Hi,What I did is just created a new function Just BelowCode: [Select]if($order == 'NEW') { $this->dao->orderby('rand()','b.pk_i_id'); }I createdCode: [Select]if($order == '') { $this->dao->orderby('rand()','b.pk_i_id'); }In the above code I just removed NEW and kept 'Apostrophe'It worked for me. But its good that the developers of this plugin confirm if its correct because I am not sure if this will affect the plugins functionality anyhow.