本文实例讲述了Ecshop实现支付时传送商品订单号和商品名称的方法。分享给大家供大家参考,具体如下:
ecshop支付时传送商品订单号和商品名称,支付传递商品名称到支付平台
ecshop paypal付款如何传商品名称,这里给大家分享一下:
1、找到themes\fefault\flow.dwt
找到商品列表代码
<!--{foreach from=$goods_list item=goods}-->
替换为:
<!--{foreach from=$goods_list item=goods key=key}-->
并加foreach循环内加上:
<input type="hidden" value="{$goods.goods_name}" name="goods_name{$key}">
2、找到目录下flow.php,大约在1378行加上:
if(emptyempty($_POST['goods_name']))
{
$getGoodsNameAll = "参数有误";
}else{
$getGoodsName = $_POST['goods_name'];
foreach($getGoodsName as $k => $v){
$getGoodsNameAll .= $v." , ";
}
}
{
$getGoodsNameAll = "参数有误";
}else{
$getGoodsName = $_POST['goods_name'];
foreach($getGoodsName as $k => $v){
$getGoodsNameAll .= $v." , ";
}
}
并在:
$order = array(数组内加上:'goods_name' => trim($getGoodsNameAll,","),
3、找到对应的支付方式,这里以paypal为例子,在\includes\modules\payment下paypal.php在大约105行找到.
"<input type="hidden" name="item_name" value='$order[order_sn]'>"
替换为:
"<input type="hidden" name="item_name" value='$order[order_sn]:$order[goods_name]'>"
希望本文所述对大家Ecshop开发有所帮助。