Jump to content

twenga module issue


Recommended Posts

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

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

/**
     * 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...