diff --git a/cart.php b/cart.php index a1a6f63..562dee1 100644 --- a/cart.php +++ b/cart.php @@ -101,7 +101,7 @@ foreach ($products_in_cart as $num => $product) { $subtotal += (float)$product['options_price'] * (int)$product['quantity']; } -template_header('Shopping Cart'); +template_header(($shopping_cart_header ?? 'Shopping Cart')); $view = '
diff --git a/checkout.php b/checkout.php index 0a451a6..7708569 100644 --- a/checkout.php +++ b/checkout.php @@ -332,7 +332,7 @@ if (isset($_POST['method'], $_POST['first_name'], $_POST['last_name'], $_POST['a $terms_link = url('index.php?page=termsandconditions'); -template_header('Checkout'); +template_header(($checkout_header ?? 'Checkout')); $view = '
@@ -490,7 +490,7 @@ $view .= '
if ($taxtotal > 0){ $view .= '
- VAT ('.$tax_rate.') + '.($tax_text ?? 'VAT').' ('.$tax_rate.') '.currency_code.''.number_format($taxtotal,2).'
'; } diff --git a/custom/css/custom.css b/custom/css/custom.css index f81409b..525a49d 100644 --- a/custom/css/custom.css +++ b/custom/css/custom.css @@ -2005,4 +2005,32 @@ input.banner_deny:hover { .news-grid { 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; } \ No newline at end of file diff --git a/custom/css/de.png b/custom/css/de.png new file mode 100644 index 0000000..523125f Binary files /dev/null and b/custom/css/de.png differ diff --git a/custom/css/es.png b/custom/css/es.png new file mode 100644 index 0000000..d5f5b09 Binary files /dev/null and b/custom/css/es.png differ diff --git a/custom/css/fr.png b/custom/css/fr.png new file mode 100644 index 0000000..193f74f Binary files /dev/null and b/custom/css/fr.png differ diff --git a/custom/css/it.png b/custom/css/it.png new file mode 100644 index 0000000..9c9f3cc Binary files /dev/null and b/custom/css/it.png differ diff --git a/custom/css/nl.png b/custom/css/nl.png new file mode 100644 index 0000000..91c83bb Binary files /dev/null and b/custom/css/nl.png differ diff --git a/custom/css/us.png b/custom/css/us.png new file mode 100644 index 0000000..818b70b Binary files /dev/null and b/custom/css/us.png differ diff --git a/custom/customfunctions.php b/custom/customfunctions.php index d0c4c39..079acf4 100644 --- a/custom/customfunctions.php +++ b/custom/customfunctions.php @@ -17,7 +17,7 @@ function get_countries() { // Template Header default including MENU 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. $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) 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. $num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0; $home_link = url('index.php'); @@ -171,7 +171,7 @@ function template_header_top($title, $head = '') { } // 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. $num_items_in_cart = isset($_SESSION['cart']) ? array_sum(array_column($_SESSION['cart'], 'quantity')) : 0; $home_link = url('index.php'); @@ -212,7 +212,27 @@ function template_menu(){ - + + $logout_link @@ -225,7 +245,7 @@ function template_menu(){ // 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; $rewrite_url = rewrite_url ? 'true' : 'false'; $year = date('Y'); @@ -292,7 +312,7 @@ function template_footer() { //++++++++++++++++++++++++++++++++++++++++++++++++++++ //Template header order email 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'); $myaccount_link = url('index.php?page=myaccount'); @@ -502,7 +522,7 @@ EOT; } // Template order 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'); $products_link = url(link_to_collection); $about_link = url('index.php?page=about'); diff --git a/custom/email/order-details-template.php b/custom/email/order-details-template.php index 022a16a..c0bbfdc 100644 --- a/custom/email/order-details-template.php +++ b/custom/email/order-details-template.php @@ -1,7 +1,7 @@ - +
@@ -18,8 +18,8 @@

-

Order:

-

Date:

+

:

+

:

@@ -30,17 +30,17 @@ - - - - + + + + - + diff --git a/custom/email/order-invoice-template.php b/custom/email/order-invoice-template.php index 7f3c952..5c9f20f 100644 --- a/custom/email/order-invoice-template.php +++ b/custom/email/order-invoice-template.php @@ -3,7 +3,7 @@ //(defined(security_key) or defined('admin')) or exit; ?> - + @@ -16,8 +16,8 @@ - - + +
Opties


Invoice:

Date:

:

:

@@ -29,10 +29,10 @@ - - - - + + + + @@ -77,7 +77,7 @@ -

Het totaalbedrag van deze factuur is betaald

+

'.($invoice_payment_paid_text ?? 'Het totaalbedrag van deze factuur is betaald').'

'; } ?> \ No newline at end of file diff --git a/custom/email/order-notification-template.php b/custom/email/order-notification-template.php index 295310d..cae43df 100644 --- a/custom/email/order-notification-template.php +++ b/custom/email/order-notification-template.php @@ -1,7 +1,7 @@ - + @@ -31,17 +31,17 @@
Options

- - - - + + + + - + diff --git a/functions.php b/functions.php index a513784..985b042 100644 --- a/functions.php +++ b/functions.php @@ -136,7 +136,7 @@ function populate_categories($categories, $selected = 0, $parent_id = 0, $n = 0) // 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) { - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; // Send payment notification to webmaster $address_name = htmlspecialchars($first_name ?? '', ENT_QUOTES).' '.htmlspecialchars($last_name ?? '', ENT_QUOTES); 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 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; $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){ - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; //GET CATALOG DATA $additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret); @@ -366,7 +366,7 @@ function getAccessoiries($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 $additional_products = ioAPIv2('/v2/catalog/category='.$categoryID,'',$clientsecret); @@ -522,7 +522,7 @@ function generateInvoice($invoice,$orderID){ function freeShipment($price, $type){ - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; //Free delivery indicator $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() { - include './custom/translations/translations_'.strtoupper(language_code).'.php'; + include './custom/translations/translations_'.strtoupper($_SESSION['country_code']).'.php'; $age_consent = '
Options