News:

Support the VirtueMart project and become a member

Main Menu

Hard coded header text in check-out

Started by gcarne, April 10, 2014, 14:35:18 PM

Previous topic - Next topic

gcarne

VM 20.0.26d  Joomla 2.5.19

It appears that the header texts LOGIN FORM, BILLING & SHIPPING INFORMATION and ORDER INFORMATION in the shopping cart (frontend) are hard coded. Is that correct? Is there a way to give these texts translations, for upgrade reasons preferably using overrides, which follow the end users choice of language?

Thanks.

jenkinhill

No they are not hardcoded in default VirtueMart - although they may be in commercial templates/themes.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gcarne

#2
Thanks Kelvyn.

I will check with the maker of the template (commercial).

You say it is not hard coded by VM. If the template designers would have left it so, would I not have been able to find it by searching in the Joomla Language Manager Overrides, meaning if it is not there, the designers did indeed change it in core?

Rgds,
Gunnar

jenkinhill

The only string you mention that does appear in the FE langage files is COM_VIRTUEMART_ACC_ORDER_INFO=Order Information - and COM_VIRTUEMART_ACC_ORDER_INFO correctly appears in invoice.php and details.php template files

Should not be difficult to fix. Check with the default templates to see the correct code and add language overrides if necessary.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gcarne

#4
No - not those, the ones you mentioned I found in the overrides. It is the strings related to vmcart_heading in the frontend of the shopping cart check out. I did with my limited knowledge look in Firefox Web Developer and it looked hard coded to me. See attached pic. Unfortunatley I am still on "localhost/XAMPP" so I cannot provide a URL.

I have sent a question to the template designers, but previous experience regarding their support does not make me overly optimistic.

[attachment cleanup by admin]

jenkinhill

Yes, they are hard coded. Not difficult to replace with language constants, though.

eg
<div class="vmcart_heading"> Billing & Shipping Information </div>
becomes
<div class="vmcart_heading"><?php echo JText::_ ('COM_VIRTUEMART_BILL_SHIP_INFO'); ?></div>

and
COM_VIRTUEMART_BILL_SHIP_INFO="Billing & Shipping Information"   added as a language override.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gcarne

#6
SOLVED

Thanks for your support Kelvyn.
Worked beautifully.
Only took a few minutes.
One line less on my issues list  :)

Perhaps something for the VM Development To-do-List.

For those who wish to do the same, the override files are:

<root> => templates => <yourTemplate> => html => com_virtuemart => cart => default_pricelist.php
<root> => templates => <yourTemplate> => html => com_virtuemart => user => login.php


jenkinhill

QuotePerhaps something for the VM Development To-do-List.
We have no control over third party developers who don't do things correctly.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gcarne

You are right, this is not in the core file (just took an additional look and remember you telling me so in the first place). I asked the template developers about this glitch and they came back as vaguely as I expected telling me which file to edit, but not how. In this way they want me to come back and pay for development for something which should have been correct in the first place. I do not want to point fingers in this forum, but gradually wish there was some kind kind of evaluation forum for 3rd party developers.

You gave me great help here and without it, I would not have been able to resolve my problem. I looked at your website and found something I will get back to once I get my site published and up and running ;)

Thanks,
Gunnar