存档

2010年8月 的存档

在ecshop中添加adwords转换跟踪代码

2010年8月20日 果果 46 条评论

转换是adwords优化很重要的参考数据,是比较准确的ROI数据来源,做adwords的各位不妨一试

你可以在adwords中设置转换跟踪,得到代码,对照做一下修改添加在模板目录flow.dwt的body标签内即可。

<!-- {if $step eq "done"} 订单提交成功-->
<!-- Google Code for order Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1028991713;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "BHskCPzL4AEQ1NXU6gM";
var google_conversion_value = 0;
if (100) {
  google_conversion_value = 100;
}
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1028991700/?value=100&amp;label=BHskCPzL4AEQ1NXU6gM&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<!-- {/if} -->

为ECSHOP后台添加通过email搜索用户的功能

2010年8月15日 果果 12 条评论

RT:准备以下两个文件admin/users.php以及admin/templates/users_list.htm
1,修改admin/users.php:
查找“过滤条件”,672行左右,在$filter['keywords']后一行添加

$filter['email'] = empty($_REQUEST['email']) ? '' : trim($_REQUEST['email']);

查找

if ($filter['keywords'])
        {
            $ex_where .= " AND user_name LIKE '%" . mysql_like_quote($filter['keywords']) ."%'";
        }

修改为:

if ($filter['keywords'] && $filter['email'])
        {
            $ex_where .= " AND user_name LIKE '%" . mysql_like_quote($filter['keywords']) ."%' AND email LIKE '%" . mysql_like_quote($filter['email']) ."%'";
        }
  elseif($filter['keywords'])
  {
   $ex_where .= " AND user_name LIKE '%" . mysql_like_quote($filter['keywords']) ."%'";
  }
  elseif($filter['email'])
  {
      $ex_where .= " AND email LIKE '%" . mysql_like_quote($filter['email']) ."%'";
  }

2,修改admin/templates/users_list.htm
查找 {$lang.label_user_name},11行左右,在下面添加

&nbsp;邮箱地址 &nbsp;<input type="text" name="email" /> <input type="submit" value="{$lang.button_search}" />

查找listTable.filter['rank'],97行左右,在后面添加:

listTable.filter['email'] = document.forms['searchForm'].elements['email'].value;

至此就可以在用户列表里面通过邮箱查找用户了。

分类: ecshop 标签:

为ECSHOP后台添加通过快递单号搜索订单的功能

2010年8月15日 果果 10 条评论

RT,需要修改admin/order.php,admin/templates/order_list.htm两个文件

1,修改admin/order.php添加代码:

搜索“过滤信息”,在后面添加

$filter['invoice_no'] = empty($_REQUEST['invoice_no']) ? '' : trim($_REQUEST['invoice_no']);

找到

if ($filter['address'])
        {
            $where .= " AND o.address LIKE '%" . mysql_like_quote($filter['address']) . "%'";
        }

在后面添加:

if ($filter['invoice_no'])
        {
            $where .= " AND o.invoice_no LIKE '%" . mysql_like_quote($filter['invoice_no']) . "%'";
        }

2,修改后台模板文件:第八行{$lang.order_sn}下添加

发货单号<input name="invoice_no" type="text" id="invoice_no" size="15">

在搜索订单部分,listTable.filter['consignee']下添加一行

listTable.filter['invoice_no'] = Utils.trim(document.forms['searchForm'].elements['invoice_no'].value);

修改完成后就可以在订单列表也看到快递单搜索框了,注意备份源文件

分类: ecshop 标签:

ECSHOP添加指定支付方式享受折扣功能

2010年8月12日 果果 7 条评论

需要修改的文件:includes/lib_order.php, themes/../order_total.lib

修改order_total.lib代码,将if $total.pay_fee > 0修改为如下内容

<!-- {if $total.pay_fee neq 0} 支付费用 -->
      + {$lang.pay_fee}: <font>{$total.pay_fee_formated}</font>
      <!-- {/if} -->

修改lib_order.php,找到“/* 支付费用是一个比例 */”,修改下面计算方法为

   

 {

        /* 支付费用是一个比例 */

        $val     = floatval($rate) / 100;

        $pay_fee = $order_amount * $val;

    }

在订单页面,将负号显示在货币前面,修改lib_order.php,找到pay_fee_formated,修改如下

if($total['pay_fee']<0){
  $total['pay_fee_formated'] = "-".price_format((-1 * $total['pay_fee']), false);
 }else{
  $total['pay_fee_formated'] = price_format($total['pay_fee'], false);
 }

就可以在后台设置支付费用时,输入-10%,即可选用该支付方式时打九折

分类: ecshop 标签: ,

修改ECSHOP后台订单列表默认订单状态为请选择

2010年8月11日 果果 3 条评论

修改admin/templates/order_list.htm,大约10行左右,最后添加selected=-1

{html_options options=$status_list selected=-1}
分类: ecshop 标签: