Update product configuration and enhance order functionality: Added shop URLs for various products in the backend configuration, improving the management of product links. Implemented new functions to generate order URLs for featured and first packages, enhancing the user experience on product pages. Updated contact and product pages to utilize the new order URL functionality for streamlined ordering.

This commit is contained in:
smueller
2026-05-28 08:30:02 +02:00
parent 67fbc68d45
commit 481d223747
10 changed files with 843 additions and 23 deletions

View File

@@ -2,7 +2,8 @@
/** /**
* HexaHost.de Produkt-Konfiguration * HexaHost.de Produkt-Konfiguration
* *
* Hier können Sie alle Preise und Produktinformationen zentral verwalten. * Hier können Sie alle Preise, Shop-Links und Produktinformationen zentral verwalten.
* Pro Paket: shop_url (WHMCS/Warenkorb-Link, z. B. https://shop.hexahost.de/cart.php?a=add&pid=123)
* Nach Änderungen: npm run build && npm run deploy * Nach Änderungen: npm run build && npm run deploy
* *
* Verwendung in PHP-Seiten: * Verwendung in PHP-Seiten:
@@ -30,6 +31,7 @@ $PRODUCTS['vpc'] = [
'starter' => [ 'starter' => [
'name' => 'VPC Starter', 'name' => 'VPC Starter',
'price' => '4,99', 'price' => '4,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '1 vCore'], ['label' => 'CPU Kerne', 'value' => '1 vCore'],
@@ -49,6 +51,7 @@ $PRODUCTS['vpc'] = [
'business' => [ 'business' => [
'name' => 'VPC Business', 'name' => 'VPC Business',
'price' => '9,99', 'price' => '9,99',
'shop_url' => '',
'featured' => true, 'featured' => true,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '2 vCores'], ['label' => 'CPU Kerne', 'value' => '2 vCores'],
@@ -69,6 +72,7 @@ $PRODUCTS['vpc'] = [
'professional' => [ 'professional' => [
'name' => 'VPC Professional', 'name' => 'VPC Professional',
'price' => '19,99', 'price' => '19,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '4 vCores'], ['label' => 'CPU Kerne', 'value' => '4 vCores'],
@@ -90,6 +94,7 @@ $PRODUCTS['vpc'] = [
'enterprise' => [ 'enterprise' => [
'name' => 'VPC Enterprise', 'name' => 'VPC Enterprise',
'price' => '39,99', 'price' => '39,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '8 vCores'], ['label' => 'CPU Kerne', 'value' => '8 vCores'],
@@ -132,6 +137,7 @@ $PRODUCTS['vps'] = [
'starter' => [ 'starter' => [
'name' => 'VPS Starter', 'name' => 'VPS Starter',
'price' => '9,99', 'price' => '9,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '1 vCore'], ['label' => 'CPU Kerne', 'value' => '1 vCore'],
@@ -151,6 +157,7 @@ $PRODUCTS['vps'] = [
'business' => [ 'business' => [
'name' => 'VPS Business', 'name' => 'VPS Business',
'price' => '19,99', 'price' => '19,99',
'shop_url' => '',
'featured' => true, 'featured' => true,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '2 vCores'], ['label' => 'CPU Kerne', 'value' => '2 vCores'],
@@ -171,6 +178,7 @@ $PRODUCTS['vps'] = [
'professional' => [ 'professional' => [
'name' => 'VPS Professional', 'name' => 'VPS Professional',
'price' => '39,99', 'price' => '39,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '4 vCores'], ['label' => 'CPU Kerne', 'value' => '4 vCores'],
@@ -192,6 +200,7 @@ $PRODUCTS['vps'] = [
'enterprise' => [ 'enterprise' => [
'name' => 'VPS Enterprise', 'name' => 'VPS Enterprise',
'price' => '79,99', 'price' => '79,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'CPU Kerne', 'value' => '8 vCores'], ['label' => 'CPU Kerne', 'value' => '8 vCores'],
@@ -234,6 +243,7 @@ $PRODUCTS['mail-gateway'] = [
'starter' => [ 'starter' => [
'name' => 'Mail Starter', 'name' => 'Mail Starter',
'price' => '4,99', 'price' => '4,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'Postfächer', 'value' => '5'], ['label' => 'Postfächer', 'value' => '5'],
@@ -252,6 +262,7 @@ $PRODUCTS['mail-gateway'] = [
'business' => [ 'business' => [
'name' => 'Mail Business', 'name' => 'Mail Business',
'price' => '14,99', 'price' => '14,99',
'shop_url' => '',
'featured' => true, 'featured' => true,
'specs' => [ 'specs' => [
['label' => 'Postfächer', 'value' => '25'], ['label' => 'Postfächer', 'value' => '25'],
@@ -272,6 +283,7 @@ $PRODUCTS['mail-gateway'] = [
'professional' => [ 'professional' => [
'name' => 'Mail Professional', 'name' => 'Mail Professional',
'price' => '29,99', 'price' => '29,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'Postfächer', 'value' => '100'], ['label' => 'Postfächer', 'value' => '100'],
@@ -293,6 +305,7 @@ $PRODUCTS['mail-gateway'] = [
'enterprise' => [ 'enterprise' => [
'name' => 'Mail Enterprise', 'name' => 'Mail Enterprise',
'price' => '59,99', 'price' => '59,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'Postfächer', 'value' => 'Unbegrenzt'], ['label' => 'Postfächer', 'value' => 'Unbegrenzt'],
@@ -336,6 +349,7 @@ $PRODUCTS['webhosting'] = [
'starter' => [ 'starter' => [
'name' => 'Webhosting Starter', 'name' => 'Webhosting Starter',
'price' => '4,99', 'price' => '4,99',
'shop_url' => 'https://shop.hexahost.de/store/webserver/webhosting-starter',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'Webspace', 'value' => '10 GB'], ['label' => 'Webspace', 'value' => '10 GB'],
@@ -358,6 +372,7 @@ $PRODUCTS['webhosting'] = [
'business' => [ 'business' => [
'name' => 'Webhosting Business', 'name' => 'Webhosting Business',
'price' => '7,99', 'price' => '7,99',
'shop_url' => 'https://shop.hexahost.de/store/webserver/webhosting-business',
'featured' => true, 'featured' => true,
'specs' => [ 'specs' => [
['label' => 'Webspace', 'value' => '30 GB'], ['label' => 'Webspace', 'value' => '30 GB'],
@@ -380,6 +395,7 @@ $PRODUCTS['webhosting'] = [
'professional' => [ 'professional' => [
'name' => 'Webhosting Professional', 'name' => 'Webhosting Professional',
'price' => '9,99', 'price' => '9,99',
'shop_url' => 'https://shop.hexahost.de/store/webserver/webhosting-professional',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'Webspace', 'value' => '50 GB'], ['label' => 'Webspace', 'value' => '50 GB'],
@@ -402,6 +418,7 @@ $PRODUCTS['webhosting'] = [
'enterprise' => [ 'enterprise' => [
'name' => 'Webhosting Enterprise', 'name' => 'Webhosting Enterprise',
'price' => '29,99', 'price' => '29,99',
'shop_url' => '',
'featured' => false, 'featured' => false,
'specs' => [ 'specs' => [
['label' => 'Webspace', 'value' => '200 GB'], ['label' => 'Webspace', 'value' => '200 GB'],
@@ -485,6 +502,38 @@ function formatPrice($price, $withCurrency = true) {
return $withCurrency ? $price . '€' : $price; return $withCurrency ? $price . '€' : $price;
} }
/**
* Bestell-Link für ein Paket (Online-Shop oder Kontaktformular)
*/
function getOrderUrl($productId, $packageId) {
$package = getPackage($productId, $packageId);
if ($package && !empty($package['shop_url'])) {
return $package['shop_url'];
}
return sprintf('contact.php?package=%s-%s', $productId, $packageId);
}
/**
* Bestell-Link für CTA (beliebtes Paket oder erstes Paket)
*/
function getProductOrderUrl($productId) {
$packages = getProductPackages($productId);
foreach ($packages as $packageId => $package) {
if (!empty($package['featured'])) {
return getOrderUrl($productId, $packageId);
}
}
$firstPackageId = array_key_first($packages);
if ($firstPackageId !== null) {
return getOrderUrl($productId, $firstPackageId);
}
return sprintf('contact.php?product=%s', $productId);
}
/** /**
* Generiert HTML für eine Paket-Karte * Generiert HTML für eine Paket-Karte
*/ */
@@ -522,7 +571,7 @@ function renderPackageCard($productId, $packageId, $package) {
<div class="package-features"> <div class="package-features">
%s %s
</div> </div>
<a href="contact.php?package=%s-%s" class="btn btn-primary">Jetzt bestellen</a> <a href="%s" class="btn btn-primary">Jetzt bestellen</a>
</div>', </div>',
$featuredClass, $featuredClass,
$featuredBadge, $featuredBadge,
@@ -530,8 +579,7 @@ function renderPackageCard($productId, $packageId, $package) {
$package['price'], $package['price'],
$specsHtml, $specsHtml,
$featuresHtml, $featuresHtml,
$productId, htmlspecialchars(getOrderUrl($productId, $packageId), ENT_QUOTES, 'UTF-8')
$packageId
); );
} }

View File

@@ -15,3 +15,94 @@
justify-content: center; justify-content: center;
margin-top: 2rem; margin-top: 2rem;
} }
/* Legal pages: plain white content with black text */
.legal-hero,
.legal-content {
background: #ffffff;
color: #000000;
}
.legal-hero {
margin-top: 70px;
padding: 2rem 0 1.5rem;
border-bottom: 1px solid #e5e5e5;
}
.legal-content {
padding-top: 2rem;
}
.legal-hero-title {
background: none;
-webkit-text-fill-color: #000000;
color: #000000;
margin-bottom: 0.5rem;
}
.legal-hero-description,
.legal-section h2,
.legal-section h3,
.legal-block p,
.legal-block li,
.breadcrumb,
.breadcrumb span {
color: #000000;
}
.legal-section,
.legal-section.glass-card {
background: transparent;
border: none;
box-shadow: none;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border-radius: 0;
padding: 0;
}
.legal-section:hover,
.legal-section.glass-card:hover {
transform: none;
box-shadow: none;
border: none;
background: transparent;
}
.legal-content .glass-card:hover {
transform: none;
box-shadow: none;
}
.legal-section h2 {
border-bottom: 1px solid #e5e5e5;
padding-bottom: 0.5rem;
margin-bottom: 0.8rem;
}
.legal-block a,
.breadcrumb a {
color: #0b57d0;
}
.legal-block a:hover,
.breadcrumb a:hover {
color: #0b57d0;
text-decoration: none;
}
/* Ensure absolutely no hover effects on legal text/content */
.legal-hero *,
.legal-content *,
.legal-hero *:hover,
.legal-content *:hover,
.legal-hero *:focus,
.legal-content *:focus,
.legal-hero *:active,
.legal-content *:active {
transform: none !important;
box-shadow: none !important;
text-shadow: none !important;
transition: none !important;
animation: none !important;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -166,8 +166,8 @@ includeHeader($page_title, $page_description, $current_page);
<h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2> <h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2>
<p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p> <p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p>
<div class="cta-actions"> <div class="cta-actions">
<a href="contact.php?product=mail-gateway" class="btn btn-primary">Jetzt bestellen</a> <a href="<?php echo htmlspecialchars(getProductOrderUrl('mail-gateway'), ENT_QUOTES, 'UTF-8'); ?>" class="btn btn-primary">Jetzt bestellen</a>
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a> <a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -2,43 +2,43 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url> <url>
<loc>https://hexahost.de/</loc> <loc>https://hexahost.de/</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>weekly</changefreq> <changefreq>weekly</changefreq>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://hexahost.de/vpc.html</loc> <loc>https://hexahost.de/vpc.html</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.9</priority> <priority>0.9</priority>
</url> </url>
<url> <url>
<loc>https://hexahost.de/vps.html</loc> <loc>https://hexahost.de/vps.html</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.9</priority> <priority>0.9</priority>
</url> </url>
<url> <url>
<loc>https://hexahost.de/mail-gateway.html</loc> <loc>https://hexahost.de/mail-gateway.html</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.9</priority> <priority>0.9</priority>
</url> </url>
<url> <url>
<loc>https://hexahost.de/webhosting.html</loc> <loc>https://hexahost.de/webhosting.html</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.9</priority> <priority>0.9</priority>
</url> </url>
<url> <url>
<loc>https://hexahost.de/about.html</loc> <loc>https://hexahost.de/about.html</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.7</priority> <priority>0.7</priority>
</url> </url>
<url> <url>
<loc>https://hexahost.de/contact.html</loc> <loc>https://hexahost.de/contact.html</loc>
<lastmod>2024-01-01</lastmod> <lastmod>2026-05-28</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.8</priority> <priority>0.8</priority>
</url> </url>

View File

@@ -166,8 +166,8 @@ includeHeader($page_title, $page_description, $current_page);
<h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2> <h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2>
<p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p> <p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p>
<div class="cta-actions"> <div class="cta-actions">
<a href="contact.php?product=vpc" class="btn btn-primary">Jetzt bestellen</a> <a href="<?php echo htmlspecialchars(getProductOrderUrl('vpc'), ENT_QUOTES, 'UTF-8'); ?>" class="btn btn-primary">Jetzt bestellen</a>
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a> <a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -171,8 +171,8 @@ includeHeader($page_title, $page_description, $current_page);
<h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2> <h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2>
<p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p> <p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p>
<div class="cta-actions"> <div class="cta-actions">
<a href="contact.php?product=vps" class="btn btn-primary">Jetzt bestellen</a> <a href="<?php echo htmlspecialchars(getProductOrderUrl('vps'), ENT_QUOTES, 'UTF-8'); ?>" class="btn btn-primary">Jetzt bestellen</a>
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a> <a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -95,7 +95,7 @@ includeHeader($page_title, $page_description, $current_page);
<polyline points="10,9 9,9 8,9"/> <polyline points="10,9 9,9 8,9"/>
</svg> </svg>
</div> </div>
<h3>cPanel/Webmin</h3> <h3>Plesk</h3>
<p>Benutzerfreundliche Verwaltungsoberfläche für einfache Website-Verwaltung und E-Mail-Konfiguration.</p> <p>Benutzerfreundliche Verwaltungsoberfläche für einfache Website-Verwaltung und E-Mail-Konfiguration.</p>
</div> </div>
<div class="detail-card glass-card"> <div class="detail-card glass-card">
@@ -170,8 +170,8 @@ includeHeader($page_title, $page_description, $current_page);
<h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2> <h2><?php echo htmlspecialchars($product['cta_title'] ?? ('Bereit für ' . $product['name'] . '?')); ?></h2>
<p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p> <p><?php echo htmlspecialchars($product['cta_description'] ?? ('Starten Sie noch heute mit ' . $product['name'])); ?></p>
<div class="cta-actions"> <div class="cta-actions">
<a href="contact.php?product=webhosting" class="btn btn-primary">Jetzt bestellen</a> <a href="<?php echo htmlspecialchars(getProductOrderUrl('webhosting'), ENT_QUOTES, 'UTF-8'); ?>" class="btn btn-primary">Jetzt bestellen</a>
<a href="/contact" class="btn btn-secondary">Beratung anfordern</a> <a href="contact.php" class="btn btn-secondary">Beratung anfordern</a>
</div> </div>
</div> </div>
</div> </div>