ThinkPHP Order Digital reminder function implementation method, thinkphp reminder function

Source: Internet
Author: User

ThinkPHP Order Digital reminder function implementation method, thinkphp reminder function

This article describes how to implement the thinkPHP Order Digital reminder function. We will share this with you for your reference. The details are as follows:

Run the following command:

Html:

<Ul class = "am-avg-sm-5"> <li class = "condition-li" status = "0"> <span class = "condition"> all <if condition = "$ num. all neq 0 "> <span class =" badge "> {sh: $ num. all} </span> </if> </span> </li> <li class = "condition-li" status = "1"> <span class = "condition"> awaiting payment <if condition = "$ num. unpaid neq 0 "> <span class =" badge "> {sh: $ num. unpaid} </span> </if> </span> </li> <li class = "condition-li" status = "2"> <span class = "condition"> pending shipment <if condition = "$ num. unsent neq 0 "> <span class =" badge "> {sh: $ num. unsent} </span> </if> </span> </li> <li class = "condition-li" status = "3"> <span class = "condition"> waiting for receipt <if condition = "$ num. unresevied neq 0 "> <span class =" badge "> {sh: $ num. unresevied} </span> </if> </span> </li> <li class = "condition-li" status = "4"> <span class = "condition"> received <if condition = "$ num. resevied neq 0 "> <span class =" badge "> {sh: $ num. resevied} </span> </if> </span> </li> </ul>

Php:

// Numeric reminder for various States $ whereall = array ('Member _ id' => $ this-> member_id ); $ allorder = $ this-> orderModel-> where ($ whereall)-> select (); $ num = array ('all' => 0, 'unpaid' => 0, 'unsent' => 0, 'unrefered' => 0, 'refered' => 0); foreach ($ allorder as $ k => $ order) {if ($ order ['paytime'] = 0) {$ num ['unpaid'] ++;} if ($ order ['paytime']! = 0 & $ order ['sendtime'] = 0) {$ num ['unsent'] ++;} if ($ order ['paytime']! = 0 & $ order ['sendtime']! = 0 & $ order ['receivetime'] = 0) {$ num ['unsecret'] ++;} if ($ order ['paytime']! = 0 & $ order ['sendtime']! = 0 & $ order ['receivetime']! = 0) {$ num ['refered'] ++;} $ num ['all'] ++;} $ this-> assign ('num', $ num );

This time, values are transmitted in the form of arrays, with uniformity.

Add a fixed layout Effect

Css:

<style type="text/css">  .badge {    background-color:#FFC245;    position: absolute;    top:-5px;    right:-20px;  }  .condition{    position: relative;  }</style>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.