Jump to content

Multilingual registration approval


JanZet

Recommended Posts

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

 

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 1 year later...

 

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.