Sorting of Country List

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
stiller
Posts: 88
Joined: 05 Mar 2016, 15:59

Sorting of Country List

Post by stiller » 16 Oct 2023, 20:50

Aimeos 22.x
TYPO3 11.x

In previous versions it was possible to manually sorting countries.
client.html.checkout.standard.address.countries {
1 = CH
2 = AT
3 = DE
4 = AD
5 = ...
}

Since 22.x countries are listed in alphabetical order ignoring the assignment in typoscript.
is there a way to prioritise countries by showing them above others?
e.g. a shop receives 90% of orders from Switzerland and you want it to show up first in the list of payment address countries.

cheers

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Sorting of Country List

Post by aimeos » 17 Oct 2023, 06:45

The country configuration has been moved to "common/countries" so it's the same everywhere:
https://github.com/aimeos/aimeos-core/b ... common.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

stiller
Posts: 88
Joined: 05 Mar 2016, 15:59

Re: Sorting of Country List

Post by stiller » 17 Oct 2023, 09:06

yes, I've realised this although documentation is not up-to-date at every point.
still, can't find a logic to sort countries according to shop requirements as it was possible before the change

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Sorting of Country List

Post by aimeos » 18 Oct 2023, 10:02

The problem is that countries are sorted alphabetically by name after translation in the HTML client. We've changed that and they are only sorted by country name now if the list of country codes is strictly alphabetical. If not, the custom order is preserved.

You need to execute this command to get the relevant changes:

Code: Select all

composer req aimeos/aimeos-core:2023.10.x-dev aimeos/ai-client-html:2023.10.x-dev 
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Sorting of Country List

Post by aimeos » 18 Oct 2023, 10:19

stiller wrote: 17 Oct 2023, 09:06 yes, I've realised this although documentation is not up-to-date at every point.
Where are updates in the documentation missing?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply