Jump to content

Prestashop translation problem in module template file


Recommended Posts

Hi,

 

I used danish language in my site, in product list page it is working fine but when I want to use in homefeatured module the translation is not working

 

{$product.name|truncate:48:'...'|escape:'htmlall':'UTF-8'}

this code is working in product-list.tpl page but in homefeatures.tpl file is not working using same code....

 

Why?

 

Can you please tell me any solution ASAP...this is very urgent for me..

 

Thanks

 

 

Link to comment
Share on other sites

 

 

this code is working in product-list.tpl page but in homefeatures.tpl file is not working using same code....

what you mean by "is not working" ? you don't see product name? truncate doesn't work? or what?

Link to comment
Share on other sites

By nothing is showing there you mean that whole block is blank, or just wanted text (product.name) doesnt want to appear?

 

any chance to see it live? what theme you use? check if module tpl file is not overrided by your theme under /themes/YOUR_THEME/modules/homefeatured/ directory

in addition, have you tried to recompile entire theme?

Link to comment
Share on other sites

Here is my live site (I'm using Prestashop 1.5.2)

 

http://nemaftensmad.dk

 

on the top left the language panel when I choos DK(Danish) then the product name and picture is showing on frontoffice, but when I choose EN(English), the product name and image are not showing on the front office.

 

I'm using "elation-liquidx" Theme, the translate language is working in "nemaftensmad.dk/en/15-menuoversigt" Product list page, which is "\themes\elation-liquidx\product-list.tpl"

 

But when I used same code in "\themes\elation-liquidx\modules\homefeatured\homefeatured.tpl", the code s not working,

 

homefeatured.tpl file

 

{$product.name|truncate:48:'...'|escape:'htmlall':'UTF-8'}

 

this code is showing nothing when I changed language danish to english from top of the language dropdown list.

 

but the same code is working in the product-list.tpl page when I use directly in the theme folder...It seems not translate is working under modules folder....HOPE YOU UNDERSTAND MY PROBLEM NOW.

 

Thanks

Link to comment
Share on other sites

I'm trying to print products ARRAY

 

{$products|@print_r}

when the language select by Danish

 

Array ( [0] => Array ( [id_product] => 31 [id_supplier] => 0 [id_manufacturer] => 0 ....

 

All the value is showin but when I select English language

 

Array ( [0] => [1] => [2] => [3] => ) 1

 

No values are showing...

Link to comment
Share on other sites

×
×
  • Create New...