You are here:  » Search options


Search options

Submitted by kimarie on Fri, 2011-12-30 23:43 in

Hi
I'd like to be able to search for certain products from specific merchants such as name:dress:merchant:shop. and so on, I think you done this for my other site but it uses searchExternal rather than the wordpress plugin so I'm not sure how to get it to work using the plugin?
Thanks,
Kimarie

Submitted by support on Sat, 2011-12-31 06:54

Hi Kimarie,

To support the same mod, in pto_search.php look for the following code at line 169:

      $fields = array("merchant","category","brand");

...and REPLACE with:

      $fields = array("merchant","category","brand","name:);

Then look for the following code at line 193:

  $where .= " ".$field." = '".$wpdb->escape($parts[$i])."' ";

...and REPLACE with:

  if ($field == "name")
  {
    $where .= " name LIKE '%".$wpdb->escape($parts[$i])."%' ";
  }
  else
  {
    $where .= " ".$field." = '".$wpdb->escape($parts[$i])."' ";
  }

Cheers,
David.
--
PriceTapestry.com

Submitted by kimarie on Sat, 2011-12-31 22:06

Great thank you.

Submitted by kimarie on Sat, 2012-03-31 00:48

Hi,
When I changed this it was working fine however I've just tried to use it today and its coming up with no results. Since making this modification I have installed the final update will this have reversed the changes I made?
Thanks

Submitted by support on Sat, 2012-03-31 09:02

Hi Kimarie,

Yes - updating to version 1.0 would have removed the modification - lines numbers remain the same so you can simply re-apply as per the above instructions...

Cheers,
David.
--
PriceTapestry.com