#126 Make Laravel 8 E-Commerce Website | Checkout Page (IV) | Edit/Delete Delivery Address

In Part-126 of Advance E-com series, we will continue working on the Checkout page. In this video, we will work on edit/delete functionality for the delivery address as well. 1) Update checkout.blade.php file :- First of all, update checkout.blade.php file…

#126 Make Laravel 8 E-Commerce Website | Checkout Page (IV) | Edit/Delete Delivery Address

Source

0
(0)

In Part-126 of Advance E-com series, we will continue working on the Checkout page. In this video, we will work on edit/delete functionality for the delivery address as well.

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

2) Update add_edit_delivery_address.blade.php file :-
We will update add_edit_delivery_address.blade.php file to add condition for action of the form. We will pass address id if user tries to edit delivery address. Also we will show delivery address existing details in delivery address form that user can update.

3) Update addEditDeliveryAddress function :-
Make sure to add condition at addEditDeliveryAddress function when id is not empty. We will get the posted data from delivery address form and will update that.

Now we will work on deletion of delivery address.

4) Create Route :-
Create GET route for deleting delivery address in web.php file like below :-
// Delete Delivery Address
Route::get(‘/delete-delivery-address/{id}’,’ProductsController@deleteDeliveryAddress’);

5) Create deleteDeliveryAddress function :-
Now create deleteDeliveryAddress function at ProductsController in which we will delete delivery address with address id.

6) Update front_script.js file :-
Update front_script.js file to add jQuery for confirm of the delete address with class addressDelete.

Now we can able to delete delivery address as well.

Thanks for watching 🙂

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

0 / 5. 0