- Posts: 31
- Thank you received: 0
Customize user registration email sent to administrator
7 years 8 months ago #302436
by hlarocque
Customize user registration email sent to administrator was created by hlarocque
-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2.13
-- Browser(s) name and version -- : Firefox latest
Hi! I've already read the following topic:
www.hikashop.com/forum/customers/875872-...istration-email.html
www.hikashop.com/forum/2-general-talk-ab...essential.html#52829
I want to put all possible information in the email sent to administrator after a new user registered but any of the above topic works for me. Maybe they are too old.
I do the following:
In Hikashop -> Menu System -> Submenu Emails
I choose User account administrator notification email.
I put a print_r($data) to see all possible data available but the registration fields are not there. Here is how it looks like :
stdClass Object (
[user_id] => 2
[user_cms_id] => 558
[user_email] => helenelarocque@hotmail.com
[user_partner_email] =>
[user_params] => stdClass Object (
[user_custom_fee] => 0
[partner_fee_currency] => 5
[user_partner_lead_fee] => 0
[user_partner_percent_fee] => 0
[user_partner_flat_fee] => 0
[user_partner_click_fee] => 0 )
[user_partner_id] => 0
[user_partner_price] => 0.00000
[user_partner_paid] => 0
[user_created_ip] =>
[user_unpaid_amount] => 0.00000
[user_partner_currency_id] => 0
[user_created] => 1537796821
[user_currency_id] => 0
[user_partner_activated] => 1
[website] =>
[create_billing_account] =>
[id] => 558
[name] => Helene Larocque
[username] => helenelarocque@hotmail.com
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2.13
-- Browser(s) name and version -- : Firefox latest
Hi! I've already read the following topic:
www.hikashop.com/forum/customers/875872-...istration-email.html
www.hikashop.com/forum/2-general-talk-ab...essential.html#52829
I want to put all possible information in the email sent to administrator after a new user registered but any of the above topic works for me. Maybe they are too old.
I do the following:
In Hikashop -> Menu System -> Submenu Emails
I choose User account administrator notification email.
I put a print_r($data) to see all possible data available but the registration fields are not there. Here is how it looks like :
stdClass Object (
[user_id] => 2
[user_cms_id] => 558
[user_email] => helenelarocque@hotmail.com
[user_partner_email] =>
[user_params] => stdClass Object (
[user_custom_fee] => 0
[partner_fee_currency] => 5
[user_partner_lead_fee] => 0
[user_partner_percent_fee] => 0
[user_partner_flat_fee] => 0
[user_partner_click_fee] => 0 )
[user_partner_id] => 0
[user_partner_price] => 0.00000
[user_partner_paid] => 0
[user_created_ip] =>
[user_unpaid_amount] => 0.00000
[user_partner_currency_id] => 0
[user_created] => 1537796821
[user_currency_id] => 0
[user_partner_activated] => 1
[website] =>
[create_billing_account] =>
[id] => 558
[name] => Helene Larocque
[username] => helenelarocque@hotmail.com
Please Log in or Create an account to join the conversation.
7 years 8 months ago #302453
by nicolas
Replied by nicolas on topic Customize user registration email sent to administrator
Hi,
The address data is not given to the email.
If you want it, you'll have to do something like that:
The address data is not given to the email.
If you want it, you'll have to do something like that:
Code:
$addressClass = hikashop_get('class.address');
$addresses = $addressClass->getByUser($data->user_id);
var_dump($addresses);
Please Log in or Create an account to join the conversation.
7 years 8 months ago #302476
by hlarocque
Replied by hlarocque on topic Customize user registration email sent to administrator
Great! It's working perfectly. Do I really have to open a topic for this kind of thing or is it documented elsewhere (I may have missed it)?
Please Log in or Create an account to join the conversation.
7 years 8 months ago #302479
by nicolas
Replied by nicolas on topic Customize user registration email sent to administrator
Hi,
You have to open a topic. Code customization is a developer thing.
Our documentation (and normally the support too) is for the merchants setting up or using their shop.
Normally, a developer should be able to get the data available in any view override with a var_dump($this); and for that, run the necessary MySQL queries to load the data he needs based on the data already available and then display it the way he wants.
Or even better, dive in the files of HikaShop to get a pitcture of the structure and how it works so that he can then use the functions available like in the code I gave you (but this takes some time so it's more for big projects than just some view customization).
Now we can give pointers and some pieces of code in some cases, but if it's too involved, we usually ask our users to have a developer work on that for them.
You have to open a topic. Code customization is a developer thing.
Our documentation (and normally the support too) is for the merchants setting up or using their shop.
Normally, a developer should be able to get the data available in any view override with a var_dump($this); and for that, run the necessary MySQL queries to load the data he needs based on the data already available and then display it the way he wants.
Or even better, dive in the files of HikaShop to get a pitcture of the structure and how it works so that he can then use the functions available like in the code I gave you (but this takes some time so it's more for big projects than just some view customization).
Now we can give pointers and some pieces of code in some cases, but if it's too involved, we usually ask our users to have a developer work on that for them.
Please Log in or Create an account to join the conversation.
Time to create page: 0.191 seconds