-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/payment-form
- Loading branch information
Showing
194 changed files
with
5,513 additions
and
3,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vue-demo-store": minor | ||
--- | ||
|
||
Add Account Type to register form & company name + VAT-ID fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware-pwa/composables-next": patch | ||
--- | ||
|
||
Adjust types in `useProductSearch` composable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vue-demo-store": minor | ||
--- | ||
|
||
Add maintenance mode page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware-pwa/helpers-next": minor | ||
--- | ||
|
||
Add isMaintenanceMode to check if backend is available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware-pwa/composables-next": patch | ||
--- | ||
|
||
Add isStackable and isDigital computed properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware/api-gen": minor | ||
--- | ||
|
||
Add Blob type support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware-pwa/cms-base": minor | ||
--- | ||
|
||
Add media 3D models support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vue-demo-store": patch | ||
--- | ||
|
||
Separate components for order (product, custom, discount, promotion) and cart (product, promotion) item types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware/api-client": minor | ||
--- | ||
|
||
Add error and success callbacks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,42 @@ | ||
name: Stackblitz templates | ||
|
||
|
||
run-name: Playwright stackblitz templates 🚀 | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '59 23 * * *' | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "59 23 * * *" | ||
jobs: | ||
run-code_examples-tests: | ||
runs-on: ubuntu-latest | ||
name: Playwright testing stackblitz templates | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install playwright browsers | ||
run: npx playwright install --with-deps | ||
- name: Run tests | ||
run: npx playwright test checkStackblitzTemplates.spec.ts --project=chromium | ||
- name: try zip the test result folder | ||
if: failure() | ||
run: zip -r playwright-report.zip playwright-report/ | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report zip | ||
path: playwright-report.zip | ||
retention-days: 7 | ||
run-stackblitz-templates-tests: | ||
runs-on: macos-14 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
|
||
- run: corepack enable | ||
- run: pnpm --version | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
cache-dependency-path: "**/pnpm-lock.yaml" | ||
- name: install | ||
run: pnpm install --no-frozen-lockfile --prefer-offline | ||
|
||
|
||
- name: Install dependencies with Playwright | ||
run: | | ||
pnpm playwright install --with-deps | ||
- name: Run tests | ||
run: | | ||
cd apps/e2e-tests | ||
npx playwright test -c examples.config.ts checkStackblitzTemplates.spec.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
apps/docs/src/getting-started/features/maintenance-mode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
head: | ||
- - meta | ||
- name: og:title | ||
content: "Maintenance mode - Shopware Frontends" | ||
- - meta | ||
- name: og:description | ||
content: "Example of implementation maintenance mode page" | ||
- - meta | ||
- name: og:image | ||
content: "https://frontends-og-image.vercel.app/Integration:%20**Maintenance%20Mode**?fontSize=100px" | ||
--- | ||
|
||
# Maintenance mode | ||
|
||
You can activate the maintenance mode of your store by selecting your sales channel and then activating the maintenance mode under Status | ||
|
||
## Detecting maintenance mode via API | ||
|
||
Maintenance mode is returned as an error from all of the endpoints. We can detect it by using `onErrorHandler` callback function in `createAPIClient` init api method. | ||
|
||
```ts | ||
const apiClient = createAPIClient({ | ||
baseURL: shopwareEndpoint, | ||
accessToken: shopwareAccessToken, | ||
contextToken: Cookies.get("sw-context-token"), | ||
onContextChanged(newContextToken) { | ||
Cookies.set("sw-context-token", newContextToken, { | ||
expires: 365, // days | ||
path: "/", | ||
sameSite: "lax", | ||
}); | ||
}, | ||
onErrorHandler(response) { | ||
const error = response._data?.errors?.find((element) => { | ||
return element.code === "FRAMEWORK__API_SALES_CHANNEL_MAINTENANCE_MODE"; | ||
}); | ||
}, | ||
}); | ||
``` | ||
|
||
## Displaying maintenance page | ||
|
||
:::warning | ||
This example is for Nuxt 3 apps | ||
::: | ||
|
||
### Throwing MAINTENANCE_MODE error | ||
|
||
Every error thrown within the application is automatically caught and the `error.vue` page is displayed. | ||
|
||
```ts | ||
onErrorHandler(response) { | ||
const error = response._data?.errors?.find((element) => { | ||
return element.code === "FRAMEWORK__API_SALES_CHANNEL_MAINTENANCE_MODE"; | ||
}); | ||
|
||
if (error) { | ||
throw createError({ | ||
statusCode: 503, | ||
statusMessage: "MAINTENANCE_MODE", | ||
}); | ||
} | ||
}, | ||
``` | ||
|
||
### Displaying maintenance mode page | ||
|
||
```vue | ||
// error.vue | ||
<script setup lang="ts"> | ||
const props = defineProps<{ | ||
error: { | ||
statusCode: number; | ||
statusMessage: string; | ||
message: string; | ||
}; | ||
}>(); | ||
const isMaintenanceMode = computed(() => { | ||
return props.error.statusMessage === "MAINTENANCE_MODE"; | ||
}); | ||
</script> | ||
<template> | ||
<div v-if="isMaintenanceMode">Maintenance Mode Page Content</div> | ||
</template> | ||
``` |
116 changes: 116 additions & 0 deletions
116
apps/docs/src/packages/composables/useB2bQuoteManagement.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
--- | ||
category: composables | ||
--- | ||
|
||
# useB2bQuoteManagement | ||
|
||
<!-- PLACEHOLDER_DESCRIPTION --> | ||
|
||
## Usage | ||
|
||
### Get quote list | ||
|
||
```vue{5} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const quotesList = ref([]); | ||
const { getQuoteList } = useB2bQuoteManagement(); | ||
onBeforeMount(async () => { | ||
quotesList.value = await getQuoteList(); | ||
}); | ||
</script> | ||
``` | ||
|
||
### Get quote | ||
|
||
```vue{5} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const quote = ref(); | ||
const { getQuote } = useB2bQuoteManagement(); | ||
onBeforeMount(async () => { | ||
quotesList.value = await getQuote('example-123'); | ||
}); | ||
</script> | ||
``` | ||
|
||
### Decline quote | ||
|
||
```vue{5} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { declineQuote } = useB2bQuoteManagement(); | ||
declineQuote('example-123', 'comment'); | ||
</script> | ||
``` | ||
|
||
### Decline quote | ||
|
||
```vue{3} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { declineQuote } = useB2bQuoteManagement(); | ||
declineQuote('example-123', 'comment'); | ||
</script> | ||
``` | ||
|
||
### Request change in quote | ||
|
||
```vue{3} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { requestChangeQuote } = useB2bQuoteManagement(); | ||
requestChangeQuote('example-123', 'comment'); | ||
</script> | ||
``` | ||
|
||
### Request quote | ||
|
||
```vue{3} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { requestQuote } = useB2bQuoteManagement(); | ||
requestQuote('comment'); | ||
</script> | ||
``` | ||
|
||
### Create order from quote | ||
|
||
```vue{3} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { createOrderFromQuote } = useB2bQuoteManagement(); | ||
requestQuote('example-123', 'comment'); | ||
</script> | ||
``` | ||
|
||
### Change quote shipping method | ||
|
||
```vue{3} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { changeShippingMethod } = useB2bQuoteManagement(); | ||
changeShippingMethod('example-123', 'shipping-method-id'); | ||
</script> | ||
``` | ||
|
||
### Change quote payment method | ||
|
||
```vue{3} | ||
<script setup lang="ts"> | ||
import { useB2bQuoteManagement } from "@shopware-pwa/composables-next"; | ||
const { changePaymentMethod } = useB2bQuoteManagement(); | ||
changePaymentMethod('example-123', 'payment-method-id'); | ||
</script> | ||
``` |
Oops, something went wrong.