Initial rewiring

This commit is contained in:
“VeLiTi”
2025-01-30 13:43:02 +01:00
parent 6f1cc27ec4
commit 390a6e9f4f
14 changed files with 38 additions and 38 deletions

View File

@@ -134,7 +134,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_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
// Send payment notification to webmaster
$address_name = htmlspecialchars($first_name ?? '', ENT_QUOTES).' '.htmlspecialchars($last_name ?? '', ENT_QUOTES);
if (email_notifications) {
@@ -159,7 +159,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_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_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";
@@ -315,7 +315,7 @@ function format_bytes($bytes) {
function getAccessoiries($pdo, $categoryID){
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
$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 JOIN products_categories pc ON pc.category_id = :category_id AND pc.product_id = p.id JOIN categories c ON c.id = pc.category_id WHERE p.status = 1');
$stmt->bindValue(':category_id', $categoryID, PDO::PARAM_INT);
@@ -364,7 +364,7 @@ function getAccessoiries($pdo, $categoryID){
function getSamples($pdo, $categoryID){
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
$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 JOIN products_categories pc ON pc.category_id = :category_id AND pc.product_id = p.id JOIN categories c ON c.id = pc.category_id WHERE p.status = 1');
$stmt->bindValue(':category_id', $categoryID, PDO::PARAM_INT);
@@ -550,7 +550,7 @@ function generateInvoice($pdo, $orderID){
function freeShipment($price, $type){
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
//Free delivery indicator
$delivery_status = ($price >= free_shipment_price) ? $free_delivery : $non_free_delivery.currency_code.free_shipment_price.',-';
@@ -564,7 +564,7 @@ function freeShipment($price, $type){
function consent()
{
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
$age_consent = '
<div id="simple-cookie-consent">
@@ -590,7 +590,7 @@ function consent()
function banner()
{
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
$banner = '
<div id="banner">
@@ -615,7 +615,7 @@ function consent()
function maintenanceMode()
{
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
$maintenanceMode = '
<div id="simple-cookie-consent">
@@ -661,7 +661,7 @@ function getPictureID($pdo,$id,$config){
//++++++++++++++++++++++++++++++++++++++++
function highlightedProducts($pdo,$categoryID,$range){
include './custom/translations_'.strtoupper(language_code).'.php';
include './custom/translations/translations_'.strtoupper(language_code).'.php';
$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 JOIN products_categories pc ON pc.category_id = :category_id AND pc.product_id = p.id JOIN categories c ON c.id = pc.category_id WHERE p.status = 1');
$stmt->bindValue(':category_id', $categoryID, PDO::PARAM_INT);