Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update dsr docs 6.6 #1339

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
AvgResult
awaitAndCheckNotification
axios
B2B Component
B2B Component
B2B Components
B2B Suite
B2B Suite

Check warning on line 90 in .wordlist.txt

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE) Suggestions: `backend` Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US Category: MISC Raw Output: .wordlist.txt:90:10: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE) Suggestions: `backend` Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US Category: MISC
backend
Backend
backends
Expand Down Expand Up @@ -437,6 +437,7 @@
dropdown
DSGVO
DSN
DSR
dTH
DTO
DTOs
Expand Down Expand Up @@ -1060,6 +1061,7 @@
pluginlogger
PluginManager
png
pnpm
POC
positionID
PositionID
Expand Down Expand Up @@ -1406,7 +1408,7 @@
SwagB
SwagBasicExample
SwagBasicExampleTheme
SwagGuidedShopping
SwagDigitalSalesRooms
SwagMigrationBundleExample
SwagMyPlugin
SwagMyPluginSW
Expand Down Expand Up @@ -1512,6 +1514,7 @@
unprefixed
unregister
Unregistering
unsecure
unserialize
unstyled
untrusted
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/products-digitalSalesRooms-installExtension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/products-digitalSalesRooms-mercureConfigExample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/products-digitalSalesRooms-videoConfig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/products-digitalSalesRooms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,10 @@ You can create interactive live video events for your customers straight from yo
## Prerequisites

Review the below minimum operating requirements before you install the *Digital Sales Rooms* feature:

* Instance of [Shopware 6](../../guides/installation/devenv) (version 6.4.18.0 and above).

::: warning
The compliant Node.js version for PWA setup is v14.0.0 to v16.0.0.
:::

* Instance of [Shopware PWA](https://github.com/vuestorefront/shopware-pwa)(version 1.2.0 and above).
* Install and activate [PWA plugin](https://github.com/shopware/SwagShopwarePwa)(version 0.3.3 and above) in Shopware 6 instance.
* Install [Mercure package](https://packagist.org/packages/symfony/mercure#v0.5.3)(version 0.5.3) in Shopware 6 instance.

```bash
# To install Mercure 0.5.3, use the following command
composer require symfony/mercure ^0.5.3
```

* [node](https://nodejs.org/en) >= v18
* [pnpm](https://pnpm.io/installation) >= 8
* [make](https://formulae.brew.sh/formula/make) command.
* Instance of [Shopware 6](../../guides/installation/devenv) (version 6.6.0 and above).
* Install Mercure service with the below available options:
* [Self-hosted installation](./selfHostedMercureInstallation).
* [Cloud service](https://mercure.rocks/). Refer to the [basic configuration of Mercure hub](./installation#basic-configuration-of-mercure-hub) section.
Expand Down
177 changes: 177 additions & 0 deletions products/digital-sales-rooms/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
nav:
title: Digital Sales Rooms installation

Check warning on line 3 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:3:18: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR
position: 10

---

# Digital Sales Rooms Installation

Check warning on line 8 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:8:10: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR

::: warning
To access the *Digital Sales Rooms* source code, please create a support ticket in your Shopware Account and share your GitLab (not GitHub) username. You will then be granted access to the private repository.

Check warning on line 11 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:11:23: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR
:::

## Installation and usage

To install and use the *Digital Sales Rooms* feature, follow the below steps:

Check warning on line 16 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:16:32: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR

### Get the plugin

1. Clone or download the [SwagDigitalSalesRooms repository 6.6.x](https://gitlab.com/shopware/shopware/shopware-6/services/swagdigitalsalesrooms/-/tree/6.6.x).
2. Extract the plugin, including the outer folder `SwagDigitalSalesRooms`, to `platform/custom/plugins` directory of Shopware repository.
3. Ensure the plugin has a PHP package structure containing `composer.json` file, `src/` folder, and so on.
4. Prepare a zip file containing the plugin as in the following structure:

```bash
# SwagDigitalSalesRooms.zip

**SwagDigitalSalesRooms**/
├── bin
├── composer.json
├── composer.lock

Check warning on line 31 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1]) Suggestions: ` Lock`, ` lock` Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1 Category: CASING Raw Output: products/digital-sales-rooms/installation.md:31:1: If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1]) Suggestions: ` Lock`, ` lock` Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1 Category: CASING
├── makefile

Check warning on line 32 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1]) Suggestions: ` Neon`, ` neon` Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1 Category: CASING Raw Output: products/digital-sales-rooms/installation.md:32:7: If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1]) Suggestions: ` Neon`, ` neon` Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1 Category: CASING
├── phpstan.neon
├── phpunit.xml
├── README.md
├── src
└── tests
```

### Run DSR template
This repository contains the Frontend Template of DSR plugin.

#### Installation
- From Shopware root folder `<shopware-root-dir>`, go to the folder of DSR templates.
```
cd ./custom/plugins/SwagDigitalSalesRooms/templates/dsr-frontends
```

- Install pnpm with global scope
```
npm install -g pnpm
```

- Generate env file
```
cp .env.template .env
```
**SHOPWARE_ENDPOINT**: This is the Shopware API Domain server.

**SHOPWARE_ACCESS_TOKEN**: This is the Shopware Access Token to connect to Shopware API. Every Sale Channel will always contain an access token. So you can copy it.

**ALLOW_ANONYMOUS_MERCURE**: This is the flag for development only. When the value = 1, it means your app is running with unsecure Mercure.

- Install dependencies
```
pnpm install
```

#### Development:
```
pnpm dev
```
Usually, port `3000` is the default port so that you can access the domain of the Frontend App `http://localhost:3000/`

#### Build
```
pnpm build
```

### Install the plugin

You can install the plugin via the admin panel or terminal server.

#### Admin panel

1. Log in to the admin panel.
2. Go to Extensions > My extensions

![ ](../../assets/products-digitalSalesRooms-extensionsMenu.png)

3. Click on the “Upload extension” button and choose the zip file containing the plugin from your device.

![ ](../../assets/products-digitalSalesRooms-uploadExtension.png)

4. Once it is uploaded and listed, click “Install”.

![ ](../../assets/products-digitalSalesRooms-installExtension.png)

5. On successful installation, activate the plugin by clicking the switch button on the left.

#### Terminal server

1. Log in to a server.
2. Zip the plugin and place it in `<shopware-root-dir>/custom/plugins` directory.
3. Extract the zip file from `<shopware-root-dir>/custom/plugins` directory.
4. Run the below Symfony commands:

```bash
# refresh the list of available plugins
bin/console plugin:refresh
# find the plugin **name** (first column on the list). In this case, it is "**SwagDigitalSalesRooms"**
bin/console plugin:install **SwagDigitalSalesRooms** --activate
# clear the cache afterward
bin/console cache:clear

# Now it is ready to use
```

### Basic configuration of Mercure Hub

Except for the self-hosted service, we recommend using any cloud-based service.

::: info
💡 We tested the service provided by [StackHero](https://www.stackhero.io/en/services/Mercure-Hub/pricing). Depending on the expected traffic, you can easily switch between the plans. For a small demo among a few people at the same time, the “Hobby” plan is sufficient.
:::

Detailed below is the minimum configuration needed for a working stack apart from project-specific CMS configurations.

* **Set up CORS allowed origins** - In our case, it would be the domain where the Shopware Frontends is hosted and available. For instance: `https://shopware-pwa-gs.herokuapp.com`(frontend).

* **Set up publish allowed origins** - The domains that request the Mercure service must be added to *publish allowed origins* or else it gets rejected. For instance (HTTP protocol must not be included): `shopware-pwa-gs.herokuapp.com` (frontend) and `pwa-demo-api.shopware.com`(backend - API).

* **Set up the publisher (JWT) key** - Set whatever you want.

* **Set up the subscriber (JWT) key** - Set whatever you want.

* **Other settings** - Look at the below sample Mercure configuration on StackHero (Default settings is recommended).

![ ](../../assets/products-digitalSalesRooms-mercureConfiguration.png)

### Daily service access

Daily service is responsible for streaming a video between the attendees. It is necessary to have an account to avail its services.

#### Set up an account

1. Go to the [Daily dashboard](https://dashboard.daily.co/).
2. Visit the “developers” section on the left.
3. Get the **API KEY**.

### Configure the plugin

Once the plugin is installed, the services are up and running and have all the required credentials. Then, the next thing to do is configure the Digital Sales Rooms plugin itself.

Check warning on line 153 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:153:81: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR

Check warning on line 153 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:153:169: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR

To do so,

1. Navigate to the admin panel where the Digital Sales Rooms plugin is installed.

![ ](../../assets/products-digitalSalesRooms-configuration.png)

2. Click the menu and select the configure option to configure the two sections below:

* **Video (daily.co)**

* You can leave the **API Base URL** as it is `https://api.daily.co/v1/` if not necessary.
* Insert your **API KEY**.

![ ](../../assets/products-digitalSalesRooms-videoConfig.png)

* **Mercure**

* Replace *Mercure Hub Url* and *Mercure Hub Public Url* with your domain’s URL where the Mercure service is working and accessible from your stack. For instance, for the URL `https://fcoxpx.stackhero-network.com`, it would be `https://fcoxpx.stackhero-network.com/.well-known/mercure`.
* Input the secret tokens that were set up in your Mercure service configuration.

![ ](../../assets/products-digitalSalesRooms-mercureConfigExample.png)

Daily and Mercure are two crucial external services for working with the Digital Sales Rooms plugin.

Check warning on line 177 in products/digital-sales-rooms/installation.md

View workflow job for this annotation

GitHub Actions / Runner

[LanguageTool] reported by reviewdog 🐶 The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR Raw Output: products/digital-sales-rooms/installation.md:177:7: The noun “Salesrooms” is spelled as one word. (ROOM_COMPOUNDS[1]) Suggestions: `Salesrooms` Rule: https://community.languagetool.org/rule/show/ROOM_COMPOUNDS?lang=en-US&subId=1 Category: GRAMMAR
39 changes: 0 additions & 39 deletions products/guided-shopping/checklist.md

This file was deleted.

Loading
Loading