intershop-pwa
intershop-pwa copied to clipboard
Fetch products in batches on the basket page
Is your feature request related to a problem? If yes, please describe it.
Multiple B2B projects face the issue of slow response and rendering times when entering the basket. This is mainly caused by the amount of products those baskets can have (up to 500. But 100+ are already causing issues). Currently, the data of the products for each and every line item is fetched one by one.
Describe the desired solution.
There are a few possible solutions that could be implemented in the demo store that also require REST API adjustments on ICM side:
- Optionally include product details when fetching the basket, instead of only the lineItem IDs
- Add separate REST call to fetch product data in batches
PWA only solution:
- Only fetch data for products that are currently in view / Implement some kind of "virtual scrolling" on the basket page
Hints Product data can be fetched via basket endpoint by adding the transitive include "lineItems_product"to the get request. This has been suggested in one of the mentioned projects as a work around. Unfortunately this does not include the product images
related to issue #764 and pull request #766
Solved within #1211