Affiliate

Các nội dung cơ bản của trang Affiliate

Trang affiliate là trang của một người dùng đã đăng ký tham gia chương trình liên kết của một nhà cung cấp sản phẩm hoặc dịch vụ. Trang affiliate sẽ tạo ra liên kết đến sản phẩm hoặc dịch vụ của doanh nghiệp đó và nếu người dùng qua liên kết đó mua sản phẩm hoặc dịch vụ, trang affiliate sẽ nhận được một phần trả tiền từ doanh nghiệp.

Các thẻ meta

{% extends layout_layout %}
{% block meta %}
    {{ headTitle('Affiliate').setSeparator(' - ').setAutoEscape(false)|raw }}
    <meta name="keywords" content="Affiliate">
    <meta name="description" content="Affiliate">
    <link rel="canonical" href="{{ getCurrentUrl(true) }}" />
    <meta property="og:url" content="{{ getCurrentUrl(true) }}">
    <meta property="og:image" content="https://dummyimage.com/300x200/000/fff">
    <meta property="og:type" content="website">
    <meta property="og:title" content="Affiliate">
{% endblock %}




Thông tin trang

Trang affiliate chứa các thông tin cơ bản như: Thông tin người giới thiệu, Thống kê đơn hàng giới thiệu, Thống kê các mã giới thiệu đơn hàng thành công...

  • Thông tin người giới thiệu:

{% if(hasIdentity()) %}
{% if(affiliateCode.extraContent) %}
{% set extra = affiliateCode.extraContent%}
    <p style="margin: 0">
        <b>Thông tin người giới thiệu:</b>
    </p>
    <ul  class="infor-customer" style="margin-bottom: 10px;padding-left: 5px;">
        {% if(extra['fullName']) %}
        <li><span>- Họ và tên: {{extra['fullName']}}</span></li>
        {% endif %}
        {% if(extra['mobile']) %}
        <li><span>- Số điện thoại: {{extra['mobile']}}</span></li>
        {% endif %}
        {% if(extra['email']) %}
        <li><span>- Email: {{extra['email']}}</span></li>
        {% endif %}
        {% if(extra['address']) %}
        <li><span>- Địa chỉ: {{extra['address']}}</span></li>
        {% endif %}
        {% if(extra['infoBank']) %}
        <li><span>- Mã ngân hàng - Số TK ngân hàng:  {{extra['infoBank']}}</span></li>
        {% endif %}
    </ul>
    <p style="margin-bottom: 10px;"><b>Link chia sẻ: </b>
        <a target="_blank" data-link="{{getCurrentUrl()}}" href="{{getCurrentUrl()}}?affcode={{affCode}}" id="linkHomeCopy" class="linkShareAff" style="color: #4080ff">{{getCurrentUrl()}}?affcode={{affCode}}</a>
    </p>
{% endif %}
{% endif %}




  • Thống kê đơn hàng giới thiệu và các mã giới thiệu đơn hàng thành công

{% if(hasIdentity()) %}
{% if(affiliateOrder is not empty) %}
    <td>{{affiliateCode.content}}</td>
    <td>
        <a href="/order/index?affCodeId={{affiliateOrder.codeId}}&fromDate={{fromDate}}&toDate={{toDate}}">{{affiliateOrder.options['totalOrder']}}</a>
    </td>
    <td>{{affiliateOrder.options['valueOrder'] |number_format(0) }} đ</td>
    <td>
        <a href="/order/index?status={{constant('Order\\Model\\Order::STATUS_SUCCESS')}}&affCodeId={{affiliateOrder.codeId}}&fromDate={{fromDate}}&toDate={{toDate}}">{{affiliateOrder.options['totalOrderSuccess']}}</a>
    </td>
    <td>{{affiliateOrder.options['valueOrderSuccess'] |number_format(0) }} đ</td>
    <td>{{affiliateOrder.options['totalBonus'] |number_format(0) }} đ</td>
{% else %}  
    <td colspan="6">Bạn chưa có đơn hàng nào</td>
{% endif %}
{% endif %}




  • Tìm kiếm theo ngày tháng

{% if(hasIdentity()) %}
{% set formDate = fromDate ? fromDate : date('-7days')|date("d/m/Y") %}
{% set toDate = toDate ? toDate : date()|date("d/m/Y") %}
<form action="" method="get">
    <input type="hidden" name="tab" value="report">
    <div class="form-group row form-input">
        <div class="col-sm-3">
             <input name="fromDate" type="text" placeholder="Từ ngày..." value="{{formDate}}"
                   class="datepicker form-control input-sm">
        </div>
        <div class="col-sm-3">
            <input name="toDate" type="text" placeholder="Đến ngày..." value="{{toDate}}"
                   class="datepicker form-control input-sm">
        </div>
        <div class="col-sm-2">
            <button type="submit" class="btn btn-sm btn-default">
                <i class="fa fa-search"></i>  Tìm kiếm
            </button>
        </div>
        <div class="clearfix"></div>
    </div>
</form>
{% endif %}




  • Tạo mã giới thiệu

{% if(hasIdentity()) %}
<div class="aff-grp">
    <input {{disable}} type="text" maxlength="45" class="form-control" id="infoBank" placeholder="Mã ngân hàng_Số TK (VPBANK_12345678)">
    <input {{disable}} type="text" name="affiliateCode" maxlength="45" class="form-control" id="affiliateCode" placeholder="Chấp nhận 3 => 45 chữ, chữ số và dấu _">
    <button id="getAffiliate"> Tạo mã giới thiệu</button>
</div>
{% endif %}

Last updated