Skip to content

Composables Reference ​

List of all public methods exported within @shopware-pwa/composables-next package.

For more information on composables, see our Building Guides and Context Composables.

CMS (Shopping Experiences) ​

namedescription
useBreadcrumbsComposable for breadcrumbs management.Read the guide.It's recommended to use getCategoryBreadcrumbs for category breadcrumbs.
useCmsBlockComposable to get cms block content
useCmsSectionComposable to get cms section content

Cart & Checkout ​

namedescription
UseCartReturn
useAddToCartComposable to manage adding product to cart
useAddressComposable to manage customer addresses
useCartItemComposable to manage specific cart item
useCheckoutComposable to manage checkout process

Context & Language ​

namedescription
useCountriesComposable to manage countries
useInternationalizationComposable for internationalization management.
useSalutationsComposable for fetching the salutations list.
useSessionContextComposable for session management.SessionContext contain all related data like user, currency, country, shippingMethod, paymentMethod etc.
useShopwareContext

Customer & Account ​

namedescription
useCustomerOrdersComposable for fetching the orders list.
useCustomerPasswordComposable for customer password management.
useNewsletterComposable for newsletter subscription.
useOrderDetailsComposable for managing an existing order.
useOrderPaymentComposable for managing an existing order.
useUserComposable for user management.
namedescription
useCategorySearchComposable for category search.
useLandingSearchComposable for landing page search.
useNavigationComposable for navigation.Provides state for navigation trees depending on navigation type.
useNavigationContextComposable to get navigation context from the URL.
useNavigationSearchComposable to get search for SeoUrl entity for given path.
useProductSearchComposable for product search.

Product ​

namedescription
usePriceComposable for getting formatted priceSet the default currency code and locale in order to format a price correctly
useProductComposable for product management.
useProductAssociationsGet product association entity.
useProductConfiguratorComposable to change product variant.
useProductPriceThe purpose of the
useProductReviewsComposable for listing customer orders.
useProductSearchSuggestComposable for product suggest search.
useProductWishlistManage wishlist for a single product.

Wishlist ​

namedescription
useLocalWishlistComposable for wishlist management.
useSyncWishlistComposable to manage wishlist via API
useWishlistComposable to manage wishlist

Other ​

namedescription
UseBreadcrumbsReturn
UseNotificationsReturn
createListingComposableFactory to create your own listing.By default you can use useListing composable, which provides you predefined listings for category(cms) listing and product search listing.Using factory you can provide our own compatible search method and use it for example for creating listing of orders in my account.
useCategoryComposable to get the category from current CMS context
useContextContext helper composable to provide and inject data.It takes
useListing
useNotificationsComposable for managing notifications (flash messages) on frontend.
Composables Reference has loaded