1 00:00:00,630 --> 00:00:01,290 Welcome back. 2 00:00:01,590 --> 00:00:06,640 Now, what I'm going to do is that I'm going to display instead of on hold, I'm going to say not paid. 3 00:00:06,660 --> 00:00:10,620 You can say on hold or you can say you're not paid or whatever you want to say. 4 00:00:11,010 --> 00:00:12,870 But it's very important to be descriptive. 5 00:00:12,870 --> 00:00:19,140 And you you need to know these key words, because these key words will will will help, you know, 6 00:00:19,260 --> 00:00:22,160 the determining the status of your order. 7 00:00:22,170 --> 00:00:25,020 So I personally used to use on hold. 8 00:00:25,410 --> 00:00:26,940 You can use not paid. 9 00:00:26,940 --> 00:00:27,600 I think not. 10 00:00:27,600 --> 00:00:29,580 But it is better if you want to. 11 00:00:29,580 --> 00:00:34,330 If you are going to display this to the user and I think you are, then it's better to say not paid 12 00:00:34,380 --> 00:00:36,450 because an all the user might be confused. 13 00:00:36,960 --> 00:00:44,880 So if the year whenever we Keith in order let me remind you if you go back to the if you go back to 14 00:00:44,880 --> 00:00:49,290 the place order the default value the default value. 15 00:00:49,290 --> 00:00:56,940 As soon as the user creates an order as user, as soon as the user makes an order, the order status 16 00:00:56,940 --> 00:00:58,020 is on hold. 17 00:00:58,620 --> 00:01:00,360 You can use whatever again. 18 00:01:00,360 --> 00:01:02,100 You can use whatever keyword you want. 19 00:01:04,620 --> 00:01:07,590 You can use not paid whatever you want. 20 00:01:07,620 --> 00:01:08,480 Let's say not paid. 21 00:01:09,620 --> 00:01:10,190 Not to be. 22 00:01:12,060 --> 00:01:16,680 So by default, it's not going to be it's going to be not paid because the user by default is going 23 00:01:16,680 --> 00:01:20,580 to place the order and then pay for the for the products. 24 00:01:21,180 --> 00:01:29,850 So let me let me change this to not paid and let me let me keep it small later. 25 00:01:29,850 --> 00:01:33,240 Because if I use if I compare, I don't want to 26 00:01:36,000 --> 00:01:36,990 do extra work. 27 00:01:37,530 --> 00:01:46,200 So here in the database, we also need to change the old values of the old orders that they have created. 28 00:01:46,770 --> 00:01:52,590 So the old orders order in the or disable these the orders that they have already created. 29 00:01:53,160 --> 00:01:58,830 You can again use whatever key keyword you want, let's say not paid instead of on hold. 30 00:01:59,850 --> 00:02:00,570 Not be it. 31 00:02:00,570 --> 00:02:01,560 I'm going to say not be. 32 00:02:10,860 --> 00:02:13,290 And for example, suppose that this was paid. 33 00:02:13,320 --> 00:02:15,270 I'm going to assume that this was paid. 34 00:02:16,270 --> 00:02:17,980 So if it's fate, I'm going to say you deliver. 35 00:02:19,060 --> 00:02:20,890 For example, it's delivered, let's say. 36 00:02:23,730 --> 00:02:25,680 Let's say delivery, for example, this. 37 00:02:26,330 --> 00:02:26,750 This. 38 00:02:26,880 --> 00:02:30,570 Let's say that this was delivered for for for the sake of this thing. 39 00:02:30,570 --> 00:02:33,540 I'm going to say that I'm going to assume that this was delivered. 40 00:02:35,430 --> 00:02:37,050 So in the um. 41 00:02:37,680 --> 00:02:40,020 Now, if I refresh, guess what if I refresh? 42 00:02:41,330 --> 00:02:44,500 These these orders are not paid except for this. 43 00:02:44,510 --> 00:02:45,530 This one was delivered. 44 00:02:46,100 --> 00:02:52,520 So what I'm going to do now is that if the order was not paid and if the user clicks on details, we 45 00:02:52,520 --> 00:02:57,740 need to display a button that would allow the user to pay for that product so that we ship that product 46 00:02:57,740 --> 00:02:59,630 or products to the user. 47 00:03:00,200 --> 00:03:04,280 So to do this in the order details, we need to check that. 48 00:03:04,610 --> 00:03:11,300 And to do this again, we need to go back to the account and the and here in the account, we need to 49 00:03:11,300 --> 00:03:13,640 create a new input. 50 00:03:13,640 --> 00:03:20,480 We need to say input and then we need to say type hidden and then we need to see value and then the 51 00:03:20,480 --> 00:03:25,970 value is going to be B2B and then echo and then draw. 52 00:03:26,660 --> 00:03:32,030 And then we need to do to store the the order status here. 53 00:03:32,030 --> 00:03:36,380 I'm going to say order status and then I'm going to close the. 54 00:03:38,460 --> 00:03:39,330 You need to be here. 55 00:03:47,940 --> 00:03:52,320 And then what I'm going to do is that I'm going to say your name is equal to order. 56 00:03:54,240 --> 00:03:54,600 Scott. 57 00:03:56,790 --> 00:04:02,760 And then now in the in the order details, we need to receive that order status. 58 00:04:02,760 --> 00:04:12,450 So at the top, remember at the top here, we need to say order underscore status is equal to post and 59 00:04:12,450 --> 00:04:17,940 then order, order, underscore status status. 60 00:04:17,940 --> 00:04:25,860 And now in the bottom, in the bottom, we need to display a button that's going to allow the user to 61 00:04:25,860 --> 00:04:26,130 pay. 62 00:04:26,130 --> 00:04:35,490 If the order if the order status if the order status is not paid, we need to display here in the details. 63 00:04:35,490 --> 00:04:38,700 We need to display a button that would allow the user to pay. 64 00:04:39,180 --> 00:04:40,830 So here I'm going to add a statement. 65 00:04:40,830 --> 00:04:45,300 I'm going to say here, if I'm going to keep it outside of the table, actually, it should be here 66 00:04:45,780 --> 00:04:46,800 outside the table. 67 00:04:46,800 --> 00:04:53,430 We need to use speech B2B and then we need to check the we need to check the order status. 68 00:04:53,430 --> 00:04:54,480 We have to say if. 69 00:04:56,750 --> 00:04:57,290 Order. 70 00:04:58,900 --> 00:04:59,440 Order. 71 00:05:00,600 --> 00:05:02,370 Status is equal. 72 00:05:06,490 --> 00:05:09,520 Is equal to not be. 73 00:05:10,840 --> 00:05:15,790 Then we need to display a we need to display a form. 74 00:05:16,030 --> 00:05:20,440 So I'm going to say here, if and then I'm going to close this, let me show you what I'm going to do. 75 00:05:20,440 --> 00:05:21,730 So let me remove this line. 76 00:05:22,600 --> 00:05:24,400 Now, let me also remove this area. 77 00:05:25,180 --> 00:05:30,010 And then between I'm going to display each because I'm going to display the speaker and then I'm going 78 00:05:30,010 --> 00:05:32,220 to close the curly bracket at the end. 79 00:05:32,250 --> 00:05:34,720 I'm going to close the if statement curly bracket. 80 00:05:36,040 --> 00:05:41,560 And here in between, only if the if the order status is not made, then I'm going to use a form. 81 00:05:43,630 --> 00:05:45,670 And then inside that form, I'm going to say input. 82 00:05:47,770 --> 00:05:48,220 Try. 83 00:05:54,790 --> 00:05:55,720 I submit. 84 00:05:57,780 --> 00:05:58,650 And value. 85 00:06:01,100 --> 00:06:02,210 They now? 86 00:06:04,510 --> 00:06:07,020 And I'm going to also give it a style. 87 00:06:07,040 --> 00:06:07,870 I'm going to say here. 88 00:06:09,670 --> 00:06:14,320 Style is equal to flight, right? 89 00:06:16,490 --> 00:06:18,620 Let's also give it a glass. 90 00:06:18,620 --> 00:06:21,050 I'm going to say glass beaten. 91 00:06:22,700 --> 00:06:27,290 And we can also say between primary. 92 00:06:28,740 --> 00:06:29,250 Leaving us. 93 00:06:29,490 --> 00:06:31,110 Let me show you how awesome this is. 94 00:06:31,320 --> 00:06:33,600 So let me go back to the account page. 95 00:06:34,230 --> 00:06:41,340 Now, in that card page, if the order is not paid and if I click on details here, there will be a 96 00:06:41,340 --> 00:06:48,270 button that says Pay now, because the order the order is not paid yet is not paid, the status is not 97 00:06:48,270 --> 00:06:48,480 paid. 98 00:06:48,810 --> 00:06:55,020 However, if the order is delivered is already was already delivered, then right in the detail. 99 00:06:55,530 --> 00:06:56,580 There is no button. 100 00:06:56,820 --> 00:07:01,050 They should there shouldn't be about it here because the order was delivered already. 101 00:07:01,650 --> 00:07:06,120 So now what you need to do is that you need to know the keywords that you are going to be using. 102 00:07:06,480 --> 00:07:13,110 So the keywords that I'm going to be using are not paid, delivered or being shipped or shipped. 103 00:07:13,680 --> 00:07:16,470 So the keywords lady me here to a comment. 104 00:07:17,440 --> 00:07:18,190 At the top here. 105 00:07:18,190 --> 00:07:22,930 I'm going to just add a comment to let you know the key words that I'm going to be using. 106 00:07:23,260 --> 00:07:28,960 So the keywords that I'm going to be using are not to be if the order obviously if the order is not 107 00:07:29,230 --> 00:07:35,740 yet delivered, if the order was if the order was delivered and shipped. 108 00:07:36,580 --> 00:07:42,820 If the order was shipped but not but but has not been delivered yet. 109 00:07:42,820 --> 00:07:46,570 So I'm going to be using three keywords. 110 00:07:46,570 --> 00:07:53,350 You can also use bait in case you want to add extra a monitoring system, but they wouldn't recommend 111 00:07:53,440 --> 00:07:55,090 making the system too complicated. 112 00:07:55,090 --> 00:07:58,870 I think not beat and then shipped as soon as the user pays. 113 00:07:59,200 --> 00:08:00,040 You need to check this. 114 00:08:00,280 --> 00:08:04,780 You need to change the status to ship and then delivered after the order. 115 00:08:04,960 --> 00:08:08,110 After you make sure that the order was delivered and the user 116 00:08:10,820 --> 00:08:12,220 received the package.