Skip to main content

Voucher Acceptance List (Base Template)

The Base Template (cockpitOS generic theme) supports an optional subpage /vouchers that lists all the shops in the center that accept center vouchers. The public page uses the same PageLayout shell as other base pages (SiteHeader, animated background, “Back”); the Footer (privacy policy, imprint, etc.) comes as usual from the center layout. Centers with a Full-Site-Template (e.g., ILG) retain their header/footer; the voucher page only shows the content in the template main.

Overview

FeatureDetails
URL/{center-slug}/vouchers
TemplateBase Template (no specific template)
Dashboard TabContent → Page: Vouchers
Shop FlagAccepts Center Vouchers (in the shop editor)

1. Set Shop Flag: “Accepts Center Vouchers”

For each shop that accepts center vouchers, the corresponding flag must be enabled:

  1. Navigate to Content → Shops in the dashboard.
  2. Open the desired shop (Edit).
  3. In the Settings / Flags section, enable the toggle “Accepts Center Vouchers”.
  4. Save.

Shops with this flag will automatically appear on the /vouchers subpage.

note

The flag is internally named acceptsCoupons. It applies only to standalone shops (no branch entry). For branches (ShopLocation), the flag is not supported.


2. Activate Voucher Page (Dashboard)

The page is disabled by default and returns a 404. Activation via the dashboard tab:

  1. Navigate to Website Configuration in the dashboard.
  2. Open the tab “Page: Vouchers” (visible only for Base Template).
  3. Turn on the toggle “Page Active”.
  4. Optionally: Adjust the Page Title and Intro Text.
  5. Save.

Once the page is active:

  • /vouchers is accessible and shows all shops with the active flag.
  • A “Vouchers” link appears in the website's hamburger menu.
  • A link to the voucher page also appears in the footer.

3. Configurable Content

FieldPath in templateContentDefault Value
Page Activebase.giftCards.enabledfalse
Page Titlebase.giftCards.title“Voucher Acceptance List”
Intro Textbase.giftCards.introText(empty)

4. Page Behavior

  • Shops present: Compact card grid (logo, name, optionally a line for category/floor or chain for branches); clicking opens the shop detail page.
  • No shops maintained: Hint box with placeholder text.
  • Page disabled: HTTP 404.

5. API

The Shops API (/api/shops) supports the parameter acceptsGiftCard=true:

GET /api/shops?centerId=<id>&acceptsGiftCard=true

Returns only shops where acceptsCoupons === true.


6. Developer Note (React Server Components)

The route apps/center-website/app/[slug]/vouchers/page.tsx is a Server Component and renders the client component PageLayout for the base theme. Lucide icon components (function references) must not be passed as prop icon={…} across the RSC boundary — this may lead to render errors in Production. Instead, use PageLayout with iconKey="gift" (or any other abbreviation listed in PAGE_TITLE_ICONS); the icon resolution occurs only in the client.

Nutzungsstatistik: Seitenaufrufe werden anonymisiert erfasst. Im Umami-Dashboard nach diesem Pfad filtern: /en/center-website/gutschein-akzeptanzliste