Holiday - Promotional Message

Holiday message pages list not sorted alphabetically - Holiday - Promotional Message

Holiday message pages list not sorted alphabetically

by 14Steve14 » Sat Sep 09, 2023 11:36 am

HI @rainer

Not sure if this is just me, but after installing this on a 1.0.8.20 version, everything works as it should, but the pages list is not sorted alphabetically when editing the addon in the admin area.

Is there a way of sorting these so its easier to find and select the files?

I have attached the below image to show what I mean.
holiday-message-page-list.png
14Steve14
Senior Contributor
Posts: 922
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Contact:

Re: Holiday message pages list not sorted alphabetically

by raiwa » Sat Sep 09, 2023 5:41 pm

The module uses a core function to retrieve the pages. So I do not think that It can be addressed within the module.
Anyway I’m on unplugged holidays (without computer) until 25 of September. I’ll have a look when I’m back.
Edit: I had a look into a 1.0.8.20 store I have access to admin and which has that module installed. The sort order is alphabetic. This must be something in your store’s core.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Holiday message pages list not sorted alphabetically

by 14Steve14 » Sun Sep 10, 2023 2:28 pm

I thought it may be something in my core but have no idea where to look as it was a new install of 1.0.8.20 pro version only a few weeks ago and all I have done is added in some modules. I will ask on the main forum if you have no ideas where to look.
14Steve14
Senior Contributor
Posts: 922
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Contact:

Re: Holiday message pages list not sorted alphabetically

by raiwa » Sun Sep 10, 2023 3:34 pm

You should search for the function which is used to retrieve the pages. As I have no computer with me, I can’t and of course I do not know by memory where it is defined.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Holiday message pages list not sorted alphabetically

by Omar_one » Sun Sep 10, 2023 7:05 pm

14Steve14 wrote:I thought it may be something in my core but have no idea where to look as it was a new install of 1.0.8.20 pro version only a few weeks ago and all I have done is added in some modules. I will ask on the main forum if you have no ideas where to look.
check this file " includes\system\versioned\1.0.5.6\page_selection.php"
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Contact:

Re: Holiday message pages list not sorted alphabetically

by 14Steve14 » Tue Sep 12, 2023 5:36 pm

Omar_one wrote:
14Steve14 wrote:I thought it may be something in my core but have no idea where to look as it was a new install of 1.0.8.20 pro version only a few weeks ago and all I have done is added in some modules. I will ask on the main forum if you have no ideas where to look.
check this file " includes\system\versioned\1.0.5.6\page_selection.php"
Gary came up with a solution in a post in the main forum and it cured the problem I was having. His suggestion was to add into includes\system\versioned\1.0.5.6\page_selection.php a sort after copying ot into the override folder.

Code: Select all

$files = array_unique($files);
sort($files); // new line of code

$output = Config::select_multiple($files, $values, $key) . '<br>'
          . new Tickable('p_all', ['class' => ' '], 'checkbox') . '&nbsp;' . TEXT_ALL;
14Steve14
Senior Contributor
Posts: 922
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Contact: