How To Grab IP Addresses of Review Spammers for Interspire Shopping Cart

Open /includes/classes/class.review.php, look for:

// Save the review in the database
$newReview = array(
  "revproductid" => (int)$reviewPostData['product_id'],
  "revfromname" => $reviewPostData['revfromname'],
  "revdate" => time(),
  "revrating" => max(1, min(5, $reviewPostData['revrating'])),
  "revtext" => $reviewPostData['revtext'],
  "revtitle" => $reviewPostData['revtitle'],
  "revstatus" => $status
);

Change to:

// Save the review in the database
$newReview = array(
  "revproductid" => (int)$reviewPostData['product_id'],
  "revfromname" => $reviewPostData['revfromname'],
  "revdate" => time(),
  "revrating" => max(1, min(5, $reviewPostData['revrating'])),
  "revtext" => $reviewPostData['revtext'],
  "revtitle" => $reviewPostData['revtitle'],
  "revstatus" => $status,
  "reviewip" => getIp()
);

Then in your database, alter the isc_reviews table to include a column called ‘reviewip’. You can now check who is spamming you before deleting their nonsense and banning them from accessing your site.

To display IP address in Admin view:

Open /admin/includes/classes/class.review.php, look for:

if ($row['revfromname'] != "") {
	$GLOBALS['PostedBy'] = isc_html_escape($row['revfromname']);
} else {
	$GLOBALS['PostedBy'] = GetLang('NA');
}

Change to:

if ($row['revfromname'] != "") {
	$GLOBALS['PostedBy'] = isc_html_escape($row['revfromname']);
} else {
	$GLOBALS['PostedBy'] = GetLang('NA');
}

if ($row['reviewip'] != "") {
	$GLOBALS['ReviewIP'] = "(".$row['reviewip'].")";
} else {
	$GLOBALS['ReviewIP'] = "";
}

Open /public_html/admin/templates/reviews.manage.row.tpl, look for:

	{{ PostedBy|safe }}

Change to:

	{{ PostedBy|safe }}
	{{ ReviewIP|safe }}

Leave a Reply

Your email address will not be published. Required fields are marked *