isotope / core

Core repository of Isotope eCommerce, an eCommerce extension for Contao Open Source CMS
https://isotopeecommerce.org
135 stars 107 forks source link

Allowing i18nl10n (Multilanguage Pages) to be used with Isotope #406

Closed ghost closed 11 years ago

ghost commented 11 years ago

Hi guys, I am trying to make i18nl10n:http://www.contao.org/en/extension-list/view/i18nl10n.html work with Isotope and Contao 2.11.2. In the frontend it seems ok, but i have some issues in the backend. I installed isotope_multilingual, but apparently DC_ProductData gets languages by simply making a @SELECT DISTINCT language FROM tl_page@.

I tried to checkout the source from https://winans.svn.beanstalkapp.com/isotope/trunk, but it requires authentication. Please allow at least read-only access to the source tree, so I can make and send you patches. Here I am pasting the modification I made so DC_ProductData gets the available languages in case i18nl10n. I hope you will apply this code.

//~line: 430
    // Load and/or change language
        $activeModules = $this->Config->getActiveModules();
    if (in_array('isotope_multilingual', $activeModules))
    {
      if(in_array('i18nl10n', $activeModules)){          
          $arrPageLanguages = array_diff(
            deserialize($GLOBALS['TL_CONFIG']['i18nl10n_languages']),
            array($GLOBALS['TL_CONFIG']['i18nl10n_default_language'])
          );
          }
          else{
        $arrPageLanguages = $this->Database->execute("SELECT DISTINCT language FROM tl_page")->fetchEach('language');
          }

See also https://bitbucket.org/k.berov/i18nl10n/src. Thanks in advance.

--- Originally created by kberov on 2012-04-16 23:45:12 (ID 3086)

aschempp commented 11 years ago

The source is on GitHub. https://github.com/isotope/core

--- Originally created by andreas.schempp on 2012-04-17 08:21:01

ghost commented 11 years ago

Ah, great. To which branch should I make a pull request? Is "master" ok?

--- Originally created by kberov on 2012-04-17 09:50:22

ghost commented 11 years ago

Krasimir Berov wrote:

Ah, great. To which branch should I make a pull request? Is "master" ok?

or is hotfix-1.3.1 the better choise?

--- Originally created by kberov on 2012-04-17 09:53:42

aschempp commented 11 years ago

hotfix-xx ist the latest 1.3 branch, develop is the upcoming 1.4

--- Originally created by andreas.schempp on 2012-04-17 10:07:55