Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
VirtueMart ForumVirtueMart Dev/Coding CentralVirtueMart Dev/Coding Central (Moderators: Soeren, aravot, gregdev)custom search categories + attribut + type_parameters
Pages: [1]   Go Down
Print
Author Topic: custom search categories + attribut + type_parameters  (Read 1553 times)
jehanon
Full Member
***
Posts: 114


« on: May 16, 2010, 02:03:35 AM »

Do you know an extension for virtuemart to search on jos_vm_product.attribute  + jos_vm_product_type_1.color  + categories  ?

thank you

Logged
zanardi
Development Team
Hero Member
*
Posts: 812


WWW
« Reply #1 on: June 04, 2010, 17:35:05 PM »

No. But you may extend the VM search plugin to search wherever you need.

--
Francesco (zanardi)
Logged

useris
Full Member
***
Posts: 145


« Reply #2 on: June 10, 2011, 08:13:26 AM »

Hi,

Sorry for asking. Could you givea tip or advice or a code Smiley for VM search plugin which will search in jos_vm_product_type_1 table.
I have spent the whole week but could not get it work, I ma not PHP programmer.

Thanks
Logged
BanquetTables.pro
Global Moderator
Hero Member
*
Posts: 4741



« Reply #3 on: June 10, 2011, 09:11:23 AM »

jehanon

Searching attributes is not the way to do this. IF it SHOULD be searchable, it should be a product_type

Logged

"Banquet Tables Pro"
useris
Full Member
***
Posts: 145


« Reply #4 on: June 10, 2011, 09:24:50 AM »

Should I edit VM search plugin? Or which VM file I must alter?
Logged
useris
Full Member
***
Posts: 145


« Reply #5 on: June 10, 2011, 15:34:33 PM »

Weird that noone has a solution or has but don't wish to share. I am just with basic PHP knowledges, so VM comunity help woud be more than helpfull.

I need to make my virtuemart to search product type (_jos_vm_produc_type_x)
Logged
BanquetTables.pro
Global Moderator
Hero Member
*
Posts: 4741



« Reply #6 on: June 10, 2011, 16:02:55 PM »

useris

I dont know of a search module that searches product type. Or seen anyone do a mod.

There are some filters here
http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=566&Itemid=2


They are not exactly what you are looking for though
Logged

"Banquet Tables Pro"
useris
Full Member
***
Posts: 145


« Reply #7 on: June 12, 2011, 11:43:29 AM »

Hi BanquetTables.pro,

Now filtering module is not what I need. I just did few testing on my site and search can find product if search phrase does not contain dot (.) for ex, search for 52
But If I will type search parameter with dot for ex. 52.11 it will not find my product.
I have product types which have dots.

I looked into vmsearch plugin and see the part of the code which builds search logic but don't know how to make it search phrases with dots
Code:
// Build search logic
$wheres = array( ) ;
switch( $phrase) {
case 'exact' :
$wheres2 = array( ) ;
foreach( $fields as $field ) {
$wheres2[] = "$field LIKE '%.%".$database->getEscaped($text)."%.%'" ;
}
$where = '(' . implode( ') OR (', $wheres2 ) . ')' ;
break ;
case 'all' :
case 'any' :
default :
$words = explode( ' ', $text ) ;
$wheres = array( ) ;
foreach( $words as $word ) {
$wheres2 = array( ) ;
foreach( $fields as $field ) {
$wheres2[] = "$field LIKE '%".$database->getEscaped($word)."%'" ;
}
$wheres[] = implode( ' OR ', $wheres2 ) ;
}
$where = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wheres ) . ')' ;
break ;
}

Logged
useris
Full Member
***
Posts: 145


« Reply #8 on: June 13, 2011, 04:28:40 AM »

Hi,

I found out that VM search plugin search for product types. But new problem is that it only finds if I type search parameters without dots for ex. 31 and it will find all product which type contains 35

But if I search fro product type wtih dot for ex. 31.56 it will not find any product. Is it a bug in that plugin or VM? I configured product type value as "float" so it should understand that product type contains dats.

useris

I dont know of a search module that searches product type. Or seen anyone do a mod.

There are some filters here
http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=566&Itemid=2


They are not exactly what you are looking for though

Logged
Pages: [1]   Go Up
Print
Jump to: