Files
Commerce/home.php
“VeLiTi” e4ddab934c Merge branch 'development'
#Conflicts:
#	admin/countries.php
#	cart.php
#	custom/css/main.css
#	custom/customfunctions.php
#	custom/email/order-details-template.php
#	custom/email/order-invoice-template.php
#	custom/email/order-notification-template.php
#	custom/pages/about.php
#	custom/pages/about_morval.php
#	custom/settings/config.php
#	custom/settings/settings.php
#	functions.php
#	home.php
#	products.php
#	script.js
2025-08-12 15:46:06 +02:00

283 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// ++++++++++++++++++++++++++++++
// Prevent direct access to file
// ++++++++++++++++++++++++++++++
defined(security_key) or exit;
// ++++++++++++++++++++++++++++++
// Include header
// ++++++++++++++++++++++++++++++
$view = template_header($home_text, '');
$view .= '
<!-- Hero Section -->
<section class="hero">
<div class="hero-content">
<h1>'.$h2_brand_name_1.'<br>'.$h2_brand_name_2.'</h1>
<a href="'.url(link_to_collection).'" class="hero-btn">'.$h2_brand_visit.'</a>
</div>
</section>
<!-- Store Description -->
<div class="store-description">
<p>'.$h2_brand_wow.'</p>
</div>';
// ++++++++++++++++++++++++++++++
// Include highlighted Products
// ++++++++++++++++++++++++++++++
<<<<<<< HEAD
$view .= highlightedProducts2($clientsecret,category_id_highlighted_products_2, ($highlight_2 ?? 'highlight 2'),'');
$view .= '
<section class="watch-ad-section">
<div class="top-section">
<div class="watch-image">
</div>
<div class="top-content">
<h2>'.($ad_watch_1 ?? 'Dutch design and Swiss craftsmanship').'</h2>
<a href="'.url('index.php?page=about').'" class="btn">'.($btn_readmore ?? 'Read more').'</a>
</div>
</div>
<div class="bottom-section">
<div class="bottom-content">
<h2>'.($ad_watch_2 ?? 'Timeless timepieces that will last for generations!').'</h2>
<a href="'.url(link_to_collection).'" class="btn">'.$h2_brand_visit.'</a>
</div>
</div>
</section>';
=======
$view .= highlightedProducts2($clientsecret,category_id_highlighted_products_1, ($highlight_2 ?? 'highlight 2'),'');
$view .= highlightedProducts($clientsecret,category_id_highlighted_products_2, ($highlight_2 ?? 'highlight 2'),'');
$view .= '
<section class="watch-ad-section">
<div class="top-section">
<div class="watch-image">
</div>
<div class="top-content">
<h2>'.($ad_watch_1 ?? 'Dutch design and Swiss craftsmanship').'</h2>
<a href="'.url('index.php?page=about').'" class="btn">'.($btn_readmore ?? 'Read more').'</a>
</div>
</div>
<div class="bottom-section">
<div class="bottom-content">
<h2>'.($ad_watch_2 ?? 'Timeless timepieces that will last for generations!').'</h2>
<a href="'.url(link_to_collection).'" class="btn">'.$h2_brand_visit.'</a>
</div>
</div>
</section>';
>>>>>>> development
$view .= '
<section class="features">
<div class="container features-container">
<div class="feature-item">
<h2>'.($home_timeless ?? 'Timeless').'</h2>
<p>'.($home_timeless_text ?? 'Morval Watches are unique, robust, stylish and timeless timepieces that will last for generations!').'</p>
</div>
<div class="feature-item">
<h2>'.($home_quality ?? 'Quality').'</h2>
<p>'.($home_quality_text ?? ' Morval watches meet the highest quality requirements and can compete with the well-known Swiss brands. The parts are supplied by renowned manufacturers from Europe and beyond. A Morval contains a Swiss-made caliber (STP) that is known for its reliable quality.').'</p>
</div>
<div class="feature-item">
<h2>'.($home_price ?? 'Price').'</h2>
<p>'.($home_price_text ?? 'Morval stands for an excellent price-quality ratio').'</p>
<<<<<<< HEAD
=======
</div>
</div>
</section>';
// ++++++++++++++++++++++++++++++
// Include customer reviews
// ++++++++++++++++++++++++++++++
$view .= '
<section class="reviews">
<div class="container">
<h2>'.($customer_reviews ?? 'Reviews').'</h2>
<div class="reviews-container">
<div class="review-item">
<div class="stars">★★★★★</div>
<p>Zeker een aanrader! Aangeschaft als cadeau voor mijn partner en we zijn er beiden erg blij mee! Het horloge heeft een prachtig design dat zowel stijlvol als tijdloos is, door de leren en stalen band. Het grootste pluspunt is dat we nooit meer een batterij hoeven te verwisselen super handig! Bovendien loopt het horloge stipt op tijd, wat je natuurlijk van een goed horloge mag verwachten. Ralph heeft mij vriendelijk en professioneel geholpen.</p>
<div class="reviewer">- Helma</div>
</div>
<div class="review-item">
<div class="stars">★★★★★</div>
<p>Morval is niet zomaar een horloge, Morval is een sieraad. Prachtig en uniek ontwerp en ook nog eens kwalitatief hoogstaand!</p>
<div class="reviewer">- Paul K</div>
</div>
<div class="review-item">
<div class="stars">★★★★★</div>
<p>Eind Januari heb ik een Morval Watch gekocht. Ik heb gekozen voor het model Thomas II in de kleur navy blue met stalen band. Tevens heb ik er een extra lederen band bij gekozen. Behalve het stijlvolle ontwerp en de Zwitserse kwaliteit, sprak het kleinschalige en het verhaal achter deze horloge me enorm aan! Uniek, stijlvol en kwaliteit voor een eerlijke prijs! Wat mij betreft zeker 5 sterren waard!</p>
<div class="reviewer">- W. Habraken</div>
</div>
>>>>>>> development
</div>
</div>
</section>';
<<<<<<< HEAD
// ++++++++++++++++++++++++++++++
// Include footer
// ++++++++++++++++++++++++++++++
$view .= template_footer();
// ++++++++++++++++++++++++++++++
// Additional JS scripts for page
// ++++++++++++++++++++++++++++++
$view .='
<script>
// Basic slider functionality
const prevBtn = document.querySelector(\'.prev-btn\');
const nextBtn = document.querySelector(\'.next-btn\');
const productContainer = document.querySelector(\'.product-container-slider\');
const products = document.querySelectorAll(\'.product-card-slider\');
let currentIndex = 0;
const productsPerView = window.innerWidth < 480 ? 1 :
window.innerWidth < 768 ? 2 :
window.innerWidth < 992 ? 3 : 4;
prevBtn.addEventListener(\'click\', () => {
if (currentIndex > 0) {
currentIndex--;
updateSliderPosition();
}
});
nextBtn.addEventListener(\'click\', () => {
if (currentIndex < products.length - productsPerView) {
currentIndex++;
updateSliderPosition();
}
});
function updateSliderPosition() {
const productWidth = products[0].offsetWidth;
productContainer.style.transform = `translateX(-${currentIndex * productWidth}px)`;
}
// Update slider on window resize
window.addEventListener(\'resize\', () => {
// Reset position when screen size changes
currentIndex = 0;
updateSliderPosition();
});
</script>
=======
// ++++++++++++++++++++++++++++++
// Include footer
// ++++++++++++++++++++++++++++++
$view .= template_footer();
// ++++++++++++++++++++++++++++++
// Additional JS scripts for page
// ++++++++++++++++++++++++++++++
$view .='
<script>
// Enhanced slider functionality for multiple carousels
function initializeCarousels() {
// Handle product sliders (highlightedProducts2)
const productSliders = document.querySelectorAll(\'.product-slider\');
productSliders.forEach((slider) => {
const carouselId = slider.getAttribute(\'data-carousel\');
const prevBtn = slider.querySelector(\'.prev-btn\');
const nextBtn = slider.querySelector(\'.next-btn\');
const productContainer = slider.querySelector(\'.product-container-slider\');
const products = slider.querySelectorAll(\'.product-card-slider\');
if (!products.length) return;
let currentIndex = 0;
const productsPerView = window.innerWidth < 480 ? 1 :
window.innerWidth < 768 ? 2 :
window.innerWidth < 992 ? 3 : 4;
function updateSliderPosition() {
const productWidth = products[0].offsetWidth;
productContainer.style.transform = `translateX(-${currentIndex * productWidth}px)`;
}
prevBtn.addEventListener(\'click\', () => {
if (currentIndex > 0) {
currentIndex--;
updateSliderPosition();
}
});
nextBtn.addEventListener(\'click\', () => {
if (currentIndex < products.length - productsPerView) {
currentIndex++;
updateSliderPosition();
}
});
// Update slider on window resize
window.addEventListener(\'resize\', () => {
// Reset position when screen size changes
currentIndex = 0;
updateSliderPosition();
});
});
// Handle sample sliders (getSamples)
const sampleButtons = document.querySelectorAll(\'.scrollButton\');
sampleButtons.forEach((button) => {
const samplesId = button.getAttribute(\'data-samples\');
if (!samplesId) return;
const samplesContainer = document.getElementById(\'add_samples_container_\' + samplesId);
if (!samplesContainer) return;
const isLeftButton = button.id.includes(\'slideLeft\');
button.addEventListener(\'click\', () => {
const scrollAmount = 200; // Adjust as needed
const currentScroll = samplesContainer.scrollLeft;
if (isLeftButton) {
samplesContainer.scrollTo({
left: currentScroll - scrollAmount,
behavior: \'smooth\'
});
} else {
samplesContainer.scrollTo({
left: currentScroll + scrollAmount,
behavior: \'smooth\'
});
}
});
});
}
// Initialize carousels when DOM is loaded
document.addEventListener(\'DOMContentLoaded\', initializeCarousels);
// Also initialize if DOM is already loaded
if (document.readyState === \'loading\') {
document.addEventListener(\'DOMContentLoaded\', initializeCarousels);
} else {
initializeCarousels();
}
</script>
>>>>>>> development
</html>
';
echo $view;
?>