Bad Filter Priority


I´m making a reservation calendar with this price filters:

base price filter (priority order 1)
extra charge filter ((priority order 2)
stay filter (order 3)
early booking filter (order 4)

When i try to insert a “extra charge filter” in priority order 2, it doesn´t do the claculation correctly, and put this filter in the last priority order.

Can you help me to insert the extra charge filter in order 2 ???

The priority is only important if you’ve multiple of the same type of filter because if the conditions match both get applied. So there’s a basic order by type and then it orders by priority.

Can i change the priority of the type of filter??

Is very important for my calendar.


You can open the file easyreservations_admin_resources.php and look between line 460 and 490 and try to change the default order till it matches your desired one.


I´m Trying but i can´t.

What I want is to put the “extra charge filter” in the 1st priority of calculation after the Base Price Calculation.

Can you put me the code?

Well it orders by type of condition and not as of the price mode. The code to change that, but keep a good ground order, won’t be easy to make. Maybe just order it by priority, for that I can give you a code 😉

Select Code
foreach($filters as $key => $filter) {
$filters[] = $filter;
$order[$key] = $filter['imp'];
array_multisort($order, SORT_ASC, SORT_NUMERIC, $filter);


Thanks … but where do I have to put this code?

changing the code between lines 460 an 490 in easyreservations_admin_resources.php ??

Itried that but nothing happends.


Replace lines 458-498 with it.

Hi again!

I replaced the code of your topic #9080 in the file easyreservations_admin_resources.php between lines 458-498 and the price filters crashes!

Could you please give me any solution??


As I said it’s a critical place where a few logics come together. The only Idea I’ve left is that filters that change the base price must always come before any other. Or what do you mean with crashes?

yes … and that solution is what a want … but when I change the code in the parameters you explained on your last post, the filters that I´ve configured in resources dissapear and when I try to create new filters, the filters don´t create.


Can you post the code with +-5 lines here?

I send you a screenshot of the code via emali. Thanks!

Delete line 464-472.

Do the same calculation.

Send you 2 screenshots by email of the code and the calculation resume in dashboard 🙁

You must be logged in to reply in this thread.

Not Resolved
18 posts