Jump to content

[SOLVED] Manufacturer description translation not shown (fixed with default language)


sanp

Recommended Posts

Manufacturer description does not translate when you switch the language.
I entered the translation in BO and I confirmed that entry in MySQL database.
Somehow you can only show manufacturer description in the default language.
Has anyone found a solution for this issue?

Link to comment
Share on other sites

I'm guessing that it's because the manufacturer object is not passed into blockmanufacturer.tpl.
It would be great if someone can give me advice.
I don't see "id_lang" thing anywhere in blockmanufacturer.php either.

Link to comment
Share on other sites

I just tried to add the manufacturer description to the manufacturer's block and can reproduce your problem of only the default language being displayed. This is because the call that gets the manufacturers is missing the id_lang parameter. I guess the Prestashop team overlooked this because they aren't using the description in the manufacturer block. To fix it, you should change line 28 of modules/blockmanufacturer/blockmanufacturer.php from:

global $smarty, $link;



to:

global $smarty, $link, $cookie;



and line 31 from:

'manufacturers' => Manufacturer::getManufacturers(),



to:

'manufacturers' => Manufacturer::getManufacturers(false, $cookie->id_lang),

Link to comment
Share on other sites

  • 1 year later...

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...