Welcome back.
Now, what we need to do is that we need to work on the products.
So what I'm going to do is that I'm going to open up a new.
I'm going to create a new file for the products here in the admin environment.
Let me close down everything because we don't need any of these.
Now in the admin we need to add we need to create a new file here.
I'm going to create a new file called Products Products that unfortunately the code is going to be very
similar to the to the orders to the index.
So I'm going to copy the code from the index and then I'm going to basically in the products.
However, we need to edit a few things.
Let's start from the beginning.
From the beginning we need the header and then we need to make sure that the user is logged in and then
we need to assassination.
However, we need to say select account all from as total records from products and then we need to
say execute, bind, result, everything's fine.
And then we need to say, by the way, this idea, I'm not going to be using it, you can use it, but
it's I don't think that we need it anymore, but let's keep it.
In case you want to add more features, then we can say gone, prepare, select all from products and
then.
We say statement execute and then products.
Products is equal to statement gets result and then we scroll and the year we say products products
and here we say product I.D. or ID and then product name, product name and then product product.
Let's display the product price.
And then product.
Actually, I think the image is better to display the image.
First, let me say your image first.
So I'm going to say here.
Product image.
Product image and the name price.
Also, we have category and we have color.
You can display everything product.
Color.
And we also have the special offer, if you want to add special offer.
Product.
Of her.
And that's it, Laney.
Now add also the edit and delete.
So here we have.
Um, product news we need to say products as product, product and then product.
And then product ready and then or product product and then product image.
And the by the way, the image cannot be like this cannot be displayed like this.
We need to use image here.
We say image and then sauce is equal to and then B2B and then we see we see we said we display the image,
but we need to add that because we need to go back first.
We need to go back from this admin and then we need to enter the assets.
We need to say assets.
Let me say let me hear, say, say before or after the echo.
I'm going to say that the assets.
Assets for life image.
Assets images.
Assets.
Images.
And then.
First lash, then dot and then product image.
This is for the image.
And it's important also to say style and then when.
76.
And also high.
70.
Next, we need to display the products.
Name.
Product name.
And then product by product price.
And then project.
Special offer.
And then the category and the color.
Category and color.
Product.
Color.
Let me now save on let me head on over to the browser.
Let me make sure that they don't have any problems.
So that's it.
Let me now refresh.
And here, if I click on products, I have a problem.
So in line 110, so in line 110, we have a problem here, 110.
So we should say product products.
So let me refresh one more time.
And we have all of the products.
As you can see, it looks outstanding.
I can't believe how awesome this is.
As you can see here, all of the products that you have, all of the products and they are paginated
you can click on to and you are going to get more products.
You can click on next.
Next, you are going to just keep getting more products.
It's just amazing.
And if you want to display the dollar sign right here, you can say here.
Echo and then dollar sign and then dot and then the product price.
And here also you can see a product special offer and then dot and then you can display percentage because
the special offer is going to be percent percentage, percentage like this and then semicolon.
Now we are going to get percentages here and here the prices so it now it's amazing.