And then I'm going to basically put her in the order details.
I'm going to base this here and then I'm going to again close it down because we don't want to work
on it.
Let me hear.
Well, everything.
And that's it.
Now we need to work on the order details area, this area.
So in order to work on this area, we need to copy again a code from the account in order to not to
keep the code from scratch.
So we have this code.
Remember these orders.
I'm going to close this orders and then I'm going to copy it.
I'm going to copy this order.
And then I'm going to pasted here in the order details.
I'm going to paste it here.
And we need to change many things.
The first thing is that we need to display the order we need to display instead of order first.
First, I'm going to change the state to order details.
Details.
And then instead of displaying the order itself, we need to display the products that belong to that
order.
So to do this, we need to check the database in the database.
What we can display is that we can display each single order has, of course, the product we need to
display the product ID the we actually don't need to display the product.
We need to display the product name, the product image and the product price and possibly the quantity.
Yes, the quantity is important.
And that's it.
That's it.
So we need to display these things.
We need can display the name, the image, the price and the quantity.
So I'm going to say your product.
Product name.
And then.
Project.
Product image.
Price.
Quantity.
Product name.
The image is going to be with the name, so there is no need for or another column.
So product name and then image price.
Quantity image.
We have the image, then price.
And quantity.
180.
And here I'm going to just say product, because this product column will contain the product as well
as the the image.
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,
now we need this and we don't need this.
So I'm going to remove this.
We don't need this and we don't need this either.
I'm going to remove this.
And for now, I'm going to also remove remove this, and I'm going to keep only one.
I'm going to just keep these two.
So I'm going to remove the goods and I'm going to remove this as well.
And I'm going to remove also this peach speech.
Good.
I'm going to remove it for now, but I'm going to get it later because we need to do the same.
So I'm going to remove it for now just to show you the page.
So let me hit it over to the browser and let me go to the order underscore order details.
I'm going to go to the here I'm going to say order underscore details that BHP.
So if I go to the order details, as you can see, I'm going to get this table product price, quantity
and it says details and that's it.
We need now to work on this.
But before before I do this, let me fix here I have a problem.
I need to increase actually the header part I'm going to say here margin top five.
And let me refresh this.
This should fix it.
And instead of saying orders, I'm going to say order details.
Order details.
And we have here the beginning, the product, price, quantity, and we can display something else
or we just can keep it simple.
Let's keep it like this for now, and then we can later fix this.
So let me now work on the side.
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
product.
So to do this, the first step is that we need to include the connection to the server.
I'm going to say include and then I'm going to say server server or first for connect connection that
BHP and then we need to pass the product ID from the account.
So if you are here in the order, if a user clicks on details, which is this forum where you need,
we need to take the user to the order details that BHP.
So here in the forum we need to say method and the method could be just, just get requests.
We don't have to use a request for this and the method and the action.
So the action could be and should be order underscore details that BHP.
And this button we to give this button name I'm going to give it any I'm going to say name is equal
to is equal to order.
Details.
The deals underscore Raytheon.
And we need to pass the order.
We need to say your input and then time.
Type hidden.
And then we need to say value and the value is going to be equal to the order value and the value is
going to be equal to BHP and then echo and then we need to echo the role and we need to say here order
80, order underscore I.
And we need you to say the name and the name is going to be order underscore item.
So we have these two inputs now.
And let me first check the account page.
I'm going to go through the accounts that BHP.
And as you can see, this is the butter.
This is the butter.
These are the buttons.
Let me now go to the order details and work on this part.
So in the order details, we need to say if and then we need to check is set is set to get, get.
Order details Beaton and.
Is set.
Get.
Order IED.
So if we have these two, what we need to do is that we need to.
We need to connect to the database and get the details.
So I'm going to say here are connections.
I'm going to first get the the order the order ID.
I'm going to say order.
It is going to be equal to get.
And then.
Order.
Underscore.
And then we need to connect to the database.
So I'm going to take an icon and then prepare and then select.
Select all from.
From order items.
Order underscore items where where order on score ID is equal to question mark.
Let me see here.
Where.
And then I'm going to store this in a variable called statement.
I'm going to say here is the MP is equal to this.
And then we need to say here is the empty and then bind theorem and then we need to bind the order in.
We say, here, order it.
And we just need to execute.
We need to say, is he empty?
Execute.
And lastly, we need to.
See a statement and then get results and then we can store the result in a variable called order.
And the score details.
The order details is going to be equal to this else.
If we don't have these things, if we don't have if the order details about it or the order if we are
not found.