【问题标题】:How to add column " Customer Id " to opencart customer list?如何将“客户 ID”列添加到 opencart 客户列表?
【发布时间】:2016-11-18 14:30:48
【问题描述】:

我使用 opencart 1.5.6.4 和 2.3 在管理面板和客户列表中没有客户 ID 列 你能帮我在列名之前添加这个吗? between this place 谢谢

【问题讨论】:

    标签: opencart customer


    【解决方案1】:

    对于 Opencart 2: 您需要编辑此文件:

    admin/view/template/customer/customer_list.tpl
    

    1) 查找:

    <td class="text-left"><?php if ($sort == 'name') { ?>
    

    在它之前添加:

    <td class="text-left">Customer ID</td>
    

    2) 查找:

    <td class="text-left"><?php echo $customer['name']; ?></td>
    

    在它之前添加:

    <td class="text-left"><?php echo $customer['customer_id']; ?></td>
    

    对于 Opencart 1: 这个文件:

    admin/view/template/sale/customer_list.tpl
    

    1) 查找:

    <td class="left"><?php if ($sort == 'name') { ?>
    

    在它之前添加:

    <td class="left">Customer ID</td>
    

    2) 查找:

    <td class="left"><?php echo $customer['name']; ?></td>
    

    在它之前添加:

    <td class="left"><?php echo $customer['customer_id']; ?></td>
    

    对于在步骤 1 中按客户 ID 对 Opencart 2 进行排序,请添加以下代码:

    <td class="text-left">
        <?php if ($sort == 'customer_id') { ?>
            <a href="<?php echo $sort_customer_id; ?>" class="<?php echo strtolower($order); ?>">Customer ID</a>
        <?php } else { ?>
            <a href="<?php echo $sort_customer_id; ?>">Customer ID</a>
        <?php } ?>
    </td>
    

    代替:

    <td class="text-left">Customer ID</td>
    

    然后打开这个文件:

    admin/controller/customer/customer.php
    

    查找:

    $data['sort_name'] = $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&sort=name' . $url, true);
    

    在它之前添加:

    $data['sort_customer_id'] = $this->url->link('customer/customer', 'token=' . $this->session->data['token'] . '&sort=customer_id' . $url, true);
    

    【讨论】:

    • پاسخ روویرایش کردم。 این موردم توضیح دادم.
    猜你喜欢
    • 2017-10-03
    • 2017-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多