translation problems on vm

GK User
Fri Apr 05, 2013 10:21 am
i have a problem: watch below, the greek text is not properly showing

1.png


the problem is in the greek title of the product (in this case both english and greek are used in product title).
The problem is not showing in the news pro gk4 in front page. there when you click on the cross icon the product is added normally to the cart, showing properly the greek title of product. any thoughts?
User avatar
Senior Boarder

GK User
Fri Apr 05, 2013 11:58 am
i found in vm forum that this is called "fancybox" and should apply this solution:

"in folder:modules\mod_virtuemart_product\tmpl\default.php
line 14:
<div class="vmheader"><?php echo $headerText ?></div>
write this:
. htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . "

i did this but still is "chinese"!
User avatar
Senior Boarder

teitbite
Sat Apr 06, 2013 1:09 pm
Hi

I do not understand what this popup does, but it doesn't looks like it's a part of a module You have changed the code for. Please send me an access to ftp and a link to a page where I can see this popup.
User avatar
Moderator

GK User
Tue Apr 09, 2013 1:08 pm
hello,
sorry but i was away...
This is a virtuemart popup, i think its called facebox or something like that. This popup is the one you get when you add something to the cart, not from the frontpage of esport theme (from popular or new product modules), but from details product page. The problem is that from your popular/new product module when you add a product using the icon of red cross to the cart, the product title description shows in greek as it should be. When you add it from product details page using the "add to cart" button it shows "chinese"!
I currently don't have a link to give but i will try to upload it for you as soon as possible.
Thanks in advance.
User avatar
Senior Boarder

GK User
Wed Apr 10, 2013 5:16 pm
teitbite,
I have sent you an email and a pm with link details.
Please verify if you got it.
User avatar
Senior Boarder

teitbite
Thu Apr 11, 2013 4:24 pm
Hi

I've tracked the issue to /components/com_virtuemart/controllers/cart.php function called: addJS()

Unfortunately I cannot make changes to fix Your problem becuase the ftp access You send me is not working.
User avatar
Moderator

GK User
Fri Apr 12, 2013 3:13 pm
i have sent you again the connection details, please check your pm.
thank you very much
User avatar
Senior Boarder

GK User
Fri Apr 12, 2013 6:00 pm
now i have also noticed two new problems.
when i add something to my cart, the popup which says that the item is added and prompts me to continue shopping or see my cart, when i choose "continue shopping" it takes me to this page: http://www.dialysis-medical.com/compone ... art/gloves.

second, when i choose to see my cart, in the products listing, the net price (without tax) is empty.
and although i have configured two ways of payment only the one is seen, if i want to see if there is another way of payment i have to click on "change payment" besides it. Is there a possibility to have them as list with a radio button choice next to them so the user can choose the one he likes?

Any ideas?
Maybe i have done so many wrong changes that now i can't find a solution...
thanks in advance
User avatar
Senior Boarder

teitbite
Sat Apr 13, 2013 11:54 am
Hi

Continue link is in the same file I'm checking for font issue. It's being generated from a category link. Means if You want to change it You will have to do this directly in file. I do not know about rest of Your issue. Please ask on VM forum. I only can help with our products.

I'm sitting to font issue now. Will update You in couple of minutes.
User avatar
Moderator

teitbite
Sat Apr 13, 2013 1:02 pm
Hi

Hard to describe the changes I've done, so I'm attaching a file with changes.
User avatar
Moderator

GK User
Mon Apr 15, 2013 8:33 am
teitbite,
thanks for your changes.
But now there is a new problem, whenever i put something in the cart it says "there was a problem during the update of your cart".
Is it something concerning your changes?
User avatar
Senior Boarder

GK User
Mon Apr 15, 2013 8:45 am
teitbite wrote:Hi

Continue link is in the same file I'm checking for font issue. It's being generated from a category link. Means if You want to change it You will have to do this directly in file...

I'm sitting to font issue now. Will update You in couple of minutes.


i don't understand, in what file should i search. Where is "continue" link and what changes should i do? I don't understand what you mean.
User avatar
Senior Boarder

teitbite
Mon Apr 15, 2013 11:23 am
Hi

I've made changes to core virtuemart files, becuase this was the part responsible. All I've done was to hide the broken text, so it has no effect on adding product to cart for sure.

file is located in /components/com_virtuemart/controllers/cart.php

In this file You will see a function: addJS() there You need to locate this line:

Code: Select all
$continue_link = JRoute::_('index.php?option=com_virtuemart' . $categoryLink);


this is nothing else than url for continue link, so simply replace it with a correct one:

Code: Select all
$continue_link = 'http://www.mysite.pl';
User avatar
Moderator

GK User
Mon Apr 15, 2013 3:02 pm
Thanks i changed the url for the continue link.
I have also checked the file you upload (cart.php) and experiment on commenting/uncomenting the addjs() function you tried to hide. When using it as you upload it, it spits the message "There was an error while updating your cart."
which i located it that it comes from COM_VIRTUEMART_MINICART_ERROR_JS. When uncomenting it spits that the product is added to cart but whith "chinese" text for greek characters.
could you check it for me, because i know nothing from php?
thanks for your advises
User avatar
Senior Boarder

GK User
Tue Apr 16, 2013 2:16 pm
hello, I use a template e-sports, I have to translate the page item in the VM into the Russian language, but when I translate it in a standard way from the site of all the goods disappear, what to do?
User avatar
Fresh Boarder

GK User
Tue Apr 16, 2013 3:33 pm
@teitbite

I have also checked the file you upload (cart.php) and experiment on commenting/uncomenting the addjs() function you tried to hide. When using it as you upload it, it spits the message "There was an error while updating your cart."
which i located it that it comes from COM_VIRTUEMART_MINICART_ERROR_JS. When uncomenting it spits that the product is added to cart but whith "chinese" text for greek characters.


do you have any ideas for the error above?
User avatar
Senior Boarder

teitbite
Tue Apr 16, 2013 5:13 pm
Hi

I've never mentioned to hide whole function. Just a line responsible for displaying this broken text. What do You wnat me to check, because I'm lost a little bit now.

@Varankin please search for translations in vm language files located in /languages folder of root joomla directory.
User avatar
Moderator

GK User
Tue Apr 16, 2013 5:35 pm
I didn't explain well enough. I don't hide the whole expression, only the part you mentioned. Just look wright now the website. With the // you used the message is "There was an error while updating your cart."
Without the // it gets the chinese text...
the change is in the /components/com_virtuemart/controllers/cart.php

Code: Select all
//if ($errorMsg) $this->json->msg .= '<div>'.$errorMsg.'</div>';
            //$this->json->stat = '1';


and i have noticed that the above error message comes from the string COM_VIRTUEMART_MINICART_ERROR_JS
does this help to fix the problem?
User avatar
Senior Boarder

teitbite
Tue Apr 16, 2013 10:56 pm
Hi

Than this may be a wrong encoding in this file. Please try to re-encode it to UTF8. If this will not work, please also check on VM forum. I'm running low on ideas about this case, maybe they will know a little more about their product.
User avatar
Moderator

GK User
Wed Apr 17, 2013 3:43 am
and that ... ? I translated all that is possible in Russian. Change the language pack by - products disappear
User avatar
Fresh Boarder

GK User
Wed Apr 17, 2013 12:13 pm
@varankin this is a translated step by step solution in a greek forum:

1.Chose english as a default language to see again the products.
2.Go to "cofiguration" in Virtuemart 2 in the tab «shop» in the field «multilanguage shop» and add the languages you wish.
3.Click on save so the propriate tables in you database to created.
4.Go to products, categories and chose your language and save (its a field in the upper left of every product or category tab).
5.Then finaly chose russian as a default frontend and backend in joomla and from now on every product you create will have your default language by default.

i hope it helps ;)
User avatar
Senior Boarder

teitbite
Wed Apr 17, 2013 5:06 pm
Hi

Additionaly to the above. If You are meaning that products dissapeared inside modules than You need to have a separate modules for each language, plus it should be configured while a proper language in selected for panel.
User avatar
Moderator

GK User
Thu Apr 18, 2013 2:23 pm
@teitbite
the cart.php is utf8. I 've checked it.
I guess there is nothing to do, isn't it?
User avatar
Senior Boarder

teitbite
Thu Apr 18, 2013 3:15 pm
Hi

I've meant language file, not cart.php. The file where translation for this file is present. I believe this should be /languages/gr-GR/gr-GR.com_virtuemart.ini
User avatar
Moderator

GK User
Thu Apr 18, 2013 4:11 pm
yes this file is utf 8 without bom
User avatar
Senior Boarder

GK User
Thu Apr 18, 2013 4:17 pm
i can't understand how the popup works fine and greek text are ok in the front page (when clicking on the red cross on your module > product) and not on the detailed product's page (click on the add to cart-where "chinese" text shows!).
User avatar
Senior Boarder

teitbite
Fri Apr 19, 2013 4:12 pm
Hi

Sorry but I do not know either, but it's a wrong codding for sure. Please look at this thread on VM forum. Looks like it's the same problem and they solved it by recodding the output text. http://forum.virtuemart.net/index.php?topic=111359.0
User avatar
Moderator

GK User
Fri Apr 19, 2013 6:58 pm
yes but they say that is inside template:
The problem is inside template files, specific under productdetails/tmpl/default_addtocart.php

around line 103
Code: [Select]

<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name) ?>"/>

change it to:

Code: [Select]

<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8') ?>"/>

and will work.


i can't locate it in your template...
Is it somewhere else?
User avatar
Senior Boarder

GK User
Fri Apr 19, 2013 7:11 pm
i located it in public_html/components/com_virtuemart/views/productdetails/default_addtocart.php and not in your template's folder as he suggests. And it is as they recommend to be..

Code: Select all
 // Display the add to cart button END  ?>
      <input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8') ?>"/>
      <input type="hidden" name="option" value="com_virtuemart"/>
      <input type="hidden" name="view" value="cart"/>
      <noscript><input type="hidden" name="task" value="add"/></noscript>
      <input type="hidden" name="virtuemart_product_id[]" value="<?php echo $this->product->virtuemart_product_id ?>"/>
User avatar
Senior Boarder

teitbite
Sat Apr 20, 2013 11:36 am
Hi

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')
User avatar
Moderator

GK User
Mon Apr 22, 2013 4:30 pm
well, thanks for your search.
I don't know how to describe this issue anymore. How to describe the "Please ask VM developers where this exact part is located.."? Are we searching for "productdetails/tmpl/default_addtocart.php" or "/helpers/config.php"?
And for further notice, i've contacted another member of this forum who uses esport template and doesn't have this kind of issue (who uses greek and english both). Isn't that weird?
I also tried to do a clean install (locally), first of joomla, then your template and then virtuemart 2.0.20b. Is it possible an incompatibility of your template with virtuemart 2.0.20b? Because the problem (in the clean istall) persists!
User avatar
Senior Boarder

GK User
Mon Apr 22, 2013 5:05 pm
have you changed anything to vm?
because now when you add anything is doing it by time delay and the popup doesn't show the message that the quantity updated successfully OR it shows delayed...

and also i see in product details page in the title a 3utf8 next to title!!!

I thought a solution reading about views in virtuemart http://forum.virtuemart.net/index.php?topic=90935.0
I searched in templates/gk_esport/html/com_virtuemart/productdetails/default.php
line 312
Code: Select all
 <input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name) ?>

change it to
Code: Select all
<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8') ?>


and WORKS!!!!!!!!!!!!!!
:D :D :D

if you 've done any changes please undo, because with this fix i did i solve the problem.
User avatar
Senior Boarder

teitbite
Tue Apr 23, 2013 5:47 pm
Hi

I haven't done any changes. That's the exact code I was looking for. I found it in VM code, but I forgot that this file is overrided already :(
User avatar
Moderator

GK User
Wed May 15, 2013 5:27 am
I have same problem in Thai language too.
User avatar
Senior Boarder

teitbite
Wed May 15, 2013 5:57 pm
kotsifas wrote:have you changed anything to vm?
because now when you add anything is doing it by time delay and the popup doesn't show the message that the quantity updated successfully OR it shows delayed...

and also i see in product details page in the title a 3utf8 next to title!!!

I thought a solution reading about views in virtuemart http://forum.virtuemart.net/index.php?topic=90935.0
I searched in templates/gk_esport/html/com_virtuemart/productdetails/default.php
line 312
Code: Select all
 <input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name) ?>

change it to
Code: Select all
<input type="hidden" class="pname" value="<?php echo htmlentities($this->product->product_name, ENT_QUOTES, 'utf-8') ?>


and WORKS!!!!!!!!!!!!!!
:D :D :D

if you 've done any changes please undo, because with this fix i did i solve the problem.


Hi

Language used doesn't matter. Please try the same solution. I've quoted it for You.
User avatar
Moderator

GK User
Tue Jul 23, 2013 2:16 pm
Hello again,
i am coming back to ask the same question as in the past:
where is the continue link in virtuemart 2.0.22a?
Because yesterday i updated virtuemart and now i have a few things to solve such as:
we have changed in the /components/com_virtuemart/controllers/cart.php the function:addJS() the $continue_link to point at my starting website page. Now in the new vm i can't locate the exact same function to change. Could you please help me once again?
The second one is that when i add a product in the cart, it sais that the "product was added to the cart successfully" but it doesn't sais (as it used to) the product name (ex. gloves no 6.5 was added to the cart).
Any ideas?
User avatar
Senior Boarder

teitbite
Wed Jul 24, 2013 5:28 am
Hi

Do You have an old file still ? If yes than please simply try overwrite it (but keep the backup of the new file). If this will not work please send me an url to the site and ftp access (I'm removing such data from computer when user confirms that problem is solved).
User avatar
Moderator

GK User
Wed Jul 24, 2013 5:12 pm
I still have the old file and i tryed to overwrite it in localhost environment. But still nothing. The new code of vm is changed a lot and i can't figure out what to do.
I overwrite those files but nothing:
components/com_virtuemart/views/cart/tmpl/default.php
components/com_virtuemart/controllers/cart.php
templates/gk_esport/html/com_virtuemart/productdetails/default.php
Could you please search if this problem can be solved by gavick as the virtuemart update affects the whole functionallity of esport theme?
User avatar
Senior Boarder

GK User
Thu Jul 25, 2013 2:42 pm
i update after some actions i have done:
> I replaced the file:
components/com_virtuemart/controllers/cart.php with the old one

> updated the language pack of virtuemart

> translated some of the strings of el-gr.com_virtuemart.ini

and now i do have the continue link inside the facebox popup to point at my frontpage :D

But i have still some issues to solve:
1) look at the picture below
facebox.png

"continue shopping" and "show cart" buttons inside facebox are united because of the small size of facebox popup. I haven't located yet wich code to alter. Could you please advise?

2) In the cart page i can't make the price (i think its base price) to be visible to customer, as it used to be before update

3) there is a link (continue shopping) that i want to point it to front page
localhost 2013-7-25 16 10 13(1).png


thanks again
User avatar
Senior Boarder

teitbite
Fri Jul 26, 2013 1:11 am
Hi

I need to see the site to help with this, but when I'm oppening Your site I see this message:

Sorry, your ip is blocked. Please visit another website


Can You please unlock it for me ?
User avatar
Moderator


cron