Post by Barend » Thu Jan 07, 2021 3:06 am

Version 3.0.3.6
Theme: Default

Hello,

I want to change the translation of checkout/success. The original text (in gray) has all kind of code, like html and %s (that resolves to the account url).
Nice, but when I type something quite similar as inside the gay box the result is that the html is shown as html, in stead of being rendered.

Is it possible to use the same codes?

Regards!
Last edited by Barend on Sat Jan 23, 2021 11:49 pm, edited 4 times in total.

New member

Posts

Joined
Wed Jan 06, 2021 8:13 pm

Post by straightlight » Thu Jan 07, 2021 3:23 am

Of course, by creating a new event, that can be easily achieved. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Barend » Thu Jan 07, 2021 5:43 pm

Hello,

Do you mean just by typing a new value in the translation dialog? I have to say that at my site any html typed there will be shown literal, so <p> (etc) is visible for the user.

Or do you mean by 'event' the Extentions -> Event?

Regards

New member

Posts

Joined
Wed Jan 06, 2021 8:13 pm

Post by JNeuhoff » Thu Jan 07, 2021 7:17 pm

We need more details please in order to help you. Were you using the Design > Language Editor from the admin backend?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Barend » Thu Jan 07, 2021 8:14 pm

Version: 3.0.3.6
Theme: default

Yes, I go to Design > Language editor, then I add checkout/success, text_customer
In the gray box (default) I see text with HTML, like <p> and a link (<a> etc).

Then I copy that text and past it in the value field. Changing the text but leaving most of the HTML-code there.

The result is that the HTML on the frontend is shown, in stead of rendered. And the link is not working hence.

New member

Posts

Joined
Wed Jan 06, 2021 8:13 pm

Post by OSWorX » Thu Jan 07, 2021 8:18 pm

Barend wrote:
Thu Jan 07, 2021 8:14 pm
Then I copy that text and past it in the value field. Changing the text but leaving most of the HTML-code there.
What text?
And what does it mean: " .. most of the HTML .. "?
Paste here the final text you want to use.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Barend » Thu Jan 07, 2021 8:27 pm

In fact ALL the HTML, when I leave the original text in tact. The text in the gray box is:

Code: Select all

<p>Uw bestelling is succesvol door ons ontvangen.</p><p>U kunt een overzicht van uw bestellingen inzien via uw <a href="%s">account</a> of in uw <a href="%s">besteloverzicht</a>.<p>Bestaat uw aankoop uit een download, dan kunt u in uw account naar uw <a href="%s">downloads</a> gaan om deze te downloaden.</p></p><p>Indien u vragen heeft, neemt u dan <a href="%s">contact</a> met ons op.</p><p>Uw vraag kunt u ook stellen door op uw bestelbevestiging te reageren.</p><p>Hartelijk dank voor uw bestelling!</p>

New member

Posts

Joined
Wed Jan 06, 2021 8:13 pm

Post by OSWorX » Thu Jan 07, 2021 9:10 pm

Okay, here we have one bug in the core.
It is related to this here (do not use, it's for the master branch and cannot be used for the 3.x series!):
https://github.com/opencart/opencart/co ... 402b9531d8

A pull request for the 3.x branch is made: https://github.com/opencart/opencart/pull/9076

What you (and other) need, is the attached file.
Unzip locally, zip-name = path.
And replace the original file with it.

Another note: if the text is changed, and to original has replacements like %s, the same amount of replacements have to be defined!
Otherwise errors will occure.

Attachments

name = path


Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Barend » Thu Jan 07, 2021 10:04 pm

Much appreciated!

I understand that the count of %s-ses have to be the same, but because in my case I wanted to get rid of the "In case you have downloaded something"-line, I've come up with a trick to skip one %s with a html-comment.

I have replaced this
<p>Blah blah bla <a href="%s">downloads</a> blah</p>
with
<!-- %s -->

New member

Posts

Joined
Wed Jan 06, 2021 8:13 pm
Who is online

Users browsing this forum: No registered users and 231 guests