Nav apraksta

AI 22c37fed25 moving admin Link to footer 1 mēnesi atpakaļ
admin efd4495650 adding filter for deleted orders 3 mēneši atpakaļ
assets d1df3130b8 adding functionality to hide orders 3 mēneši atpakaļ
data d54d377282 Merge remote-tracking branch 'refs/remotes/origin/main' 3 mēneši atpakaļ
docs 12aa172c79 initial implementation order history 1 mēnesi atpakaļ
includes 22c37fed25 moving admin Link to footer 1 mēnesi atpakaļ
.gitignore 8d19d7cd42 adding gitignore updates 1 mēnesi atpakaļ
README.md 12aa172c79 initial implementation order history 1 mēnesi atpakaļ
cart.php 76871458c4 fixing mobile responsiveness 3 mēneši atpakaļ
checkout.php 12aa172c79 initial implementation order history 1 mēnesi atpakaļ
config.sample.php 12aa172c79 initial implementation order history 1 mēnesi atpakaļ
default.htaccess 5a5209c139 improoving security, adding readme 3 mēneši atpakaļ
favicon.ico 3ac77d431f adding favicon 3 mēneši atpakaļ
index.php 812a5cddc2 adding disclaimer message 3 mēneši atpakaļ
orders.php 12aa172c79 initial implementation order history 1 mēnesi atpakaļ
product.php 8b4fedf193 refactor terminology from "Nachbestellung" to "Vorbestellung" across 3 mēneši atpakaļ
reservation.php 8b4fedf193 refactor terminology from "Nachbestellung" to "Vorbestellung" across 3 mēneši atpakaļ

README.md

Feuerwehr Vereinsshop - Setup

Voraussetzungen

  • PHP 8.x
  • Webserver
  • Schreibrechte auf data/

1) .htaccess aktivieren

Im Projektordner liegt eine Vorlage unter data/default.htaccess.

Benenne sie um in:

  • data/.htaccess

Beispiel:

mv data/default.htaccess data/.htaccess

2) Globale Config und Admins im config.php einrichten

In config.php mindestens diese Werte anpassen:

  • SITE_NAME
  • SITE_URL
  • ADMIN_EMAIL
  • FROM_EMAIL
  • FROM_NAME
  • Optional: ORDER_PREFIX, RESERVATION_EXPIRY_DAYS
  • ORDER_HISTORY_COOKIE_SECRET (Pflicht für signierte Browser-Bestellhistorie)

Passe ADMIN_USERS an:

  • Für jeden Admin einen Eintrag mit Benutzername und Passwort-Hash hinzufügen
  • Standard-Accounts/Hashes nach dem ersten Setup ersetzen

Beispielstruktur:

define('ADMIN_USERS', [
    'admin' => '...bcrypt-hash...',
    'manager' => '...bcrypt-hash...'
]);

Generate the password: https://www.onlinewebtoolkit.com/hash-generator using the crypt functionality.

3) Browser-Bestellhistorie konfigurieren

Für die Seite Meine Bestellungen wird eine signierte, browsergebundene Historie genutzt.

  • Setze in config.php einen eigenen Wert für ORDER_HISTORY_COOKIE_SECRET
  • Optionale Tuning-Werte:
    • ORDER_HISTORY_COOKIE_NAME
    • ORDER_HISTORY_COOKIE_TTL_DAYS
    • ORDER_HISTORY_MAX_IDS

Details zur Funktion und zum Sicherheitsmodell:

  • docs/ORDER_HISTORY.md