Guest
28 May 2013 08:26

Hi,

Here are the stesps:

I created a digit field in a type

I called that field in the module filter template as follows

onRenderFilter($section, TRUE);?>

on the frontend I am seeing error like this:

Fatal error: Call to a member function onRenderFilter() on a non-object in /home/xxx/modules/mod_cobalt_filters/tmpl/2columnsModal.php on line 112

However I had created some fields of digit and when I use them explicitly I don't see any errors. I only see this error for new digit fields.

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
29 May 2013 02:18

This is mecause there is not such a field. maybe ther is no data yet in DB that is why it is not shown.

Here is how you can do this correctly

onRenderFilter($section, TRUE); } ?>

Sergey
Total posts: 13,748
03 Jun 2013 01:55

$filter = $filters[$keys_by_id[72]]->onRenderFilter($section, TRUE);

if($filter) {

echo $filter;

}


Guest
03 Jun 2013 05:50

Thanks Sergey, it is working fine now. But there is one more issue, not sure if it is a bug or not.

If you have lets say 3 digit fields, one is Price, another is Bed and another is Bathrooms. and if you have Bathroom as the first field followed by Beds and Price, Then on the module filter, all the values in the text box slider is showing the min and max values of the first value (which is in my case Bathrooms). Means in price and Beds, the min and max is preoccupied by Bathroom Min and Max value. I wonder if it is a bug or something is not correct in my setup.


Guest
03 Jun 2013 06:06

Hi Sergey,

Here is the scenario:

I have three types : Type1, Type2, Type3

I have one section: section1

All the above three types belong to same section Section1

I have all these three fields named as Bathrooms, Beds and Price.

All the above three fields have same name and are all present on all three types.

Now in module cobalt filter, I select Section1

and when I see the cobalt module filter output, I see Beds and Price Min and Max slider text is prefilled by Bathrooms Min and Max field.

Another question is in such above case, which ($keys_by_id[?]) fields do i need to use, from which type?

Thanks


Sergey
Total posts: 13,748
03 Jun 2013 07:13

Another question is in such above case, which ($keys_by_id[?]) fields do i need to use, from which type?

Any. They key for Bathroom of any type will be the same. So you use ID of any Bathroom field. This is by the way why we invented keys. It is multiple type support.

Another question is in such above case, which ($keys_by_id[?]) fields do i need to use, from which type?

I wonder if it is a bug or something is not correct in my setup.

This was a bug. I had fixed it.


Guest
03 Jun 2013 07:16

gr8 and thanks for your quick reply.


pepperstreet VIP
Total posts: 3,837
03 Jun 2013 12:35

They key for Bathroom of any type will be the same. So you use ID of any Bathroom field. This is by the way why we invented keys. It is multiple type support.

Finally an example i can follow ;-) Now i understand the difference and benefit of "Key"... but I am still unsure about the ID? Isn´t it the same as the field ID? But field ID is unique, IMHO?


Sergey
Total posts: 13,748
04 Jun 2013 03:26

But field ID is unique, IMHO?

yes field ID is unique. And that is why when we call fields or filers we use keys. because we want to call Bathroom field of any type that potentially might be displayed than Bathroom field of type rent only.

Powered by Cobalt