Welcome back.
Now, what we need to do is that we need to head on over to the single product at B2B and in the single
product that B2B we have access to.
We have access to the product.
So at the top.
At the very top and before before the email code, we need to add it up before the 40 million to our
B2B and then we need to get first.
We need to get the product.
So the product data is stored in a get in the get request.
So we, we first need to make sure that the that we have the product.
So I'm going to say if statement I'm going to say is F is set get.
Get and then bronze 80 on underscore it.
So if we have if we have the product, maybe remember the the the parameter, the get parameter is product
underscore.
And therefore here we need to say if is set get front any then we can now make a request to the database
and get the product ID.
Else.
We need to return back to the homepage.
So else, if we don't have the product, maybe we need to say, Hey there.
Location.
And then.
Hey there.
Location.
Index, not BHP.
We need to go back to the.
We need to go back to the homepage.
So let me test the limits.
So if I can go to the single product without, as you can see, without specifying the, the product,
adding if it's right again single underscore product.
If I try to go to the single product without specifying it, it's going to take me to the homepage because
we don't have a product.
So this is this.
No project I need was a given.
So we need to get the product ready in case we have to make a request.
So I'm going to copy records from the from the server.
Get, get, get featured products.
We have this code, so I'm going to copy this code.
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.
So here we need to say, let me push this first.
Let me push this first here.
I'm going to say con prepare select all from products.
But we don't need to say or we need to say actually limits limits one, because we need only one product
and one before limit.
We need to say where, where?
Product I.D..
Is equal to a question mark.
And the limit to the limit now is not important because the product is unique.
So there is no need to say limit product.
I do.
I now want to say statement is empty and then we need to say bind.
Mind.
Underscore params and then we to pass here the the the type the type is integer and the second parameter
is the.
So we need to get to a variable called product 80.
Project underscore it.
So the end is going to be equal to get get project I.
Bronek.
I.
And then we need to say we capacity to protect.
I and here it should be.
Bind baram knots params bind bar.
So make sure that this building is correct.
And let's also use the my is.
You know, I.
And that's it.
Now we need to say product here.
It's going to be not products.
It's going to be only product, product and then get results, statement, get results.
And we can use this product now in the bottom and the bottom.
Let me instead of displaying the product, the product is here.
So the product here, single product.
So here, instead of displaying the image like this, I'm going to remove this image and then I'm going
to say here BHP and then HP.
But before I actually I forgot something important, which is the while.
So we need to say here while and then actually we need first each HP and then while let me give myself
some space and show you how this is going to look like while and then while and then only want one single
curly bracket.
And then while the all is equal to product product, fetch a source.
It.
A source.
And then at the end.
The end of this.
This, the end of this, this.
So here this.
Then this is the end.
So here we need to say.
BHP, close the Kennedy bracket and then close the BHP angular racket.
And then he went on to say And then echo.
And then what we need to echo is that we need where they are with the product image.
Product.
Radack underscore image.
And I'm going to explain something very important here, by the way, this fine.
So I'm going to explain something important here.
You might be wondering why we have a wired loop, but we even though we have a11 single product, the
reason is because this is going to return an array.
So this is going to be center array.
But in this case, this array will contain only one single product.
Therefore, we need to look over the array, but we will loop over one single product.
So don't worry about this.
Even though this is an array, there will only be one product for the small images.
We need to display this small images.
So here for example.
Here.
We have an error, so I cannot test.
Now, let me finish first.
So here I'm going to say I'm going to repeat the same course.
I'm going to copy the race card.
I'm going to copy this guy, and then I'm going to be sitting here.
I'm going to peace with you.
But but the first thing we need to say, product, underscore image.
Just the image.
In the second, we need to say we need to say we echo raw product image.
We want to run the image, too, because we have remember, the columns are.
Image, image product image two products image and product image four.
So we have a new product image view.
And then here we need to say a core product image three.
And lastly.
Product image for.
And for the for the product information we have, the product name is is I think the product name is
this one.
Product name and here the product price.
So let's display the product price here.
I'm going to say echo product price.
And here we have an echo product name.
And instead of this and so instead of these
paragraphs, I'm going to say echo and then product description this duration and we are good to go.
Let me save and leave me.
By the way, I have here an error.
I should I should get this here because it can in brackets and then added here I should add it here.
I have a problem should be here because there are should be inside the loop.
So make sure that this scaling bracket after we have we are done.
Let me now save and let's this.
Let me save even now.
Let me go back and test.
So I'm going to refresh first and then I'm going to click on one of these products, less click on the
first one and we have an error here.
It says undefined variable.
So the reason is because at the top, which we regret, a very important thing, which is include the
connection.
Remember, we need to see a server, server or slash connection.
Let me be safe and let me test one more time.
So now we should have the product refresh.
As you can see, I'm going to get this product and I'm going to get me for the same four images.
The reason is because I don't have other images.
The I have only the same exact image.
But if you add other images, they will be displayed here and the information is correct.
So why choose 155 product details?
Awesome.
Why shoot?
Let's make sure that everything is working.
Let me click on the second product.
So if you click on the second product, it's going to split again, the green bag 155 and everything
is fine.
Let me check the third one.
Here.
Black bag to 50.
Awesome black bag.
So it works successfully.
And now we now have to get to a specific through a single product each with with that specific product.