#208 Laravel 8 E-commerce | Cancel Order Process (III) | Amazon Cancel Order like Functionality

Votre vidéo commence dans 20
Passer (5)
bibliothèque images IA

Merci ! Partagez avec vos amis !

Vous avez aimé cette vidéo, merci de votre vote !

Ajoutées by admin
97 Vues
In Part-208 of the Laravel E-commerce series, we will continue working on Cancel Order functionality like Amazon.

We will add cancel reasons this time and change the cancel functionality process.

We are going to add below cancel reasons like mentioned in Amazon:-
Order Created by Mistake
Item Not Arrive on Time
Shipping Cost too High
Found Cheaper Somewhere Else

1) Update orders_logs table :-
First of all, we will update the orders_logs table with "reason" and "updated_by columns" with varchar data types. We can do it with Migration commands or simply from PHPMyadmin.

2) Add Modal Pop-up for Orders Cancellation:-
Now we will search for Bootstrap Modal Pop-up at Google with keyword "modal popup in HTML" for Orders Cancellation with below link:-
https://getbootstrap.com/docs/4.0/components/modal/

We will add this Modal Pop-up in the orders_details.blade.php file located at resources/views/front/orders/ and will update it with the Cancellation form.

This time we will use the form with post method with reason field as well.

3) Update Order Cancel Route:-
Now we will add Post method as well in Order Cancel Route in web.php file like below :-
// User Order Cancel Route::match(['get','post'],'/orders/{id}/cancel','OrdersController@orderCancel');

4) Update OrderCancel function :-
Now we will update the OrderCancel function at OrdersController with the Post method in which we will save reason as well in the orders_logs table. Also, we are going to update the "User Cancelled" status when an order gets cancelled by the user.

5) Update front_script.js file:-
Update Cancel Order jQuery script at front_script.js file to add validation for reason as well. We will show an alert if the reason is not selected.

6) Update orders_details.blade.php file (for Admin) :-
Now update orders_details.blade.php file located at resources/views/admin/orders/ to show reason as well with "User Cancelled" status.

Follow the below playlist to make a Laravel E-commerce Website like Amazon:-
https://studio.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/playlists

Join this channel to get complete code/support:
https://www.youtube.com/channel/UCExO2i-tLU1NyVZD6zOJQlw/join
Catégories
E commerce Amazon

Ajouter un commentaire

Connectez-vous ou inscrivez-vous pour poster un commentaire.

Commentaires

Soyez le premier à commenter cette vidéo.