VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sandomatyas on September 24, 2018, 16:32:58 PM

Title: feature request:search by ID
Post by: sandomatyas on September 24, 2018, 16:32:58 PM
In Joomla you can search for articles, modules, users, etc by id, when you type like id:123
It would be great using something similar with Virtuemart too
When I check the core class UsersModelUsers it's a simple code:
if (stripos($search, 'id:') === 0)
{
$query->where('a.id = ' . (int) substr($search, 3));
}

it sounds easy to implement
In the core code it also works with username (users), author (articles), link (menus), uid (user notes) so maybe VM could also use some more fields for that.
Title: Re: feature request:search by ID
Post by: PRO on September 29, 2018, 17:28:04 PM
what do you have for your search settings?
Title: Re: feature request:search by ID
Post by: Jörgen on September 29, 2018, 20:55:28 PM
I am not sure what sandomatyas end means, but searching 34 or id:34 is not the same thing. Searching for 34 gives probably a lot of hits. Searching id:34 should give only one return item. id:34

Jörgen @ Kreativ Fotografi
Title: Re: feature request:search by ID
Post by: sandomatyas on October 01, 2018, 14:31:51 PM
Quote from: Jörgen on September 29, 2018, 20:55:28 PM
I am not sure what sandomatyas end means, but searching 34 or id:34 is not the same thing. Searching for 34 gives probably a lot of hits. Searching id:34 should give only one return item. id:34

Jörgen @ Kreativ Fotografi

exactly :)
Title: Re: feature request:search by ID
Post by: sandomatyas on October 14, 2021, 07:52:52 AM
Any update with this maybe? I had to modify one of my sites to achive this because we us it on a daily basis but it would be great having a core solution for that.
Title: Re: feature request:search by ID
Post by: GJC Web Design on October 14, 2021, 12:02:31 PM
+1 for this ...  would be very useful