Welcome back.
Now, what you need to do is that we need to let the user check out.
So after the user adds new products into the cart and if they want to check out, we want to allow them
to check out.
So let's work on this check out.
So in order to do this, I'm going to head on over to the cart that B2B and you'll find that we have
a button and we don't need a button and instead we need an input and we need a form.
So I'm going to create a form, I'm going to say form, and then I'm going to say action and value,
action and method.
So the method is based.
And the the action is shake out.
She?
After that BHP.
And I'm going to move I'm going to move this button over to the.
To the check out form.
However, I'm going to convert this button into input, so I'm going to take your input input and then
I'm going to remove this completely.
And I'm going to say here value.
So the value is going to be check out or let's say proceed.
Let's say check out, check out and what else do we want?
We want a name.
I'm going to say name.
Check out.
We need the name and we need a value.
Let me check this in the browser now.
So we should have a button.
Let me go to the check out.
Let me go to the card.
So in the card we have here, check out the button.
So now what we want to do is that we need to work on the check out page.
Remember, we have here the check out page and the check out page has is email and we need to convert
this check out.
I'm going to rename this page.
We need to convert it into P2P.
So I'm going to say check out that being HP.
Now this is this is the checkout page, if I click on it.
If they click on it, it's not going to take me to the check out.
Why?
Because we need to say here in this input, we need to see a type submit.
The type must be submit because this is a button.
Let me refresh and try one more time.
So let me hear.
Click on check out if I click on check out.
Now it's going to take me to the checkout breach.
Now in the check out page.
What we want to do is that we need to work on this form and submit this form and allow the user to feel
the information and then proceed to payment.
So let me heading over to the check out page.
Now in the check out page.
What we want to do is that we want.
Here to add a form.
We already have a form which is great.
We don't have to do anything special.
We just need to add.
We just want to make this form active.
We want we want to activate this form.
And to do this we can just add the action and method.
So I'm going to say here, action and method.
So the action is going to be is going to be a let me get a file for this.
I'm going to say I'm going to hit a new file in the circled place order.
I'm going to say place underscore.
Order that.
And in the check out here, we need to say please.
Underscore or.
Got BHP and we need to, we need to set a method.
And what is a method?
The method is based.
So here what we have is that we have the name and the name has a name.
The email has a name, the phone number has a name.
The city has a name.
You need to make sure that all of them have names and the address has a name.
The submit also has it doesn't have a name, so we need to give it a submit button.
Amy When you say your name and the name is going to be, let's say, something else other than check
out, I'm going to say place will order place.
Lease order, lease, underscore order.
And here I'm going to say the value is going to say leasehold lease.
Order now in the in the lease lease order BHP.
We need to work on the code here.
So the code here is going to first check whether user clicked on this button or not and that can be
done by using the if statement if is set.
If a set lost.
Lost.
And then we want to say please.
Order.
So if the place or order is set, we need to do something else.
We need to take the user to the homepage or do nothing.
Basically do nothing because the user will not be able to come to this page unless they have something
in the cart and unless they unless unless something is in the cart.
So we need to say, let's order.