From c0fa589370e3ae76c3ce015b43e1060162c77e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20S=C3=A9ghair?= Date: Wed, 22 Jan 2025 16:50:56 +0100 Subject: [PATCH] chore: add README.md --- _dev/apps/verification-tag/README.md | 17 ++++++++++++ _dev/apps/warning-messages/README.md | 39 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 _dev/apps/verification-tag/README.md create mode 100644 _dev/apps/warning-messages/README.md diff --git a/_dev/apps/verification-tag/README.md b/_dev/apps/verification-tag/README.md new file mode 100644 index 000000000..876a24d16 --- /dev/null +++ b/_dev/apps/verification-tag/README.md @@ -0,0 +1,17 @@ +# Verification Tag + +The verification tag app is a crucial component of the PS Marketing module that handles Google site verification for PrestaShop stores. +A verification tag is an HTML meta tag used to confirm ownership of a website with Google services. It appears in the `` section of your website's HTML and looks like this: + +```html + +``` + +## Core Functionality + +The verification tag app manages the verification process through several steps: + +1. **Token Retrieval**: The app fetches a site verification token from PS Marketing API +2. **Token Storage**: Stores the verification token in the PrestaShop shop configuration +3. **Verification Process**: Handles the verification process with Google through PS Marketing API +4. **Website Claiming**: Claims the website with Google (with safety checks to prevent overwriting existing claims) through PS Marketing API diff --git a/_dev/apps/warning-messages/README.md b/_dev/apps/warning-messages/README.md new file mode 100644 index 000000000..83ad63e44 --- /dev/null +++ b/_dev/apps/warning-messages/README.md @@ -0,0 +1,39 @@ +# Warning Messages Application + +## Overview +The Warning Messages application is a component of the PS Marketing module for PrestaShop. It provides merchants with real-time notifications about their configuration status directly in their BackOffice Dashboard. + +### Purpose +- Notify merchants about configuration issues that need attention +- Provide actionable insights for account improvement +- Display clear, user-friendly warning messages with action buttons +- Help maintain optimal account configuration + +### Tech Stack +- TypeScript +- Webpack +- Jest for testing +- Sentry for error tracking +- Integration with PS Marketing onboarding API + +### Core Components +- `WarningElement`: Creates and manages warning message UI components +- Warning message generator +- Onboarding client integration +- Sentry error tracking + +## Usage + +The warning system automatically initializes when the merchant accesses their BackOffice Dashboard. It: +1. Checks for configuration issues +2. Displays relevant warning messages +3. Provides action buttons when applicable +4. Updates dynamically as configurations change + +### Example Warning Message +```typescript +buildWarningMessages(["IT_APPEARS_THAT_YOU_HAVE_NOT_FINALISED_YOUR_CONFIGURATION"],{ + isoCode: "en", + link: "configuration-page" +}); +```