( Latest versions: 2.9.3 Stable, compatible with Joomla 3.9.0+   &   0.9.3 Stable, compatible with WordPress 4+ )

"Order by date" in Complex Tariff

More
5 years 2 weeks ago - 5 years 1 week ago #5135 by fabrikastyle
"Order by date" in Complex Tariff was created by fabrikastyle
Hi!
For example I have Tariffs for 3 diferent seasons.
- Fabruary-Mart - 200$,
- April 300$
- May - 400$

In front-end they appear in the same order. But if I would like to break first period for 2 periods (Fabruary and March),
tariff;s table ordered by ID and looks like this:

- Fabruary- 200$ (changed Fabruary-Mart period)
- April 300$
- May - 400$
- March - 250$.

Is it possible to ORDER array by "valid_from" ?

Thank you!
Last edit: 5 years 1 week ago by fabrikastyle.

Please Log in or Create an account to join the conversation.

More
5 years 2 weeks ago #5138 by vietvh
Replied by vietvh on topic "Order by date" in Complex Tariff
Hi,

Sure, it is possible with simple modification:

1. Oepn file /administrator/components/com_solidres/models/tariffs.php

2. Replace line 155:
return $query;

With these lines:
$query->order('t.valid_from ASC');

        return $query;

Hope this helps,
The following user(s) said Thank You: fabrikastyle

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #5176 by fabrikastyle
Replied by fabrikastyle on topic "Order by date" in Complex Tariff
Thank you!
This is very important, if you made a mistake in the period and add them "out of order" :)

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #5180 by vietvh
Replied by vietvh on topic "Order by date" in Complex Tariff
Hi,

Nice to see it works for you.

We will include it in the upcoming release v0.8.1 as well.

Regards,

Please Log in or Create an account to join the conversation.

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?