Hello,
I'd like to send the user details (username and password) to the customers in their "confirmed order" email
I tried to copy this code from the user account email
<?php
$password = false;
if(HIKASHOP_J16){
jimport('joomla.application.component.helper');
$usersConfig = JComponentHelper::getParams( 'com_users' );
if ($usersConfig->get('sendpassword')) {
$password = true;
}
}else{
$password = true;
}
?>
<?php if($password) echo JText::sprintf('YOU_CAN_LOG_IN_WITH');?><br/>
<?php echo JText::sprintf('HIKA_USERNAME').' : '.$data->username;?><br/>
<?php if($password) echo JText::sprintf('HIKA_PASSWORD').' : '.$data->password.'<br/>'; ?>
but when I test it the username and password do not show; I only see
username:
password:
with no data
I tested this by creating a new order for myself, changing it to "confirmed" and sending a notification to myself, maybe this is not the right way to test this though...
Other questions:
1 - is it possible to show the user password in these emails? By testing the "user account" email the password is always hidden, should I put $password = true; ?
2 - I am already sending user details via Joomla default configuration, can I deactivate the "user account" email or is still necessary? (I am trying to avoid users to receive to many messages)
Thank you!