You are here:  » Creating a new filter - Only four field to select


Creating a new filter - Only four field to select

Submitted by nazeelp on Fri, 2006-07-21 12:12 in

Hello

When i create a filter i only getting four fields to selcet to apply the filter.

I actually want ot select the price so that i can drop some of the product with zero value.

Thank You

Naz

Submitted by support on Fri, 2006-07-21 12:43

Hello Naz,

As it stands in the distribution, the Price field is not available on the filter drop-down because it is automatically "decimalised", which is a special filter that tries to convert all types of price representation into a normal currency value to 2 decimal places.

However, you can add it to the drop down with a simple modification to both admin/feeds_filters.php and admin/feeds_filters_configure.php. In each of those two files you will find a block of code that populates an array of fields that will appear in the drop down. You just need to add the following line to that block (look for the code that looks the same as this new line):

  if ($feed["field_price"]) $fields[$feed["field_price"]] = "Price (".$feed["field_price"].")";

Becuse the decimalisation filter will have already been applied, you will need to enter "0.00" as the value to match.

Hope this helps;
Cheers,
David.