Adding more details to "Contact The Seller" Email sent to Seller

This is a discussion on Adding more details to "Contact The Seller" Email sent to Seller within the v3.1 Modules & Modifications forums, part of the v3.1 Legacy Help & Support category; Is it possible to add some more info to the email sent to seller from the buyer ? Currently it ...


Go Back   68 Classifieds Forums > v3.1 Legacy Help & Support > v3.1 Modules & Modifications

 
LinkBack Thread Tools Display Modes
  #1  
Old 02-20-2008, 09:15 PM
Senior Member
 
Join Date: Jul 2007
Posts: 109
Rep Power: 9
Default Adding more details to "Contact The Seller" Email sent to Seller

Is it possible to add some more info to the email sent to seller from the buyer ?

Currently it only says this ..

The following message was sent to you by USER who has been viewing your listing at the XXXXXXXX web site.
http://www.yoursite.com.au/viewlisting.php?view=1139
Comments
testing

Is it possible to include the email address and phone number of buyer in this email ?

Cheers

__________________
Greg

Version 3.1.9 Developer
Reply With Quote
  #2  
Old 02-21-2008, 10:39 AM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,322
Rep Power: 99
Default

Greg,

The only way to do this would be to alter the contact.php file. You would need to add the fields to the users query then add new lines where it says:
//format the email//
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter
Reply With Quote
  #3  
Old 02-21-2008, 05:15 PM
Senior Member
 
Join Date: Jul 2007
Posts: 109
Rep Power: 9
Default

Thanks for the reply..


Coud you please advise a little more on how this is done...

I think you mean add to the users query here...but im not exactly sure what to add
PHP Code:
//now get the user information

            
$sSQL="SELECT email FROM ".PREFIX."users WHERE id=".$id;

            
$result $db->query($sSQL);

            
$rs $result->fetch();

            
$to=$rs['email']; 
I think I have the //format the email// part sorted..

Thanks
__________________
Greg

Version 3.1.9 Developer
Reply With Quote
  #4  
Old 02-21-2008, 05:23 PM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,322
Rep Power: 99
Default

You should be able to do something like this:
PHP Code:
$sSQL="SELECT email,phone FROM ".PREFIX."users WHERE id=".$id;
$result $db->query($sSQL);
$rs $result->fetch();
$to=$rs['email'];
$phone $rs['phone']; 
Then this would give you the $phone variable to use later in the str_replace.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter
Reply With Quote
  #5  
Old 02-21-2008, 06:24 PM
Senior Member
 
Join Date: Jul 2007
Posts: 109
Rep Power: 9
Default

Ok, this IS working (sort of) BUT its placing the Sellers email address in the "Contact The Seller" email, which is not quite what I was trying to achieve. The seller already knows his own phone number! Its the buyers phone number I was trying to get in there.

In contact.php I now have this..
PHP Code:
            //now get the user information

        
$sSQL="SELECT email,phone FROM ".PREFIX."users WHERE id=".$id;
        
$result $db->query($sSQL);
        
$rs $result->fetch();
        
$to=$rs['email'];
        
$phone $rs['phone']; 

and I also have this ...
PHP Code:
            //format the email//

            
$htmlContent str_replace("##name##"$name$htmlContent);

            
$htmlContent str_replace("##sitetitle##"$sitetitle$htmlContent);

            
$htmlContent str_replace("##listingurl##"$htmlsiteurl$htmlContent);
            
            
$htmlContent str_replace("##phone##"$phone$htmlContent);

            
$htmlContent str_replace("##comments##"$comments$htmlContent);



            
$textContent str_replace("##name##"$name$textContent);

            
$textContent str_replace("##sitetitle##"$sitetitle$textContent);

            
$textContent str_replace("##listingurl##"$siteurl$textContent);
            
            
$textContent str_replace("##phone##"$phone$textContent);

            
$textContent str_replace("##comments##"$comments$textContent);

                
$mail = new Mailer();

                
$mail->AddAddress($to);

                
$mail->From $from;

                
$mail->FromName $name;

                
$mail->Subject $subject;

                
$mail->IsHTML(true);

                
$mail->Body    $htmlContent;

                
$mail->AltBody $textContent
And In Admin email templates. contact seller template i have this for html...

PHP Code:
The following message was sent to you by ##name## who has been viewing your listing at the  ##sitetitle## web site.<br>
##listingurl##<br>
##phone##<br>
Comments<br>
##comments## 
and this for txt..

PHP Code:
The following message was sent to you by ##name## who has been viewing your listing at the  ##sitetitle## web site.<br>
##listingurl##<br>
##phone##<br>
Comments<br>
##comments## 

Thanks
__________________
Greg

Version 3.1.9 Developer

Last edited by Greg H; 02-25-2008 at 04:45 PM.
Reply With Quote
  #6  
Old 02-26-2008, 05:22 PM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,322
Rep Power: 99
Default

In that case you need to create a phone form field and replace this line:
$htmlContent = str_replace("##phone##", $phone, $htmlContent);
with:
$htmlContent = str_replace("##phone##", $_POST['phone'], $htmlContent);
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter
Reply With Quote
  #7  
Old 02-26-2008, 06:01 PM
Senior Member
 
Join Date: Jul 2007
Posts: 109
Rep Power: 9
Default

Thanks Eric,

Do I need to change anything here too ?

PHP Code:
            //now get the user information

$sSQL="SELECT email,phone FROM ".PREFIX."users WHERE id=".$id;
$result $db->query($sSQL);
$rs $result->fetch();
$to=$rs['email'];
$phone $rs['phone']; 
I tried adding the $_POST in here but gave me errors when sending the form.
__________________
Greg

Version 3.1.9 Developer

Last edited by Greg H; 02-26-2008 at 06:03 PM.
Reply With Quote
  #8  
Old 02-26-2008, 06:07 PM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,322
Rep Power: 99
Default

From my understanding you want the phone number from the person contacting your user. In that case you would have to add a new field to the contact form and then get the data they entered and add it to the template. That is why I said use $_POST['phone']
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter
Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Email Notifications alisa v3.1 Questions & Support 14 12-07-2007 12:26 AM
Adding Seller Link to Results Page art v3.1 Questions & Support 7 09-04-2006 12:51 AM
Adding site url to renewal email message GSP v3.0 Questions & Support 5 04-17-2006 08:02 PM


All times are GMT -4. The time now is 12:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22