Jump to content

Customer Comments not being saved to admin panel


Guest steveriley

Recommended Posts

OK evidently this has NOT made it into the files for CCv3.0.17

(and it should...)

If you use Authorize.net or eWay or other Credit card based gateways you will need to make these changes to /includes/content/gateway.inc.php if you want your customer comments to carry through.

FIND:

	$orderSum['time'] = $db->mySQLSafe(time());

	$orderSum['customer_comments'] = $db->mySQLSafe($_POST['customer_comments']);




REPLACE WITH:


	$orderSum['time'] = $db->mySQLSafe(time());

	// fix for customer comments by RdWilder



if(empty($_POST['customer_comments'])){

$orderSum['customer_comments'] = $db->mySQLSafe($basket['customer_comments']);

$basket = $cart->setVar($basket['customer_comments'],"customer_comments");

} else {

$orderSum['customer_comments'] = $db->mySQLSafe($_POST['customer_comments']);

$basket = $cart->setVar($_POST['customer_comments'],"customer_comments");

}

	//$orderSum['customer_comments'] = $db->mySQLSafe($_POST['customer_comments']);

Hope this helps and this should at least be made a sticky!!!

Link to comment
Share on other sites

  • 8 months later...

We had the same issue and added a quick mod to gateway.inc.php. Since we know that the comments are in the basket before we transfer to AIM, but deleted upon return, we figured the quickest thing to do was to retrieve the originally saved comments and add them back into the string that AIM updates.

Here's the code snippet:

Add right after: $orderSum['time'] = $db->mySQLSafe(time());

// fix for customer comments

if(empty($_POST['customer_comments'])){

$orderSum['customer_comments'] = $db->mySQLSafe($basket['customer_comments']);

$basket = $cart->setVar($basket['customer_comments'],"customer_comments");

} else {

$orderSum['customer_comments'] = $db->mySQLSafe($_POST['customer_comments']);

$basket = $cart->setVar($_POST['customer_comments'],"customer_comments");

}

It's a hack, but it works. Many thanks to RL.

Excellent! Just the fix I needed. Using BluePay and this did the trick. Thanks for the fix and posting!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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