1 00:00:01,110 --> 00:00:01,710 Welcome back. 2 00:00:02,220 --> 00:00:09,030 Now, what we need to do is that we need to head on over to the single product at B2B and in the single 3 00:00:09,030 --> 00:00:11,730 product that B2B we have access to. 4 00:00:11,940 --> 00:00:13,290 We have access to the product. 5 00:00:13,980 --> 00:00:15,480 We have access to the product. 6 00:00:16,080 --> 00:00:16,980 So at the top. 7 00:00:16,980 --> 00:00:25,950 At the very top and before before the email code, we need to add it up before the 40 million to our 8 00:00:25,950 --> 00:00:28,210 B2B and then we need to get first. 9 00:00:28,420 --> 00:00:30,450 We need to get the product. 10 00:00:30,720 --> 00:00:34,860 So the product data is stored in a get in the get request. 11 00:00:34,860 --> 00:00:39,720 So we, we first need to make sure that the that we have the product. 12 00:00:39,990 --> 00:00:46,470 So I'm going to say if statement I'm going to say is F is set get. 13 00:00:49,720 --> 00:00:56,860 Get and then bronze 80 on underscore it. 14 00:00:57,490 --> 00:01:06,610 So if we have if we have the product, maybe remember the the the parameter, the get parameter is product 15 00:01:06,610 --> 00:01:07,120 underscore. 16 00:01:07,140 --> 00:01:15,760 And therefore here we need to say if is set get front any then we can now make a request to the database 17 00:01:15,760 --> 00:01:18,130 and get the product ID. 18 00:01:19,230 --> 00:01:19,890 Else. 19 00:01:20,580 --> 00:01:22,650 We need to return back to the homepage. 20 00:01:23,370 --> 00:01:29,160 So else, if we don't have the product, maybe we need to say, Hey there. 21 00:01:32,070 --> 00:01:32,970 Location. 22 00:01:34,980 --> 00:01:35,670 And then. 23 00:01:37,490 --> 00:01:37,850 Hey there. 24 00:01:37,850 --> 00:01:38,630 Location. 25 00:01:41,110 --> 00:01:43,450 Index, not BHP. 26 00:01:43,450 --> 00:01:44,680 We need to go back to the. 27 00:01:45,820 --> 00:01:48,130 We need to go back to the homepage. 28 00:01:48,520 --> 00:01:50,300 So let me test the limits. 29 00:01:50,300 --> 00:02:00,520 So if I can go to the single product without, as you can see, without specifying the, the product, 30 00:02:00,520 --> 00:02:05,380 adding if it's right again single underscore product. 31 00:02:06,910 --> 00:02:13,300 If I try to go to the single product without specifying it, it's going to take me to the homepage because 32 00:02:13,300 --> 00:02:14,650 we don't have a product. 33 00:02:15,790 --> 00:02:17,170 So this is this. 34 00:02:19,530 --> 00:02:25,320 No project I need was a given. 35 00:02:25,380 --> 00:02:30,690 So we need to get the product ready in case we have to make a request. 36 00:02:30,900 --> 00:02:34,500 So I'm going to copy records from the from the server. 37 00:02:34,530 --> 00:02:37,560 Get, get, get featured products. 38 00:02:37,920 --> 00:02:40,230 We have this code, so I'm going to copy this code. 39 00:02:41,930 --> 00:02:47,480 I'm going I'm going to sit here because it's going to be the same, but it's going to be a little different. 40 00:02:47,990 --> 00:02:51,710 So here we need to say, let me push this first. 41 00:02:53,940 --> 00:02:56,220 Let me push this first here. 42 00:02:56,220 --> 00:03:02,190 I'm going to say con prepare select all from products. 43 00:03:03,190 --> 00:03:13,270 But we don't need to say or we need to say actually limits limits one, because we need only one product 44 00:03:13,270 --> 00:03:14,200 and one before limit. 45 00:03:14,200 --> 00:03:17,500 We need to say where, where? 46 00:03:20,150 --> 00:03:22,810 Product I.D.. 47 00:03:24,610 --> 00:03:27,910 Is equal to a question mark. 48 00:03:28,540 --> 00:03:35,740 And the limit to the limit now is not important because the product is unique. 49 00:03:35,740 --> 00:03:38,140 So there is no need to say limit product. 50 00:03:38,140 --> 00:03:38,410 I do. 51 00:03:39,100 --> 00:03:45,220 I now want to say statement is empty and then we need to say bind. 52 00:03:47,280 --> 00:03:48,090 Mind. 53 00:03:55,140 --> 00:04:07,260 Underscore params and then we to pass here the the the type the type is integer and the second parameter 54 00:04:07,260 --> 00:04:07,500 is the. 55 00:04:07,830 --> 00:04:12,200 So we need to get to a variable called product 80. 56 00:04:13,640 --> 00:04:16,010 Project underscore it. 57 00:04:16,130 --> 00:04:22,250 So the end is going to be equal to get get project I. 58 00:04:25,600 --> 00:04:26,260 Bronek. 59 00:04:28,100 --> 00:04:28,490 I. 60 00:04:33,070 --> 00:04:35,980 And then we need to say we capacity to protect. 61 00:04:38,550 --> 00:04:40,950 I and here it should be. 62 00:04:40,950 --> 00:04:44,710 Bind baram knots params bind bar. 63 00:04:45,000 --> 00:04:46,680 So make sure that this building is correct. 64 00:04:47,370 --> 00:04:51,650 And let's also use the my is. 65 00:04:51,750 --> 00:04:53,040 You know, I. 66 00:04:59,910 --> 00:05:00,540 And that's it. 67 00:05:00,570 --> 00:05:04,740 Now we need to say product here. 68 00:05:04,740 --> 00:05:06,120 It's going to be not products. 69 00:05:06,120 --> 00:05:12,510 It's going to be only product, product and then get results, statement, get results. 70 00:05:13,170 --> 00:05:17,490 And we can use this product now in the bottom and the bottom. 71 00:05:17,490 --> 00:05:23,130 Let me instead of displaying the product, the product is here. 72 00:05:24,090 --> 00:05:25,890 So the product here, single product. 73 00:05:25,890 --> 00:05:32,010 So here, instead of displaying the image like this, I'm going to remove this image and then I'm going 74 00:05:32,010 --> 00:05:37,020 to say here BHP and then HP. 75 00:05:37,020 --> 00:05:43,020 But before I actually I forgot something important, which is the while. 76 00:05:43,020 --> 00:05:54,300 So we need to say here while and then actually we need first each HP and then while let me give myself 77 00:05:54,300 --> 00:06:04,380 some space and show you how this is going to look like while and then while and then only want one single 78 00:06:04,380 --> 00:06:05,190 curly bracket. 79 00:06:05,190 --> 00:06:14,700 And then while the all is equal to product product, fetch a source. 80 00:06:16,650 --> 00:06:16,980 It. 81 00:06:18,620 --> 00:06:19,430 A source. 82 00:06:24,940 --> 00:06:26,350 And then at the end. 83 00:06:27,160 --> 00:06:28,330 The end of this. 84 00:06:29,140 --> 00:06:32,630 This, the end of this, this. 85 00:06:33,960 --> 00:06:35,070 So here this. 86 00:06:35,070 --> 00:06:36,200 Then this is the end. 87 00:06:36,210 --> 00:06:37,200 So here we need to say. 88 00:06:38,860 --> 00:06:46,090 BHP, close the Kennedy bracket and then close the BHP angular racket. 89 00:06:46,600 --> 00:06:48,850 And then he went on to say And then echo. 90 00:06:49,540 --> 00:06:54,070 And then what we need to echo is that we need where they are with the product image. 91 00:06:55,860 --> 00:06:56,430 Product. 92 00:06:58,530 --> 00:07:00,900 Radack underscore image. 93 00:07:02,460 --> 00:07:09,690 And I'm going to explain something very important here, by the way, this fine. 94 00:07:09,930 --> 00:07:11,900 So I'm going to explain something important here. 95 00:07:11,910 --> 00:07:18,690 You might be wondering why we have a wired loop, but we even though we have a11 single product, the 96 00:07:18,690 --> 00:07:21,510 reason is because this is going to return an array. 97 00:07:21,990 --> 00:07:23,250 So this is going to be center array. 98 00:07:23,250 --> 00:07:27,240 But in this case, this array will contain only one single product. 99 00:07:27,810 --> 00:07:33,390 Therefore, we need to look over the array, but we will loop over one single product. 100 00:07:33,390 --> 00:07:34,380 So don't worry about this. 101 00:07:35,070 --> 00:07:41,820 Even though this is an array, there will only be one product for the small images. 102 00:07:41,820 --> 00:07:44,040 We need to display this small images. 103 00:07:44,040 --> 00:07:46,230 So here for example. 104 00:07:47,880 --> 00:07:48,270 Here. 105 00:07:48,390 --> 00:07:49,980 We have an error, so I cannot test. 106 00:07:49,990 --> 00:07:51,270 Now, let me finish first. 107 00:07:52,050 --> 00:07:54,480 So here I'm going to say I'm going to repeat the same course. 108 00:07:54,480 --> 00:07:55,860 I'm going to copy the race card. 109 00:07:55,980 --> 00:07:59,220 I'm going to copy this guy, and then I'm going to be sitting here. 110 00:08:01,050 --> 00:08:02,040 I'm going to peace with you. 111 00:08:03,010 --> 00:08:07,020 But but the first thing we need to say, product, underscore image. 112 00:08:08,070 --> 00:08:08,670 Just the image. 113 00:08:09,270 --> 00:08:14,850 In the second, we need to say we need to say we echo raw product image. 114 00:08:14,850 --> 00:08:20,820 We want to run the image, too, because we have remember, the columns are. 115 00:08:22,140 --> 00:08:26,520 Image, image product image two products image and product image four. 116 00:08:27,150 --> 00:08:28,650 So we have a new product image view. 117 00:08:28,650 --> 00:08:34,800 And then here we need to say a core product image three. 118 00:08:36,540 --> 00:08:37,380 And lastly. 119 00:08:40,300 --> 00:08:41,290 Product image for. 120 00:08:44,700 --> 00:08:55,260 And for the for the product information we have, the product name is is I think the product name is 121 00:08:55,260 --> 00:08:55,710 this one. 122 00:08:56,790 --> 00:08:58,650 Product name and here the product price. 123 00:08:58,650 --> 00:09:01,110 So let's display the product price here. 124 00:09:01,110 --> 00:09:04,110 I'm going to say echo product price. 125 00:09:09,530 --> 00:09:13,790 And here we have an echo product name. 126 00:09:17,110 --> 00:09:20,260 And instead of this and so instead of these 127 00:09:23,830 --> 00:09:33,310 paragraphs, I'm going to say echo and then product description this duration and we are good to go. 128 00:09:33,340 --> 00:09:34,270 Let me save and leave me. 129 00:09:35,500 --> 00:09:36,970 By the way, I have here an error. 130 00:09:36,970 --> 00:09:45,430 I should I should get this here because it can in brackets and then added here I should add it here. 131 00:09:45,430 --> 00:09:52,400 I have a problem should be here because there are should be inside the loop. 132 00:09:52,420 --> 00:09:55,630 So make sure that this scaling bracket after we have we are done. 133 00:09:56,500 --> 00:09:57,910 Let me now save and let's this. 134 00:09:59,740 --> 00:10:00,670 Let me save even now. 135 00:10:00,670 --> 00:10:04,360 Let me go back and test. 136 00:10:04,630 --> 00:10:09,520 So I'm going to refresh first and then I'm going to click on one of these products, less click on the 137 00:10:09,520 --> 00:10:11,420 first one and we have an error here. 138 00:10:11,420 --> 00:10:13,450 It says undefined variable. 139 00:10:13,780 --> 00:10:20,590 So the reason is because at the top, which we regret, a very important thing, which is include the 140 00:10:20,590 --> 00:10:21,160 connection. 141 00:10:21,160 --> 00:10:28,870 Remember, we need to see a server, server or slash connection. 142 00:10:31,000 --> 00:10:33,660 Let me be safe and let me test one more time. 143 00:10:33,690 --> 00:10:37,640 So now we should have the product refresh. 144 00:10:37,710 --> 00:10:41,990 As you can see, I'm going to get this product and I'm going to get me for the same four images. 145 00:10:42,000 --> 00:10:45,080 The reason is because I don't have other images. 146 00:10:45,090 --> 00:10:47,280 The I have only the same exact image. 147 00:10:47,280 --> 00:10:52,740 But if you add other images, they will be displayed here and the information is correct. 148 00:10:52,740 --> 00:10:57,360 So why choose 155 product details? 149 00:10:57,360 --> 00:10:57,810 Awesome. 150 00:10:57,810 --> 00:10:59,070 Why shoot? 151 00:11:00,120 --> 00:11:01,980 Let's make sure that everything is working. 152 00:11:01,980 --> 00:11:03,720 Let me click on the second product. 153 00:11:04,800 --> 00:11:12,240 So if you click on the second product, it's going to split again, the green bag 155 and everything 154 00:11:12,240 --> 00:11:12,810 is fine. 155 00:11:12,840 --> 00:11:14,940 Let me check the third one. 156 00:11:16,160 --> 00:11:16,610 Here. 157 00:11:17,210 --> 00:11:20,150 Black bag to 50. 158 00:11:20,840 --> 00:11:21,890 Awesome black bag. 159 00:11:21,890 --> 00:11:23,030 So it works successfully. 160 00:11:23,030 --> 00:11:30,830 And now we now have to get to a specific through a single product each with with that specific product.