WEBVTT 00:01.060 --> 00:05.890 So how did you make out with the pagination of the old subscriptions page, as you can see here, I 00:05.890 --> 00:10.990 have it done, so I have five on this page and one in the next page, just enough to ensure that it's 00:10.990 --> 00:12.430 doing exactly what I want. 00:13.090 --> 00:18.140 And implementing this, of course, was virtually identical to implementing it on the sales page. 00:18.190 --> 00:20.770 So let's go have a look in my code. 00:20.920 --> 00:23.260 I modified the subscriptions page. 00:23.590 --> 00:29.770 Basically, I added the pagination part here with the idea of pagination exactly the same as in the 00:29.770 --> 00:30.640 old sales page. 00:31.270 --> 00:32.920 And I did the same thing in the script. 00:33.040 --> 00:35.470 I defined a current page on a page size. 00:35.750 --> 00:40.120 I added the pagination function, which is identical to the one that we have in the other one. 00:40.120 --> 00:43.680 And of course this is code duplication and you could always put this in a shared library. 00:44.950 --> 00:47.620 Then I created an update table function. 00:47.620 --> 00:54.520 And really the only difference here is that I'm calling it mean all subscriptions instead of instead 00:54.520 --> 00:55.300 of all sales. 00:56.200 --> 00:58.650 And this stays pretty much exactly the same. 00:58.660 --> 01:05.230 I modified this, of course, to be exactly as it was on the previous version of the old subscriptions 01:05.230 --> 01:09.190 page, because we're displaying things slightly differently in the table. 01:09.230 --> 01:15.010 It goes to a different URL and I have cancelled instead of refunded here, but otherwise it's pretty 01:15.010 --> 01:16.030 much exactly the same. 01:16.300 --> 01:18.090 So that's the front end. 01:18.820 --> 01:26.860 Now, the handlers, all I did was copy all all sales, paste it as all subscriptions and come down 01:26.860 --> 01:29.140 here and modify the query. 01:31.000 --> 01:37.120 To be get all subscriptions patinated instead of get all sales patinated, then I went over to my models, 01:37.120 --> 01:44.530 file models, Dargo and I created the get all subscriptions pageant, basically a copy and get all pages 01:44.530 --> 01:48.790 patinated, pasted it and change this where clause here on line five. 01:48.790 --> 01:52.690 Sixty five of my code to be WSC is recurring equals one. 01:53.290 --> 01:54.640 And you can't forget this part. 01:55.270 --> 01:58.860 I had to do the same thing in this query, make that one equal to one. 01:58.870 --> 02:02.780 Otherwise your total records will be wrong and you're going to have some mathematical problems. 02:03.430 --> 02:04.570 So that was pretty straightforward. 02:04.810 --> 02:05.170 All right. 02:05.180 --> 02:11.980 In the next section of the course, we'll move on to managing users, adding editing and deleting admin 02:11.980 --> 02:12.490 users.