The shop pages products: every page is a full reload that throws away the grid the visitor was reading. This appends the next page to the grid instead, on scroll or on a "Load more products" click, per website. The controller does not duplicate /shop. The new /shop/lazy_products calls shop() and renders the cards out of the qcontext it prepared, so search, categories, attributes, tags, price filter, sort order and pricelists are supported by construction -- and so are the values other modules add to the listing, the wishlist state among them. Out of range pages answer empty rather than the last page again, which portal.pager would otherwise clamp to and the frontend would append as duplicates. The product loop of website_sale.products is replaced by a call to a shared template, so the first page and the appended ones are the same markup: a ribbon, a price or a button another module adds to products_item shows up on every card, not only on the ones the initial render produced. Progressive enhancement throughout: the first page and the pager are still what the standard controller renders, and the pager is only hidden once the widget is running. Without JavaScript -- and for crawlers -- the shop is exactly what it is without this module. The page size is the shop layout's "Products per page", the value the pager already uses, so there is nothing to keep in sync. The frontend takes no decision about what to show: the server sends the mode, the URL of the listing on screen and each page of cards. It observes a block below the grid rather than listening to scroll, restarts the public widgets on the appended cards, and keeps a button as the fallback for a failed request or a browser without IntersectionObserver. Tests cover the block rendering per mode, the filters travelling in the AJAX URL, and the endpoint on a next page, the last page, an out of range page, a broken page number and an unknown category. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
56 lines
1.5 KiB
Text
56 lines
1.5 KiB
Text
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
Version 3, 19 November 2007
|
|
|
|
Website Sale - Aplicoop
|
|
Copyright 2025 Criptomart SL
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
---
|
|
|
|
FULL LICENSE TEXT
|
|
=================
|
|
|
|
For the complete AGPL-3 license text, see:
|
|
https://www.gnu.org/licenses/agpl-3.0.html
|
|
|
|
---
|
|
|
|
SUMMARY OF RIGHTS
|
|
=================
|
|
|
|
When you distribute a modified version under AGPL-3, you must:
|
|
|
|
1. Keep the same license (AGPL-3)
|
|
2. Provide a copy of the license with your distribution
|
|
3. State what changes you made
|
|
4. Include the original copyright notices
|
|
5. If distributed over a network, provide source code access
|
|
|
|
Detailed information: https://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
|
|
---
|
|
|
|
ATTRIBUTION
|
|
===========
|
|
|
|
This module was developed by: Criptomart SL
|
|
Website: https://criptomart.net
|
|
|
|
Original inspiration: Aplicoop project
|
|
https://sourceforge.net/projects/aplicoop/
|
|
|
|
---
|
|
|
|
This file is part of the Website Sale - Aplicoop module for Odoo.
|