How to disable auto setup of locale en-Euro?

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
mr.zherart
Posts: 22
Joined: 04 Jun 2020, 14:00

How to disable auto setup of locale en-Euro?

Post by mr.zherart » 11 Oct 2021, 13:58

Hello, I find hardcoded locale en Euro in app/vendor/aimeos/aimeos-core/lib/mshoplib/setup/MShopAddLocaleData.php in migrate()

Code: Select all

try
		{
			$localeItem = $localeManager->create();
			$localeItem->setSiteId( $siteItem->getSiteId() );
			$localeItem->setLanguageId( 'en' );
			$localeItem->setCurrencyId( 'EUR' );
			$localeItem->setStatus( 1 );

			$localeManager->save( $localeItem, false );
		}
		catch( \Aimeos\MW\DB\Exception $e ) // already in the database
		{
			$this->status( 'OK' );
			return;
		}
But, what if I don't need this? How can I disable this from the setup? Thank you.

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

Re: How to disable auto setup of locale en-Euro?

Post by aimeos » 12 Oct 2021, 16:54

At the moment, it can't be removed but in the future it should be created only if there's no entry in the mshop_locale table for that site.

You can disable the locale item by setting it's status to "disabled". Then, it won't show up in the frontend.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply