Advertisement:

Author Topic: [New Plugin] Custom Attributes  (Read 115757 times)

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: [New Plugin] Custom Attributes
« Reply #15 on: January 05, 2013, 02:30:14 am »
Hi

I have a small fix for you. Currently with the following lines of code brakes the search from searching the description.


if (!empty($params['sPattern'])) {
	
	
$pattern trim($params['sPattern']);
	
	
Search::newInstance()->addConditions("s_title LIKE '%"$pattern "%'");
	

	
}


The solution is to remove the above lines. The line numbers are 108 to 111.

Jay

admymotor

  • Newbie
  • *
  • Posts: 29
  • www.admymotor.co.uk
Re: [New Plugin] Custom Attributes
« Reply #16 on: January 05, 2013, 02:50:17 pm »
Would it be as effective to use this instead of car attributes?
Could we have the vehicle makes and models still?

Thanks

chrisavv

  • Newbie
  • *
  • Posts: 30
Re: [New Plugin] Custom Attributes
« Reply #17 on: January 05, 2013, 04:20:46 pm »
in which files are the above lines located?

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: [New Plugin] Custom Attributes
« Reply #18 on: January 05, 2013, 05:39:44 pm »
Hi

The lines are in the index.php file of the plugin.

Jay

chrisavv

  • Newbie
  • *
  • Posts: 30
Re: [New Plugin] Custom Attributes
« Reply #19 on: January 05, 2013, 05:55:46 pm »
thanks a lot.

chrisavv

  • Newbie
  • *
  • Posts: 30
Re: [New Plugin] Custom Attributes
« Reply #20 on: January 05, 2013, 08:33:17 pm »
any idea why the search returns duplicate items?

sharkey

  • Full Member
  • ***
  • Posts: 102
Re: [New Plugin] Custom Attributes
« Reply #21 on: January 05, 2013, 08:39:19 pm »
Would it be as effective to use this instead of car attributes?
Could we have the vehicle makes and models still?

Thanks

I believe this plugin is better but .......
a) I'm biased
b) this is beta
c) I've never used cars attributes so it may have some feature I'm not aware of.

Try both and let us know which meets your needs better and why.   ;)

Thinking about it cars attributes probably does something like

Car>Honda>CRV>4 cyl>4 door>

with sub attributes.


sharkey

  • Full Member
  • ***
  • Posts: 102
Re: [New Plugin] Custom Attributes
« Reply #22 on: January 05, 2013, 08:40:52 pm »
any idea why the search returns duplicate items?

Is the duplicate a sponsored ad?  That's the only issue I've had.

chrisavv

  • Newbie
  • *
  • Posts: 30
Re: [New Plugin] Custom Attributes
« Reply #23 on: January 05, 2013, 08:47:17 pm »
nope its normal ads. some of them come 2 and 3 times...

sharkey

  • Full Member
  • ***
  • Posts: 102
Re: [New Plugin] Custom Attributes
« Reply #24 on: January 05, 2013, 08:49:47 pm »
I'll notify Sydcode an alternate way and see if we can drag him here.   :P  The testing I've done is very limited as I have no end users so any ads are one's I've made up.

P.S.  Did you make any changes?  I haven't made any including what Trains fixed yet.
« Last Edit: January 05, 2013, 08:53:54 pm by sharkey »

chrisavv

  • Newbie
  • *
  • Posts: 30
Re: [New Plugin] Custom Attributes
« Reply #25 on: January 05, 2013, 09:48:31 pm »
thanks a lot. the site is www.immoeuro.be.
if you search with the term "flat" you will see the double ads.
thanks in advanced

admymotor

  • Newbie
  • *
  • Posts: 29
  • www.admymotor.co.uk
Re: [New Plugin] Custom Attributes
« Reply #26 on: January 05, 2013, 10:38:49 pm »
I very much like this plugin, but i dont think its possible to have drop down selections for vehicle makes and models like in car attributes, for example if i select nissan, then all the nissan models will appear, if i change to jaguar, then the model selections change to jagaurs, i havent played with it much so not 100% sure.

Maybe i can install the cars attributes and just use that for makes and models, but im struggling to delete all the other parts to this like airbags, fuel type etc without any problems, if i can do this then i can then use this plugin for any other fields i choose, maybe the can be combined?

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: [New Plugin] Custom Attributes
« Reply #27 on: January 06, 2013, 12:13:21 am »
@admymotor,

Currently the custom attributes plugin does not support sub selects yet. It is possible just has not been implemented.

Jay

admymotor

  • Newbie
  • *
  • Posts: 29
  • www.admymotor.co.uk
Re: [New Plugin] Custom Attributes
« Reply #28 on: January 06, 2013, 12:23:08 am »
I am will defo looking forward to that, think that would be ideal.

sydcode

  • Newbie
  • *
  • Posts: 41
Re: [New Plugin] Custom Attributes
« Reply #29 on: January 06, 2013, 02:25:01 am »
Sorry guys, I've been away.

Quote
Currently with the following lines of code brakes the search from searching the description.
Yes, I should've added descriptions to that line. Here's the fix.

Code: [Select]
Search::newInstance()->addConditions("(s_title LIKE '%". $pattern . "%' OR s_description LIKE '%". $pattern . "%')");
Just a reminder, that code forces "Like" results instead of the usual keyword results. I'll put in an option to allow you to choose which one to use.