How the PDP occ calls are getting called

45 Views Asked by At

In PDP page of Spartacus i can see 3 network calls with different parameters. How is the 3 occ class with diferent parameters invoked. (https://i.stack.imgur.com/OX3k2.png)

In node modules file i was able to see these entries, So how are the 3 calls happening.

product: { default: 'products/${productCode}?fields=DEFAULT,images(FULL),classifications,manufacturer,numberOfReviews,categories(FULL),baseOptions,baseProduct,variantOptions,variantType', list: 'products/${productCode}?fields=code,name,summary,price(formattedValue),images(DEFAULT,galleryIndex),baseProduct', details: 'products/${productCode}?fields=stock(DEFAULT),description,availableForPickup,code,url,price(DEFAULT),numberOfReviews,manufacturer,categories(FULL),priceRange,multidimensional,tags,images(FULL)', attributes: 'products/${productCode}?fields=classifications', price: 'products/${productCode}?fields=price(formattedValue)', }

1

There are 1 best solutions below

0
Adam Kaczmarek On

The separate calls are made because of loading scopes. Each component asks for a different set of product data (scope). This is configurable. See the docs: https://help.sap.com/docs/SAP_COMMERCE_COMPOSABLE_STOREFRONT/eaef8c61b6d9477daf75bff9ac1b7eb4/3128ae8ce1cd4108b5c408768d85fd9c.html?locale=en-US