Freigabemail bei Registrierung: Einfügen von Adressdaten

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
1 month 2 weeks ago #362175

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 5.0.3

Hallo,

registriert sich ein neuer Kunden, wird bei uns vor der ersten Bestellung die Registrierung durch den Admin freigeschalten. Hierbei ist in der Mail an den Admin leider wenig Information zu dem neuen Kunden. Ich möchte seine Anschrift mit einfügen, so dass es für den Admin leichter ist, den neuen Kunden zuzuordnen.

Wie können Daten der Registrierung zusätzlich in die Freigabemail an den Admin eingefügt werden?

Grüße vom Christian



Hello,

When a new customer registers, their registration is approved by the admin before the first order. Unfortunately, the email to the admin contains little information about the new customer. I would like to include their address so that it is easier for the admin to identify the new customer.

How can the registration data be added to the approval email sent to the admin?

Best regards,
Christian

Last edit: 1 month 1 week ago by Philip.

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

  • Posts: 82308
  • Thank you received: 13257
  • MODERATOR
1 month 2 weeks ago #362180

Hi,

You can edit the "user account admin notification" email via the menu System>Emails.
There, you can add extra PHP code.
For example:

echo 'firstname: ' . $data->address_data->address_firstname. '<br/>';
echo 'lastname: ' . $data->address_data->address_lastname. '<br/>';

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
1 month 2 weeks ago #362256

Hello Nicolas,

Thank you for your feedback signal. Unfortunately I didn't describe the situation correctly.

The change you specified is great for the first notification that someone has newly registered (changes in the user account administrator notification area).

However, the customer is not automatically activated in our shop. The process is therefore:
1. Customer registers
2. Admin receives information and customer email to confirm his registration.
3. Customer confirms his registration
4. Admin receives an email that the customer has confirmed his registration and can activate the customer using the attached link.

In your description so far, the customer data is in the email from point 2. We need the customer details in the email to the admin from point 4. Is this possible?

Greetings from Christian

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

  • Posts: 82308
  • Thank you received: 13257
  • MODERATOR
1 month 2 weeks ago #362258

Hi,

You read my message too fast.
There are two emails: "user account" and "user account admin notification".
If you add the code I gave in the "user account" email, then yes, it will affect the email from point 2.
However, I talked about the "user account admin notification" email in my message, and that's the one from point 4.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
1 month 1 week ago #362292

Hello,

Now I'm a bit confused: I entered the specified code in the "admin notification" area, for me the output is in the email point 2. I'm currently using Hika-Shop version 5.0.4, there is a change in newer versions ? Or have I misunderstood something else?
The question also arises for me as to whether the release link (point 4) is actually sent by Hika or whether it is an email from Joomla?

Greetings from Christian

Attachments:

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

  • Posts: 82308
  • Thank you received: 13257
  • MODERATOR
1 month 1 week ago #362296

Hi,

This is definitely the email sent to the admin at point 4, not the email sent to the customer.
You can see it has the template "admin_notification", which is grey, while the emails sent to the customer use the "default" template, which is blue.
You can try with the "preview" button at the top of the page of your screenshot.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
1 month 1 week ago #362319

Hello Nicolas,

Now we have cleared up the misunderstanding:

Step 2 AND Step 4 are emails to AMDIN! At no time is it about emails to customers!

With the setting “admin_notification” only the email from step 2 to the ADMIN is set. This is simply information that a customer has registered.

Step 4 is ANOTHER E-MAIL TO THE ADMIN! The link is included here, with which the admin can then finally activate the customer.

What is important to me is the 2nd email (step 4) to the ADMIN, which contains the link for activating the customer.

Background:
We only want to unlock customers in our B2B shop who are already customers in our company. The admin should not have to laboriously clarify customer data in the Hika backend to activate it. The customer data in the admin email (step 4) can easily be compared with our company inventory.

Greetings from Christian

Attachments:

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

  • Posts: 82308
  • Thank you received: 13257
  • MODERATOR
1 month 1 week ago #362330

Hi,

Ok, I think it's indeed clear now.
In your PDF, the first email is an email sent by HikaShop. And it looks like the "user account admin notification" email, which is sent to the admin in step 2.
The second email is the admin activation email, which is sent by Joomla on step 4, not HikaShop.
So you can't customize this email via the System>Emails menu of HikaShop.
Instead, Joomla has an interface to customize its emails:
magazine.joomla.org/all-issues/february-...tml-email-templating
Someone else talks about doing the same thing as you want here:
forum.joomla.org/viewtopic.php?f=811&p=3694490
But no one answered him as to how to do it.
Looking a bit in the code of the mail templating component of Joomla, it has an event called onMailBeforeTagsRendering($template_id, &$mail) which can be implemented in a plugin of the group "system". The $template_id contains the id of the email template and $mail is an object with the data of the email. In it, you can add extra tags to the array

$mail->params['tags']
Then, you can also implement the event onMailBeforeRendering($template_id, &$tags) in that same plugin. The $template_id is still the id of the email template, and $tags is an array where the keys are the names of the tags and the values are the values to replace.
So it's not possible to do if you're not a developer. If you're a developer, with a bit of tinkering, you'll be able to do it.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum