CMXX - Language selection
This commit is contained in:
2
cart.php
2
cart.php
@@ -101,7 +101,7 @@ foreach ($products_in_cart as $num => $product) {
|
|||||||
$subtotal += (float)$product['options_price'] * (int)$product['quantity'];
|
$subtotal += (float)$product['options_price'] * (int)$product['quantity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
template_header('Shopping Cart');
|
template_header(($shopping_cart_header ?? 'Shopping Cart'));
|
||||||
|
|
||||||
$view = '
|
$view = '
|
||||||
<div class="cart content-wrapper">
|
<div class="cart content-wrapper">
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ if (isset($_POST['method'], $_POST['first_name'], $_POST['last_name'], $_POST['a
|
|||||||
|
|
||||||
$terms_link = url('index.php?page=termsandconditions');
|
$terms_link = url('index.php?page=termsandconditions');
|
||||||
|
|
||||||
template_header('Checkout');
|
template_header(($checkout_header ?? 'Checkout'));
|
||||||
|
|
||||||
$view = '
|
$view = '
|
||||||
<div class="checkout content-wrapper">
|
<div class="checkout content-wrapper">
|
||||||
@@ -490,7 +490,7 @@ $view .= ' </div>
|
|||||||
|
|
||||||
if ($taxtotal > 0){
|
if ($taxtotal > 0){
|
||||||
$view .= '<div class="vat">
|
$view .= '<div class="vat">
|
||||||
<span>VAT <span class="alt">('.$tax_rate.')</span></span>
|
<span>'.($tax_text ?? 'VAT').' <span class="alt">('.$tax_rate.')</span></span>
|
||||||
<span>'.currency_code.''.number_format($taxtotal,2).'</span>
|
<span>'.currency_code.''.number_format($taxtotal,2).'</span>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2006,3 +2006,31 @@ input.banner_deny:hover {
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.dropdown-content {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
min-width: 80px;
|
||||||
|
box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.dropdown:hover .dropdown-content {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.dropdown-content a {
|
||||||
|
text-decoration: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.dropdown-content a:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
.dropdown-content img {
|
||||||
|
width: 20px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
BIN
custom/css/de.png
Normal file
BIN
custom/css/de.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 138 B |
BIN
custom/css/es.png
Normal file
BIN
custom/css/es.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 83 KiB |
BIN
custom/css/fr.png
Normal file
BIN
custom/css/fr.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
custom/css/it.png
Normal file
BIN
custom/css/it.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 340 B |
BIN
custom/css/nl.png
Normal file
BIN
custom/css/nl.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 B |
BIN
custom/css/us.png
Normal file
BIN
custom/css/us.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -17,7 +17,7 @@ function get_countries() {
|
|||||||
// Template Header default including MENU
|
// Template Header default including MENU
|
||||||
function template_header($title, $head = '') {
|
function template_header($title, $head = '') {
|
||||||
|
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
// Get the amount of items in the shopping cart, this will be displayed in the header.
|
// Get the amount of items in the shopping cart, this will be displayed in the header.
|
||||||
$num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0;
|
$num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0;
|
||||||
@@ -110,7 +110,7 @@ if (veliti_analytics){
|
|||||||
// Template Header (related to MENU function)
|
// Template Header (related to MENU function)
|
||||||
function template_header_top($title, $head = '') {
|
function template_header_top($title, $head = '') {
|
||||||
|
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
// Get the amount of items in the shopping cart, this will be displayed in the header.
|
// Get the amount of items in the shopping cart, this will be displayed in the header.
|
||||||
$num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0;
|
$num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0;
|
||||||
$home_link = url('index.php');
|
$home_link = url('index.php');
|
||||||
@@ -171,7 +171,7 @@ function template_header_top($title, $head = '') {
|
|||||||
}
|
}
|
||||||
// Template Menu
|
// Template Menu
|
||||||
function template_menu(){
|
function template_menu(){
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
// Get the amount of items in the shopping cart, this will be displayed in the header.
|
// Get the amount of items in the shopping cart, this will be displayed in the header.
|
||||||
$num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0;
|
$num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0;
|
||||||
$home_link = url('index.php');
|
$home_link = url('index.php');
|
||||||
@@ -213,6 +213,26 @@ function template_menu(){
|
|||||||
<a href="$myaccount_link" title="My Account">
|
<a href="$myaccount_link" title="My Account">
|
||||||
<i class="fa fa-user"></i>
|
<i class="fa fa-user"></i>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="dropdown">
|
||||||
|
<img src="{$base_url}custom/css/us.png" id="title" alt="English Flag" style="width:40px; height:auto; margin-right:10px;">
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<a href="javascript:void(0)" style="padding:2px;" onclick="changeLanguage('English', 'en', '{$base_url}custom/css/us.png')">
|
||||||
|
<img src="{$base_url}custom/css/us.png" style="padding:2px;" alt="English Flag">
|
||||||
|
</a>
|
||||||
|
<a href="javascript:void(0)" style="padding:2px;" onclick="changeLanguage('Spanish', 'es', '{$base_url}custom/css/es.png')">
|
||||||
|
<img src="{$base_url}custom/css/es.png" style="padding:2px;" alt="Spanish Flag">
|
||||||
|
</a>
|
||||||
|
<a href="javascript:void(0)" style="padding:2px;" onclick="changeLanguage('French', 'fr', '{$base_url}custom/css/fr.png')">
|
||||||
|
<img src="{$base_url}custom/css/fr.png" style="padding:2px;" alt="French Flag">
|
||||||
|
</a>
|
||||||
|
<a href="javascript:void(0)" style="padding:2px;" onclick="changeLanguage('German', 'de', '{$base_url}custom/css/de.png')">
|
||||||
|
<img src="{$base_url}custom/css/de.png" style="padding:2px;" alt="German Flag">
|
||||||
|
</a>
|
||||||
|
<a href="javascript:void(0)" style="padding:2px;" onclick="changeLanguage('Italian', 'it', '{$base_url}custom/css/it.png')">
|
||||||
|
<img src="{$base_url}custom/css/it.png" style="padding:2px;" alt="Italian Flag">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
$logout_link
|
$logout_link
|
||||||
<a class="responsive-toggle" onclick="openMenu('header_menu nav')" href="#">
|
<a class="responsive-toggle" onclick="openMenu('header_menu nav')" href="#">
|
||||||
<i class="fas fa-bars"></i>
|
<i class="fas fa-bars"></i>
|
||||||
@@ -225,7 +245,7 @@ function template_menu(){
|
|||||||
|
|
||||||
// Template footer
|
// Template footer
|
||||||
function template_footer() {
|
function template_footer() {
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
$base_url = base_url;
|
$base_url = base_url;
|
||||||
$rewrite_url = rewrite_url ? 'true' : 'false';
|
$rewrite_url = rewrite_url ? 'true' : 'false';
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
@@ -292,7 +312,7 @@ function template_footer() {
|
|||||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
//Template header order email
|
//Template header order email
|
||||||
function template_order_email_header() {
|
function template_order_email_header() {
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
$home_link = url('index.php');
|
$home_link = url('index.php');
|
||||||
$myaccount_link = url('index.php?page=myaccount');
|
$myaccount_link = url('index.php?page=myaccount');
|
||||||
@@ -502,7 +522,7 @@ EOT;
|
|||||||
}
|
}
|
||||||
// Template order footer
|
// Template order footer
|
||||||
function template_order_email_footer() {
|
function template_order_email_footer() {
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
$home_link = url('index.php');
|
$home_link = url('index.php');
|
||||||
$products_link = url(link_to_collection);
|
$products_link = url(link_to_collection);
|
||||||
$about_link = url('index.php?page=about');
|
$about_link = url('index.php?page=about');
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php defined(security_key) or exit; ?>
|
<?php defined(security_key) or exit; ?>
|
||||||
|
|
||||||
<?=template_order_email_header()?>
|
<?=template_order_email_header()?>
|
||||||
<?php include './custom/translations/translations_'.strtoupper(language_code).'.php';?>
|
<?php include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><br></td></tr>
|
<tr><td><br></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
<h1><?=$order_email_message_1?></h1>
|
<h1><?=$order_email_message_1?></h1>
|
||||||
<p><?=$order_email_message_2?></p></td>
|
<p><?=$order_email_message_2?></p></td>
|
||||||
<td>
|
<td>
|
||||||
<p>Order: <?=$order_id?></p>
|
<p><?=$order_number_text ?? 'Order' ?>: <?=$order_id?></p>
|
||||||
<p>Date: <?php echo date("Y-m-d");?></p></td>
|
<p><?=$order_date_text ?? 'Date'?>: <?php echo date("Y-m-d");?></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,17 +30,17 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$tr_product?></td>
|
<td><?=$tr_product ?? 'Product' ?></td>
|
||||||
<td>Opties</td>
|
<td><?=$tr_options ?? 'Options' ?></td>
|
||||||
<td><?=$tr_quantity?></td>
|
<td><?=$tr_quantity ?? 'Quantity'?></td>
|
||||||
<td><?=$tr_price?></td>
|
<td><?=$tr_price ?? 'Price' ?></td>
|
||||||
<td style="text-align:right;"><?=$tr_total?></td>
|
<td style="text-align:right;"><?=$tr_total?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach($products['products'] as $product): ?>
|
<?php foreach($products['products'] as $product): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$product['meta']['name']?></td>
|
<td><?=${$product['meta']['name']} ?? $product['meta']['name']?></td>
|
||||||
<td><?=implode(", ", $product['options'])?></td>
|
<td><?=implode(", ", $product['options'])?></td>
|
||||||
<td><?=$product['quantity']?></td>
|
<td><?=$product['quantity']?></td>
|
||||||
<td><?=currency_code?><?=number_format($product['options_price'],2)?></td>
|
<td><?=currency_code?><?=number_format($product['options_price'],2)?></td>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//(defined(security_key) or defined('admin')) or exit; ?>
|
//(defined(security_key) or defined('admin')) or exit; ?>
|
||||||
|
|
||||||
<?=template_order_email_header()?>
|
<?=template_order_email_header()?>
|
||||||
<?php include './custom/translations/translations_'.strtoupper(language_code).'.php';?>
|
<?php include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><br></td></tr>
|
<tr><td><br></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr><td><br></td></tr>
|
<tr><td><br></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><h2>Invoice: <?=$invoice_cust['invoice']['id']?></h2></td>
|
<td><h2><?=$order_invoice_text ?? 'Invoice'?>: <?=$invoice_cust['invoice']['id']?></h2></td>
|
||||||
<td><p>Date: <?php echo date("Y-m-d", strtotime($invoice_cust['invoice']['created']))?></p></td>
|
<td><p><?=$order_date_text ?? 'Date'?>: <?php echo date("Y-m-d", strtotime($invoice_cust['invoice']['created']))?></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -29,10 +29,10 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$tr_product?></td>
|
<td><?=$tr_product ?? 'Product' ?></td>
|
||||||
<td>Options</td>
|
<td><?=$tr_options ?? 'Options' ?></td>
|
||||||
<td><?=$tr_quantity?></td>
|
<td><?=$tr_quantity ?? 'Quantity'?></td>
|
||||||
<td><?=$tr_price?></td>
|
<td><?=$tr_price ?? 'Price' ?></td>
|
||||||
<td style="text-align:right;"><?=$tr_total?></td>
|
<td style="text-align:right;"><?=$tr_total?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<?php if($invoice_cust['invoice']['payment_status'] === 1){
|
<?php if($invoice_cust['invoice']['payment_status'] === 1){
|
||||||
echo '
|
echo '
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<p>Het totaalbedrag van deze factuur is betaald</p>
|
<p>'.($invoice_payment_paid_text ?? 'Het totaalbedrag van deze factuur is betaald').'</p>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php defined(security_key) or exit; ?>
|
<?php defined(security_key) or exit; ?>
|
||||||
|
|
||||||
<?=template_order_email_header()?>
|
<?=template_order_email_header()?>
|
||||||
<?php include './custom/translations/translations_'.strtoupper(language_code).'.php';?>
|
<?php include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';?>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><br></td></tr>
|
<tr><td><br></td></tr>
|
||||||
@@ -31,17 +31,17 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$tr_product?></td>
|
<td><?=$tr_product ?? 'Product' ?></td>
|
||||||
<td>Options</td>
|
<td><?=$tr_options ?? 'Options' ?></td>
|
||||||
<td><?=$tr_quantity?></td>
|
<td><?=$tr_quantity ?? 'Quantity'?></td>
|
||||||
<td><?=$tr_price?></td>
|
<td><?=$tr_price ?? 'Price' ?></td>
|
||||||
<td style="text-align:right;"><?=$tr_total?></td>
|
<td style="text-align:right;"><?=$tr_total?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach($products['products'] as $product): ?>
|
<?php foreach($products['products'] as $product): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$product['meta']['name']?></td>
|
<td><?=${$product['product_name']} ?? $product['product_name']?></td>
|
||||||
<td><?=implode(", ", $product['options'])?></td>
|
<td><?=implode(", ", $product['options'])?></td>
|
||||||
<td><?=$product['quantity']?></td>
|
<td><?=$product['quantity']?></td>
|
||||||
<td><?=currency_code?><?=number_format($product['options_price'],2)?></td>
|
<td><?=currency_code?><?=number_format($product['options_price'],2)?></td>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ function populate_categories($categories, $selected = 0, $parent_id = 0, $n = 0)
|
|||||||
|
|
||||||
// Send order details email function
|
// Send order details email function
|
||||||
function send_order_details_email($email, $products, $first_name, $last_name, $address_street, $address_city, $address_state, $address_zip, $address_country, $subtotal, $discounttotal,$shippingtotal,$taxtotal,$total, $order_id) {
|
function send_order_details_email($email, $products, $first_name, $last_name, $address_street, $address_city, $address_state, $address_zip, $address_country, $subtotal, $discounttotal,$shippingtotal,$taxtotal,$total, $order_id) {
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
// Send payment notification to webmaster
|
// Send payment notification to webmaster
|
||||||
$address_name = htmlspecialchars($first_name ?? '', ENT_QUOTES).' '.htmlspecialchars($last_name ?? '', ENT_QUOTES);
|
$address_name = htmlspecialchars($first_name ?? '', ENT_QUOTES).' '.htmlspecialchars($last_name ?? '', ENT_QUOTES);
|
||||||
if (email_notifications) {
|
if (email_notifications) {
|
||||||
@@ -160,7 +160,7 @@ function send_order_details_email($email, $products, $first_name, $last_name, $a
|
|||||||
|
|
||||||
//Send email to administrator for out of stock notification // only for registered users
|
//Send email to administrator for out of stock notification // only for registered users
|
||||||
function send_product_notification_email($email,$product_details){
|
function send_product_notification_email($email,$product_details){
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
$subject = $subject_out_of_stock.' - '.$product_details;
|
$subject = $subject_out_of_stock.' - '.$product_details;
|
||||||
$headers = 'From: ' . mail_from . "\r\n" . 'Reply-To: ' . $email . "\r\n" . 'Return-Path: ' . mail_from . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset=UTF-8' . "\r\n";
|
$headers = 'From: ' . mail_from . "\r\n" . 'Reply-To: ' . $email . "\r\n" . 'Return-Path: ' . mail_from . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" . 'Content-Type: text/html; charset=UTF-8' . "\r\n";
|
||||||
@@ -316,7 +316,7 @@ function format_bytes($bytes) {
|
|||||||
|
|
||||||
function getAccessoiries($clientsecret, $categoryID){
|
function getAccessoiries($clientsecret, $categoryID){
|
||||||
|
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
//GET CATALOG DATA
|
//GET CATALOG DATA
|
||||||
$additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret);
|
$additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret);
|
||||||
@@ -366,7 +366,7 @@ function getAccessoiries($clientsecret, $categoryID){
|
|||||||
|
|
||||||
function getSamples($clientsecret, $categoryID){
|
function getSamples($clientsecret, $categoryID){
|
||||||
|
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
//GET CATALOG DATA
|
//GET CATALOG DATA
|
||||||
$additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret);
|
$additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret);
|
||||||
@@ -522,7 +522,7 @@ function generateInvoice($invoice,$orderID){
|
|||||||
|
|
||||||
function freeShipment($price, $type){
|
function freeShipment($price, $type){
|
||||||
|
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
//Free delivery indicator
|
//Free delivery indicator
|
||||||
$delivery_status = ($price >= free_shipment_price) ? $free_delivery : $non_free_delivery.currency_code.free_shipment_price.',-';
|
$delivery_status = ($price >= free_shipment_price) ? $free_delivery : $non_free_delivery.currency_code.free_shipment_price.',-';
|
||||||
@@ -538,7 +538,7 @@ function freeShipment($price, $type){
|
|||||||
|
|
||||||
function consent()
|
function consent()
|
||||||
{
|
{
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
$age_consent = '
|
$age_consent = '
|
||||||
<div id="simple-cookie-consent">
|
<div id="simple-cookie-consent">
|
||||||
@@ -564,7 +564,7 @@ function consent()
|
|||||||
|
|
||||||
function banner()
|
function banner()
|
||||||
{
|
{
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
$banner = '
|
$banner = '
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
@@ -589,7 +589,7 @@ function consent()
|
|||||||
|
|
||||||
function maintenanceMode()
|
function maintenanceMode()
|
||||||
{
|
{
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
$maintenanceMode = '
|
$maintenanceMode = '
|
||||||
<div id="simple-cookie-consent">
|
<div id="simple-cookie-consent">
|
||||||
@@ -635,7 +635,7 @@ function getPictureID($pdo,$id,$config){
|
|||||||
//++++++++++++++++++++++++++++++++++++++++
|
//++++++++++++++++++++++++++++++++++++++++
|
||||||
function highlightedProducts($clientsecret,$categoryID,$range){
|
function highlightedProducts($clientsecret,$categoryID,$range){
|
||||||
|
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
|
||||||
//GET CATALOG DATA
|
//GET CATALOG DATA
|
||||||
$products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret);
|
$products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret);
|
||||||
|
|||||||
22
home.php
22
home.php
@@ -1,10 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// Prevent direct access to file
|
// Prevent direct access to file
|
||||||
defined(security_key) or exit;
|
defined(security_key) or exit;
|
||||||
// Get the 4 most recent added products
|
|
||||||
$stmt = $pdo->prepare('SELECT p.*, (SELECT m.full_path FROM products_media pm JOIN media m ON m.id = pm.media_id WHERE pm.product_id = p.id ORDER BY pm.position ASC LIMIT 1) AS img FROM products p WHERE p.status = 1 ORDER BY p.date_added DESC LIMIT 4');
|
|
||||||
$stmt->execute();
|
|
||||||
$recently_added_products = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
//LINK to products page:
|
//LINK to products page:
|
||||||
$products_link = url(link_to_collection);
|
$products_link = url(link_to_collection);
|
||||||
@@ -116,30 +112,30 @@ $view .='
|
|||||||
<div class="container neutral-three-columns-1">
|
<div class="container neutral-three-columns-1">
|
||||||
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
|
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
|
||||||
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
|
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
|
||||||
<h4 class="neutral-feature-title-1 neutral-margin-left-1">Timeless</h4>
|
<h4 class="neutral-feature-title-1 neutral-margin-left-1">'.($home_timeless ?? 'Timeless').'</h4>
|
||||||
</div>
|
</div>
|
||||||
<p class="paragraph neutral-paragraph-text-1">
|
<p class="paragraph neutral-paragraph-text-1">
|
||||||
Morval Watches are unique, robust, stylish and timeless timepieces that will last for generations!
|
'.($home_timeless_text ?? 'Morval Watches are unique, robust, stylish and timeless timepieces that will last for generations!').'
|
||||||
</p>
|
</p>
|
||||||
<a class="link-text neutral-text-link-1" href="'.$products_link.'">shop now ></a>
|
<a class="link-text neutral-text-link-1" href="'.$products_link.'">'.($shop_action ?? 'shop now').'></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
|
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
|
||||||
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
|
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
|
||||||
<h4 class="neutral-feature-title-1 neutral-margin-left-1">Quality</h4>
|
<h4 class="neutral-feature-title-1 neutral-margin-left-1">'.($home_quality ?? 'Quality').'</h4>
|
||||||
</div>
|
</div>
|
||||||
<p class="paragraph neutral-paragraph-text-1">
|
<p class="paragraph neutral-paragraph-text-1">
|
||||||
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.
|
'.($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>
|
</p>
|
||||||
<a class="link-text neutral-text-link-1" href="'.$products_link.'">shop now ></a>
|
<a class="link-text neutral-text-link-1" href="'.$products_link.'">'.($shop_action ?? 'shop now').' ></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
|
<div class="container neutral-feature-wrapper-1 neutral-left-align-items-1">
|
||||||
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
|
<div class="container container-feature-icon-wrapper-1"><span class="icon"></span>
|
||||||
<h4 class="neutral-feature-title-1 neutral-margin-left-1">Price</h4>
|
<h4 class="neutral-feature-title-1 neutral-margin-left-1">'.($home_price ?? 'Price').'</h4>
|
||||||
</div>
|
</div>
|
||||||
<p class="paragraph neutral-paragraph-text-1">
|
<p class="paragraph neutral-paragraph-text-1">
|
||||||
Morval stands for an excellent price-quality ratio
|
'.($home_price_text ?? 'Morval stands for an excellent price-quality ratio').'
|
||||||
</p>
|
</p>
|
||||||
<a class="link-text neutral-text-link-1" href="'.$products_link.'">shop now ></a>
|
<a class="link-text neutral-text-link-1" href="'.$products_link.'">'.($shop_action ?? 'shop now').'></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
31
index.php
31
index.php
@@ -17,7 +17,36 @@ session_start();
|
|||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
include './custom/settings/config.php';
|
include './custom/settings/config.php';
|
||||||
include 'functions.php';
|
include 'functions.php';
|
||||||
include './custom/translations/translations_'.strtoupper(language_code).'.php';
|
|
||||||
|
|
||||||
|
//TRANSLATION FILE LOCATION
|
||||||
|
if (isset($_GET['language']) && $_GET['language'] !=''){
|
||||||
|
//INCLUDE LANGUAGE FILE
|
||||||
|
$file_language = './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
if (file_exists($api_file_language)){
|
||||||
|
include $file_language; //Include the code
|
||||||
|
//DEFINE LANGUAGE
|
||||||
|
$_SESSION['country_code'] = trim($_GET['language']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
include './custom/translations/translations_US.php';
|
||||||
|
//DEFINE LANGUAGE
|
||||||
|
$_SESSION['country_code'] = language_code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif(isset($_SESSION['country_code'])){
|
||||||
|
$file_language = './settings/translations/translations_'.strtoupper($_SESSION['country_code']).'.php';
|
||||||
|
if (file_exists($file_language)){
|
||||||
|
include $file_language; //Include the code
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
include './custom/translations/translations_US.php';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
include './custom/translations/translations_US.php';
|
||||||
|
//DEFINE LANGUAGE
|
||||||
|
$_SESSION['country_code'] = language_code;
|
||||||
|
}
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
//LOGIN TO API
|
//LOGIN TO API
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if (isset($_SESSION['discount'])) {
|
|||||||
unset($_SESSION['discount']);
|
unset($_SESSION['discount']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?=template_header('Place Order')?>
|
<?=template_header(($place_order_header ?? 'Place order'))?>
|
||||||
|
|
||||||
<?php if ($error): ?>
|
<?php if ($error): ?>
|
||||||
<p class="content-wrapper error"><?=$error?></p>
|
<p class="content-wrapper error"><?=$error?></p>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ $view .= ' <div style="margin-top: 30px;display: flex;align-items: center;align-
|
|||||||
foreach ($categories as $categorie){
|
foreach ($categories as $categorie){
|
||||||
if ($categorie['parent_id'] == '0' && $categorie['status'] == 1 && $categorie['filter'] != 1){
|
if ($categorie['parent_id'] == '0' && $categorie['status'] == 1 && $categorie['filter'] != 1){
|
||||||
$weburl = url('index.php?page=products&category='.$categorie['rowID'].'');
|
$weburl = url('index.php?page=products&category='.$categorie['rowID'].'');
|
||||||
$view .= '<a href="'.$weburl.'">'.$categorie['name'].'</a>';
|
$view .= '<a href="'.$weburl.'">'.(${$categorie['name']} ?? $categorie['name']).'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$view .= '
|
$view .= '
|
||||||
@@ -119,7 +119,7 @@ $view .= ' <div style="margin-top: 30px;display: flex;align-items: center;align-
|
|||||||
foreach ($categories as $categorie){
|
foreach ($categories as $categorie){
|
||||||
if ($categorie['parent_id'] == $_GET['category'] && $categorie['status'] == 1 && $categorie['filter'] != 1){
|
if ($categorie['parent_id'] == $_GET['category'] && $categorie['status'] == 1 && $categorie['filter'] != 1){
|
||||||
$weburl = url('index.php?page=productsnew&category='.$categorie['rowID'].'');
|
$weburl = url('index.php?page=productsnew&category='.$categorie['rowID'].'');
|
||||||
$view .= '<a href="'.$weburl.'" style="color: #fff;background-color: #555555;font-size: 10px;">'.$categorie['name'].'</a>';
|
$view .= '<a href="'.$weburl.'" style="color: #fff;background-color: #555555;font-size: 10px;">'.(${$categorie['name']} ?? $categorie['name']).'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$view .= '</div>';
|
$view .= '</div>';
|
||||||
|
|||||||
@@ -153,3 +153,11 @@ function updateOption(id_large, IMG_large){
|
|||||||
//change picture
|
//change picture
|
||||||
document.getElementById(id_large).src = IMG_large;
|
document.getElementById(id_large).src = IMG_large;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Function to change the title and flag when a language is selected
|
||||||
|
function changeLanguage(language, langCode, flagUrl) {
|
||||||
|
const title = document.getElementById("title");
|
||||||
|
title.src = flagUrl;
|
||||||
|
title.alt = language+" Flag";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user