#125 Create Laravel 8 E-Commerce Website | Checkout Page (III) | Add Multiple Delivery Addresses

In Part-125 of Advance E-com series, we will continue working on the Checkout page. In this video, we will add delivery addresses in checkout page. 1) Update checkout.blade.php file :- First of all, update checkout.blade.php file to add “Add”, “Edit”…

#125 Create Laravel 8 E-Commerce Website | Checkout Page (III) | Add Multiple Delivery Addresses

Source

In Part-125 of Advance E-com series, we will continue working on the Checkout page. In this video, we will add delivery addresses in checkout page.

1) Update checkout.blade.php file :-
First of all, update checkout.blade.php file to add “Add”, “Edit” and “Delete” Delivery Address links.

2) Create Route :-
Now create GET/POST Route for add/edit delivery address in web.php file like below :-
// Add/Edit Delivery Address
Route::match([‘GET’,’POST’],’/add-edit-delivery-address/{id?}’,’ProductsController@addEditDeliveryAddress’);

3) Create addEditDeliveryAddress function :-
Now create addEditDeliveryAddress function at ProductsController in which we will also return countries.

4) Create add_edit_delivery_address.blade.php file :-
Now create add_edit_delivery_address.blade.php file at resources/views/products/ path similar to account blade file which we will update further.

5) Update addEditDeliveryAddress function :-
Now update addEditDeliveryAddress function at ProductsController to insert the delivery address with in post method when id is empty.

6) Update checkout.blade.php file :-
Forget success_message session at checkout page after showing the success message. Do same for error message everywhere.

Now we can able to add new delivery addresses for the customer. In next video, we will work on edit/delete functionality for the delivery address as well.

Join this channel to get complete code:
https://www.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/join