Skip to content

Commerce & Webshop Documentatie

Overzicht van alle commerce-gerelateerde configuratie en implementaties.

Product Types

VGBC Ticket

  • Variaties: Student (-50%) / Arts (standaard prijs)
  • BTW: 21%
  • Attendee registratie via order items
  • Custom fields per attendee

Online Cursus

  • Variaties: Student / Arts pricing
  • BTW: 9% (onderwijs)
  • Digital product

Checkout Flow

Payment Gateway

  • Mollie integratie
  • Test API key: test_mSAUYy4bj43MWCg5RTVFVFfCWq48jR
  • Live API key: live_eRN9kTBcJGL66ZgnZKCBpaQiPy2GfJ

Payment Processing Architecture

Probleem: Ghost invoices en database locks door race conditions tussen webhook en return URL

Oplossing (29 dec 2024): - Webhook (/payment/notify/{gateway}): Returns immediate 200 OK zonder processing - Return URL (/mollie_return/{order}): Doet alle payment processing - Custom controllers in vg_commerce module - Safety layers: PaymentProcessingLock + PaymentIdempotency event subscribers

Files: - /web/modules/custom/vg_commerce/src/Controller/QueuedPaymentNotifyController.php - /web/modules/custom/vg_commerce/src/Controller/MollieReturnController.php - /web/modules/custom/vg_commerce/src/EventSubscriber/PaymentProcessingLock.php - /web/modules/custom/vg_commerce/src/EventSubscriber/PaymentIdempotency.php

Checkout Completion

  • Custom template met twee buttons
  • "Naar de voorpagina" en "Ga naar mijn account"
  • Template: /web/modules/custom/vg_commerce/templates/commerce-checkout-completion-message.html.twig

BTW Configuratie

  • 9%: Online cursussen (onderwijs)
  • 21%: VGBC tickets (evenementen)
  • Display: Prijzen inclusief BTW met percentage weergave
  • B2B: BTW vrijstelling bij geldig BTW nummer

Verzendmethoden

  1. Gratis verzending - Digital products
  2. Fysiek afhalen - VGBC tickets

Facturen

Invoice Template

  • Custom template in vg25 theme
  • Klantgegevens: naam, organisatie, adres
  • Factuurnummer + Ordernummer
  • BTW met percentages: "BTW (9%)" / "BTW (21%)"
  • Betaalstatus: Betaald
  • PDF generation met Roboto fonts

Files: - /web/themes/custom/vg25/templates/commerce-invoice/commerce-invoice.html.twig - /web/themes/custom/vg25/vg25.theme - vg25_preprocess_commerce_invoice()

Known Issues

  • Studentenkorting wordt toegepast op hele order (moet per attendee) - Fase 3

Order Workflow

  • Workflow: "Default, with validation"
  • States: Draft → Validation → Completed
  • Payment completion plaatst order in validation state

Gerelateerde Sessies