Remove countries from checkout in config/shop.php
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 3
- Joined: 28 Aug 2016, 13:16
Remove countries from checkout in config/shop.php
Hi, I am trying to remove all countries except for a few from checkout address option. I do not want to tamper with core configuration and I am wondering if it is possible to do it in config/shop.php.
If I try the following, it just changes the first two countries in the list:
The following code appears to do nothing at all:
What can I do if I just want those two countries to be available for users to select from?
If I try the following, it just changes the first two countries in the list:
Code: Select all
'client' => array(
'html' => array(
'checkout' => array(
'standard' => array(
'address' => array(
'countries' => array(
'[0]' => 'US',
'[1]' => 'GB',
),
),
),
),
),
),
Code: Select all
'client' => array(
'html' => array(
'checkout' => array(
'standard' => array(
'address' => array(
'countries' => array(
'US',
'GB',
),
),
),
),
),
),
Re: Remove countries from checkout in config/shop.php
This works with the latest stable Aimeos core (2016.07.5)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 3
- Joined: 28 Aug 2016, 13:16
Re: Remove countries from checkout in config/shop.php
I updated my shop to 2016.07 version but it still behaves the same way. The documentation shows it to be the latest stable version and it seems to risky to use dev versions for me.
What are my other options rather than altering `client/html/checkout/standard/address/countries`?
If I want to remove those countries within core library, where do I find the list of countries? The only file I found that has any list of countries is `..\vendor\aimeos\aimeos-core\client\i18n\country\core-client-country.pot`. Is this the file that I am trying to configure through shop.php? I was looking through the database for a table with countries, but I couldn't find it either.
What are my other options rather than altering `client/html/checkout/standard/address/countries`?
If I want to remove those countries within core library, where do I find the list of countries? The only file I found that has any list of countries is `..\vendor\aimeos\aimeos-core\client\i18n\country\core-client-country.pot`. Is this the file that I am trying to configure through shop.php? I was looking through the database for a table with countries, but I couldn't find it either.
-
- Posts: 3
- Joined: 28 Aug 2016, 13:16
Re: Remove countries from checkout in config/shop.php
I ended up changing the list of countries in
This only works in v 2016.04. I couldn't figure out how to do it in v 2016.07
Code: Select all
..\vendor\aimeos\aimeos-core\client\html\config\client.php
Re: Remove countries from checkout in config/shop.php
The problem is the "[0]" and "[1]":
As it's a PHP array it must beArthur Tarasov wrote:Code: Select all
'client' => array( 'html' => array( 'checkout' => array( 'standard' => array( 'address' => array( 'countries' => array( '[0]' => 'US', '[1]' => 'GB', ), ), ), ), ), ),
Code: Select all
0 => 'US',
1 => 'GB',
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Remove countries from checkout in config/shop.php
The Laravel integration didn't allow to overwrite a setting that contains a list of values up to now. They have been merged instead.
The latest release (2017.07.3) offers the same functionality as Symfony. You can add your countries to the config/shop.php file and only those will be displayed.
The latest release (2017.07.3) offers the same functionality as Symfony. You can add your countries to the config/shop.php file and only those will be displayed.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
