How to implement thinkPHP order digital reminder function

不言
Release: 2023-04-01 08:32:01
Original
2027 people have browsed it

This article mainly introduces the implementation method of thinkPHP order digital reminder function, involving the implementation skills of thinkPHP database query, traversal and front-end display related functions. Friends in need can refer to the following

The example of this article tells the thinkPHP order Implementation method of digital reminder function. Share it with everyone for your reference, the details are as follows:

The operation rendering is as follows:

html:

  • 全部{sh:$num.all}
  • 待付款 {sh:$num.unpaid}
  • 待发货 {sh:$num.unsent}
  • 待收货 {sh:$num.unresevied}
  • 已收货 {sh:$num.resevied}
Copy after login

php:

// 各种状态的数字提醒 $whereall = array('member_id' => $this->member_id); $allorder = $this->orderModel->where($whereall)->select(); $num = array('all'=>0,'unpaid'=>0,'unsent'=>0,'unresevied'=>0,'resevied'=>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['unresevied'] ++ ; } if ($order['paytime'] != 0 && $order['sendtime'] != 0 && $order['receivetime'] != 0) { $num['resevied'] ++ ; } $num['all'] ++ ; } $this->assign('num',$num);
Copy after login

This time, the value is passed in the form of an array, which is consistent.

Add a fixed layout effect

css:

Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone's learning. For more related content, please pay attention to PHP Chinese website!

Related recommendations:

About the code for adding js event paging class to the thinkPHP framework

How to implement a shopping cart based on the CodeIgniter framework Function

The above is the detailed content of How to implement thinkPHP order digital reminder function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!