thisis Posted October 3, 2016 Share Posted October 3, 2016 Hello, Im trying to install twenga module: http://addons.prestashop.com/es/2053-twenga-ready-to-sell.html?pab=1& It shows the last one issue: Notice on line 57 in file /modules/twengafeed/twengafeedabstract.php[8] Undefined index: language_id I see some prestashop stores has this problem but I dont find the solution to this problem. Can you help me, please? Link to comment Share on other sites More sharing options...
rocky Posted October 4, 2016 Share Posted October 4, 2016 Have you asked the developer of the module for support? If they're not answering, post the code around line 57 of modules/twengafeed/twengafeedabstract.php so we can try to figure out what's going wrong. Link to comment Share on other sites More sharing options...
thisis Posted October 4, 2016 Author Share Posted October 4, 2016 He still has not answered nothing. Thank you four your help. public function __construct() { parent::__construct(); spl_autoload_register(array($this, 'autoload')); Twenga_Config::setConfigPath(_PS_MODULE_DIR_.$this->name . '/config'); $this->loadGeozone(); Twenga_Services_Lang::setTranslationDir(_PS_MODULE_DIR_.$this->name . '/config/translations'); Twenga_Services_Lang::init(); Twenga_Services_Lang::setDebugMode(Twenga_Config::get('tws.debug')); Twenga_Services_Lang::setLanguageId($this->geozoneInfo['language_id']); } Link to comment Share on other sites More sharing options...
rocky Posted October 4, 2016 Share Posted October 4, 2016 Check the loadGeozone() function and make sure $this->geozoneInfo['language_id'] is being set. Link to comment Share on other sites More sharing options...
thisis Posted October 4, 2016 Author Share Posted October 4, 2016 How can I do this? Link to comment Share on other sites More sharing options...
rocky Posted October 4, 2016 Share Posted October 4, 2016 Just find the loadGeozone() function and paste it here. It should be in the same file you pasted the other code from. Link to comment Share on other sites More sharing options...
thisis Posted October 4, 2016 Author Share Posted October 4, 2016 /** * Load twenga geozones based on iso_code * @return $this */ private function loadGeozone() { $geozoneConfigs = Twenga_Config::get('geozone'); if (isset($geozoneConfigs[$this->context->country->iso_code])) { $this->geozoneInfo = $geozoneConfigs[$this->context->country->iso_code]; } return $this; } Link to comment Share on other sites More sharing options...
rocky Posted October 4, 2016 Share Posted October 4, 2016 Seems we have to keep going deeper. Find the file with class Twenga_Config and check the get function. Link to comment Share on other sites More sharing options...
thisis Posted October 5, 2016 Author Share Posted October 5, 2016 The issie can be this? /twenga/config/geozone.php: * @author Twenga * @copyright 2016 Twenga * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */return array( 'FR' => array( 'tw_code' => 'FR', 'name' => 'France', 'lang' => 'fr', 'language_id' => 2 ), 'DE' => array( 'tw_code' => 'DE', 'name' => 'Deutschland', 'lang' => 'de', 'language_id' => 3 ), 'ES' => array( 'tw_code' => 'ES', 'name' => 'España', 'lang' => 'es', 'language_id' => 4 ), 'IT' => array( 'tw_code' => 'IT', 'name' => 'Italia', 'lang' => 'it', 'language_id' => 5 ), 'NL' => array( 'tw_code' => 'NL', 'name' => 'Nederland', 'lang' => 'nl', 'language_id' => 7 ), 'PL' => array( 'tw_code' => 'PL', 'name' => 'Polska', 'lang' => 'pl', 'language_id' => 6 ), 'GB' => array( 'tw_code' => 'UK', 'name' => 'United Kingdom', 'lang' => 'en', 'language_id' => 1 )); This is my website configuration (My country isnt in geozone.php): Localizacion>configuracion: Idioma: Español País: Colombia I try to add this lines: /twenga/config/geozone.php 'CO' => array( 'tw_code' => 'CO', 'name' => 'Colombia', 'lang' => 'es', 'language_id' => 4 ), It seems that it WORK. Im going to configurate it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now