*

Dan

  • ***
  • 52 posts
Sort Best seller By User ID
« on: July 18, 2023, 01:18:03 AM »
Hi
I would like to show best seller based on user ID. How do I archive this using code ?

*

MB Themes

Re: Sort Best seller By User ID
« Reply #1 on: July 18, 2023, 01:53:06 PM »
In functions.php find this:
Code: [Select]
function eps_get_users($type = '', $limit = 12) {
  if($type == 'by_items') {
    $order_col = 'i_items';
    $order_type = 'DESC';
  } else if ($type == 'by_reg_date') {
    $order_col = 'dt_reg_date';
    $order_type = 'DESC';
  }

you probably want to change i_items to pk_i_id
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dan

  • ***
  • 52 posts
Re: Sort Best seller By User ID
« Reply #2 on: July 19, 2023, 12:36:56 AM »
Works ,
however I would like to enter user id manual for specific IDs
Something like this $user_id={'1,2,3}

How do I archive that?

*

MB Themes

Re: Sort Best seller By User ID
« Reply #3 on: July 19, 2023, 10:02:09 AM »
add there where statement in way:
Code: [Select]
...->where('fk_i_user_id in (1,2,3,4)');
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots