[FIX] website_sale_aplicoop: Complete infinite scroll and search filter integration
Major fixes: - Fix JSON body parsing in load_products_ajax with type='http' route * Parse JSON from request.httprequest.get_data() instead of post params * Correctly read page, search, category from JSON request body - Fix search and category filter combination * Use intersection (&) instead of replacement to preserve both filters * Now respects search AND category simultaneously - Integrate realtime_search.js with infinite_scroll.js * Add resetWithFilters() method to reset scroll to page 1 with new filters * When search/category changes, reload products from server * Clear grid and load fresh results - Fix pagination reset logic * Set currentPage = 0 in resetWithFilters() so loadNextPage() increments to 1 * Prevents loading empty page 2 when resetting filters Results: ✅ Infinite scroll loads all pages correctly (1, 2, 3...) ✅ Search filters work across all products (not just loaded) ✅ Category filters work correctly ✅ Search AND category filters work together ✅ Page resets to 1 when filters change
This commit is contained in:
parent
534876242e
commit
5eb039ffe0
4 changed files with 603 additions and 71 deletions
|
|
@ -48,6 +48,7 @@
|
|||
"assets": {
|
||||
"web.assets_frontend": [
|
||||
"website_sale_aplicoop/static/src/css/website_sale.css",
|
||||
"website_sale_aplicoop/static/src/js/infinite_scroll.js",
|
||||
],
|
||||
"web.assets_tests": [
|
||||
"website_sale_aplicoop/static/tests/test_suite.js",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue