Laravel Multi Vendor Ecom

Опубликовано: 01 Январь 1970
на канале: Stack Developers
478
10

►Laravel 9 Tutorial from the beginning:-    • Laravel Multi Vendor Tutorial  

In Part-168, we will start making our website secure by preventing disabled and out-of-stock products to order.

So we are going to work on two things to make our website secure:-
1) Prevent Disabled Products from order
2) Prevent Out of Stock Products to order

First, we are going to prevent disabled products to order with the below steps:-

1) Create getProductStatus function:-
We will create the getProductStatus function at the Product model to check the product status.

2) Create deleteCartProduct function :-
Now, we will create the deleteCartProduct function at the Product model to delete products from the cart.

3) Update checkout function :-
Now update the checkout function in ProductsController to check the status of every ordered product and in case if any product is disabled then we will delete that product from the user cart and send him back to the shopping cart with the error message.

You can see in the video that we are able to prevent users to order for disabled products.

Now we will prevent Out of Stock Products to order

4) Create getProductStock function:-
We will create the getProductStock function at the Product model to return the product stock.

5) Update checkout function:-
Now, we will update the checkout function once again at ProductsController to check every ordered product for its stock. And if in case the stock does not exist then we will delete that product from the user cart and send him back to the shopping cart with the error message.

You can see in the video that we are able to prevent users to order for out of stock products.

In the next video, we will do more website security points.

Thanks for watching :)

►Laravel 9 Tutorial Playlist (Create Multi-Vendor E-commerce Website) -    • Laravel Multi Vendor Tutorial  

►Click here to subscribe for Laravel & other updates -    / stackdevelopers  

Popular Stack Developers Series that can help you:-

►React JS Tutorial for Beginners with Laravel 9 -    • React JS Tutorial with Laravel for Be...  

►Laravel Tutorial for Beginners -    • Laravel Tutorial for Beginners | Adva...  

►GIT Tutorial for Beginners -    • Git Tutorial for Beginners | Create y...  

►Laravel API Tutorial -    • Laravel API Tutorial | Create API fro...  

►Laravel Interview Questions -    • Laravel Interview Questions & Answers...  

►jQuery Tutorial -    • jQuery Tutorial  

►Laravel Basic E-commerce Series -    • Make Admin Panel / E-commerce Website...  

►Laravel Dating Series -    • Make Dating / Social Networking Websi...  

►Join this channel to get the complete source code of all series:
   / @stackdevelopers  

Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates -   / stackdevelopers2  
►Join Facebook Group to resolve your queries -   / stackdevelopers  
►Follow on Instagram -   / stackdevelopers2  
►Follow on GitHub - https://github.com/stackdevelopers

#laravel9 #laravel9tutorial #laravel


Смотрите видео Laravel Multi Vendor Ecom онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Stack Developers 01 Январь 1970, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 478 раз и оно понравилось 10 людям.