1 00:00:00,720 --> 00:00:01,380 Welcome back. 2 00:00:01,770 --> 00:00:05,790 Now, what you need to do is that we need to let the user check out. 3 00:00:06,390 --> 00:00:13,860 So after the user adds new products into the cart and if they want to check out, we want to allow them 4 00:00:13,860 --> 00:00:14,550 to check out. 5 00:00:15,330 --> 00:00:18,150 So let's work on this check out. 6 00:00:18,750 --> 00:00:23,490 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 7 00:00:23,490 --> 00:00:29,010 a button and we don't need a button and instead we need an input and we need a form. 8 00:00:29,010 --> 00:00:35,430 So I'm going to create a form, I'm going to say form, and then I'm going to say action and value, 9 00:00:35,640 --> 00:00:36,450 action and method. 10 00:00:36,930 --> 00:00:38,280 So the method is based. 11 00:00:40,210 --> 00:00:46,510 And the the action is shake out. 12 00:00:47,750 --> 00:00:48,110 She? 13 00:00:49,510 --> 00:00:50,830 After that BHP. 14 00:00:54,560 --> 00:00:59,870 And I'm going to move I'm going to move this button over to the. 15 00:01:01,200 --> 00:01:04,810 To the check out form. 16 00:01:05,310 --> 00:01:13,290 However, I'm going to convert this button into input, so I'm going to take your input input and then 17 00:01:13,290 --> 00:01:15,420 I'm going to remove this completely. 18 00:01:16,170 --> 00:01:18,020 And I'm going to say here value. 19 00:01:18,030 --> 00:01:23,610 So the value is going to be check out or let's say proceed. 20 00:01:24,330 --> 00:01:31,530 Let's say check out, check out and what else do we want? 21 00:01:31,530 --> 00:01:32,400 We want a name. 22 00:01:32,400 --> 00:01:33,240 I'm going to say name. 23 00:01:34,230 --> 00:01:34,920 Check out. 24 00:01:36,960 --> 00:01:39,430 We need the name and we need a value. 25 00:01:39,580 --> 00:01:41,310 Let me check this in the browser now. 26 00:01:41,880 --> 00:01:43,380 So we should have a button. 27 00:01:43,380 --> 00:01:46,080 Let me go to the check out. 28 00:01:46,290 --> 00:01:47,440 Let me go to the card. 29 00:01:47,610 --> 00:01:50,700 So in the card we have here, check out the button. 30 00:01:51,540 --> 00:01:57,270 So now what we want to do is that we need to work on the check out page. 31 00:01:57,660 --> 00:02:06,600 Remember, we have here the check out page and the check out page has is email and we need to convert 32 00:02:06,600 --> 00:02:07,350 this check out. 33 00:02:07,350 --> 00:02:08,580 I'm going to rename this page. 34 00:02:09,810 --> 00:02:11,450 We need to convert it into P2P. 35 00:02:11,460 --> 00:02:13,770 So I'm going to say check out that being HP. 36 00:02:15,240 --> 00:02:17,850 Now this is this is the checkout page, if I click on it. 37 00:02:20,670 --> 00:02:23,150 If they click on it, it's not going to take me to the check out. 38 00:02:23,160 --> 00:02:23,520 Why? 39 00:02:23,910 --> 00:02:29,550 Because we need to say here in this input, we need to see a type submit. 40 00:02:30,790 --> 00:02:33,210 The type must be submit because this is a button. 41 00:02:33,840 --> 00:02:35,730 Let me refresh and try one more time. 42 00:02:37,520 --> 00:02:38,330 So let me hear. 43 00:02:38,330 --> 00:02:40,370 Click on check out if I click on check out. 44 00:02:40,790 --> 00:02:42,830 Now it's going to take me to the checkout breach. 45 00:02:43,760 --> 00:02:44,990 Now in the check out page. 46 00:02:44,990 --> 00:02:53,120 What we want to do is that we need to work on this form and submit this form and allow the user to feel 47 00:02:53,120 --> 00:02:55,160 the information and then proceed to payment. 48 00:02:55,640 --> 00:02:57,710 So let me heading over to the check out page. 49 00:02:58,660 --> 00:03:00,100 Now in the check out page. 50 00:03:00,880 --> 00:03:02,770 What we want to do is that we want. 51 00:03:03,860 --> 00:03:05,690 Here to add a form. 52 00:03:05,690 --> 00:03:07,370 We already have a form which is great. 53 00:03:07,370 --> 00:03:08,930 We don't have to do anything special. 54 00:03:08,930 --> 00:03:10,970 We just need to add. 55 00:03:11,270 --> 00:03:13,580 We just want to make this form active. 56 00:03:13,580 --> 00:03:15,680 We want we want to activate this form. 57 00:03:16,370 --> 00:03:21,260 And to do this we can just add the action and method. 58 00:03:22,130 --> 00:03:25,370 So I'm going to say here, action and method. 59 00:03:25,940 --> 00:03:32,480 So the action is going to be is going to be a let me get a file for this. 60 00:03:32,480 --> 00:03:38,480 I'm going to say I'm going to hit a new file in the circled place order. 61 00:03:38,480 --> 00:03:40,910 I'm going to say place underscore. 62 00:03:40,910 --> 00:03:42,210 Order that. 63 00:03:44,960 --> 00:03:48,110 And in the check out here, we need to say please. 64 00:03:50,480 --> 00:03:51,530 Underscore or. 65 00:03:52,930 --> 00:03:56,740 Got BHP and we need to, we need to set a method. 66 00:03:56,740 --> 00:03:57,610 And what is a method? 67 00:03:58,360 --> 00:03:59,500 The method is based. 68 00:04:01,770 --> 00:04:06,000 So here what we have is that we have the name and the name has a name. 69 00:04:06,600 --> 00:04:10,050 The email has a name, the phone number has a name. 70 00:04:11,010 --> 00:04:12,780 The city has a name. 71 00:04:12,780 --> 00:04:17,520 You need to make sure that all of them have names and the address has a name. 72 00:04:18,330 --> 00:04:23,250 The submit also has it doesn't have a name, so we need to give it a submit button. 73 00:04:24,450 --> 00:04:30,780 Amy When you say your name and the name is going to be, let's say, something else other than check 74 00:04:30,780 --> 00:04:34,290 out, I'm going to say place will order place. 75 00:04:36,580 --> 00:04:39,940 Lease order, lease, underscore order. 76 00:04:40,840 --> 00:04:45,790 And here I'm going to say the value is going to say leasehold lease. 77 00:04:48,110 --> 00:04:54,290 Order now in the in the lease lease order BHP. 78 00:04:54,860 --> 00:04:56,560 We need to work on the code here. 79 00:04:56,960 --> 00:05:03,440 So the code here is going to first check whether user clicked on this button or not and that can be 80 00:05:03,440 --> 00:05:08,630 done by using the if statement if is set. 81 00:05:10,100 --> 00:05:11,590 If a set lost. 82 00:05:14,730 --> 00:05:15,180 Lost. 83 00:05:16,400 --> 00:05:19,880 And then we want to say please. 84 00:05:21,160 --> 00:05:21,670 Order. 85 00:05:22,880 --> 00:05:27,450 So if the place or order is set, we need to do something else. 86 00:05:27,470 --> 00:05:31,130 We need to take the user to the homepage or do nothing. 87 00:05:31,190 --> 00:05:37,610 Basically do nothing because the user will not be able to come to this page unless they have something 88 00:05:37,610 --> 00:05:42,950 in the cart and unless they unless unless something is in the cart. 89 00:05:43,670 --> 00:05:46,340 So we need to say, let's order.