Hi,
Thanks for the accesses.
We saw that the products displayed by "null" are products with special characters (like "Č").
I tried to reproduce the issue in my local website but the display is fine on my side.
I checked if there were some modifications between the current stable release and the development version and I there is nothing related to the display of the elements.
So I see the source of the error but it is difficult to explain exactly why you have the error.
I see two differences with my local website.
First I can see it that I have a database with a "utf8_bin" collation and you have a database with a "latin1_swedish_ci" collation.
Second, You're using PHP 5.3.29 and I'm using PHP 5.4.12
It looks like that PHP 5.4 is better with UTF8 in strings when encoding to JSON.
(
stackoverflow.com/questions/8143163/php-...null-instead-of-text
)
So the best might be to detect if the product name have some special characters and is not in UTF8 ; in order to convert it into UTF8.
(
stackoverflow.com/questions/4407854/how-...r-encode-on-a-string
)
So in the file "administrator/components/com_hikashop/classes/product.php" please replace
if(!empty($displayFormat) && !empty($displayFormat_tags)) {
if($p->product_quantity == -1)
$p->product_quantity = JText::_('UNLIMITED');
$p->product_name = htmlentities($p->product_name);
$o->name = $displayFormat;
foreach($displayFormat_tags[1] as $key) {
$o->name = str_replace('{'.$key.'}', $p->$key, $o->name);
}
}
if(empty($o->name)) {
$o->name = htmlentities($p->product_name);
if(empty($o->name))
$o->name = '['.$p->product_id.']';
}
Into
if(!preg_match('!!u', $p->product_name))
$product_name = htmlentities(utf8_encode($p->product_name));
else
$product_name = htmlentities($p->product_name);
if(!empty($displayFormat) && !empty($displayFormat_tags)) {
if($p->product_quantity == -1)
$p->product_quantity = JText::_('UNLIMITED');
$p->product_name = $product_name;
$o->name = $displayFormat;
foreach($displayFormat_tags[1] as $key) {
$o->name = str_replace('{'.$key.'}', $p->$key, $o->name);
}
}
if(empty($o->name)) {
$o->name = $product_name;
if(empty($o->name))
$o->name = '['.$p->product_id.']';
}
And I hope it will fix your issue by converting the text into a correct encoding.
Regards,