Skip to main content

Function: useProductBundles()

useProductBundles(options): UseProductBundlesReturn

Defined in: composables/react/useProductBundles.ts:81

useProductBundles — bundle fetching and add-to-cart flow.

Parameters​

options​

UseProductBundlesOptions

see UseProductBundlesOptions.

Returns​

UseProductBundlesReturn

bundle state plus async actions — see UseProductBundlesReturn.

Remarks​

GraphQL integration: services are built per-call via createServices(graphqlClient). fetchBundles calls services.bundle.getBundles() (BundleService) filtered by product id. addBundleToCart resolves a cart via the shared initCart flow when none exists, then calls services.cart.addBundleToCart() (CartService). calcDiscountPercent is pure and makes no API call. Cart mutations require an authenticated session.