溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

ecshop如何取消配送方式

發(fā)布時(shí)間:2023-03-06 10:28:40 來源:億速云 閱讀:129 作者:iii 欄目:建站服務(wù)器

這篇文章主要介紹“ecshop如何取消配送方式”,在日常操作中,相信很多人在ecshop如何取消配送方式問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”ecshop如何取消配送方式”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

ecshop取消配送方式的方法:1、找到并打開“flow.dwt”文件,然后刪除“<!--{if $total.real_goods_count neq 0}-->...<!-- {/if} -->”代碼;2、將”js/shopping_flow.js“中的”checkOrderForm(frm)“改為”if (document.getElementById(...)“即可。

ECSHOP去除配送方式

以2.7.3默認(rèn)版為例

1.在flow.dwt中刪除這一段

<!--{if $total.real_goods_count neq 0}-->
        <div class="colbox colpd">
          <h4>配送方式</h4>
          <div class="colboxcontent">
            <table border="0" cellspacing="0" class="styletable">
              <tr>
                <th width="5"> </th>
                <th width="100">{$lang.name}</th>
                <th width="400">{$lang.describe}</th>
                <th width="100">{$lang.fee}</th>
                <th width="80">{$lang.free_money}</th>
                <th width="80">{$lang.insure_fee}</th>
              </tr>
              <!-- {foreach from=$shipping_list item=shipping key=key} 循環(huán)配送方式 -->
              <tr>
                <td>
                  <input name="shipping" type="radio" value="{$shipping.shipping_id}" {if $order.shipping_id eq $shipping.shipping_id}checked="true"{/if} supportCod="{$shipping.support_cod}" insure="{$shipping.insure}" οnclick="selectShipping(this)" id="shipping{$key}" />
                </td>
                <td><label for="shipping{$key}">{$shipping.shipping_name}</label></td>
                <td>{$shipping.shipping_desc}</td>
                <td>{$shipping.format_shipping_fee}</td>
                <td>{$shipping.free_money}</td>
                <td>
                  <!-- {if $shipping.insure neq 0} -->
                  {$shipping.insure_formated}
                  <!-- {else} -->
                  {$lang.not_support_insure}
                  <!-- {/if} -->
                </td>
              </tr>
              <!-- {/foreach} 循環(huán)配送方式 -->
              <tr>
                <td colspan="6" align="right">
                  <label for="ECS_NEEDINSURE" class="textStrong">
                  <input name="need_insure" type="checkbox"  οnclick="selectInsure(this.checked)" value="1"{if $order.need_insure} checked="checked"{/if}{if $insure_disabled} disabled="disabled"{/if} id="ECS_NEEDINSURE"  />
                  {$lang.need_insure}
                  </label>
                </td>
              </tr>
            </table>
          </div>
        </div><!-- /colbox -->
        <!-- {else} -->
        <input name = "shipping" type="radio" value = "-1" checked="checked" style="display:none" />
        <!-- {/if} -->

2.在js/shopping_flow.js中的checkOrderForm(frm)改為

function checkOrderForm(frm)
{
 
  // 檢查用戶輸入的余額
  if (document.getElementById("ECS_SURPLUS"))
  {
    var surplus = document.getElementById("ECS_SURPLUS").value;
    var error   = Utils.trim(Ajax.call('flow.php?step=check_surplus', 'surplus=' + surplus, null, 'GET', 'TEXT', false));
 
    if (error)
    {
      try
      {
        document.getElementById("ECS_SURPLUS_NOTICE").innerHTML = error;
      }
      catch (ex)
      {
      }
      return false;
    }
  }
 
  // 檢查用戶輸入的積分
  if (document.getElementById("ECS_INTEGRAL"))
  {
    var integral = document.getElementById("ECS_INTEGRAL").value;
    var error    = Utils.trim(Ajax.call('flow.php?step=check_integral', 'integral=' + integral, null, 'GET', 'TEXT', false));
 
    if (error)
    {
      return false;
      try
      {
        document.getElementById("ECS_INTEGRAL_NOTICE").innerHTML = error;
      }
      catch (ex)
      {
      }
    }
  }
  frm.action = frm.action + '?step=done';
  return true;
}

3.在flow.php中 if ($_REQUEST['step'] == 'done'中注釋掉

if ($order['order_amount'] > 0)
    {
        $payment = payment_info($order['pay_id']);
 
        include_once('includes/modules/payment/' . $payment['pay_code'] . '.php');
 
        $pay_obj    = new $payment['pay_code'];
 
        $pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
 
        $order['pay_desc'] = $payment['pay_desc'];
 
        $smarty->assign('pay_online', $pay_online);
    }

if(isset($is_real_good))
    {
        $sql="SELECT shipping_id FROM " . $ecs->table('shipping') . " WHERE shipping_id=".$order['shipping_id'] ." AND enabled =1"; 
        if(!$db->getOne($sql))
        {
           show_message($_LANG['flow_no_shipping']);
        }
    }

4.在flow.dwt中的<!-- {if $step eq "done"} -->中的文字可以自己定義。

到此,關(guān)于“ecshop如何取消配送方式”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI