<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] # 關于人人運費模板 之前就分享過一篇文章,這里就不過多的講解了,反正設計人人運費光看后臺就有很多種, 看order里的``create.php``里搜索``discountprice``就知道有多么的復雜了 這里直接貼代碼 ## 重量的計算 ` $zhongliang=0; $order_goods = pdo_getall('ewei_shop_order_goods', array('orderid' => $order['id'])); foreach ($order_goods as $key => $value) { $goods = pdo_get('ewei_shop_goods', array('id' => $value['goodsid'])); $order_goods[$key]['thumb'] =tomedia($goods['thumb']) ; if($value['optionname']==$goods['guige1']){ $zhongliang+=intval($goods['guige1']); }else if($value['optionname']==$goods['guige2']){ $zhongliang+=intval($goods['guige2']); }else if($value['optionname']==$goods['guige3']){ $zhongliang+=intval($goods['guige3']); } } ` ## 具體代碼 ``` $cart= pdo_getall('ewei_shop_goods', array('id' => $order_goods['goodsid'])); if($cart[0]['dispatchtype']==1){ $yunfei=$cart[0]['dispatchprice']; }else{ //默認模版 if(empty($cart[0]['dispatchid'])){ //calculatetype 0按重量計費 1按件計費 $dispatch = pdo_get('ewei_shop_dispatch', array('isdefault' => 1,"uniacid"=>$_W['uniacid'])); }else{ $dispatch = pdo_get('ewei_shop_dispatch', array('id' => $cart[0]['dispatchid'])); } $kuaidi = pdo_get('ewei_shop_express', array('express' => $dispatch['express'])); //isdispatcharea 0 不配送區域 1 只配送區域 //nodispatchareas 不配送區域 $ispeisong=0; if($dispatch['isdispatcharea']==1){ if(strpos($dispatch['nodispatchareas'],$address['city']) !== false){ }else{ $ispeisong=1; $noadd="當前區域不支持配送"; } }else{ if(strpos($dispatch['nodispatchareas'],$address['city']) !== false){ $ispeisong=1; $noadd=$address['city']."不支持配送"; } } $area=iunserializer($dispatch['areas']); $areaid=0; foreach ($area as $key => $value) { if(strpos($value['citys'],$address['city']) !== false){ $areaid=$key+1; } } if(empty($dispatch)){ $yunfei=0; }else{ //jfguige 按件計費 //firstnum 首件 //firstnumprice 運費 //secondnum 續件 //secondnumprice 續費 //按件計費 if($dispatch['calculatetype']==1){ $jianshu=count($order_goods); if(!empty($areaid)){ $areaid=$areaid-1; if($jianshu<=$area[$areaid]['firstnum']){ $yunfei=$area[$areaid]['firstnumprice']; }else{ $yunfei=intval(($jianshu-$area[$areaid]['firstnum'])/$area[$areaid]['secondnum'])*$area[$areaid]['secondnumprice']+$area[$areaid]['firstnumprice']; } //freeprice 滿額 if($yunfei>=$area[$areaid]['freeprice']&&!empty($area[$areaid]['freeprice'])){ $yunfei=0; } }else{ if($jianshu<=$dispatch['firstnum']){ $yunfei=$dispatch['firstnumprice']; }else{ $yunfei=intval(($jianshu-$dispatch['firstnum'])/$dispatch['secondnum'])*$dispatch['secondnumprice']+$dispatch['firstnumprice']; } //freeprice 滿額 if($yunfei>=$dispatch['freeprice']&&!empty($dispatch['freeprice'])){ $yunfei=0; } } }else{ //firstweight 默認重量 //secondweight 續重 //secondprice 續費 //firstprice 默認價格 if(!empty($areaid)){ $areaid=$areaid-1; if($zhongliang<=$area[$areaid]['firstweight']){ $yunfei=$area[$areaid]['firstprice']; }else{ $yunfei=intval(($zhongliang-$area[$areaid]['firstweight'])/$area[$areaid]['secondweight'])*$area[$areaid]['secondprice']+$area[$areaid]['firstprice']; } //freeprice 滿額 if($yunfei>=$area[$areaid]['freeprice']&&!empty($area[$areaid]['freeprice'])){ $yunfei=0; } }else{ if($zhongliang<=$dispatch['firstweight']){ $yunfei=$dispatch['firstprice']; }else{ $yunfei=intval(($zhongliang-$dispatch['firstweight'])/$dispatch['secondweight'])*$dispatch['secondprice']+$dispatch['firstprice']; } //freeprice 滿額 if($yunfei>=$dispatch['freeprice']&&!empty($dispatch['freeprice'])){ $yunfei=0; } } } } } ``` ## 不配送區域
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看