This project is a plentymarkets integration for Vue Storefront 2. The project takes a monorepo approach and contains all packages required to run the application.
This section walks you through the first steps of working with the app.
- Download NodeJS v14. If some of your projects require other NodeJS versions, use a node version manager like nvm or nvm-windows to quicky switch between the different versions.
- Install the Yarn package manager.
- Fork the repository.
- Clone your fork.
- To install the project dependencies, run
yarn
. - To build the project, run
yarn build
. - To start the project in development mode, run
yarn dev
.
- To connect the app to your plentymarkets system, open
packages/theme/middleware.config.js
and edit theurl
. - To update your theme, edit the following files:
packages/theme/assets/scss/theme.scss
for global variablespackages/theme/tailwind.config.js
for utility classespackages/theme/themeConfig.js
for media files
- To update the available locales and currencies, open
packages/theme/nuxt.config.js
and editi18n
. Note that when editing internationalisation, you also have to configure your plentymarkets system accordingly. When adding languages, you also have to add new translations inpackages/theme/lang
. - To update cookie groups and decide when to load additional scripts, edit
packages/theme/cookieConfig.js
.
This project extends Vue Storefront. This means it relies on Nuxt 2, VueJS 2 and TypeScript.
📓 Vue components use the composition API.
Package | Responsibilities |
---|---|
api-client | Queries data from external systems, for example to exchange data with the connected plentymarkets system. |
composables | Handles the app state and all major app logic. By default, most composables extend core storefront functionality. |
theme | Contains the presentation of the app. |
For further information on each package, refer to that package's README.
This section provides an overview of how to use the packages when adding new functionality. For example, imagine you want to display information from https://petstore.swagger.io/v2/pet/findByStatus?status=available
.
- Create a new API in
packages/api-client
. - Create a new inteface for the API.
- Build the api-client package with
yarn build
. - Create a new composable in
packages/composables
. - In the composable, create a method that uses the API to fetch information.
- In the composable, create a property that stores the fetched information.
- Import the property in a Vue component in
packages/theme
.
Want to contribute? Ping us on the plentymarkets
channel on our Discord!
Also, before getting started, check out to the contribution guide.
Vue Storefront:
General:
If you have any questions about this integration we will be happy to answer them on plentymarkets
channel on our Discord.
This project follows the all-contributors specification. Contributions of any kind welcome!