Path

ez projects / search_and_order_by_float_o...


Search and order by float or price datatype fields

UNIX name Owner Status Version Compatible with
search_and_order_by_float_or_price_datatype_fields Cesar Verdes planning N/A N/A

This contribution permit to order and search into the fetch functions at
the content module by float and price datatypes.

I had to develop a site where we need to order and search products by
prices.
I discovered that at de 3.3.3 version order and search command are
only supported by int and string fields.
In order to solve this problem I had to make smalls changes at the
following kernel files:
ezcontentobjectattribute.php
ezcontentobjecttreenode.php
ezfloattype.php
ezpricetype.php
ezsearchengine.php
and I had to add a indexed field call sort_key_float at the table
ezcontentobject_attribute.
At the ezcontentobject_attribute table of your database you have to add
a float field called "sort_key_float" and create a index on that new
field with the same name "sort_key_float".
We are including a zip files with all the modified kernel files. You
can find the changes bracked between comments with the following
header:
/*************************
* Modify by: phpFactory Argentina
* User: cverdes
* date: ...
* Comment: ...
*/
... change goes here ...
/*
*************************/
You can use the string "phpFactory Argentina" as a keyboard to find the
changes.
I hope this change could be useful to you, and could it be included at
futures releases of the kernel.
Good Luck
C.

 

Screenshot

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.