Author Topic: search in Virtuemart admin by product_sku  (Read 1606 times)

adriantanase

  • Beginner
  • *
  • Posts: 1
search in Virtuemart admin by product_sku
« on: April 12, 2012, 14:10:51 pm »
This is something I needed in Virtuemart (since i'm making the transition from my old hardcoded site to a new Joomla OOP modular website).

There is a feature Virtuemart doesn't have (apparently) working, that I had in my old site, and this is also search in admin  (backend) module by product_sku,
and why not, by other fields.

I found the tweak on the net and thought I could share it here maybe they will include it in the next version.
Please feel free to repost my message in other subforums here, if you think this is not really the forum I should post this.


Open administrator/components/com_virtuemart/models/product.php

Around Line 94 Replace This:
Code:

$this->valid_search_fields= array('product_name');

With This:

Code:

$this->valid_search_fields= array('product_name','product_sku');

Around Line 132 Replace This:

Code:

$valid_search_fields = array('product_name');

With This:

Code:

$valid_search_fields = array('product_name','product_sku');


Is this the best way to do this? Probably not. Does it work? Yes.

Thanks guys.