View Single Post
  #1  
Old 12-20-2005, 10:01 AM
 
JannieB JannieB is offline
 

Senior Member
  
Join Date: Sep 2004
Posts: 117
 

Default Passing Product Name to SecPay

Just doing some integration with SECpay and noticed Xcart only passes through the product code so that the email generated by SECPay which shows details of the order, only shows the product code and not the product name. Thought it would be a bit more user friendly to have the name as well....so...

Here is the code to acheive this:

In payment cc_secpay.php change this
Code:
$prod = array(); if (!empty($products)) { foreach ($products as $p) { $prod[] = "prod=".str_replace(array(",",";","\n","\r"), array("","","",""), $p['productcode']).",item_amount=".price_format($p['price'])."x".$p['amount']; } }

to this:

Code:
$prod = array(); if (!empty($products)) { foreach ($products as $p) { $prod_and_name = $p['productcode']." ".$p['product']; $prod[] = "prod=".str_replace(array(",",";","\n","\r"), array("","","",""), $prod_and_name).",item_amount=".price_format($p['price'])."x".$p['amount']; } }

Hope this helps someone!

Jan
__________________
Jan Beesley
(Currently Xcart 5
Previously XCart Gold from 3.5....)
Reply With Quote