温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ecshop如何取消配送方式

发布时间:2023-03-06 10:28:40 来源:亿速云 阅读:115 作者:iii 栏目:建站服务器

这篇文章主要介绍“ecshop如何取消配送方式”,在日常操作中,相信很多人在ecshop如何取消配送方式问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”ecshop如何取消配送方式”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

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默认版为例

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} 循环配送方式 -->
              <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} 循环配送方式 -->
              <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"} -->中的文字可以自己定义。

到此,关于“ecshop如何取消配送方式”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI