intershop-pwa icon indicating copy to clipboard operation
intershop-pwa copied to clipboard

Fetch products in batches on the basket page

Open philippsauer opened this issue 3 years ago • 1 comments

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

AB#69170

philippsauer avatar Aug 23 '21 09:08 philippsauer

related to issue #764 and pull request #766

shauke avatar Aug 27 '21 16:08 shauke

Solved within #1211

5t3v3n-H avatar Sep 06 '22 12:09 5t3v3n-H