URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushp_general_purpose
Thread Number: 339
[ Go back to previous page ]

Original Message
"IP Adress in order review screen?"

Posted by Ralf Schwab [ralf.schwab@friseurversand.de] on at 01:18 PM
Hello,

is it possible to include the Customers IP Adress
in the order review screen (last order step)?
I have included the IP Adress in the e-mail notification but i think it is a good idea,
to include it also in the review screen.

Best regards

schwab ralf


Table of contents

Messages in this discussion
"RE: IP Adress in order review screen?"
Posted by Bill Weiner on at 05:32 AM
Do you mean the "Review Order" page (where the customer selects his/her payment type)? Or do you mean the final "Thank You" page?

Here's how you could add the customer's IP address to the "footer" portion of the final "Thank You" page:

STEP 1: Make a backup of your ushop.pl script... just in case.

STEP 2: Open your ushop.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

$order_form_html =~ s/ < USHOP FOOTER > /$order_footer/g;

In case the above line does not show up correctly in this forum, it is the line directly ABOVE the line that reads:

# Output .html form.

... so you can search on that line too.

STEP 4: Immediately before the line:

$order_form_html =~ s/ < USHOP FOOTER > /$order_footer/g;

Try adding these lines:

if (($REMOTE_ADDR =~ /\S/) && ($REMOTE_ADDR ne "NONE"))
{
$order_footer .= " < BR > Your IP Address Is: $REMOTE_ADDR < BR >";
}

(Again the above code may not appear correctly in this forum.... so make sure that there are NO spaces around the greater-than and less-than signs.)

STEP 5: Save the script... as TEXT if your editor asks... and try it out!


"Thank YOU"
Posted by Ralf Schwab [nodar@mail.augustanet.de] on at 01:08 PM
Hello Bill,

perfect answer as usual !
It works verry fine.
I have one other question:
Where have i to add the IP lines if i want to
show the IP Adress in the Review Order Page ?

Thank you again

best regards

schwab ralf


"RE: Thank YOU"
Posted by Bill Weiner on at 06:56 AM
Below are instructions on how to add the IP Address to the "Review Order" page:

STEP 1: Make a backup of your ushop-lib.pl script... just in case.

STEP 2: Open your ushop-lib.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

$order_footer .= &get_review_page_buttons();

STEP 4: Immediately after that line, insert these 5 lines:

$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};
if ($REMOTE_ADDR =~ /\S/)
{
$order_footer .= " < BR > Your IP Address Is: $REMOTE_ADDR < BR >";
}

(Note that the above code may not appear correctly in this forum.... so make sure that above 5 lines did not wrap and that there are NO spaces around the greater-than and less-than signs.)

STEP 5: Save the script... as TEXT if your editor asks... and try it out!