Automatically add subscription to Membership by registration for an event

More
4 years 3 months ago #130945 by Tuan Pham Ngoc
Ah, Yes. Invoice is generated for Membership Pro before Events Booking, so the modification must be done for Events Booking

I'm glad you got it works

Tuan

Please Log in or Create an account to join the conversation.

  • Pascal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago #130989 by Pascal
Now I have one hopefully smaller issue. The Email, my Plugin generates, with the Method OSMembershipMailHelper::sendEmails() are for the customer not properly translated, but for the administrator it is. I need to add, that we speak German on our website.

It is about the [SUBSCRIPTION_DETAIL] content, which is not properly translated. Here I just post an excerpt of it:
Mail generated for Customer looks like this:
OSM_PLAN Passivmitgliedschaft 2020
OSM_USERNAME kunde1
OSM_SUBSCRIPTION_START_DATE 02.01.2020
OSM_SUBSCRIPTION_END_DATE 31.12.2020
Vorname xxx
Nachname yyy

The email for the admin, which arrives at the same time:
Mitgliedschaft Passivmitgliedschaft 2020
Benutzername kunde1
Anmeldung vom 02.01.2020
Ihr Zugang endet am 31.12.2020
Vorname xxx
Nachname yyy

Can you explain this? Some of the things are translated properly, like all the field from the system or custom fields, but others not... I tried to have a look, if they are missing anywhere, but did not get where it does the difference

Thank you

Please Log in or Create an account to join the conversation.

  • Pascal
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago #131049 by Pascal
Do you have any idea, where this comes from?

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #131058 by Tuan Pham Ngoc
Honestly, I am unsure. Maybe you can add code to load language file before calling OSMembershipHelper::sendEmails($row, $config);

So change that code to:

JFactory::getLanguage()->load('com_osmembership', JPATH_ROOT, 'de_DE');

OSMembershipHelper::sendEmails($row, $config);


Then check it again to see if it helps answering your issue

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc