# Kickstart mit Shopware 6
# Backend
Für Shopware 6 als Backend bietet hubble eine direkt nutzbare Integration.
Shopware's Sales Channel (opens new window) und Store API (opens new window)'s werden direkt über das @hubblecommerce
Modul angesprochen.
TIP
Hinweis: Die folgenden Installationsanweisungen wurden für MacOS und Linux Umgebungen getestet.
# Requirements
- Node.js (opens new window) (>=10.20.1)
- npm (>=6.14.4)
- Shopware >= 6.3.0 (opens new window)
- Shopware 6 PWA Plugin (opens new window)
- Shopware 6 Payone Plugin (opens new window)
- NuxtJS Projekt (opens new window)
# Installation und Konfiguration des hubble Moduls
Das hubble Modul ist vefügbar als npm (opens new window) Package und kann über das Terminal via npm
heruntergeladen
und als Nuxt Modul (opens new window) in NuxtJS Projekten eingebunden werden:
- Install NuxtJS (opens new window)
- Install hubble NuxtJs Module
npm i @hubblecommerce/hubble
- Add module to nuxt.config.js
buildModules: [
['@hubblecommerce/hubble']
],
/*
** hubble module configuration
*/
hubble: {
apiType: process.env.API_TYPE
},
2
3
4
5
6
7
8
9
10
Um die Entwicklung zu beginnen wird eine ~/.env
benötigt, in die Credentials wie API Keys und Auth Token
aus den Admin Bereichen der jeweiligen Services einzutragen sind.
Mehr zur .env unter: Konfiguration.
Im Zusammenhang mit Shopware sind mindestens folgende Einträge notwendig:
API_TYPE = 'sw'
API_SW_ACCESS_KEY = 'ENTER_YOUR_ACCESS_KEY_HERE'
API_BASE_URL = 'http://shopware.local'
2
3
Dabei ist zu beachten, dass der API_SW_ACCESS_KEY
für den Storefront Verkaufskanal eingetragen wird und nicht für den
Headless Verkaufskanal, denn die Headless Variante liefert zur Zeit keine SEO URLs.
# Starten der hubble PWA im Entwicklungsmodus
npm run dev
Das hubble Frontend ist nun unter http://localhost:3336/
einsehbar.
# Starten der hubble PWA im Production Modus
npm run build
npm run start
2