JanZet Posted October 24, 2010 Share Posted October 24, 2010 For registration approval I use the plugin "Multilingual registration approval" in Virtuemart. I need more fields in the e-mail that is sent to the administrator then only the name, e-mail and username. Therefore I have changed the file plugins/system/registrationapproval.php: (lines 123 -131 and 166) as follows: 115 function _send_email($id, $activation) 116 { 117 $mainframe =& JFactory::getApplication(); 118 $db =& JFactory::getDBO(); 119 $user =& JUser::getInstance((int)$id); 120 $name = $user->name; 121 $email = $user->email; 122 $username = $user->username; 123 $user_id =$user->id; 124 $q = "SELECT * from #__{vm}_user_info WHERE (#__{vm}_user_info.user_id='$user_id')"; 125 $db->query($q); 126 $userInfo = $db->loadRow(); 127 $address_1 =$userInfo->address_1; 128 $zip =$userInfo->zip; 129 $city =$userInfo->city; 130 $country =$userInfo->country; 131 $phone_1 =$userInfo->phone_1; 158 // send request to approve to admin 165 $msg = JText::_('REGISAPPROVAL_APPROVAL_REQUIRED_EMAIL'); 166 $message = sprintf($msg,$siteURL,$name,$email,$username,$address_1,$zip,$city,$country,$phone_1,$actLink); 167 $message = html_entity_decode($message, ENT_QUOTES, 'UTF-8'); And in the file administrator/language/nl-NL/nl-NL.plg_system_registrationapproval.ini: REGISAPPROVAL_APPROVAL_REQUIRED_EMAIL=Hallo administrator,nnEen nieuwe gebruiker heeft zich geregistreerd op %s.nDe gebruiker heeft het e-mailadres geverifieerd en vraagt u de account goed te keuren.nDeze e-mail bevat zijn/haar gegevens:nn Naam : %s n E-mailadres: %s n Klantnummer: %s n Adres: %s n Postcode: %s n Woonplaats: %s n Land: %s n Telefoonnummer: %s nnU kunt de gebruiker activeren door op de onderstaande link te klikken:n %s n In the e-mail however there are blanks for the fields address_1, zip, city, country and phone_1. Can anybody tell me what I'm doing wrong? and is there a tool or method to test a php-script? Greetings, Jan Zaunbrecher Bachlaan 408 5011 BJ Tilburg, The Netherlands tel. 013-4681220 / 06-42578220 Quote Link to comment https://forums.phpfreaks.com/topic/216698-multilingual-registration-approval/ Share on other sites More sharing options...
luc_p Posted November 11, 2010 Share Posted November 11, 2010 Hi, I'm trying to do the same. Maybe this post could be helpfull. http://forum.joomla.org/viewtopic.php?f=473&t=412443&p=2119673#p2115393 Quote Link to comment https://forums.phpfreaks.com/topic/216698-multilingual-registration-approval/#findComment-1133104 Share on other sites More sharing options...
luc_p Posted February 2, 2011 Share Posted February 2, 2011 hi. you found a solution? i'm working in shop_registration.php and ps_userfield.php but i can't solve it. I appreciate any help. Thank you Luciano Quote Link to comment https://forums.phpfreaks.com/topic/216698-multilingual-registration-approval/#findComment-1169064 Share on other sites More sharing options...
marypsyche Posted April 13, 2012 Share Posted April 13, 2012 124 $q = "SELECT * from #__{vm}_user_info WHERE (#__{vm}_user_info.user_id='$user_id')"; Hi, i tried your code and i had the same problem but resolved it : you can not use #__{vm}_user_info here (Joomla does not have access to virtuemart tables here !) Use the complete name jos_vm_user_info and it will works ! bye Quote Link to comment https://forums.phpfreaks.com/topic/216698-multilingual-registration-approval/#findComment-1337023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.