From 2074707c9d4e6008281876f6de55dae66f95380d Mon Sep 17 00:00:00 2001 From: TheOnlyMace <0815cracky@gmail.com> Date: Thu, 9 Apr 2026 21:07:48 +0200 Subject: [PATCH] Add product visibility control: Introduced a mechanism to hide specific products ('vpc', 'vps') from the shop. Updated relevant templates to conditionally display these products based on visibility status, enhancing user experience and product management. --- backend/config/products-config.php | 11 +++++++++++ backend/includes/header.php | 5 +++++ public/contact.php | 5 +++++ public/index.php | 5 +++++ 4 files changed, 26 insertions(+) diff --git a/backend/config/products-config.php b/backend/config/products-config.php index f65934a..faa4626 100644 --- a/backend/config/products-config.php +++ b/backend/config/products-config.php @@ -10,6 +10,9 @@ * $packages = getProductPackages('vpc'); */ +// Temporär ausgeblendete Produkte (einfach IDs aus dieser Liste entfernen, um sie wieder im Shop anzuzeigen) +$HIDDEN_PRODUCTS = ['vpc', 'vps']; + // ============================================================================ // VIRTUAL PRIVATE CONTAINER (VPC) // ============================================================================ @@ -442,6 +445,14 @@ function getProduct($productId) { return $PRODUCTS[$productId] ?? null; } +/** + * Prüft, ob ein Produkt im Shop angezeigt werden soll + */ +function isProductVisible($productId) { + global $HIDDEN_PRODUCTS; + return !in_array($productId, $HIDDEN_PRODUCTS, true); +} + /** * Alle Pakete eines Produkts abrufen */ diff --git a/backend/includes/header.php b/backend/includes/header.php index 82629a5..eb00be5 100644 --- a/backend/includes/header.php +++ b/backend/includes/header.php @@ -1,4 +1,5 @@ +
@@ -61,8 +62,12 @@