Issue of Text Interception – Magento Megamall them

The product name ends with a question mark when the product name contains Chinese characters. http://i.share.pho.to/6b59d724_o.png

9 answers

Profile photo of Mall Staff 184060.00 $tone February 5, 2015
Public

Hi Oliver Yuan,
I have created a backup and edited the template file at app/desgin/frontend/default/jm_megamall/template/joomlart/jmproductsslider/verticallist.phtml
Let’s clean the Magento cache in back-end of your site & have a look.
And contact me if you need further help.
Regards,
Mall

#4
Profile photo of Oliver Yuan 90.00 $tone February 5, 2015
Public

Hi Mall,
It seems that there’s no effect, the issue is still there. I guess the issue is inside 

<?php 
if (strlen($_product->getName()) > 18) :
echo substr($_product->getName(),0, 16).'...';
else :
echo $_product->getName();
endif;
?>
#5
Profile photo of Oliver Yuan 90.00 $tone February 5, 2015
Public

After googling, here’s the fix 
 

<?php 
if (strlen($_product->getName()) > 18) :
echo mb_substr($_product->getName(),0, 16,'utf-8').'...';
else :
echo $_product->getName();
endif;
?>

use mb_substr to replace substr
#6
Profile photo of Mall Staff 184060.00 $tone February 6, 2015
Public

Hi Oliver Yuan,
Yeah, that’s my fixed code in your site. Did you see it in this template file?

/quickstart/app/desgin/frontend/default/jm_megamall/template/joomlart/jmproductsslider/verticallist.phtml
Anyway, glad it work now, let me know if you need further helps.
 

#7
Profile photo of tuan le van 11570.00 $tone April 13, 2015
Public

Hi Oliver Yuan,
I have created a backup and edited the template file line 189 at app/design/frontend/default/jm_megamall/template/catalog/product/list.phtml
Let’s clean the Magento cache in back-end of your site & have a look.
And contact me if you need further help.
Regards,
Kan Lee

#9

Please login or Register to Submit Answer

Written By

Comments