October 8, 2013
at 10:09 /
#9045
Hi.
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 ???
October 8, 2013
at 11:31 /
#9050
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.
Regards
October 8, 2013
at 11:58 /
#9057
Can i change the priority of the type of filter??
Is very important for my calendar.
Thanks
October 9, 2013
at 11:37 /
#9071
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.
Regards
October 9, 2013
at 12:58 /
#9074
Hi.
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?
October 10, 2013
at 10:35 /
#9080
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 😉
1
2
3
4
5
|
foreach($filters as $key => $filter) {
$filters[] = $filter;
$order[$key] = $filter['imp'];
}
array_multisort($order, SORT_ASC, SORT_NUMERIC, $filter);
|
Regards
October 10, 2013
at 13:17 /
#9083
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.
Thanks!
October 11, 2013
at 11:16 /
#9088
Replace lines 458-498 with it.
Regards
October 12, 2013
at 08:02 /
#9099
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??
Thanks!
October 14, 2013
at 12:10 /
#9113
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?
Regards
October 14, 2013
at 12:13 /
#9115
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.
🙁
October 14, 2013
at 13:14 /
#9117
Can you post the code with +-5 lines here?
Regards
October 16, 2013
at 15:14 /
#9142
I send you a screenshot of the code via emali. Thanks!
October 17, 2013
at 11:09 /
#9155
Delete line 464-472.
Regards
October 17, 2013
at 11:44 /
#9170
Do the same calculation.
Send you 2 screenshots by email of the code and the calculation resume in dashboard 🙁