VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Sergi0 on February 28, 2012, 10:17:00 AM

Title: How to search for custom fields.
Post by: Sergi0 on February 28, 2012, 10:17:00 AM
Hi!
Can i search products using custom fields? I'm found in file administrator\components\com_virtuemart\models\product.php $this->searchcustoms array, that contain assoc array (id => value).
If i run /index.php?option=com_virtuemart&search=true&view=category&customfields[16]=intershina&customfields[6]=195 virtuemart gives me the result, where the rows contain the specified values ​​custom_fields, but not as they should: it gives the result rows that contain the id field is 16 and the value of intershina, but rows that contain the id field value of 6 and 195, but does not contain the id field is 16 and the value of intershina.
This is logical true, but I need to rows containing all of the custom_fields and values.

I know, it's SQL question, but how can i do it without dirty hacking of code.

upd:
I'm using Joomla 1.5.25 and Vm 2.0.2

Mod edit:  bump message removed.  http://forum.virtuemart.net/index.php?board=66.0