Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hello,

 

I?ve installed ?Order IP Recorder? contribution. It shows fine when customers paying by Check/Money Order, but it doesn't support ?PayPal IPN Shopping Cart v3.1.5?. Every time somebody orders through PayPal, IP Address and ISP are just blank in admin/orders. Have anybody figured out how to implement this contrib with PayPal IPN Shopping Cart? Any help would be greatly appreciated.

 

Thanks in advance,

Irina.

  • 1 month later...
Posted

I have the same problem. I think it has to do with the checkout_process.php, but I don't know how to fix it.

 

Please help

Posted

Well I figured it out thanks for your help *sarcasm* lol

 

Anyway, In PayPal shopping Cart IPN:

 

/includes/modules/payment/paypal/catalog/checkout_process.inc.php

 

ADD:

 

$ip = $_SERVER['REMOTE_ADDR'];

$client = gethostbyaddr($ip);

$str = preg_split("/\./", $client);

$i = count($str);

$x = $i - 1;

$n = $i - 2;

$isp = $str[$n] . "." . $str[$x];

 

BEFORE:

 

$sql_data_array = array('customers_id' => $customer_id,

 

REPLACE: 'currency_value' => $order->info['currency_value'],

 

WITH THIS:

 

'currency_value' => $order->info['currency_value'],

'ipaddy' => $ip,

'ipisp' => $isp);

 

Well this works for me, hope it helps you.

Posted
Well I figured it out thanks for your help *sarcasm* lol

 

Anyway, In PayPal shopping Cart IPN:

 

/includes/modules/payment/paypal/catalog/checkout_process.inc.php

 

ADD:

 

$ip = $_SERVER['REMOTE_ADDR'];

$client = gethostbyaddr($ip);

$str = preg_split("/\./", $client);

$i = count($str);

$x = $i - 1;

$n = $i - 2;

$isp = $str[$n] . "." . $str[$x];

 

BEFORE:

 

$sql_data_array = array('customers_id' => $customer_id,

 

REPLACE: 'currency_value' => $order->info['currency_value'],

 

WITH THIS:

 

'currency_value' => $order->info['currency_value'],

'ipaddy' => $ip,

'ipisp' => $isp);

 

Well this works for me, hope it helps you.

 

Perfect! Thank you! :thumbsup:

  • 1 month later...
Posted (edited)
Perfect! Thank you! :thumbsup:

I don't know how you got it to work guys, mine doesn't work this way. I'm just getting a tiny black dot in place of IP, that's all. And, no ISP at all. I did exactly like Mike suggested and still not able to get the Order IP info. Any ideas why?

 

Thanks.

Edited by Irin
  • 2 years later...
Posted
Well I figured it out thanks for your help *sarcasm* lol

 

Anyway, In PayPal shopping Cart IPN:

 

/includes/modules/payment/paypal/catalog/checkout_process.inc.php

 

ADD:

 

$ip = $_SERVER['REMOTE_ADDR'];

$client = gethostbyaddr($ip);

$str = preg_split("/\./", $client);

$i = count($str);

$x = $i - 1;

$n = $i - 2;

$isp = $str[$n] . "." . $str[$x];

 

BEFORE:

 

$sql_data_array = array('customers_id' => $customer_id,

 

REPLACE: 'currency_value' => $order->info['currency_value'],

 

WITH THIS:

 

'currency_value' => $order->info['currency_value'],

'ipaddy' => $ip,

'ipisp' => $isp);

 

Well this works for me, hope it helps you.

 

Hallelujah, finally I found the answer here after spent almost the whole day.

 

Thanks GOD and thanks to you MIKE.

 

(Almost three years since your post, but anyway there is someone still want to say thanks to you)

  • 2 months later...
Posted

Guys, need your help. After installing this great contribution, I received a Parse error: syntax error, unexpected '<' in my checkout confirmation as below

  echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";
<tr>

<td class="main">
<?php echo 
	HEADING_IPRECORDED_1;
	$ip_iprecorded = YOUR_IP_IPRECORDED;
	$isp_iprecorded = YOUR_ISP_IPRECORDED;
		$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
	$client = gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);
	$str = preg_split("/\./", $client);
	$i = count($str);
	$x = $i - 1;
	$n = $i - 2;
	$isp = $str[$n] . "." . $str[$x];
?>

 

I think something is missing or wrong closing in between

 

<tr>

<td class="main">

 

I hope any PHP master here can help me solve this as my customer can't check out when this error occur.

 

Your great help is truly appreciated.

Posted

This code:

 

<tr>

<td class="main">
<?php echo

Probably needs to be:

 

 echo '<tr><td class="main">';

Hard to tell exactly 'cuz you haven't posted enough code to be certain.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted (edited)
This code:

 

<tr>

<td class="main">
<?php echo

Probably needs to be:

 

 echo '<tr><td class="main">';

Hard to tell exactly 'cuz you haven't posted enough code to be certain.

:blush:

 

Germ, thank you for the help.. here is the rest of the script

 

<?php

 if (isset($$payment->form_action_url)) {

$form_action_url = $$payment->form_action_url;

 } else {

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

 }



 echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');



 if (is_array($payment_modules->modules)) {

echo $payment_modules->process_button();

 }



 echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";

<tr>

<td class="main">
<?php echo 
	HEADING_IPRECORDED_1;
	$ip_iprecorded = YOUR_IP_IPRECORDED;
	$isp_iprecorded = YOUR_ISP_IPRECORDED;
		$ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
	$client = gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);
	$str = preg_split("/\./", $client);
	$i = count($str);
	$x = $i - 1;
	$n = $i - 2;
	$isp = $str[$n] . "." . $str[$x];
?>

Edited by Ariffshah
Posted

The code I posted should do the trick.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

  • 2 weeks later...
Posted

Hey guys,

 

i installed the last version, during ordering i can see the ip address, but it is not regestered in de database, i see its just empty.

 

can somone please help?

 

Thank you!

  • 3 weeks later...
Posted
Hey guys,

 

i installed the last version, during ordering i can see the ip address, but it is not regestered in de database, i see its just empty.

 

can somone please help?

 

Thank you!

 

 

it only works with an older shopping cart version 3.15..ive also tried the newer paypal ipn carts..didnt work, only got it to work with 3.15

  • 2 weeks later...
Posted
it only works with an older shopping cart version 3.15..ive also tried the newer paypal ipn carts..didnt work, only got it to work with 3.15

 

my bad, it works fine with 2.2rc2. just make sure to apply the fix mentioned by dalice

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...