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

@@ -1,4 +1,5 @@
<!DOCTYPE html>
<?php require_once __DIR__ . '/../config/products-config.php'; ?>
<html lang="de">
<head>
<meta charset="UTF-8">
@@ -61,8 +62,12 @@
<li class="nav-dropdown">
<a href="#" class="nav-link <?php echo (in_array($current_page, ['vpc', 'vps', 'mail-gateway', 'webhosting'])) ? 'active' : ''; ?>">Produkte</a>
<ul class="dropdown-menu">
<?php if (isProductVisible('vpc')): ?>
<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>
<?php endif; ?>
<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>
</ul>