Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Passing Product Name to SecPay

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #2  
Old 02-20-2006, 03:50 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Moving to Custom Mods.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:28 AM.

   

 
X-Cart forums © 2001-2020