mirror of
https://git.hexahost.dev/smueller/HexaHost-Frontend.git
synced 2026-06-02 08:08:43 +00:00
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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user