Filter data with jquery ajax in ecommerce-2 | Django eCommerce Website | | Django Tutorials

preview_player
Показать описание
Django eCommerce Website | Filter data with jquery ajax in eCommerce-2 | Django Tutorials. We will go to implement the data filtration. I have divided the data filtration into two parts. In the first part, we will collect the checked filter. In the second part, we will send the collected filter to the server via jquery ajax and filter the data in the database, and fetch the data. After fetching the data we will show the fetched data in right-side content. We will mainly do the following tasks. This is our first part of data filtration. In this video, we will send the selected filter to the server and return the filtered data to the browser and show the data.
- Send selected checkbox data to the server
- Filter the distinct data in the database
- Send the data to the template
- Return template to a string
- Send string template to the browser
- Show the template the product section
Please like this video and subscribe to the channel for regular updates. I am updating all source code on GitHub.
#djangoTutorials #pythonDjango #DjangoModels #searchData #django3 #DjangoAdmin #pythonTutorials #djangoEcommerceWebsite #codeArtisanLab
Thanks for watching this video. :) :)

-----------------------------------------------
LIKE ✦ COMMENT ✦ SHARE ✦ SUBSCRIBE
-----------------------------------------------

## Tutorials
--------------------------

## In this series, we will cover the following things
- How to setup or install Django 3
- How to create and activate the virtual environment
- Learn Django from scratch
- Learn Django with an Ecommerce website
- How to create a project from scratch with Django 3
- How to create an application in Django 3
- How to create a model in Django 3
- How to register model in Django admin
- How to customize Django admin panel
- How to customize Django admin panel list view
- How to create model fields in Django 3
- How to create migration in Django 3
- How to migrate model in Django 3
- How to create an admin panel in Django 3
- How to work with admin panel in Django 3
- How to create templates in Django 3
- How to fetch data from database in Django 3
- How to show data in Django templates
- How to implement pagination in Django 3
- How to upload image in Django
- How to insert data database with Django 3
- How to make a dynamic website in Django 3
- How to create a website in Django 3, bootstrap 4, and SQLite
- How to create an eCommerce app in Django 3 and SQLite
- How to create a Django project from scratch
- How to run the server in Django 3
- How to Customize Django Admin
- How to set the order of the Django model in the admin
- How to add HTML element in Django admin list display
- How to create eCommerce product filters
- How to create a brand list page on the Django eCommerce website
- How to create a product list page with filters on the Django eCommerce website
- How to show image in Django admin list display
- How to create the boolean field in the Django model
- How to show product list according to the specific category
- How to show product list according to the specific brand
- How to fetch related data directly in Django template
- How to use model set in Django template
- How to use template context processor
- How to return data from context template
- How to use include template tag to include the partial template in another template
- How to search data in the database
- How to filter the database result
- How to show related products
- How to fetch data in limit
- How to define data limit
- How to get multiple checkbox values in a javascript object
- How to create a dynamic key in a javascript object
- How to implement checkbox filter functionality with jquery ajax
- How to filter the data with jquery ajax in Django
- How to return template to string in Django
Рекомендации по теме
Комментарии
Автор

This worked great thanks very much!
Please could you advise - if i have 3 color options for a product, each with a different image to show the variation. Is it possible to show the product varied images when filtered instead of it currently showing 3 of the same image and instead of using .distinct() ?

JK-nxwd
Автор

Brother thanks a lot for grateful tutorial.
I have small problem that the filter not working while iam following ur code step by step.
any help plz

samirsalah
Автор

How do you paginated the filtered products? I'm new to Javascript and so it's a bit confused for me on how to do this. I got pagination for products that are not being filtered in another view such as store's view. But the filter_data view which I implemented as how you instructed works well - but my pagination from store's view appears underneath the filtered products - but when trying to use it - the paginated pages just show non-filtered products.

arghxxx
Автор

sir dekh 2 model hai 1 store or 2 product to jab me user ko product upload Kar ne Dera hu na tu wo apna user se related store ko bhi select Kar sake foreign key ke through Jo store uske user name se banawa ho

AmeerHamza-xkzd
Автор

sir dekhe 2 model hai 1 store or 2 product to jab me user ko product upload Kar ne Dera hu na tu wo apna user se related store ko bhi select Kar sake foreign key ke through Jo store uske user name se banawa ho this is my problem

movieofficial
Автор

Hello, the objects are showing in console but not on template what might be the problem

xy
Автор

Clicking on an item from the filtered list doesn't open up the detail page anymore.... it does work before filtering tho. no idea what is wrong.

FIXED: I was loading my static javascript in the html file containing the list of items instead of in base.html file, that's why the the function within the filter.js file wasn;t executing.

timetosleep
Автор

Sir ajax call mera pas arhi hai data sai filter ho rha hai ajax me but product-list k Template me sb products show ho rhi hain yaa issue fix ni rha mera sy

bilalzafar
Автор

what if I want to clear the selection after filter?
maybe I want a link or button to clear the filter

chilloutshow
Автор

I think min max price filter bhi hona chahiye or acha lagta filter bar

movieofficial
Автор

Sir product view counting bhi hona chahiye Jese youtube me hota hai

movieofficial
Автор

can anyone tell which algorithm he used for filtering????

AmanSingh-vbvu
Автор

Sir I think min max Price filter bhi hona chahiye

movieofficial
Автор

Sir muje aapka guidance chaiye filtering mai

krishnagupta
Автор

after data fetchin isn't work button add to cart

argammanukyan
Автор

Sir foreign key filed ko request.user se auto select kese kare

movieofficial
Автор

Sir foreign key filed me html input value kese insert kare sir very important

movieofficial
Автор

Sir i follow all your video but still my filter not work

neerajbhatt
Автор

Feeling Strong to following your tutroial. lots of new things for me. please share you INSTAGRAM handle with us

tech-n
Автор

This is not perfect filters because if you everytime you click on check box even if you unchecked the button it will display the data twice, so it's not perfect filters, you have to make empty the div before every request send to Ajax..

anilbarad
join shbcf.ru