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.

This commit is contained in:
TheOnlyMace
2026-04-09 21:07:48 +02:00
parent 55f9fdd957
commit 2074707c9d
4 changed files with 26 additions and 0 deletions

View File

@@ -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
*/