Esempio n. 1
0
    echo Yii::app()->theme->baseUrl;
    ?>
/images/shophome/com-step1.jpg"></div>
            <div class="float_l m_left140">
                <img src="<?php 
    echo Yii::app()->theme->baseUrl;
    ?>
/images/shophome/cx-bg.jpg">
            </div>
            <div class="choice-cx float_l">
                <p class="p-choice" id="make-select-mall"  onclick="ajaxLoading()">
                    <?php 
    $cookie = Yii::app()->request->getCookies();
    $car = array('make' => $cookie['mallmake']->value, 'series' => $cookie['mallseries']->value, 'year' => $cookie['mallyear']->value, 'model' => $cookie['mallmodel']->value);
    if ($car['make']) {
        $str = MallService::getCarmodeltxt($car);
        ?>
                        <a href="javascript:void(0)" id='veh'>更换车型</a>
                    <?php 
    } else {
        ?>
                        <a href="javascript:void(0)" id='veh'>选择车型</a>
                    <?php 
    }
    ?>
                    <!--                <a href="javascript:;" id='veh'>选择车型</a>-->
                </p>

                <p class="p-choiced" style='display:none' ></p>
                <input type="hidden" id="vechileold" value="<?php 
    echo $str ? $str : '';
Esempio n. 2
0
    ?>
" target="_blank"><?php 
    echo isset($cart['SellerName']) ? $cart['SellerName'] : '';
    ?>
</a></span></p>
                        <input type="hidden" class="input" name="minTurnover" value="<?php 
    echo $cart["MinTurnover"];
    ?>
"/>
                        <ul>
                            <?php 
    foreach ($cart["GoodsList"] as $list) {
        ?>
                                <?php 
        if ($list['MakeID']) {
            $locatecarmodel = MallService::getCarmodeltxt(array('make' => $list['MakeID'], 'series' => $list['CarID'], 'year' => $list['Year'], 'model' => $list['ModelID']));
            $goodsurl = Yii::app()->createUrl('pap/mall/detail', array('goods' => $list['GoodsID'], 'cart' => $list['ID']));
        } else {
            $goodsurl = Yii::app()->createUrl('pap/mall/detail', array('goods' => $list['GoodsID']));
        }
        ?>
                                <?php 
        $oldTotal = $list['ProPrice'] ? $list['ProPrice'] * $list['Quantity'] : $list['Price'] * $list['Quantity'];
        ?>
                                <?php 
        $subTotal = sprintf('%.2f', $oldTotal);
        ?>
                                <li id="li<?php 
        echo $list['ID'];
        ?>
">
Esempio n. 3
0
 private static function getVersionGoods($v)
 {
     $res = DealergoodsService::getmongoversion($v['GoodsID'], $v['Version']);
     $goods = $res['GoodsInfo'];
     // if (is_array($goods) && !empty($goods)) {
     //商品图片
     if (is_array($goods['img']) && !empty($goods['img'])) {
         if (!$goods['img'][0]['ImageUrl']) {
             $v['ImageUrl'] = $goods['img'][0]['MallImage'];
         } else {
             $v['ImageUrl'] = $goods['img'][0]['ImageUrl'];
         }
     } else {
         $v['ImageUrl'] = '';
     }
     //商品oe号
     if (is_array($goods['oeno']) && !empty($goods['oeno'])) {
         $oe = '';
         foreach ($goods['oeno'] as $ov) {
             if ($ov) {
                 $oe .= $ov . ',';
             }
         }
         $v['GoodsOE'] = substr($oe, 0, -1);
     } else {
         $v['GoodsOE'] = '';
     }
     $v['GoodsName'] = $goods['Name'];
     $v['GoodsNum'] = $goods['GoodsNO'];
     $v['Brand'] = $goods['Brand'];
     $v['PartsLevelName'] = $goods['PartsLevelName'];
     $v['CpName'] = Gcategory::model()->find(array('select' => 'Name', 'condition' => "Code='{$goods['StandCode']}'"))->attributes['Name'];
     $v['Carmodeltxt'] = MallService::getCarmodeltxt(array('make' => $v['MakeID'], 'series' => $v['CarID'], 'year' => $v['Year'], 'model' => $v['ModelID']));
     return $v;
 }
Esempio n. 4
0
        echo $goods['GoodsInfo']['Brand'];
        ?>
</span></p>
                            <p class="m-top5" style="width:300px;height: 18px;white-space: nowrap;overflow: hidden; text-overflow: ellipsis;">标准名称:<span><?php 
        echo $goods['GoodsInfo']['StandCodeName'];
        ?>
</span> | 拼音代码:<span><?php 
        echo $goods['GoodsInfo']['Pinyin'];
        ?>
</span> </p>

                            <?php 
        $orderGoods = PapOrderGoods::model()->find("OrderID=:OrderID and GoodsID=:GoodsID", array(":OrderID" => $v['OrderID'], ":GoodsID" => $goods['GoodsInfo']['ID']));
        ?>
                            <p>定位车型:<span><?php 
        echo MallService::getCarmodeltxt(array('make' => $orderGoods['MakeID'], 'series' => $orderGoods['CarID'], 'year' => $orderGoods['Year'], 'model' => $orderGoods['ModelID']));
        ?>
</span></p>
                            <p class="m-top5">配件档次:<span><?php 
        echo $goods['GoodsInfo']['PartsLevelName'];
        ?>
</span></p>

                            <p class="m-top5" style="width:300px;height: 18px;white-space: nowrap;overflow: hidden; text-overflow: ellipsis;" >OE号:<span><?php 
        if ($goods['GoodsInfo']['oeno']) {
            foreach ($goods['GoodsInfo']['oeno'] as $key => $value) {
                if ($key) {
                    echo '、' . $value;
                } else {
                    echo $value;
                }
Esempio n. 5
0
 public function actionOrderGoods()
 {
     $this->layout = '//layouts/papmall';
     $goodsid = $subParts = Yii::app()->request->getParam('goods');
     $payment = 1;
     $result = MallService::getGoodByID($goodsid, $payment);
     if (!$result) {
         $this->redirect(array('index'));
     }
     $cookie = Yii::app()->request->getCookies();
     $car = array('make' => $cookie['mallmake']->value, 'series' => $cookie['mallseries']->value, 'year' => $cookie['mallyear']->value, 'model' => $cookie['mallmodel']->value);
     $carmodeltext = MallService::getCarmodeltxt($car);
     $res = array();
     if ($car['make'] && $car['series'] && $car['year'] && $car['model']) {
         $params = $car;
         $params['goodsid'] = $goodsid;
         $res = MallService::checkCarfit($params);
     }
     $this->pageTitle = Yii::app()->name . '-' . "商品详情";
     //获取经销商客服列表
     $csparams['organID'] = $result['SellerID'];
     $csparams['type'] = 1;
     $csinfo = CsService::getcslists($csparams);
     $this->render('ordergoods', array('r' => $result, 'carmodeltext' => $carmodeltext, 'res' => $res, 'csinfo' => $csinfo));
 }
Esempio n. 6
0
 public static function papgetgoods($param = array())
 {
     $car['make'] = Yii::app()->request->getParam('make') ? Yii::app()->request->getParam('make') : Yii::app()->request->getParam('jpmall_make');
     $car['series'] = Yii::app()->request->getParam('series') ? Yii::app()->request->getParam('series') : Yii::app()->request->getParam('jpmall_series');
     $car['year'] = Yii::app()->request->getParam('year') ? Yii::app()->request->getParam('year') : Yii::app()->request->getParam('jpmall_year');
     $car['model'] = Yii::app()->request->getParam('model') ? Yii::app()->request->getParam('model') : Yii::app()->request->getParam('jpmall_model');
     $params = array('rows' => 12, 'page' => Yii::app()->request->getParam("page") ? Yii::app()->request->getParam("page") : 1, 'car' => $car, 'SellerID' => Yii::app()->user->getOrganID());
     if ($param['IsPro'] == 2) {
         //促销
         $params['SellerIsPro'] = 2;
     }
     if ($param['IsPro'] == 5) {
         //未促销
         $params['SellerIsPro'] = 22;
     }
     if ($_GET) {
         $Title = Yii::app()->request->getParam('Title');
         if ($Title && $Title != '请输入关键字') {
             $Title = urldecode($Title);
             $params['keywords'] = $Title;
         }
         $GoodsNO = Yii::app()->request->getParam('GoodsNO');
         if ($GoodsNO) {
             $GoodsNO = urldecode($GoodsNO);
             $params['GoodsNO'] = $GoodsNO;
         }
         $Name = Yii::app()->request->getParam('Name');
         if ($Name) {
             $Name = urldecode($Name);
             $params['Name'] = $Name;
         }
         $BrandID = Yii::app()->request->getParam('BrandID');
         if ($BrandID) {
             $params['brandID'] = $BrandID;
         }
         $StandCode = Yii::app()->request->getParam('StandCode');
         if ($StandCode) {
             $params['codes'] = $StandCode;
         }
         $Pinyin = Yii::app()->request->getParam('Pinyin');
         if ($Pinyin) {
             $Pinyin = urldecode($Pinyin);
             $params['Pinyin'] = $Pinyin;
         }
         $PartsLevel = Yii::app()->request->getParam('PartsLevel');
         if ($PartsLevel) {
             $params['PartsLevel'] = $PartsLevel;
         }
         $Price = Yii::app()->request->getParam('Price');
         if ($Price) {
             $Price = urldecode($Price);
             $params['goodprice'] = $Price;
         }
         $OE = Yii::app()->request->getParam('OE');
         if ($OE) {
             $OE = urldecode($OE);
             $params['oeno'] = $OE;
         }
         $IsSale = Yii::app()->request->getParam('IsSale');
         if ($IsSale == 1) {
             $params['IsSale'] = 1;
         } else {
             if ($IsSale == 0) {
                 $params['IsSale'] = 0;
             }
         }
     }
     //        exit;
     foreach ($params as $key => $value) {
         $params[$key] = str_replace('%', '\\%', $params[$key]);
         $params[$key] = str_replace('<<q>>', '/', $params[$key]);
     }
     $params['order'] = 'time_l';
     $model = MallService::getGoodsDataold($params);
     $car = MallService::getCarmodeltxt($params);
     return array('model' => $model, 'car' => $car);
 }
Esempio n. 7
0
File: buynow.php Progetto: zwq/unpei
    }
    .select{padding:3px 0px}
    .display-n{ color:#EC8051}
    .goodname{font-size:14px; font-weight: bold}
    .addr table{width:988px; margin:0px;}

    .addr table td{text-align:center}
    .dd_info_lm span{font-weight:bold}
    .select{margin-top:0px}
    .addr input{margin-top:0px}
    .shop_company{line-height:30px; margin-top:10px}
</style>
<?php 
$locatecar = Yii::app()->request->getParam('locate');
$locate = explode('_', $locatecar);
$locatecarmodel = MallService::getCarmodeltxt(array('make' => $locate[0], 'series' => $locate[1], 'year' => $locate[2], 'model' => $locate[3]));
?>
<div class="wrap-contents" style="background:#fff;border:1px solid #ccc;padding:5px; width:990px;margin-top:5px">
<p class="gwc_lm"><span class="gwc_lm_info">我的购物车</span></p>
    <div class="step">

        <div class="step_info">
            <ul>
                <li>
                    <i><img src="<?php 
echo Yii::app()->theme->baseUrl . '/images/papmall/gouwuche/step2.jpg';
?>
"></i><br>
                    <span>1.确认商品信息</span>
                </li>
                <li>
Esempio n. 8
0
 public function actionGeteva()
 {
     $goodsid = $_GET['goodsid'];
     $organid = $_GET['organid'];
     $page = $_GET['page'];
     $criteria = new CDbCriteria();
     //过滤有图片的评论
     if ($_GET['status'] == 'pic') {
         $sql = "select Group_Concat(DISTINCT EvalID) as eval FROM `pap_evaluation_goods_image` where GoodsID={$goodsid}";
         $res = Yii::app()->papdb->createCommand($sql)->queryRow();
         if ($res && !is_null($res['eval'])) {
             $criteria->addCondition("ID in({$res['eval']})", "AND");
         } else {
             $criteria->addCondition("ID in('')", "AND");
         }
     } else {
         if ($_GET['status'] == 'good') {
             $criteria->addCondition("Status=1 ", "AND");
         } else {
             if ($_GET['status'] == 'medium') {
                 $criteria->addCondition("Status=2 ", "AND");
             } else {
                 if ($_GET['status'] == 'bad') {
                     $criteria->addCondition("Status=3 ", "AND");
                 }
             }
         }
     }
     //评价有无内容过滤
     if ($_GET['content'] == 'content') {
         $criteria->addCondition("BuyerToEvalRemark != '0' and BuyerToEvalRemark != '' ", "AND");
     }
     //评价排序
     if ($_GET['orderby'] == 'orderID') {
         $criteria->order = "id DESC";
     } elseif ($_GET['orderby'] == 'ordertimeup') {
         $criteria->order = "CreateTime ASC";
     } elseif ($_GET['orderby'] == 'ordertimedrop') {
         $criteria->order = "CreateTime DESC";
     }
     $criteria->addCondition("t.GoodsID= " . $goodsid, "AND");
     $criteria->addCondition("t.OrganID= " . $organid, "AND");
     $criteria->addCondition("OrderID!=''", "AND");
     //        $criteria->select = 't.*';
     //        $criteria->join = "join pap_evaluation_goods_image b on t.ID=b.EvalID";
     //分页
     $count = PapEvaluationGoods::model()->count($criteria);
     $pages = new CPagination($count);
     $pages->pageSize = 5;
     $pages->applyLimit($criteria);
     $model = PapEvaluationGoods::model()->findAll($criteria);
     $data = array();
     $zi = 1500;
     foreach ($model as $key => $value) {
         $data[$key]['BuyerToEvalRemark'] = !empty($value["BuyerToEvalRemark"]) ? $value["BuyerToEvalRemark"] : '';
         $data[$key]['SellerToEvalRemark'] = $value["SellerToEvalRemark"];
         $data[$key]['BCreateTime'] = date("Y-m-d H:i:s", $value["CreateTime"]);
         $data[$key]['UpdateTime'] = date('Y-m-d H:i:s', $value['UpdateTime']);
         $sql = "select MakeID,CarID,Year,ModelID from pap_order_goods where OrderID={$value['OrderID']} and GoodsID={$value['GoodsID']}";
         $res = Yii::app()->papdb->createCommand($sql)->queryRow();
         $carstr = MallService::getCarmodeltxt(array('make' => $res['MakeID'], 'series' => $res['CarID'], 'year' => $res['Year'], 'model' => $res['ModelID']));
         $data[$key]['CarmodelText'] = $carstr ? $carstr : '无';
         //获得图片
         //   $goodsimg = OrganPhoto::model()->findAll("OrganID=:userID", array(":userID" => $userID));
         //  $data[$key]['GoodsIMG'] = $goodsimg[0]->Path;
         switch ($value['Status']) {
             case '2':
                 $data[$key]['Eval'] = '中评';
                 break;
             case '3':
                 $data[$key]['Eval'] = '差评';
                 break;
             default:
                 $data[$key]['Eval'] = '好评';
                 break;
         }
         $data[$key]['BuyerID'] = $value["BuyerID"];
         $buyerinfo = Organ::model()->findByPk($value["BuyerID"]);
         $data[$key]['BuyerName'] = $buyerinfo->OrganName;
         $data[$key]['Grade'] = $buyerinfo->Grade;
         $data[$key]['zindex'] = $zi--;
         //信用等级
         $xylevel = EvaluateService::getpets($data[$key]['Grade']);
         if (empty($xylevel) || !$xylevel[0] || !$xylevel[1]) {
             $data[$key]['Xylv'] = "<div title='积分:暂无' style='color:#888;text-indent:0px;float:left'>暂无</div>";
         } else {
             $data[$key]['Xylv'] = '<div class="showlv" title = "积分:' . $data[$key]['Grade'] . '">' . str_repeat("<i class='buyer-level" . $xylevel[0] . "'></i>", $xylevel[1]) . '</div>';
         }
         //获取评论图片
         if ($value->image) {
             foreach ($value->image as $k => $v) {
                 $data[$key]['Picture'][$k]['ImageUrl'] = $v['ImageUrl'];
             }
         }
     }
     $rs['rows'] = $data;
     //获得分页
     $rs['page'] = $this->getPagination($count, $pages->pageSize, $page);
     echo json_encode($rs);
     yii::app()->end();
 }
Esempio n. 9
0
 public function actionOrderGoods()
 {
     $this->layout = '//layouts/base';
     $goodsid = Yii::app()->request->getParam('goods');
     $version = Yii::app()->request->getParam('Version');
     $order = Yii::app()->request->getParam('Order');
     $return = Yii::app()->request->getParam('return');
     $quo = Yii::app()->request->getParam('quo');
     //版本信息
     $good = DealergoodsService::getmongoversion($goodsid, $version);
     $result = $good['GoodsInfo'];
     $result['SellerID'] = $result['OrganID'];
     if ($order) {
         $model = PapOrderGoods::model()->find(array('select' => 'ProPrice as Price,Quantity,MakeID,CarID,Year,ModelID', 'condition' => "OrderID={$order} and GoodsID={$goodsid}"))->attributes;
         $result['Quantity'] = $model['Quantity'];
         $result['Price'] = $model['Price'];
         $car = array('make' => $model['MakeID'], 'series' => $model['CarID'], 'year' => $model['Year'], 'model' => $model['ModelID']);
     } else {
         if ($return) {
             $model = PapReturnGoods::model()->find(array('select' => 'Price,OrderID', 'condition' => "ReturnID='{$return}' and GoodsID='{$goodsid}'"))->attributes;
             $result['Quantity'] = $model['Quantity'];
             $result['Price'] = $model['Price'];
             $ordermodel = PapOrderGoods::model()->find(array('select' => 'MakeID,CarID,Year,ModelID', 'condition' => "OrderID={$model['OrderID']} and GoodsID={$goodsid}"))->attributes;
             $car = array('make' => $ordermodel['MakeID'], 'series' => $ordermodel['CarID'], 'year' => $ordermodel['Year'], 'model' => $ordermodel['ModelID']);
         } else {
             if ($quo) {
                 $model = PapQuotationGoods::model()->findByPk($quo, array('select' => 'Price,Num', 'condition' => "GoodsID='{$goodsid}'"))->attributes;
                 $result['Quantity'] = $model['Num'];
                 $result['Price'] = $model['Price'];
             } else {
                 $this->redirect(array('index'));
             }
         }
     }
     //发货公告
     $model = new PapGoodsSendnotice();
     $notice = $model->find("OrganID = {$result['SellerID']}");
     //商品基本信息
     $result['GoodsID'] = $goodsid;
     $result['BrandName'] = $result['Brand'];
     $goods = PapGoods::model()->findByPk($goodsid, array('select' => 'IsSale,CommentNo'));
     $result['IsSale'] = $goods->attributes['IsSale'];
     $result['CommentNo'] = $goods->attributes['CommentNo'];
     if ($result['oeno']) {
         $oe = '';
         foreach ($result['oeno'] as $v) {
             $oe .= $v . ',';
         }
         $result['OENO'] = substr($oe, 0, -1);
     } else {
         $result['OENO'] = '';
     }
     //最小交易金额
     $result['MinTurnover'] = PapOrderMinTurnover::model()->find("OrganID=:ID", array(":ID" => $result['SellerID']))->attributes['MinTurnover'];
     //店家积分
     $result['TotalScore'] = DefaultService::getrecord($result['SellerID']);
     //店家信息
     $organInfo = Organ::model()->findByPk($result['SellerID'])->attributes;
     $result['OrganName'] = $organInfo['OrganName'];
     $result['QQ'] = $organInfo['QQ'];
     $result['Phone'] = $organInfo['Phone'];
     $result['Address'] = array(Area::getCity($organInfo['Province']), Area::getCity($organInfo['City']), Area::getCity($organInfo['Area']));
     //大类子类标准名称
     $result['StandCodeName'] = Gcategory::model()->find(array('select' => 'Name', 'condition' => "Code='{$result['StandCode']}'"))->attributes['Name'];
     $cpArr = MallService::getCategory($result['StandCode']);
     $result['BigName'] = $cpArr['BigParts'];
     $result['SubName'] = $cpArr['SubParts'];
     $result['sub'] = $cpArr['sub'];
     $result['ValidityType'] = $result['spec']['ValidityType'];
     $result['ValidityDate'] = $result['spec']['ValidityDate'];
     $result['BganCompany'] = $result['spec']['BganCompany'] ? $result['spec']['BganCompany'] : '';
     //标品
     $result['BganGoodsNO'] = $result['spec']['BganGoodsNO'] ? $result['spec']['BganGoodsNO'] : '';
     //标商
     $result['Unit'] = $result['spec']['Unit'] ? $result['spec']['Unit'] : '';
     //单位ID
     $result['UnitName'] = GoodsUnit::model()->findByPk($result['Unit'])->attributes['UnitName'];
     //单位
     $result['MinQuantity'] = $result['pack']['MinQuantity'] ? $result['pack']['MinQuantity'] : '';
     //最小包装
     // 图片
     if (!$result['img']) {
         $result['Images'][0]['ImageUrl'] = 'dealer/goods-img-big.jpg';
         $result['Images'][0]['BigImage'] = 'dealer/goods-img-big.jpg';
     } else {
         foreach ($result['img'] as $k => $v) {
             $result['Images'][$k]['MallImage'] = $v['MallImage'];
             $result['Images'][$k]['ImageUrl'] = $v['ImageUrl'];
             if (!$v['BigImage']) {
                 $result['Images'][$k]['BigImage'] = $v['ImageUrl'];
             } else {
                 $result['Images'][$k]['BigImage'] = $v['BigImage'];
             }
         }
     }
     if (!$result) {
         $this->redirect(array('index'));
     }
     $carmodeltext = MallService::getCarmodeltxt($car);
     $carfit = $car;
     $carfit['goodsid'] = $goodsid;
     $fitres = MallService::checkCarfit($carfit);
     $rows = $this->Getmaincate($result['SellerID']);
     $cate = $this->findsub($rows);
     $this->pageTitle = Yii::app()->name . '-' . "订单商品详情";
     //获取经销商客服列表
     $csparams['organID'] = $result['SellerID'];
     $csparams['type'] = 1;
     $csinfo = CsService::getcslists($csparams);
     $this->render('ordergoods', array('r' => $result, 'cate' => $cate, 'carmodeltext' => $carmodeltext, 'fitres' => $fitres['success'] == 1 ? 1 : 0, 'csinfo' => $csinfo, 'car' => $car, 'data' => $notice, 'goodsid' => $goodsid));
 }