Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Page 97 of Manual, Displaying Visitors IP Address Question


RC Heli Pilot

Recommended Posts

On page 97 of the manual it explains how to add this code:

<tr>
<td colspan="2" class="smalltext" align="center">
<?php
echo 'Your IP Address is: ' . tep_get_ip_address();
?>
</td>
</tr>

 

To your footer.php.

 

Is there a way to insert this code so that the IP Address also gets sent in the Order Email that we get when a purchase is made so that the IP Address can be tracked later if needed?

 

Thank You.

 

RCHP

Link to comment
Share on other sites

When the 'send extra order emails to' option in the Admin panel under configuration is set to true. The page that does this is:

catalog/checkout_process.php Line 286

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

You will need to use the same function and append the value to the variable $email_order.

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

$email_order .= 'IP Address is: ' . tep_get_ip_address() . "\n\n";

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

Lloyd

Link to comment
Share on other sites

When the 'send extra order emails to' option in the Admin panel under configuration is set to true. The page that does this is:

catalog/checkout_process.php Line 286

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

You will need to use the same function and append the value to the variable $email_order.

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

$email_order .= 'IP Address is: ' . tep_get_ip_address() . "\n\n";

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

 

When i edit the Admin> My Store> Send extra order emails to> Option all i'm allowed to set is an email address. I can't set it to True or False. Is yours Different?

 

I'll check out that line of code and see if i can figure it out.

 

Thanks For The Help, The code must be correct since no one else responded so Thank You.

 

RCHP

Link to comment
Share on other sites

When the 'send extra order emails to' option in the Admin panel under configuration is set to true. The page that does this is:

catalog/checkout_process.php Line 286

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

You will need to use the same function and append the value to the variable $email_order.

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

$email_order .= 'IP Address is: ' . tep_get_ip_address() . "\n\n";

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

}

 

 

I just checked mu checkout_process.php file and I don't have a line 286. Mine only goes to 284.

 

But anyway i found it on line 264 and made those changes

 

I also added it to this line:

 

// lets start with the email confirmation
$email_order = STORE_NAME . "\n" . 
EMAIL_SEPARATOR . "\n" . 
"\r\nThank you for your recent order. \r\nEnjoy! \r\n \r\n" .
			 EMAIL_SEPARATOR . "\n" . 
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
			 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n";
 $email_order .= 'For Security Reasons Your IP Address Was Tracked To: ' . tep_get_ip_address() . "\n\n";

 

Which worked out Great.

The code above is for the email that the Customer Receives. The code you gave me is for the one I receive. I wanted to make sure that the Buyer knew also that their IP Address is being tracked.

 

Is there a way to make the IP Address appear in BOLD # in the email?

 

Thanks again for your help. You've Helped out a BUNCH.

 

RCHP

Link to comment
Share on other sites

Is there a way to make the IP Address appear in BOLD # in the email?

 

Now thers a question. If you are sending in html format you would add the tags <b></b>:

$email_order .= 'IP Address is: <b>' . tep_get_ip_address() . '</b>' . "\n\n";

 

If sending in MIME format - I don't know how you would do it.. Perhaps the same way??

 

If you figure it out in MIME please let me know.

 

Perhaps someone else will pitch in here??

Lloyd

Link to comment
Share on other sites

  • 3 weeks later...
Now thers a question. If you are sending in html format you would add the tags <b></b>:

$email_order .= 'IP Address is: <b>' . tep_get_ip_address() . '</b>' . "\n\n";

 

If sending in MIME format - I don't know how you would do it.. Perhaps the same way??

 

If you figure it out in MIME please let me know.

 

Perhaps someone else will pitch in here??

 

 

Hey Photofxplus,...

 

I thought i'd check back here to see the new replies.

I've made the changes as you suggested but havent tested it out yet.

 

I have no idea about having it displayed in Bold in MIME format, Yes hopefully someone who might know will stop by and help us out but from the looks of it, Almost a month later and no other added replies so either no one is willing to help us that knows how to do and has read the thread or it can't be done. I don't know.

 

But,...

 

I do have another question pertaining towards this IP thing,...

 

How do you change the Font Font Font Font Size of the IP Address to something Smaller?

 

Right now Mine appears to be about "This Size" and I'd want it to be about "This Size" or Pretty Small while it's being Displayed on all of the Pages on the Website.

 

It just seems kind of out of place since the font size is so much larger than the rest of the font sizes.

 

I would very much appreciate any help with this please.

 

Thanks for the other help Photofxplus

RCHP

Link to comment
Share on other sites

I have no idea about having it displayed in Bold in MIME format, Yes hopefully someone who might know will stop by and help us out but from the looks of it, Almost a month later and no other added replies so either no one is willing to help us that knows how to do and has read the thread or it can't be done. I don't know.

 

I do have another question pertaining towards this IP thing,...

 

How do you change the Font Font Font Font Size of the IP Address to something Smaller?

 

Right now Mine appears to be about "This Size" and I'd want it to be about "This Size" or Pretty Small while it's being Displayed on all of the Pages on the Website.

 

It just seems kind of out of place since the font size is so much larger than the rest of the font sizes.

 

it's not really the mime format that you need to contend with, it's the content-type mime header. if it's text/html, the you can use all the normal html tags for setting bold, font size, color, etc. if it's text/plain then you're looking at plain old ascii - no formatting at all, just text.

 

so, if in html, to make the text larger and bold you could do something like:

<span style="font-size:80%;font-weight:bold"> ...your text here ... </span>

 

or whatever your choosing.

 

if it's such a different size, maybe the rest of the text is within a <span> or some other css class= setting. check the html generated for your email (by viewing email source - it's different for each email client) and see what it looks like and how they do it, then just mimic that.

Link to comment
Share on other sites

it's not really the mime format that you need to contend with, it's the content-type mime header. if it's text/html, the you can use all the normal html tags for setting bold, font size, color, etc. if it's text/plain then you're looking at plain old ascii - no formatting at all, just text.

 

so, if in html, to make the text larger and bold you could do something like:

<span style="font-size:80%;font-weight:bold"> ...your text here ... </span>

 

or whatever your choosing.

 

if it's such a different size, maybe the rest of the text is within a <span> or some other css class= setting. check the html generated for your email (by viewing email source - it's different for each email client) and see what it looks like and how they do it, then just mimic that.

 

 

This is the code right here from page 97

 

<tr>
<td colspan="2" class="smalltext" align="center">
<?php
echo 'Your IP Address is: ' . tep_get_ip_address();
?>
</td>
</tr>

 

How does it need to be written in order for the font size to be smaller?

I've tried all sorts of html commands with no success.

 

Can you just tell me how it needs to be written and i'll change it?

 

I don't know where it's getting it's class info from.

 

RCHP

Link to comment
Share on other sites

This is the code right here from page 97

 

<tr>
<td colspan="2" class="smalltext" align="center">
<?php
echo 'Your IP Address is: ' . tep_get_ip_address();
?>
</td>
</tr>

 

How does it need to be written in order for the font size to be smaller?

I've tried all sorts of html commands with no success.

 

Can you just tell me how it needs to be written and i'll change it?

 

I don't know where it's getting it's class info from.

 

the code from page 97 is intended to be html generated for a web page. what you need is the text to be added to an email. they're a little different.

 

first, are you sending emails as html or as text? if text, you can't change the size. but since you mention that the sizes are different, i'm assuming that you're sending the email as html.

 

post the section of code where you're adding the ip address to the email being sent and i'll see if i can show you what needs to be changed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...