Setup af Vue i Shopware6

Først skal Shopware6 klargøres til, at håndtere Vue. Det gør vi ved at installere Shopware’s PWA plugin:

composer require shopware-pwa/shopware-pwa
bin/console plugin:install --activate SwagShopwarePwa

 

Eftf. kan vi tjekke installationen med nedenstående kommando:

bin/console plugin:refresh

---------------------- -------------------------------- --------- ----------------- ------------- ----------- -------- -------------
Plugin Label Version Upgrade version Author Installed Active Upgradeable
---------------------- -------------------------------- --------- ----------------- ------------- ----------- -------- -------------
SwagMarkets Shopware Markets 1.3.5 shopware AG Yes Yes No
SwagPayPal PayPal Products for Shopware 6 2.2.6 3.3.1 Shopware Yes No Yes
SwagPlatformDemoData Shopware 6 Demo data 1.0.8 shopware AG Yes Yes No
SwagShopwarePwa PWA Integration 0.3.1 shopware AG Yes Yes No
---------------------- -------------------------------- --------- ----------------- ------------- ----------- -------- -------------

 

Jeg vælger, at smide Vue i mappen public_html/vue:

mkdir vue
cd vue/

 

Herefter initialiseres PWA med denne kommando:

npx @shopware-pwa/cli@canary init

 

Der promptes med detaljer omkring storefront URL samt tilhørende API access key:

sw6pwa_host@phct-143:~/public_html/vue$ npx @shopware-pwa/cli@canary init
✔ Shopware instance address: · http://sw6pwa.powr.host/
✔ Shopware instance access token: · SWSCAUZXRVJ5MEXSAKLUYVBSUW
? Which version you'd like to use: …
▸ ^0.9.1
^0.8.2
canary

API access key kan findes i Shopware’s backend under Sales Channels –> Storefront.

 

Herefter kan applikationen startes i dev-mode med:

yarn dev

 

Om forfatter

Relaterede artikler

Nyhedsbrev... Privat, sikkert og spam-fri.