From 11f95cfd4b262e3b95f2694fcbeabeffc720a9d0 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 12 Dec 2025 19:32:49 +0000 Subject: [PATCH] ENG v.1 --- cart.php | 148 +++++++-------------- cart_actions.php | 7 +- checkout.php | 42 +----- includes/auth.php | 3 - includes/footer.php | 13 +- includes/header.php | 266 +++++--------------------------------- includes/html_head.php | 27 ++++ includes/i18n.php | 277 ++++++++++++++++++++++++++++++++++++++++ includes/init.php | 8 ++ index.php | 114 +++-------------- login.php | 15 +-- order_confirmation.php | 105 +++++---------- order_details.php | 75 +---------- orders.php | 153 +++++----------------- product.php | 95 ++++---------- profile.php | 179 +++++++++----------------- related_suggestions.php | 145 ++++----------------- 17 files changed, 604 insertions(+), 1068 deletions(-) create mode 100644 includes/html_head.php create mode 100644 includes/i18n.php create mode 100644 includes/init.php diff --git a/cart.php b/cart.php index 65729bb..fb5db7c 100644 --- a/cart.php +++ b/cart.php @@ -1,12 +1,9 @@ $price_net, 'price_gross' => $price_gross, 'quantity' => $quantity, - 'line_total' => $line_total_gross, // Use gross for calculations + 'line_total' => $line_total_gross, ]; - $total_price += $line_total_gross; // Sum up the gross total + $total_price += $line_total_gross; } } catch (PDOException $e) { - die("Błąd połączenia z bazą danych: " . $e->getMessage()); + die(t('db_connection_error') . $e->getMessage()); } } -$page_title = 'Koszyk'; $user_role = get_user_role(); ?> - - - - - - <?php echo htmlspecialchars($page_title); ?> - B2B Commerce - - - - - - - -
-

Koszyk

- - - - Wróć do sklepu - + + +
- - - - - + + + + + - - - + + + - + @@ -157,24 +101,20 @@ $user_role = get_user_role(); - - + +
ProduktCena nettoCena bruttoIlośćRazem
- + - - - + + +
- + - +
Razem (brutto):
- - - -
- - - - - \ No newline at end of file + +
+ + +
+ + + + \ No newline at end of file diff --git a/cart_actions.php b/cart_actions.php index 3a5ad37..c57ff16 100644 --- a/cart_actions.php +++ b/cart_actions.php @@ -1,11 +1,6 @@ "> - +

Podsumowanie zamówienia

diff --git a/includes/auth.php b/includes/auth.php index 1859ac7..77b1019 100644 --- a/includes/auth.php +++ b/includes/auth.php @@ -1,7 +1,4 @@ -
-

© . All Rights Reserved.

-
- +
+
+

© powered by LEA24. All Rights Reserved.

+
+
+ + + \ No newline at end of file diff --git a/includes/header.php b/includes/header.php index 1afb512..25979ef 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,239 +1,26 @@ [ - 'menu_catalog' => 'Katalog', - 'menu_cart' => 'Koszyk', - 'menu_orders' => 'Zamówienia', - 'menu_profile' => 'Profil', - 'menu_logout' => 'Wyloguj', - 'btn_add_to_cart' => 'Dodaj do koszyka', - 'btn_go_to_cart' => 'Przejdź do koszyka', - 'btn_checkout' => 'Przejdź do zamówienia', - 'btn_back_to_shop' => 'Wróć do sklepu', - 'label_quantity' => 'Ilość', - 'label_price' => 'Cena', - 'label_total' => 'Razem', - 'label_product' => 'Produkt', - 'title_cart' => 'Koszyk', - 'title_orders' => 'Twoje zamówienia', - 'title_order_details' => 'Szczegóły zamówienia', - 'title_checkout' => 'Podsumowanie zamówienia', - 'title_profile' => 'Profil użytkownika', - 'footer_powered_by' => 'powered by LEA24', - 'cart_empty' => 'Twój koszyk jest pusty.', - 'product' => 'Produkt', - 'remove' => 'Usuń', - 'subtotal' => 'Suma częściowa', - 'continue_shopping' => 'Kontynuuj zakupy', - 'order_summary' => 'Podsumowanie', - 'order_date' => 'Data zamówienia', - 'order_status' => 'Status', - 'order_total' => 'Suma', - 'order_action' => 'Akcja', - 'order_view' => 'Zobacz', - 'order_id' => 'ID Zamówienia', - 'order_number' => 'Numer zamówienia', - 'order_confirmation' => 'Potwierdzenie zamówienia', - 'order_thank_you' => 'Dziękujemy za złożenie zamówienia.', - 'order_number_is' => 'Numer Twojego zamówienia to', - 'first_name' => 'Imię', - 'last_name' => 'Nazwisko', - 'email' => 'Email', - 'current_password' => 'Aktualne hasło', - 'new_password' => 'Nowe hasło', - 'confirm_new_password' => 'Potwierdź nowe hasło', - 'update_profile' => 'Zaktualizuj profil', - 'password_note' => 'Pozostaw puste, jeśli nie chcesz zmieniać hasła.', - 'profile_updated' => 'Profil zaktualizowany pomyślnie.', - 'password_updated' => 'Hasło zaktualizowane pomyślnie.', - 'password_mismatch' => 'Nowe hasła nie są zgodne.', - 'incorrect_password' => 'Nieprawidłowe aktualne hasło.', - 'app_title' => 'B2B Commerce', - 'btn_update' => 'Zaktualizuj', - 'btn_remove' => 'Usuń', - 'label_unit_price' => 'Cena jednostkowa', - 'label_subtotal' => 'Suma częściowa', - 'confirm_order' => 'Potwierdź zamówienie', - 'delivery_payment_options' => 'Opcje dostawy i płatności', - 'delivery_source' => 'Źródło dostawy', - 'central_warehouse' => 'Magazyn Centralny', - 'external_supplier' => 'Dostawca zewnętrzny', - 'available_trade_credit' => 'Dostępny limit kredytu kupieckiego', - 'order_notes' => 'Uwagi do zamówienia', - 'order_history' => 'Historia zamówień', - 'error_client_id_not_found' => 'Nie znaleziono identyfikatora klienta. Zaloguj się ponownie.', - 'error_fetching_orders' => 'Wystąpił błąd podczas pobierania zamówień. Prosimy spróbować ponownie później.', - 'no_orders_yet' => 'Nie masz jeszcze żadnych zamówień.', - 'btn_view_details' => 'Szczegóły', - 'error_no_permission' => 'Brak uprawnień do wyświetlenia tego zamówienia.', - 'error_order_not_found' => 'Nie znaleziono zamówienia lub nie masz do niego dostępu.', - 'error_database' => 'Błąd bazy danych. Prosimy spróbować ponownie później.', - 'label_payment_method' => 'Metoda płatności', - 'label_notes' => 'Uwagi', - 'label_image' => 'Zdjęcie', - 'label_no_image' => 'Brak zdjęcia', - 'btn_back_to_orders' => 'Wróć do listy zamówień', - 'order_details_for' => 'Szczegóły zamówienia', - 'error_loading_profile' => 'Wystąpił błąd podczas ładowania danych profilu. Prosimy spróbować ponownie później.', - 'profile_meta_description' => 'Zarządzaj swoim profilem w platformie B2B Commerce.', - 'toggle_navigation' => 'Przełącz nawigację', - 'label_email' => 'Adres e-mail', - 'label_client' => 'Klient', - 'password_management' => 'Zarządzanie hasłem', - 'feature_in_preparation' => 'Funkcja w przygotowaniu.', - 'track_status_in' => 'Możesz śledzić jego status w panelu', - 'my_orders' => 'Moje zamówienia', - 'header_account' => 'Konto', - // Standardized Statuses - 'status_pending' => 'Oczekujące', - 'status_pending_payment' => 'Oczekuje na płatność', - 'status_paid' => 'Zapłacone', - 'status_in_progress' => 'W realizacji', - 'status_shipped' => 'Wysłane', - 'status_partially_shipped' => 'Częściowo wysłane', - 'status_completed' => 'Zrealizowane', - 'status_cancelled' => 'Anulowane', - // Standardized Payment Methods - 'payment_method' => 'Metoda płatności', - 'payment_bank_transfer' => 'Przelew tradycyjny', - 'payment_online' => 'Płatność online (Przelewy24)', - 'payment_credit' => 'Kredyt kupiecki', - 'header_welcome' => 'Witaj', - 'footer_text' => 'powered by LEA24', - ], - 'en' => [ - 'menu_catalog' => 'Catalog', - 'menu_cart' => 'Cart', - 'menu_orders' => 'Orders', - 'menu_profile' => 'Profile', - 'menu_logout' => 'Logout', - 'btn_add_to_cart' => 'Add to cart', - 'btn_go_to_cart' => 'Go to cart', - 'btn_checkout' => 'Proceed to checkout', - 'btn_back_to_shop' => 'Back to shop', - 'label_quantity' => 'Quantity', - 'label_price' => 'Price', - 'label_total' => 'Total', - 'label_product' => 'Product', - 'title_cart' => 'Shopping Cart', - 'title_orders' => 'Your Orders', - 'title_order_details' => 'Order Details', - 'title_checkout' => 'Checkout', - 'title_profile' => 'User Profile', - 'footer_powered_by' => 'powered by LEA24', - 'cart_empty' => 'Your cart is empty.', - 'product' => 'Product', - 'remove' => 'Remove', - 'subtotal' => 'Subtotal', - 'continue_shopping' => 'Continue shopping', - 'order_summary' => 'Order Summary', - 'order_date' => 'Order Date', - 'order_status' => 'Status', - 'order_total' => 'Total', - 'order_action' => 'Action', - 'order_view' => 'View', - 'order_id' => 'Order ID', - 'order_number' => 'Order Number', - 'order_confirmation' => 'Order Confirmation', - 'order_thank_you' => 'Thank you for your order.', - 'order_number_is' => 'Your order number is', - 'first_name' => 'First Name', - 'last_name' => 'Last Name', - 'email' => 'Email', - 'current_password' => 'Current Password', - 'new_password' => 'New Password', - 'confirm_new_password' => 'Confirm New Password', - 'update_profile' => 'Update Profile', - 'password_note' => 'Leave blank if you don\'t want to change the password.', - 'profile_updated' => 'Profile updated successfully.', - 'password_updated' => 'Password updated successfully.', - 'password_mismatch' => 'New passwords do not match.', - 'incorrect_password' => 'Incorrect current password.', - 'app_title' => 'B2B Commerce', - 'btn_update' => 'Update', - 'btn_remove' => 'Remove', - 'label_unit_price' => 'Unit price', - 'label_subtotal' => 'Subtotal', - 'confirm_order' => 'Confirm order', - 'delivery_payment_options' => 'Delivery and payment options', - 'delivery_source' => 'Delivery source', - 'central_warehouse' => 'Central Warehouse', - 'external_supplier' => 'External Supplier', - 'available_trade_credit' => 'Available trade credit', - 'order_notes' => 'Order notes', - 'order_history' => 'Order History', - 'error_client_id_not_found' => 'Client ID not found. Please log in again.', - 'error_fetching_orders' => 'An error occurred while fetching orders. Please try again later.', - 'no_orders_yet' => 'You have no orders yet.', - 'btn_view_details' => 'Details', - 'error_no_permission' => 'You do not have permission to view this order.', - 'error_order_not_found' => 'Order not found or you do not have access to it.', - 'error_database' => 'Database error. Please try again later.', - 'label_payment_method' => 'Payment Method', - 'label_notes' => 'Notes', - 'label_image' => 'Image', - 'label_no_image' => 'No image', - 'btn_back_to_orders' => 'Back to orders', - 'order_details_for' => 'Order Details', - 'error_loading_profile' => 'An error occurred while loading profile data. Please try again later.', - 'profile_meta_description' => 'Manage your profile on the B2B Commerce platform.', - 'toggle_navigation' => 'Toggle navigation', - 'label_email' => 'Email address', - 'label_client' => 'Client', - 'password_management' => 'Password Management', - 'feature_in_preparation' => 'Feature in preparation.', - 'track_status_in' => 'You can track its status in the', - 'my_orders' => 'My Orders', - 'header_account' => 'Account', - // Standardized Statuses - 'status_pending' => 'Pending', - 'status_pending_payment' => 'Pending payment', - 'status_paid' => 'Paid', - 'status_in_progress' => 'In progress', - 'status_shipped' => 'Shipped', - 'status_partially_shipped' => 'Partially shipped', - 'status_completed' => 'Completed', - 'status_cancelled' => 'Cancelled', - // Standardized Payment Methods - 'payment_method' => 'Payment method', - 'payment_bank_transfer' => 'Bank transfer', - 'payment_online' => 'Online payment (Przelewy24)', - 'payment_credit' => 'Trade credit', - 'header_welcome' => 'Welcome', - 'footer_text' => 'powered by LEA24', - ] -]; - -if (!function_exists('t')) { - function t($key) { - global $translations, $lang; - return $translations[$lang][$key] ?? $key; - } -} - -function getCurrentLanguage() { - global $lang; - return $lang; -} - -require_once __DIR__ . '/auth.php'; - $user_role = get_user_role(); -$current_lang = getCurrentLanguage(); +$current_lang = get_lang(); ?>