Default Language not English or French. Install returns: Fatal error (Tab->name is empty for default language)

Author Mike West on October 29, 2010 | Print | Bookmark

Due to STC only having English Data Feeds, STCtoPresta is naturally designed for English as the default language. However I realize that some users would want to target specific countries and different languages.

PrestaShop reads the main install file stctopresta.php to create Tabs during the install. If your default language is not English or French, you'll need to manually make changes to stctopresta.php so your Default Language will be represented in the Tabs.

On line number 75 and 76 of stctopresta.php you'll see the following:

|| !$this->installModuleTab('AdminSTC', array(Language::getIdByIso('en') =>'STC',Language::getIdByIso('fr')  =>'STC'), 1)

|| !$this->installModuleTab('AdminAPI', array(Language::getIdByIso('en') =>'STC API',Language::getIdByIso('fr')  =>'STC API'), 3))

Change ('fr') for both lines to your Default Country 2 ISO Code and translate the STC and STC API as you see fit. The "STC" will be located under the Catalog Tab and the "STC API" will be located under the Orders Tab

Notice: If you make changes to the stctopresta.php file after you receive the Fatal Error, and you try to Install / Uninstall again you'll receive the following error:

error

Just hit the Install / Uninstall a few times until the modified page has been read by PrestaShop and the problem resolves itself!

Was this article helpful?

Yes No

Category: STCtoPresta Installation

Last updated on October 29, 2010 with 941 views