Disclaimer: This project is still in beta phase.
This repository is a vue storefront commercetools integration for the REST API
The main goal of the repository is to extend the offical commercetools integration with REST capabilities that are not possible with the GraphQL API.
These capabilities are:
This repository is a monorepo containing three projects:
- api-client - communicates with commercetools backend;
- composables - exposes composable functions used to retrieve data using
api-client
; - theme -
nuxt
project that glues everything together. It extends our core theme and usescomposables
to retrieve data. For this particular integration, only sample code for the use of composables is provided.
- Install all required dependencies:
yarn install
- (optional) Then you can verify if everything works properly by building all three projects:
yarn build
- If everything built properly, you can run the code with:
yarn dev
-
Create a vue storefront commercetools integration project. Documentation
-
Install the dependency
yarn add @vsf-devgurus/vsf-ct-rest-integration
- Configure the integration in the middleware.config.js file
ctRest: {
location: "@vsf-devgurus/vsf-ct-rest-integration-api/server",
configuration: {
api: {
uri: "https://api.us-central1.gcp.commercetools.com",
authHost: "https://auth.us-central1.gcp.commercetools.com",
projectKey: <project-key>,
clientId: <client-id>,
clientSecret: <client-secret>,
scopes: <client-scopes>
}
}
}
- Use the composables exposed
- useProductSearch Example here