mirror of
https://git.hexahost.dev/smueller/HexaHost-Frontend.git
synced 2026-06-02 05: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');
|
* $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)
|
// VIRTUAL PRIVATE CONTAINER (VPC)
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -442,6 +445,14 @@ function getProduct($productId) {
|
|||||||
return $PRODUCTS[$productId] ?? null;
|
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
|
* Alle Pakete eines Produkts abrufen
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<?php require_once __DIR__ . '/../config/products-config.php'; ?>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -61,8 +62,12 @@
|
|||||||
<li class="nav-dropdown">
|
<li class="nav-dropdown">
|
||||||
<a href="#" class="nav-link <?php echo (in_array($current_page, ['vpc', 'vps', 'mail-gateway', 'webhosting'])) ? 'active' : ''; ?>">Produkte</a>
|
<a href="#" class="nav-link <?php echo (in_array($current_page, ['vpc', 'vps', 'mail-gateway', 'webhosting'])) ? 'active' : ''; ?>">Produkte</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
<?php if (isProductVisible('vpc')): ?>
|
||||||
<li><a href="/vpc" class="<?php echo ($current_page === 'vpc') ? 'active' : ''; ?>">Virtual Private Container</a></li>
|
<li><a href="/vpc" class="<?php echo ($current_page === 'vpc') ? 'active' : ''; ?>">Virtual Private Container</a></li>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isProductVisible('vps')): ?>
|
||||||
<li><a href="/vps" class="<?php echo ($current_page === 'vps') ? 'active' : ''; ?>">Virtual Private Server</a></li>
|
<li><a href="/vps" class="<?php echo ($current_page === 'vps') ? 'active' : ''; ?>">Virtual Private Server</a></li>
|
||||||
|
<?php endif; ?>
|
||||||
<li><a href="/mail-gateway" class="<?php echo ($current_page === 'mail-gateway') ? 'active' : ''; ?>">Mail Gateway</a></li>
|
<li><a href="/mail-gateway" class="<?php echo ($current_page === 'mail-gateway') ? 'active' : ''; ?>">Mail Gateway</a></li>
|
||||||
<li><a href="/webhosting" class="<?php echo ($current_page === 'webhosting') ? 'active' : ''; ?>">Webhosting</a></li>
|
<li><a href="/webhosting" class="<?php echo ($current_page === 'webhosting') ? 'active' : ''; ?>">Webhosting</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once __DIR__ . '/../backend/includes/functions.php';
|
require_once __DIR__ . '/../backend/includes/functions.php';
|
||||||
|
require_once __DIR__ . '/../backend/config/products-config.php';
|
||||||
|
|
||||||
// Page configuration
|
// Page configuration
|
||||||
$page_title = 'Kontakt - HexaHost.de | Hosting aus Niederbayern';
|
$page_title = 'Kontakt - HexaHost.de | Hosting aus Niederbayern';
|
||||||
@@ -130,8 +131,12 @@ includeHeader($page_title, $page_description, $current_page, $additional_scripts
|
|||||||
<select id="subject" name="subject" required>
|
<select id="subject" name="subject" required>
|
||||||
<option value="">Bitte wählen...</option>
|
<option value="">Bitte wählen...</option>
|
||||||
<option value="allgemeine-anfrage">Allgemeine Anfrage</option>
|
<option value="allgemeine-anfrage">Allgemeine Anfrage</option>
|
||||||
|
<?php if (isProductVisible('vpc')): ?>
|
||||||
<option value="vpc-anfrage">Virtual Private Container</option>
|
<option value="vpc-anfrage">Virtual Private Container</option>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isProductVisible('vps')): ?>
|
||||||
<option value="vps-anfrage">Virtual Private Server</option>
|
<option value="vps-anfrage">Virtual Private Server</option>
|
||||||
|
<?php endif; ?>
|
||||||
<option value="mail-gateway-anfrage">Mail Gateway</option>
|
<option value="mail-gateway-anfrage">Mail Gateway</option>
|
||||||
<option value="webhosting-anfrage">Webhosting</option>
|
<option value="webhosting-anfrage">Webhosting</option>
|
||||||
<option value="it-beratung">IT-Beratung</option>
|
<option value="it-beratung">IT-Beratung</option>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once __DIR__ . '/../backend/includes/functions.php';
|
require_once __DIR__ . '/../backend/includes/functions.php';
|
||||||
|
require_once __DIR__ . '/../backend/config/products-config.php';
|
||||||
|
|
||||||
// Page configuration
|
// Page configuration
|
||||||
$page_title = 'HexaHost.de - Zuverlässiges Hosting aus Niederbayern';
|
$page_title = 'HexaHost.de - Zuverlässiges Hosting aus Niederbayern';
|
||||||
@@ -54,6 +55,7 @@ includeHeader($page_title, $page_description, $current_page);
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="products-grid">
|
<div class="products-grid">
|
||||||
|
<?php if (isProductVisible('vpc')): ?>
|
||||||
<div class="product-card glass-card">
|
<div class="product-card glass-card">
|
||||||
<div class="product-icon">
|
<div class="product-icon">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
@@ -74,6 +76,8 @@ includeHeader($page_title, $page_description, $current_page);
|
|||||||
</ul>
|
</ul>
|
||||||
<a href="/vpc" class="btn btn-primary">Mehr erfahren</a>
|
<a href="/vpc" class="btn btn-primary">Mehr erfahren</a>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isProductVisible('vps')): ?>
|
||||||
<div class="product-card glass-card">
|
<div class="product-card glass-card">
|
||||||
<div class="product-icon">
|
<div class="product-icon">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
@@ -92,6 +96,7 @@ includeHeader($page_title, $page_description, $current_page);
|
|||||||
</ul>
|
</ul>
|
||||||
<a href="/vps" class="btn btn-primary">Mehr erfahren</a>
|
<a href="/vps" class="btn btn-primary">Mehr erfahren</a>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
<div class="product-card glass-card">
|
<div class="product-card glass-card">
|
||||||
<div class="product-icon">
|
<div class="product-icon">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
|
|||||||
Reference in New Issue
Block a user