Hello
After upgrade from 2.0.14 to 2.0.16, clicking "add to cart", the popup mini-cart shows the product name with weird characters (Î�Î�§Î¤Î¥Î�Î�Î�).
The cart module and the check out page are OK.
The VM 2 is multilingual in Greek and English.
I checked all db tables and are OK (utf8_general_ci )
I forced Database Collation to utf8_general_ci with Admin Tools without luck.
Any ideas?
Thank you
Joomla 2.5.8 | VM 2.0..16 | PHP 5.3.13
Thanks strange,
Haven't test it with greek yet also, any live url?
Hello again,
Hoping the re-Collation did not Collation the data wrong...
I test it with a localsite, i updated and everything is working fine with Greek characters... Please provide a live url, i am thinking that may be there is a js conflict and the javascript function encodeURIComponent is not running properly inside vmprices.js ... not sure, but we can check it ...
Regards
Sorry
I tested in WAMP not in live server.
I will make a new clean installation to check it.
Thank you
Hello,
I tested on XAMPP, works fine, also check your database, are the data readable?
Take a look also on that post: http://forum.virtuemart.net/index.php?topic=110647.0
Clean Joomla 2.5.8 installation on WAMP
clean VM 2.0.16 installation
Joomla original template
Data Base has readable records in Greek
The same problem in mini-cart ???
I don't know, is strange, test it again working fine ... if you try to change the browser encoding from it's options?
Made all possible encodings in firefox - :(
The strange is that at Shopping cart module and in check out page the name is OK.
etna,
yes i reproduce it ... i am looking at it ...
hmm ...
The problem is inside template files, specific under productdetails/tmpl/default_addtocart.php
around line 103
<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name) ?>"/>
change it to:
<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8') ?>"/>
and will work.
This was added from a suggestion in the forum but causes issues because didn't parse the encoding for compatibility with multi-byte 8-bit Unicode
Fix added in 2.1 trunk
Thanks for finding that tiny bug ;)
Regards
Thank you Nikos.
The code worked fine locally.
I owe you a drink!
maybe a... raki?
Nice :)
I prefer raki, but i drink too much raki yesterday ;)
Thats why you are so fast and genius!
Hey should I try some of that?
@Kelvyn
We can send a botle :)
Yes! Email one to me... ;D
i have the same problem as posted in the first place
I use joomla 2.5.9, virtuemart 2.0.20b and php 5.5.3
I have installed esport template by gavick. I have communicated with them and finally they turned me to you...
this is my post to their forum, if someone needs it to understand what is happening
https://www.gavick.com/forums/140/translation-problems-on-vm-24468.html
any ideas my friends?
below is the final answer of gavick's moderator:
QuoteHi
This issue is becoming even more impossible. I was looking for a right file to add the code adviced in VM forum. I've done it like this:
Looked for a text visible after broken message in cart "προστέθηκε στο καλάθι σας."
Has found that this text is being used by this static lang value: "COM_VIRTUEMART_MINICART_ADDED_JS"
Than scanned all Your site files to see where this code was used and there is none ;/ So I've tried with my copy and was directed to /helpers/config.php file which is not present in Your installation. I honestly do not know what's going on :) I think You have a different VM version than me, but this is just ridicules.
After a while I've tracked it in administrator files for VM, but it was just this part after broken text, no product name there at all. So it means this popup is being constructed from parts located in different files across whole joomla installation. Please ask VM developers where this exact part is located, the broken one and add this encode function then htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8')