Welcome back.
Now, what I'm going to do is that I'm going to display instead of on hold, I'm going to say not paid.
You can say on hold or you can say you're not paid or whatever you want to say.
But it's very important to be descriptive.
And you you need to know these key words, because these key words will will will help, you know,
the determining the status of your order.
So I personally used to use on hold.
You can use not paid.
I think not.
But it is better if you want to.
If you are going to display this to the user and I think you are, then it's better to say not paid
because an all the user might be confused.
So if the year whenever we Keith in order let me remind you if you go back to the if you go back to
the place order the default value the default value.
As soon as the user creates an order as user, as soon as the user makes an order, the order status
is on hold.
You can use whatever again.
You can use whatever keyword you want.
You can use not paid whatever you want.
Let's say not paid.
Not to be.
So by default, it's not going to be it's going to be not paid because the user by default is going
to place the order and then pay for the for the products.
So let me let me change this to not paid and let me let me keep it small later.
Because if I use if I compare, I don't want to
do extra work.
So here in the database, we also need to change the old values of the old orders that they have created.
So the old orders order in the or disable these the orders that they have already created.
You can again use whatever key keyword you want, let's say not paid instead of on hold.
Not be it.
I'm going to say not be.
And for example, suppose that this was paid.
I'm going to assume that this was paid.
So if it's fate, I'm going to say you deliver.
For example, it's delivered, let's say.
Let's say delivery, for example, this.
This.
Let's say that this was delivered for for for the sake of this thing.
I'm going to say that I'm going to assume that this was delivered.
So in the um.
Now, if I refresh, guess what if I refresh?
These these orders are not paid except for this.
This one was delivered.
So what I'm going to do now is that if the order was not paid and if the user clicks on details, we
need to display a button that would allow the user to pay for that product so that we ship that product
or products to the user.
So to do this in the order details, we need to check that.
And to do this again, we need to go back to the account and the and here in the account, we need to
create a new input.
We need to say input and then we need to say type hidden and then we need to see value and then the
value is going to be B2B and then echo and then draw.
And then we need to do to store the the order status here.
I'm going to say order status and then I'm going to close the.
You need to be here.
And then what I'm going to do is that I'm going to say your name is equal to order.
Scott.
And then now in the in the order details, we need to receive that order status.
So at the top, remember at the top here, we need to say order underscore status is equal to post and
then order, order, underscore status status.
And now in the bottom, in the bottom, we need to display a button that's going to allow the user to
pay.
If the order if the order status if the order status is not paid, we need to display here in the details.
We need to display a button that would allow the user to pay.
So here I'm going to add a statement.
I'm going to say here, if I'm going to keep it outside of the table, actually, it should be here
outside the table.
We need to use speech B2B and then we need to check the we need to check the order status.
We have to say if.
Order.
Status is equal.
Is equal to not be.
Then we need to display a we need to display a form.
So I'm going to say here, if and then I'm going to close this, let me show you what I'm going to do.
So let me remove this line.
Now, let me also remove this area.
And then between I'm going to display each because I'm going to display the speaker and then I'm going
to close the curly bracket at the end.
I'm going to close the if statement curly bracket.
And here in between, only if the if the order status is not made, then I'm going to use a form.
And then inside that form, I'm going to say input.
Try.
I submit.
And value.
They now?
And I'm going to also give it a style.
I'm going to say here.
Style is equal to flight, right?
Let's also give it a glass.
I'm going to say glass beaten.
And we can also say between primary.
Leaving us.
Let me show you how awesome this is.
So let me go back to the account page.
Now, in that card page, if the order is not paid and if I click on details here, there will be a
button that says Pay now, because the order the order is not paid yet is not paid, the status is not
paid.
However, if the order is delivered is already was already delivered, then right in the detail.
There is no button.
They should there shouldn't be about it here because the order was delivered already.
So now what you need to do is that you need to know the keywords that you are going to be using.
So the keywords that I'm going to be using are not paid, delivered or being shipped or shipped.
So the keywords lady me here to a comment.
At the top here.
I'm going to just add a comment to let you know the key words that I'm going to be using.
So the keywords that I'm going to be using are not to be if the order obviously if the order is not
yet delivered, if the order was if the order was delivered and shipped.
If the order was shipped but not but but has not been delivered yet.
So I'm going to be using three keywords.
You can also use bait in case you want to add extra a monitoring system, but they wouldn't recommend
making the system too complicated.
I think not beat and then shipped as soon as the user pays.
You need to check this.
You need to change the status to ship and then delivered after the order.
After you make sure that the order was delivered and the user
received the package.