Post by oc_ms » Sun Dec 03, 2017 5:33 am

Hello OC Forum Members!

If have added custom a translation to the route "mail/order_add" and key "text_greeting" (in OC 3.0.2.0).

But the text in the mail is still taken from the translation file "catalog/language/en-EN/mail/order_add.php ...

Is there something I have to do to "activate" the custom translation?

Thanks for your help in advance!

Bye,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by straightlight » Sun Dec 03, 2017 5:37 am

- Ensure your admin - > systems - > localisation - > languages - > <your selected language> is enabled.
- Ensure the admin - > systems - > settings - > edit settings - > option - > your order statuses shows a list of order statuses. If not, your system/storage folder must be outside your public_html folder. Follow these instructions for more information: viewtopic.php?f=191&t=186892&p=705633#p705633

Clear all caches from your admin dashboard and from your admin - > extensions - > modifications - > refresh button afterwards.

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 straightlight » Sun Dec 03, 2017 5:59 am

In addition, ensure your event table contains more than one row on your Opencart database in PHPMyAdmin.

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 oc_ms » Sun Dec 03, 2017 6:33 am

Dear Straightlight!

Thanks for your fast reply!

> event table contains more than one row
OK

> admin - > systems - > localisation - > languages - > <your selected language> is enabled
OK

> Extension refresh
OK

> admin dashbord cache refresh
OK

> Ensure the admin - > systems - > settings - > edit settings - > option - > your order
> statuses shows a list of order statuses. If not, your system/storage folder must be outside your public_html folder.

I have already moved the storage folder before working on this issue. This looks fine. But under "admin - > systems - > settings - > edit settings - > option" I see under the section "Checkout" only "Order Status", "Processing Order Status" and "Complete Order Status" - but no "your order statuses".

Any ideas?

Best regards,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by straightlight » Sun Dec 03, 2017 6:36 am

under "admin - > systems - > settings - > edit settings - > option" I see under the section "Checkout" only "Order Status", "Processing Order Status" and "Complete Order Status" - but no "your order statuses".
That's fine. Although, the question on this one is about knowing if you do see a list of checkboxes in each of those lists on the option tab or only the frame is showing on each of those order statuses without a list inside. Do you see a list on each of these boxes?

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 oc_ms » Sun Dec 03, 2017 6:39 am

> That's fine. Although, the question on this one is about knowing if you do see a list of checkboxes in each of those lists
> on the option tab or only the frame is showing on each of those order statuses without a list inside. Do you see a list on each of these boxes?

Yes, I do see the statuses in the sections. Some of them are "checked".

Best regards,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by straightlight » Sun Dec 03, 2017 6:47 am

If have added custom a translation to the route "mail/order_add" and key "text_greeting" (in OC 3.0.2.0).
What are the exact and step-by-step walkthrough did you use in order to produce this result?

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 straightlight » Sun Dec 03, 2017 6:52 am

In addition, there seem to be recent fixes about the language editor. Followed are the list of files to replace:

- https://github.com/opencart/opencart/bl ... lation.php
- https://github.com/opencart/opencart/bl ... lation.php
- https://github.com/opencart/opencart/bl ... _form.twig

Clear all caches again and see if that fixes the issue afterwards.

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 oc_ms » Sun Dec 03, 2017 7:03 am

> What are the exact and step-by-step walkthrough did you use
> in order to produce this result?

I have now first deleted the "old" translations and walked through the following steps under the Language Editor:

1. "add new"
2. Choosing:
Store => default
Language => English
Route => mail/order_add
Key => text_greeting
Value => new text
3. Save
4. Clearing Admin Dashboard and Extension/Modification cache

Same result - the e-mail after placing an order still shows the default.

By the way, I have installed the extension "OSWorx German Translation". May this extension force the loading of the defaults from the php file?

Best regards,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by straightlight » Sun Dec 03, 2017 7:06 am

By the way, I have installed the extension "OSWorx German Translation". May this extension force the loading of the defaults from the php file?
Try the fix solution on my previous reply and see if that resolves the issue. If not, now that you mentioned installing an extension, disable / uninstall this extension noticing the effects after resaving your changes in the language editor.

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 oc_ms » Mon Dec 04, 2017 5:18 am

Dear Straightlight!

I am short before giving up. :-( Extensions are disabled - 3 files replaced by the latest versions.

When I add a translation e.g. for the product page it's working perfect - even without clearing the caches. ;-)

But it does not work for the mail texts ...

Bye,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by straightlight » Mon Dec 04, 2017 6:57 am

Let's troubleshoot this issue. In admin/controller/design/translation.php file, in the add() method,

find:

Code: Select all

$this->response->redirect($this->url->link('design/translation', 'user_token=' . $this->session->data['user_token'] . $url, true));
add above:

Code: Select all

echo "<pre />\n";
print_r($this->request->post);
echo "</pre>\n";

exit;
Then, after saving the changes, add the new translation for the mail again. Provide the array you will see on screen afterwards.

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 oc_ms » Tue Dec 05, 2017 6:22 am

Dear Straightlight!

The array looks okay:

Array
(
[store_id] => 0
[language_id] => 1
[route] => mail/order_add
[key] => text_subject
[value] => This is a test!
)

Bye,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by straightlight » Tue Dec 05, 2017 6:55 am

No issue found on this array, indeed. Revert the changes. In admin/model/design/translation.php file,

right below:

Code: Select all

$this->db->query("INSERT INTO `" . DB_PREFIX . "translation` SET `store_id` = '" . (int)$data['store_id'] . "', `language_id` = '" . (int)$data['language_id'] . "', `route` = '" . $this->db->escape($data['route']) . "', `key` = '" . $this->db->escape($data['key']) . "', `value` = '" . $this->db->escape($data['value']) . "', `date_added` = NOW()");
add:

Code: Select all

echo "<pre />\n";
		print_r($this->db->countAffected());
		echo "</pre>\n";
		
		exit;
Try again by adding the same results and see the output again on screen with the database transaction that should appear.

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 goll » Sat Dec 19, 2020 10:37 pm

Hi all,

It seems I'm having the same issue as Holger three years ago.
In some cases the language editor works, (for example it work for the route=extension/payment/bank_transfer key=text_title) but it works not for Route=mail/order_add, Key=text_greeting as described below
oc_ms wrote:
Mon Dec 04, 2017 5:18 am
I am short before giving up. :-( Extensions are disabled - 3 files replaced by the latest versions.

When I add a translation e.g. for the product page it's working perfect - even without clearing the caches. ;-)

But it does not work for the mail texts ...

Bye,

Holger
I modified the following string in the language editor:
Language: German (Deutsch-German-v.3.0.13-OC-3.x-from-OSWorX.net.ocmod)
Route: mail/order_add
Key: text_greeting
But the greeting text in the email remains unchanged.

I'm on the latest OC version 3.0.3.6, and PHP v7.4
I'm not using VQmod and I have cleared the OCmod cache

Thanks for any help
cheers
Rolf

Newbie

Posts

Joined
Wed Jul 13, 2011 4:42 am
Location - Zurich, Switzerland

Post by IP_CAM » Sun Dec 20, 2020 9:39 am

Vergiss doch einfach dieses nur teilweise brauchbare Tool, und füge
solche Variablen der zuständigen LANGUAGE Datei hinzu, wie man das
schon tat, als Du OC kennen lerntest. :laugh:

Was Einige vielleicht davon abschreckt, ihren Senf dazu zu geben, ist aber
eher die Tatsache, dass Du offenbar auch noch nie Lust dazu verspürtest,
ohne sehr triftigen Grund hier zu sein, um irgendwo mitzuhelfen ... :choke:
Nimm's aber besser nicht persönlich, eher als Erklärung, weshalb nicht mehr
'Feedback' dazu reinkam ...
Gruss ;)
Ernst

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by goll » Sun Dec 20, 2020 10:29 pm

Thanks for the answer.
IP_CAM wrote:
Sun Dec 20, 2020 9:39 am
Vergiss doch einfach dieses nur teilweise brauchbare Tool, und füge
solche Variablen der zuständigen LANGUAGE Datei hinzu, wie man das
schon tat, als Du OC kennen lerntest. :laugh:
I didn't know that it's not recommended to use the language editor. I thought it's useful because modifications survive the installation of an update.
IP_CAM wrote:
Sun Dec 20, 2020 9:39 am
Was Einige vielleicht davon abschreckt, ihren Senf dazu zu geben, ist aber
eher die Tatsache, dass Du offenbar auch noch nie Lust dazu verspürtest,
ohne sehr triftigen Grund hier zu sein, um irgendwo mitzuhelfen ... :choke:
Nimm's aber besser nicht persönlich, eher als Erklärung, weshalb nicht mehr
'Feedback' dazu reinkam ...
Gruss ;)
Ernst
Ups. So this means many people know the answer but don't give it to me because I haven't contributed enough?
Well, I'm truly sorry for that. First I haven't contributed much in this forum because I don't consider myself enough of an expert to give correct advice. Second, I am a big fan of the open source movement and I have made significant contributions in other projects. I my understanding of the open source paradigm it matters that you equally give an take, but not where you give and take.
So am I banned form this forum now?
cheers
Rolf

Newbie

Posts

Joined
Wed Jul 13, 2011 4:42 am
Location - Zurich, Switzerland

Post by by mona » Sun Dec 20, 2020 11:55 pm

No you should not get banned for not contributing ..

Whilst open source is an ideology which in the days of corporate abuse was great, today it has grown a generation of self-entitled individuals who have very little community spirit or consideration. COVID could not have made this more obvious - This forum has been going that way for some time. That is not to say people should contribute if they do not have the knowledge to do so, but it is to make an effort to offer to pay something for the knowledge of others. Everyone is entitled to make a living and Opencart is a commercial site, as such there is no question that FREE is an unreasonable request. It should always be ‘hoped’ that someone will offer some kindness - in respect of those before us that did the same - thank you thank you to those who I hope know who they are.

As for your issue - do not use the built in editor - it is good advice.
Yes I understand your point, but it does work as expected and causes other issues, so it is not worth it.

The events system is what people here will push you to, I have my reasons why I think that is not the best idea, but the powers that be will do as they wish, as they are entitled to do. Personally stick with OCMOD and you will be able to upgrade easily even if OCMOD no longer exists.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by goll » Mon Dec 21, 2020 12:32 am

Thank you very much for your hints 1) not to use the language editor and 2) having a look at the event system. Will definitely do so!
by mona wrote:
Sun Dec 20, 2020 11:55 pm
Whilst open source is an ideology which in the days of corporate abuse was great, today it has grown a generation of self-entitled individuals who have very little community spirit or consideration. COVID could not have made this more obvious - This forum has been going that way for some time. That is not to say people should contribute if they do not have the knowledge to do so, but it is to make an effort to offer to pay something for the knowledge of others. Everyone is entitled to make a living and Opencart is a commercial site, as such there is no question that FREE is an unreasonable request. It should always be ‘hoped’ that someone will offer some kindness - in respect of those before us that did the same - thank you thank you to those who I hope know who they are.
I perfectly understand what you are saying. And I am willing to help. I was searching opencart.com for possibilites to make a donation. I haven't found it.
What is the recommended way to financially support
- the developers of opencart core
- the supporters in the forum
?
Cheers
Rolf

Newbie

Posts

Joined
Wed Jul 13, 2011 4:42 am
Location - Zurich, Switzerland

Post by IP_CAM » Mon Dec 21, 2020 12:35 am

Well, nobody was talking about banning someone, but OC Users should be
aware of, that Community Support has a meaning, and only depending on
others, without ever giving something back, is just not, what makes a place
like this beeing worth it's name.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 79 guests