芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/canaldegap.fr_old/modules/CTLModuleMaker/src/functions/addCartUrls.php
function addCartUrls($itemlist,$id,$returnid){ // for eventual use with CartMadeSimple // however, integration requires changes to CartMadeSimple $CartMadeSimple = false; if (isset($gCms->modules["CartMadeSimple"]) && $gCms->modules["CartMadeSimple"]["active"]) $CartMadeSimple = $gCms->modules["CartMadeSimple"]["object"]; if(!$CartMadeSimple) return $itemlist; $cartparams = array("perfaction"=>"add_product", "qty"=>1, "returnmod"=>$this->GetName()); $newlist = array(); foreach($itemlist as $item){ $cartparams["product_id"] = $item->id; $cartparams["name"] = $item->name; $item->addtocartlink = $CartMadeSimple->CreateLink($id, "cart", $returnid, $this->Lang("addtocart"), $cartparams); $item->addtocarturl = $CartMadeSimple->CreateLink($id, "cart", $returnid, "", $cartparams, "", true); array_push($newlist, $item); } return $newlist; }