Wrong language string in views/cart/tmpl/default.php

Started by patrik60, April 29, 2012, 19:52:58 PM

Previous topic - Next topic

patrik60

When a customer is checking out he might want to leave a comment. Therefor in components/com_virtuemart/views/tmpl/default.php the language string COM_VIRTUEMART_COMMENT is used.

COM_VIRTUEMART_COMMENT="Please write your recommendation....(min. %s, max. %s characters)"

There is no option to set minimum or maximum lenght of these comments. In my opinion there should be an other language string because minimum and maximum lenght is used for placing reviews.
Maybe if it is used only there it shouldn't be a recommendation but just a comment without maximum and minimum lenght.

COM_VIRTUEMART_COMMENT="Please leave a note to us with your order if you want to:"

Milbo

thx,
'COM_VIRTUEMART_COMMENT' needs at least one additional variation.

is now COM_VIRTUEMART_COMMENT_CART
COM_VIRTUEMART_COMMENT_CART="special instruction"
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

leahRae

Hi,

I am 2.0.8a and I followed the path Patbe60 outlined to the php file and Milbo's and I still have "Please write your recommendation....(min. %s, max. %s characters)" on my checkout page.

I have flushed my joomla cache, and my browser cache. Is there another file I need to edit.

Thank you,

L
Dipping my toes into Virtuemart.

efocus

QuoteI am 2.0.8a and I followed the path Patbe60 outlined to the php file and Milbo's and I still have "Please write your recommendation....(min. %s, max. %s characters)" on my checkout page.

I have flushed my joomla cache, and my browser cache. Is there another file I need to edit.

I verified what you're seeing. Milbo mentioned that COM_VIRTUEMART_COMMENT has been changed to COM_VIRTUEMART_COMMENT_CART but the file it's in has not been updated. Here's how I fixed it:

1. Go to components > com_virtuemart > views > cart > tmpl and open default.php.

2. Save a copy to templates > YourTemplateFolder > html > com_virtuemart > cart. (Note: If com_virtuemart and/or cart folders don't exist in your template's html folder, you need to create them. Modifying the template override means that future updates won't overwrite your change.)

3. On line 109 (as of VirtueMart 2.0.8e), change COM_VIRTUEMART_COMMENT to COM_VIRTUEMART_COMMENT_CART.

That fixed it for me during checkout. I haven't tested yet to make sure it's correct on the generated email order forms.

patrik60

QuoteI verified what you're seeing. Milbo mentioned that COM_VIRTUEMART_COMMENT has been changed to COM_VIRTUEMART_COMMENT_CART but the file it's in has not been updated.

COM_VIRTUEMART_COMMENT_CART has been changed in rev 5968 on 30 of April. It is correct in the default.php file. The comment of Milbo was:

'COM_VIRTUEMART_COMMENT' was used in two different context, added COM_VIRTUEMART_COMMENT_CART="special instruction"

Maybe you are using a third party template which uses template overrides and has not yet made these changes. There where a lot of layout changes from version 2.0.6 to 2.0.8. If you use template overrides try to rename (disable) temporarily your html folder in your template folder to be shure that the original templates of VM are used.

ivus

I think this it the umphteenth time I've written this... perhaps I should start a new thread about "HOW TO CHANGE WORDING/TEXT in VM"...




Instead of sifting through code that will ultimately get overwritten on the next update, a far better solution is to use Language Overrides.

Admin > Extensions > Language Manager > Overrides
/administrator/index.php?option=com_languages&view=override&layout=edit

Simply create a new item, and do a VALUE search for "Price with discount" in the right hand panel. This will give you results which contain your phrases. Then it's simply a case of finding and altering the one you want to change.

This is the case for any component/module etc Joomla! wide... not just VM (provided the language files are being used).

I hope this helps.

patrik60

QuoteInstead of sifting through code that will ultimately get overwritten on the next update, a far better solution is to use Language Overrides.

You are right. But in this case it makes no sence since both codes are used in VM templates:

COM_VIRTUEMART_COMMENT_CART is used in cart/tmpl/default.php

COM_VIRTUEMART_COMMENT is used in recommend/tmpl/form.php

By changing the second code with language overrides you will get then a wrong value in the recommend template.

michellezum

I'm having this same issue. I checked the default.php file and the line you've recommended I change is already correct: COM_VIRTUEMART_COMMENT_CART

Any other ideas. I'm using Joomla 2.5.11 and Virtuemart 2.0.20b

Help Please!!
Michelle

Milbo

This thread is more than a year old, I cant believe that you have still this problem. Which language do you use actually?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/