- Posts: 41
- Thank you received: 2
Change order ASC or DESC - Move not working
- mike
- Topic Author
- Offline
- Senior Member
Less
More
10 years 10 months ago #33003
by mike
Change order ASC or DESC - Move not working was created by mike
Hi,
I want to order the category list from old to new, currently the newest is on top, but it needs to be changed (oldest first), how can i do this ?
Also, if I set the "ordering events by" to ordering it changes the order, but in the backend I cannot change the order in the events list.
the system does not allow me to change the number or even the "move up/down/ does not work.
You have a solution for my problem ?
thanks mike.
I want to order the category list from old to new, currently the newest is on top, but it needs to be changed (oldest first), how can i do this ?
Also, if I set the "ordering events by" to ordering it changes the order, but in the backend I cannot change the order in the events list.
the system does not allow me to change the number or even the "move up/down/ does not work.
You have a solution for my problem ?
thanks mike.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 years 10 months ago #33059
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Change order ASC or DESC - Move not working
Hi Mike
Go to the events/categories list page in the back-end, click on the header of ordering column. After that, you can change the order of these items !
Regards,
Tuan
Go to the events/categories list page in the back-end, click on the header of ordering column. After that, you can change the order of these items !
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- mike
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 41
- Thank you received: 2
10 years 10 months ago #33065
by mike
Replied by mike on topic Re: Change order ASC or DESC - Move not working
Hi Tuan,
this indeed solves one of the problems.
but would there be a way to have the events sorted by date and then choose asc / desc ??
or is there a simple code change to do this ?
thanks,
Mike.
this indeed solves one of the problems.
but would there be a way to have the events sorted by date and then choose asc / desc ??
or is there a simple code change to do this ?
thanks,
Mike.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 years 10 months ago #33091
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Change order ASC or DESC - Move not working
Hi Mike
In the current version, it is not possible for users to choose asc/desc. If you want, you can edit the code. Look at the file components/com_eventbooking/models/category.php, find the code below :
Change it to :
function _buildContentOrderBy()
{
$orderby = ' ORDER BY a.event_date DESC';
return $orderby;
}
After that, events will be ordered by DATE DESC .
Hope this give you alitle help !
Tuan
In the current version, it is not possible for users to choose asc/desc. If you want, you can edit the code. Look at the file components/com_eventbooking/models/category.php, find the code below :
Code:
function _buildContentOrderBy()
{
$orderEvents = EventBookingHelper::getConfigValue('order_events');
if ($orderEvents == 2) {
$orderby = ' ORDER BY a.event_date ';
} else {
$orderby = ' ORDER BY a.ordering ';
}
return $orderby;
}
Change it to :
function _buildContentOrderBy()
{
$orderby = ' ORDER BY a.event_date DESC';
return $orderby;
}
After that, events will be ordered by DATE DESC .
Hope this give you alitle help !
Tuan
Please Log in or Create an account to join the conversation.
- TomArtur
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
10 years 7 months ago #36886
by TomArtur
Replied by TomArtur on topic Re: Change order ASC or DESC - Move not working
Hi Tuan,
this doesn´t work with 1.6.2.
Is there another way with this version?
Best regards
Tom
this doesn´t work with 1.6.2.
Is there another way with this version?
Best regards
Tom
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 years 7 months ago #36918
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Change order ASC or DESC - Move not working
Hi Tom
In version 1.6.2, the code has been changed. Please follow the instructions below :
1. Open the file components/com_eventbooking/models/category.php
2. Find the code below:
Change it to :
After that, it should work as expected.
Tuan
In version 1.6.2, the code has been changed. Please follow the instructions below :
1. Open the file components/com_eventbooking/models/category.php
2. Find the code below:
Code:
if ($orderEvents == 2)
{
$this->state->set('filter_order', 'tbl.event_date');
}
else
{
$this->state->set('filter_order', 'tbl.ordering');
}
Change it to :
Code:
$this->state->set('filter_order', 'tbl.event_date');
$this->state->set('filter_order_Dir', 'DESC');
After that, it should work as expected.
Tuan
Please Log in or Create an account to join the conversation.
- TomArtur
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
10 years 7 months ago #36921
by TomArtur
Replied by TomArtur on topic Re: Change order ASC or DESC - Move not working
Thanks Tuan,
works like a charm
works like a charm
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 years 7 months ago #36922
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Change order ASC or DESC - Move not working
Oh Yes. I know that .
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.