文件名称:购物车功能
文件大小:9KB
文件格式:DOC
更新时间:2018-09-14 05:15:14
购物车
session购物车功能实现 public function showCart(){ define('flag',10); $this->sessionStart(); $totalnumber = $this->cart->Getnumber().'件';//得到总数量\ if($totalnumber==0){ $url='/index.php?m=ticat&c=shopping&a=getMessage'; /* echo "";*/ showmessage('您的购物车空无一物!!',$url); } $allprice = $this->cart->Getprice().'元';//折前总价格 $vipprice = $this->cart->Getprice()*$this->discount.'元';//折后价 if($this->discount*flag>=flag){ $discount='无'; }else { $discount = $this->discount; } $discountprice = $allprice-$vipprice.'元';//优惠金额 $tt = $this->cart->Itemlist();//获取商品前台展示页面信息 include template('shopping', 'cartshow'); }