1 00:00:00,390 --> 00:00:02,690 And then I'm going to basically put her in the order details. 2 00:00:02,700 --> 00:00:07,830 I'm going to base this here and then I'm going to again close it down because we don't want to work 3 00:00:07,830 --> 00:00:08,250 on it. 4 00:00:10,570 --> 00:00:11,500 Let me hear. 5 00:00:15,710 --> 00:00:16,760 Well, everything. 6 00:00:22,340 --> 00:00:23,390 And that's it. 7 00:00:23,420 --> 00:00:27,350 Now we need to work on the order details area, this area. 8 00:00:27,740 --> 00:00:33,380 So in order to work on this area, we need to copy again a code from the account in order to not to 9 00:00:33,650 --> 00:00:35,000 keep the code from scratch. 10 00:00:35,450 --> 00:00:36,440 So we have this code. 11 00:00:36,500 --> 00:00:37,670 Remember these orders. 12 00:00:38,060 --> 00:00:40,380 I'm going to close this orders and then I'm going to copy it. 13 00:00:40,400 --> 00:00:41,630 I'm going to copy this order. 14 00:00:42,110 --> 00:00:44,590 And then I'm going to pasted here in the order details. 15 00:00:44,600 --> 00:00:45,580 I'm going to paste it here. 16 00:00:47,440 --> 00:00:49,090 And we need to change many things. 17 00:00:49,570 --> 00:00:57,790 The first thing is that we need to display the order we need to display instead of order first. 18 00:00:58,060 --> 00:01:00,400 First, I'm going to change the state to order details. 19 00:01:01,450 --> 00:01:02,020 Details. 20 00:01:02,620 --> 00:01:07,990 And then instead of displaying the order itself, we need to display the products that belong to that 21 00:01:07,990 --> 00:01:08,380 order. 22 00:01:09,040 --> 00:01:12,800 So to do this, we need to check the database in the database. 23 00:01:12,820 --> 00:01:21,400 What we can display is that we can display each single order has, of course, the product we need to 24 00:01:21,400 --> 00:01:25,990 display the product ID the we actually don't need to display the product. 25 00:01:26,230 --> 00:01:32,080 We need to display the product name, the product image and the product price and possibly the quantity. 26 00:01:32,240 --> 00:01:33,760 Yes, the quantity is important. 27 00:01:35,020 --> 00:01:36,850 And that's it. 28 00:01:37,300 --> 00:01:37,810 That's it. 29 00:01:41,030 --> 00:01:42,380 So we need to display these things. 30 00:01:42,380 --> 00:01:45,800 We need can display the name, the image, the price and the quantity. 31 00:01:46,580 --> 00:01:48,110 So I'm going to say your product. 32 00:01:49,370 --> 00:01:50,210 Product name. 33 00:01:53,260 --> 00:01:53,920 And then. 34 00:01:56,450 --> 00:01:57,140 Project. 35 00:01:59,570 --> 00:02:01,910 Product image. 36 00:02:02,480 --> 00:02:03,140 Price. 37 00:02:03,710 --> 00:02:04,400 Quantity. 38 00:02:05,480 --> 00:02:06,200 Product name. 39 00:02:07,130 --> 00:02:11,210 The image is going to be with the name, so there is no need for or another column. 40 00:02:11,810 --> 00:02:16,160 So product name and then image price. 41 00:02:16,160 --> 00:02:18,260 Quantity image. 42 00:02:18,800 --> 00:02:23,270 We have the image, then price. 43 00:02:25,220 --> 00:02:26,210 And quantity. 44 00:02:30,560 --> 00:02:32,030 180. 45 00:02:32,840 --> 00:02:38,450 And here I'm going to just say product, because this product column will contain the product as well 46 00:02:38,450 --> 00:02:41,570 as the the image. 47 00:02:42,080 --> 00:02:48,710 So here what I'm going to do is that I'm going to say I'm going to uncomment this now we need this, 48 00:02:48,710 --> 00:02:53,910 now we need this and we don't need this. 49 00:02:53,910 --> 00:02:54,830 So I'm going to remove this. 50 00:02:55,760 --> 00:03:01,570 We don't need this and we don't need this either. 51 00:03:01,580 --> 00:03:02,480 I'm going to remove this. 52 00:03:03,950 --> 00:03:13,400 And for now, I'm going to also remove remove this, and I'm going to keep only one. 53 00:03:13,580 --> 00:03:15,050 I'm going to just keep these two. 54 00:03:15,080 --> 00:03:20,480 So I'm going to remove the goods and I'm going to remove this as well. 55 00:03:22,370 --> 00:03:26,060 And I'm going to remove also this peach speech. 56 00:03:26,270 --> 00:03:26,770 Good. 57 00:03:28,480 --> 00:03:33,610 I'm going to remove it for now, but I'm going to get it later because we need to do the same. 58 00:03:33,610 --> 00:03:35,830 So I'm going to remove it for now just to show you the page. 59 00:03:36,580 --> 00:03:44,810 So let me hit it over to the browser and let me go to the order underscore order details. 60 00:03:44,840 --> 00:03:53,110 I'm going to go to the here I'm going to say order underscore details that BHP. 61 00:03:53,590 --> 00:04:01,690 So if I go to the order details, as you can see, I'm going to get this table product price, quantity 62 00:04:01,740 --> 00:04:06,580 and it says details and that's it. 63 00:04:07,240 --> 00:04:10,870 We need now to work on this. 64 00:04:11,780 --> 00:04:14,950 But before before I do this, let me fix here I have a problem. 65 00:04:14,950 --> 00:04:20,260 I need to increase actually the header part I'm going to say here margin top five. 66 00:04:21,610 --> 00:04:23,320 And let me refresh this. 67 00:04:23,320 --> 00:04:24,370 This should fix it. 68 00:04:25,480 --> 00:04:26,410 This should fix it. 69 00:04:26,410 --> 00:04:31,660 And instead of saying orders, I'm going to say order details. 70 00:04:32,950 --> 00:04:36,100 Order details. 71 00:04:38,020 --> 00:04:46,450 And we have here the beginning, the product, price, quantity, and we can display something else 72 00:04:46,450 --> 00:04:49,210 or we just can keep it simple. 73 00:04:49,660 --> 00:04:53,050 Let's keep it like this for now, and then we can later fix this. 74 00:04:53,710 --> 00:04:55,690 So let me now work on the side. 75 00:04:55,690 --> 00:05:02,530 So at the top here, what we want to do is that we want to get the we want to get the details of our 76 00:05:02,920 --> 00:05:03,250 product. 77 00:05:03,250 --> 00:05:07,270 So to do this, the first step is that we need to include the connection to the server. 78 00:05:07,270 --> 00:05:14,770 I'm going to say include and then I'm going to say server server or first for connect connection that 79 00:05:14,770 --> 00:05:19,510 BHP and then we need to pass the product ID from the account. 80 00:05:20,920 --> 00:05:30,550 So if you are here in the order, if a user clicks on details, which is this forum where you need, 81 00:05:30,670 --> 00:05:34,320 we need to take the user to the order details that BHP. 82 00:05:34,810 --> 00:05:42,820 So here in the forum we need to say method and the method could be just, just get requests. 83 00:05:42,820 --> 00:05:50,620 We don't have to use a request for this and the method and the action. 84 00:05:50,860 --> 00:05:58,690 So the action could be and should be order underscore details that BHP. 85 00:06:00,490 --> 00:06:06,460 And this button we to give this button name I'm going to give it any I'm going to say name is equal 86 00:06:07,420 --> 00:06:12,280 to is equal to order. 87 00:06:14,920 --> 00:06:16,060 Details. 88 00:06:18,310 --> 00:06:22,590 The deals underscore Raytheon. 89 00:06:23,350 --> 00:06:26,610 And we need to pass the order. 90 00:06:26,620 --> 00:06:30,310 We need to say your input and then time. 91 00:06:32,450 --> 00:06:33,380 Type hidden. 92 00:06:34,730 --> 00:06:42,230 And then we need to say value and the value is going to be equal to the order value and the value is 93 00:06:42,230 --> 00:06:51,480 going to be equal to BHP and then echo and then we need to echo the role and we need to say here order 94 00:06:51,500 --> 00:06:54,800 80, order underscore I. 95 00:06:56,240 --> 00:07:04,480 And we need you to say the name and the name is going to be order underscore item. 96 00:07:06,290 --> 00:07:08,720 So we have these two inputs now. 97 00:07:09,590 --> 00:07:13,140 And let me first check the account page. 98 00:07:13,160 --> 00:07:16,250 I'm going to go through the accounts that BHP. 99 00:07:17,850 --> 00:07:20,790 And as you can see, this is the butter. 100 00:07:20,880 --> 00:07:21,570 This is the butter. 101 00:07:22,080 --> 00:07:22,950 These are the buttons. 102 00:07:23,820 --> 00:07:28,290 Let me now go to the order details and work on this part. 103 00:07:28,740 --> 00:07:39,120 So in the order details, we need to say if and then we need to check is set is set to get, get. 104 00:07:41,590 --> 00:07:49,480 Order details Beaton and. 105 00:07:51,700 --> 00:07:53,100 Is set. 106 00:07:54,720 --> 00:07:55,350 Get. 107 00:07:58,480 --> 00:08:00,420 Order IED. 108 00:08:02,290 --> 00:08:06,550 So if we have these two, what we need to do is that we need to. 109 00:08:08,550 --> 00:08:11,490 We need to connect to the database and get the details. 110 00:08:11,490 --> 00:08:13,760 So I'm going to say here are connections. 111 00:08:14,040 --> 00:08:17,250 I'm going to first get the the order the order ID. 112 00:08:17,370 --> 00:08:17,970 I'm going to say order. 113 00:08:17,970 --> 00:08:20,640 It is going to be equal to get. 114 00:08:21,360 --> 00:08:22,110 And then. 115 00:08:23,370 --> 00:08:23,970 Order. 116 00:08:24,760 --> 00:08:25,530 Underscore. 117 00:08:27,810 --> 00:08:29,850 And then we need to connect to the database. 118 00:08:29,850 --> 00:08:36,180 So I'm going to take an icon and then prepare and then select. 119 00:08:36,930 --> 00:08:42,600 Select all from. 120 00:08:44,770 --> 00:08:48,490 From order items. 121 00:08:48,730 --> 00:09:00,850 Order underscore items where where order on score ID is equal to question mark. 122 00:09:01,910 --> 00:09:02,620 Let me see here. 123 00:09:02,620 --> 00:09:03,010 Where. 124 00:09:06,000 --> 00:09:08,260 And then I'm going to store this in a variable called statement. 125 00:09:08,280 --> 00:09:11,280 I'm going to say here is the MP is equal to this. 126 00:09:11,850 --> 00:09:20,510 And then we need to say here is the empty and then bind theorem and then we need to bind the order in. 127 00:09:20,850 --> 00:09:23,280 We say, here, order it. 128 00:09:24,150 --> 00:09:25,860 And we just need to execute. 129 00:09:25,860 --> 00:09:28,380 We need to say, is he empty? 130 00:09:29,430 --> 00:09:30,190 Execute. 131 00:09:31,110 --> 00:09:32,970 And lastly, we need to. 132 00:09:34,300 --> 00:09:46,240 See a statement and then get results and then we can store the result in a variable called order. 133 00:09:46,240 --> 00:09:47,860 And the score details. 134 00:09:48,880 --> 00:09:51,400 The order details is going to be equal to this else. 135 00:09:51,400 --> 00:10:01,450 If we don't have these things, if we don't have if the order details about it or the order if we are 136 00:10:01,450 --> 00:10:02,100 not found.