Author Topic: feature request:search by ID  (Read 1117 times)

sandomatyas

  • Jr. Member
  • **
  • Posts: 327
feature request:search by ID
« 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:
Code: [Select]
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.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10431
  • VirtueMart Version: 3+
Re: feature request:search by ID
« Reply #1 on: September 29, 2018, 17:28:04 pm »
what do you have for your search settings?

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3658
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: feature request:search by ID
« Reply #2 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

sandomatyas

  • Jr. Member
  • **
  • Posts: 327
Re: feature request:search by ID
« Reply #3 on: October 01, 2018, 14:31:51 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 :)

sandomatyas

  • Jr. Member
  • **
  • Posts: 327
Re: feature request:search by ID
« Reply #4 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.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10247
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: feature request:search by ID
« Reply #5 on: October 14, 2021, 12:02:31 pm »
+1 for this ...  would be very useful
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation