News:

Looking for documentation? Take a look on our wiki

Main Menu

Backend Search by SKU

Started by prismalight, January 23, 2012, 05:38:08 AM

Previous topic - Next topic

prismalight

HI,
I have migrated to VM and everything is working so far.
At the backend I have set SKU as a search able field. If I search in the product tab at the backend I get no results when I enter a SKU phrase. When I enter a Product Name phrase I get results.
Any advise?

prismalight

I just got it working via a core hack .. better solutions are welcome

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

glasya

I'm facing the same issue, could you tell me which file you edited these lines in?

prismalight

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

I just added the red part

petebass4life

as of version 2.0.8e
on line 151 of product.php in administrator/components/com_virtuemart/models
Replace:

$valid_search_fields = array('product_name');

with this:

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

makevalue

Quote from: prismalight on January 23, 2012, 05:38:08 AM
HI,
I have migrated to VM and everything is working so far.
At the backend I have set SKU as a search able field. If I search in the product tab at the backend I get no results when I enter a SKU phrase. When I enter a Product Name phrase I get results.
Any advise?

When I search in the backend, I am having really poor results finding any specific product.  Is there any documentation on searching?  How do I search for one product to edit?

airone93

Same issue here.

I'm afraid the backend doesn't include special characters or punctuation in the search.
For sure, a code like "501.001.032" is read as "501001032".

The same happens on frontend search.
The best would be if a module parameter could exclude this character filter.

I may hack my products.php page but the next VM update could erase my changes.

makevalue

Quote from: airone93 on August 07, 2012, 21:03:29 PM
Same issue here.

I'm afraid the backend doesn't include special characters or punctuation in the search.
For sure, a code like "501.001.032" is read as "501001032".

The same happens on frontend search.
The best would be if a module parameter could exclude this character filter.

I may hack my products.php page but the next VM update could erase my changes.

I had my developer hack it too.  I hope that this is addressed in the next update.


airone93

Excuse me, what's the fix for this?
Which file should be modified to address this issue?
Please, if you already fixed that, please, share the solution.
Thanks.