How do I stop the password from getting emailed?

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4750

Looking for the option or code or anywhere I can stop the password from being emailed at confirmation? Where are the email text options?

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

  • Posts: 81605
  • Thank you received: 13084
  • MODERATOR
13 years 3 months ago #4756

The emails can be edited via the menu System->Emails which is available in the business edition of HikaShop.

You cannot stop this email from being sent by just editing the email with the current version. It will be possible in next version by adding the code

$data->email='';
to the email.

For now the only solution is to remove the line
$mailClass->sendMail($mail);
from the file components/com_hikashop/controllers/checkout.php but you will loose that change when you update HikaShop.

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4822

I went to System > Emails & clicked on User Account. Not knowing anything about php I tried to comment out the line:

<?php echo JText::sprintf('HIKA_PASSWORD').' : '.$data->password;?><br/>
<?php echo JText::sprintf('HIKA_PASSWORD').' : '.$data->password;?><br/>
from the html & text by replacing <?php & ?> with <--?php & ?-->. Hey it's worth a try. B)

This produced text in my email that looks like: "password;?-->" but at least the password is not displayed.

As I was testing this out I noticed that if a user confirms his account by clicking the link in his email generated from HikaShop, HikaShop recognizes him as a user but CB only enables the account but does not approve it. Then if you click on "view profile" in the front end you get this error in red letters:

This user has not yet confirmed his email address and account!
This user has not yet been approved by a moderator!

Which of course is incorrect because HikaShop created the user and let the transaction go through. I need the user to be approved after he confirms so that I can redirect him to his order page after submitting the Authorize.net payment.

Last edit: 13 years 3 months ago by bthayer.

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

  • Posts: 81605
  • Thank you received: 13084
  • MODERATOR
13 years 3 months ago #4823

If you just want to remove the password from the email, you don't need to edit the email. You can just edit your hikashop translation file in the config under the tab languages and empty the translation for HIKA_PASSWORD so that the line becomes:
HIKA_PASSWORD=""

Indeed, when a user registers via HikaShop, like when a user registers via joomla, his account will be confirmed in joomla but won't be confirmed in CB because CB has a special table with the user information instead of using joomla's confirmed value.

What you can do is edit the file components/com_hikashop/controllers/checkout.php and add the code:

			if($user_id && file_exists(JPATH_ROOT.DS.'components'.DS.'com_comprofiler'.DS.'comprofiler.php')){
				 $db->setQuery('REPLACE #__comprofiler SET (cbactivation,id) VALUES (\'\','.$user_id.')');
				 $db->query();
			}
just after the line
$user_id = $class->getID($user->get('id'));
which should confirm the user in CB as well.

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4836

nicolas wrote:

If you just want to remove the password from the email, you don't need to edit the email. You can just edit your hikashop translation file in the config under the tab languages and empty the translation for HIKA_PASSWORD so that the line becomes:
HIKA_PASSWORD=""


I did this and what happened was the registration view's Password field was left without a value in it's label.

This is what I'm trying to get rid of:
You can log in the website with the following username and password.
Username : reggy
Password : reggy01 <----password should not be sent

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

  • Posts: 81605
  • Thank you received: 13084
  • MODERATOR
13 years 3 months ago #4837

Ah yes.

To remove the full password line of the email, you need to edit the email and then remove the code :
<?php echo JText::sprintf('HIKA_PASSWORD').' : '.$data->password;?>

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

  • Posts: 73
  • Thank you received: 0
13 years 3 months ago #4839

That worked. Thank you!

I will start a new thread for the CB confirmation code

Regards,
Bill

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

Time to create page: 0.064 seconds
Powered by Kunena Forum