From 3fc0519f9dbdcddb0f2b460807c2f65fdaa2a49a Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Fri, 27 Feb 2026 00:04:16 +0100 Subject: [PATCH] Add review step template for one page checkout module - Introduced a new template file 'review copy.tpl' for the order summary step in the one page checkout process. - The template includes a loading indicator and a header for the order summary section. - Conditional rendering based on customer registration status is implemented. --- .serena/.gitignore | 1 + .serena/memories/codebase_structure.md | 34 + .serena/memories/project_overview.md | 39 + .serena/memories/style_and_conventions.md | 39 + .serena/memories/suggested_commands.md | 34 + .serena/memories/task_completion_checklist.md | 29 + .serena/project.yml | 126 + .vscode/ftp-kr.json | 3 +- .vscode/ftp-kr.sync.cache.json | 16 +- info.php | 1 + modules/dpdpoland/AdminOrdersOverride.gif | Bin 0 -> 265 bytes modules/dpdpoland/AdminOrdersOverride.php | 241 ++ .../backward_compatibility/Context.php | 347 ++ .../backward_compatibility/Display.php | 48 + .../backward_compatibility/backward.ini | 1 + .../backward_compatibility/backward.php | 55 + .../backward_compatibility/index.php | 35 + modules/dpdpoland/changelog.txt | 202 ++ modules/dpdpoland/classes/CSV.php | 280 ++ modules/dpdpoland/classes/Carrier.php | 100 + modules/dpdpoland/classes/Configuration.php | 557 ++++ modules/dpdpoland/classes/Country.php | 192 ++ modules/dpdpoland/classes/Log.php | 34 + modules/dpdpoland/classes/Manifest.php | 244 ++ modules/dpdpoland/classes/ObjectModel.php | 148 + modules/dpdpoland/classes/Package.php | 448 +++ modules/dpdpoland/classes/Parcel.php | 296 ++ modules/dpdpoland/classes/ParcelProduct.php | 254 ++ modules/dpdpoland/classes/PayerNumber.php | 123 + modules/dpdpoland/classes/PickupHistory.php | 188 ++ modules/dpdpoland/classes/SenderAddress.php | 175 + modules/dpdpoland/classes/index.php | 29 + modules/dpdpoland/composer.json | 7 + modules/dpdpoland/composer.lock | 18 + modules/dpdpoland/config.api.php | 284 ++ modules/dpdpoland/config.xml | 12 + modules/dpdpoland/config/index.php | 29 + modules/dpdpoland/config/routes.yml | 17 + modules/dpdpoland/config_pl.xml | 12 + .../controllers/arrange_pickup.controller.php | 347 ++ .../controllers/configuration.controller.php | 260 ++ modules/dpdpoland/controllers/controller.php | 206 ++ .../controllers/countryList.controller.php | 191 ++ .../dpdpoland/controllers/csv.controller.php | 671 ++++ .../controllers/dpd_classic.service.php | 128 + .../controllers/dpd_pudo.service.php | 0 .../controllers/dpd_pudo_cod.service.php | 131 + modules/dpdpoland/dpdpoland.ajax.php | 134 + modules/dpdpoland/dpdpoland.lang.php | 157 + modules/dpdpoland/dpdpoland.pdf.php | 75 + modules/dpdpoland/dpdpoland.php | 2836 +++++++++++++++++ modules/dpdpoland/en.php | 397 +++ modules/dpdpoland/index.php | 29 + modules/dpdpoland/logo.gif | Bin 0 -> 253 bytes modules/dpdpoland/logo.png | Bin 0 -> 3413 bytes modules/dpdpoland/logo.webp | Bin 0 -> 1738 bytes modules/dpdpoland/pl.php | 895 ++++++ .../views/templates/front/carrier.tpl | 11 +- .../templates/front/steps/review copy.tpl | 22 + .../views/css/front/onepagecheckoutps_17.css | 4 + .../views/templates/front/carrier.tpl | 8 +- 61 files changed, 11187 insertions(+), 13 deletions(-) create mode 100644 .serena/.gitignore create mode 100644 .serena/memories/codebase_structure.md create mode 100644 .serena/memories/project_overview.md create mode 100644 .serena/memories/style_and_conventions.md create mode 100644 .serena/memories/suggested_commands.md create mode 100644 .serena/memories/task_completion_checklist.md create mode 100644 .serena/project.yml create mode 100644 modules/dpdpoland/AdminOrdersOverride.gif create mode 100644 modules/dpdpoland/AdminOrdersOverride.php create mode 100644 modules/dpdpoland/backward_compatibility/Context.php create mode 100644 modules/dpdpoland/backward_compatibility/Display.php create mode 100644 modules/dpdpoland/backward_compatibility/backward.ini create mode 100644 modules/dpdpoland/backward_compatibility/backward.php create mode 100644 modules/dpdpoland/backward_compatibility/index.php create mode 100644 modules/dpdpoland/changelog.txt create mode 100644 modules/dpdpoland/classes/CSV.php create mode 100644 modules/dpdpoland/classes/Carrier.php create mode 100644 modules/dpdpoland/classes/Configuration.php create mode 100644 modules/dpdpoland/classes/Country.php create mode 100644 modules/dpdpoland/classes/Log.php create mode 100644 modules/dpdpoland/classes/Manifest.php create mode 100644 modules/dpdpoland/classes/ObjectModel.php create mode 100644 modules/dpdpoland/classes/Package.php create mode 100644 modules/dpdpoland/classes/Parcel.php create mode 100644 modules/dpdpoland/classes/ParcelProduct.php create mode 100644 modules/dpdpoland/classes/PayerNumber.php create mode 100644 modules/dpdpoland/classes/PickupHistory.php create mode 100644 modules/dpdpoland/classes/SenderAddress.php create mode 100644 modules/dpdpoland/classes/index.php create mode 100644 modules/dpdpoland/composer.json create mode 100644 modules/dpdpoland/composer.lock create mode 100644 modules/dpdpoland/config.api.php create mode 100644 modules/dpdpoland/config.xml create mode 100644 modules/dpdpoland/config/index.php create mode 100644 modules/dpdpoland/config/routes.yml create mode 100644 modules/dpdpoland/config_pl.xml create mode 100644 modules/dpdpoland/controllers/arrange_pickup.controller.php create mode 100644 modules/dpdpoland/controllers/configuration.controller.php create mode 100644 modules/dpdpoland/controllers/controller.php create mode 100644 modules/dpdpoland/controllers/countryList.controller.php create mode 100644 modules/dpdpoland/controllers/csv.controller.php create mode 100644 modules/dpdpoland/controllers/dpd_classic.service.php create mode 100644 modules/dpdpoland/controllers/dpd_pudo.service.php create mode 100644 modules/dpdpoland/controllers/dpd_pudo_cod.service.php create mode 100644 modules/dpdpoland/dpdpoland.ajax.php create mode 100644 modules/dpdpoland/dpdpoland.lang.php create mode 100644 modules/dpdpoland/dpdpoland.pdf.php create mode 100644 modules/dpdpoland/dpdpoland.php create mode 100644 modules/dpdpoland/en.php create mode 100644 modules/dpdpoland/index.php create mode 100644 modules/dpdpoland/logo.gif create mode 100644 modules/dpdpoland/logo.png create mode 100644 modules/dpdpoland/logo.webp create mode 100644 modules/dpdpoland/pl.php create mode 100644 modules/onepagecheckoutps/views/templates/front/steps/review copy.tpl diff --git a/.serena/.gitignore b/.serena/.gitignore new file mode 100644 index 00000000..14d86ad6 --- /dev/null +++ b/.serena/.gitignore @@ -0,0 +1 @@ +/cache diff --git a/.serena/memories/codebase_structure.md b/.serena/memories/codebase_structure.md new file mode 100644 index 00000000..04ab5fb9 --- /dev/null +++ b/.serena/memories/codebase_structure.md @@ -0,0 +1,34 @@ +# Codebase Structure + +``` +interblue.pl/ +├── admin658c34/ # Back-office admin panel (obfuscated folder name) +├── app/ # PrestaShop Symfony app (kernel, AppKernel) +├── classes/ # PrestaShop core classes +├── config/ # Configuration files (settings.inc.php, defines.inc.php, etc.) +├── controllers/ # PrestaShop core controllers +├── custom/ # Custom utility files (medoo.php, sollux.csv) +├── img/ # Images (products, categories, etc.) +├── mails/ # Email templates +├── modules/ # PrestaShop modules (~120+ modules) +├── override/ # Class & controller overrides +│ ├── classes/ # Overridden core classes (Product, Order, Hook, etc.) +│ └── controllers/ # Overridden front controllers +├── src/ # Symfony-based PrestaShop source +│ ├── Adapter/ +│ └── Core/ +├── themes/ +│ ├── InterBlue/ # Active custom theme +│ └── classic/ # Default PS theme (base) +├── xml/ # XML configuration files +├── import-products.php # Sollux product importer +├── export.php # Product export +├── custom-cron.php # Custom cron tasks +└── NOTATKI.md # Developer notes +``` + +## Key Directories for Development +- **Custom modules**: `modules/customfeaturetab/`, `modules/dw_*`, `modules/addcolumninlist/`, `modules/sposoby_dostawy/` +- **Overrides**: `override/classes/`, `override/controllers/front/` +- **Theme**: `themes/InterBlue/` +- **Custom scripts**: Root-level PHP files (import-products.php, export.php, etc.) diff --git a/.serena/memories/project_overview.md b/.serena/memories/project_overview.md new file mode 100644 index 00000000..cb8e665f --- /dev/null +++ b/.serena/memories/project_overview.md @@ -0,0 +1,39 @@ +# interblue.pl - Project Overview + +## Purpose +E-commerce store **interblue.pl** built on **PrestaShop 1.7.x**. The shop sells lighting products (Sollux Lighting and others). It integrates with multiple marketplaces (Allegro, Empik) and shipping providers (DPD, InPost, Poczta Polska, Geis, FedEx). + +## Tech Stack +- **CMS/Framework**: PrestaShop 1.7.x (PHP, Symfony 3.x/4.x core) +- **Template Engine**: Smarty (front) + Twig (admin/back-office) +- **Database**: MySQL (via PrestaShop's `Db` class and ObjectModel ORM) +- **Front Theme**: Custom theme `InterBlue` (based on classic) +- **PHP**: 7.x+ (PrestaShop 1.7 compatible) +- **Additional lib**: Medoo (lightweight PHP database framework, used in custom scripts) + +## Key Integrations +- **Marketplaces**: Allegro (x13allegro, marzaallegro), Empik (empikmarketplace) +- **Payments**: Przelewy24, imoje, paybynet, ps_cashondelivery, ps_checkpayment, ps_wirepayment +- **Shipping**: DPD Poland, InPost, Poczta Polska, FedEx, Geis, Paczka w Ruchu +- **Analytics**: Google Tag Manager (cdc_googletagmanager), Google Analytics 4 (pdgoogleanalytycs4pro), Google Merchant Center (pdgooglemerchantcenterpro) +- **Other**: Baselinker, Sendinblue (email marketing), eKomi reviews + +## Custom Scripts (project root) +- `import-products.php` - Imports products from Sollux Lighting XML feed +- `export.php`, `export-csv.php` - Product export scripts +- `custom-cron.php`, `custom-script.php` - Custom cron/automation +- `google-merchant_id-1.xml` - Google Merchant feed + +## Custom Modules (developed in-house) +- `customfeaturetab` - Custom Feature Tab with DB integration and AJAX +- `dw_promocyjne_produkty` - Promotional products +- `dw_promowane_produkty` - Promoted products +- `addcolumninlist` - Extra column in product list (BO) +- `AddOrderExtraFields` - Extra fields on orders +- `ordersextracolumns` - Extra columns in order list +- `sposoby_dostawy` - Delivery methods customization + +## Override System +Active overrides in `override/`: +- Classes: Product, Combination, Dispatcher, Hook, Link, Media, FrontController, Order, OrderCarrier, OrderHistory, OrderInvoice, OrderPayment +- Controllers (front): Category, Cms, Manufacturer, Order, Product, Supplier diff --git a/.serena/memories/style_and_conventions.md b/.serena/memories/style_and_conventions.md new file mode 100644 index 00000000..d3b9ef0d --- /dev/null +++ b/.serena/memories/style_and_conventions.md @@ -0,0 +1,39 @@ +# Code Style and Conventions + +## General +- **Language**: PHP (PrestaShop conventions) +- **Comments/Notes**: Often in Polish (this is a Polish project) +- **No strict linting** - no PHPStan/Psalm/PHP-CS-Fixer configured for the project + +## PrestaShop Module Conventions +- Module class extends `Module` +- Module file named same as module folder (e.g., `customfeaturetab/customfeaturetab.php`) +- Hooks: `hookDisplay*`, `hookAction*` methods +- Templates: Smarty `.tpl` files in `views/templates/` +- Admin controllers in `controllers/admin/` +- Front controllers in `controllers/front/` + +## PrestaShop Override Conventions +- Override classes extend the original class +- Place in `override/classes/` or `override/controllers/` +- Must clear cache after adding overrides + +## Custom Scripts +- Root-level PHP scripts include PrestaShop config via: + ```php + include(dirname(__FILE__).'/config/config.inc.php'); + include(dirname(__FILE__).'/init.php'); + ``` +- Use `Tools::getValue()` for GET/POST parameters +- Use PrestaShop's `Db::getInstance()` for database queries + +## Naming +- Module names: lowercase, no spaces (e.g., `customfeaturetab`) +- Database tables: `ps_` prefix (PrestaShop convention) +- Class names: PascalCase +- Variables/methods: camelCase (PrestaShop convention) + +## Theme +- Active theme: `InterBlue` (customized classic theme) +- Templates: Smarty `.tpl` files +- Assets in `themes/InterBlue/assets/` diff --git a/.serena/memories/suggested_commands.md b/.serena/memories/suggested_commands.md new file mode 100644 index 00000000..2218a5fd --- /dev/null +++ b/.serena/memories/suggested_commands.md @@ -0,0 +1,34 @@ +# Suggested Commands + +## System Commands (Windows with Git Bash) +- `git` - Version control +- `ls` / `dir` - List files +- `cd` - Change directory +- `grep` / `findstr` - Search in files +- `find` (Git Bash) - Find files +- `cat` - View file contents + +## PrestaShop CLI +- `php bin/console` - Symfony console (PrestaShop 1.7+) +- `php bin/console cache:clear` - Clear Symfony cache +- `php bin/console debug:router` - List routes + +## Cache Management +- Clear PrestaShop cache: Delete contents of `var/cache/` (prod & dev) +- In admin panel: Advanced Parameters > Performance > Clear cache + +## Development +- No composer.json in repo root (PrestaShop modules may have their own) +- No automated tests configured in this project +- No linter/formatter configured +- FTP sync configured via `.vscode/ftp-kr.json` (deploy via FTP) + +## Deployment +- Code is deployed via FTP (VS Code ftp-kr extension) +- No CI/CD pipeline configured + +## Custom Scripts +- `php import-products.php?add=true` - Import new products from Sollux XML +- `php import-products.php?update=true` - Update existing products +- `php export.php` - Export products +- `php custom-cron.php` - Run custom cron tasks diff --git a/.serena/memories/task_completion_checklist.md b/.serena/memories/task_completion_checklist.md new file mode 100644 index 00000000..f3e8230d --- /dev/null +++ b/.serena/memories/task_completion_checklist.md @@ -0,0 +1,29 @@ +# Task Completion Checklist + +When a task is completed, follow these steps: + +## 1. Code Quality +- [ ] Code follows PrestaShop conventions (camelCase, Module class structure) +- [ ] No hardcoded values where configuration should be used +- [ ] SQL queries use PrestaShop's `Db` class with proper escaping (`pSQL()`, `(int)`) +- [ ] Comments in Polish or English (match surrounding code) + +## 2. Cache +- [ ] If overrides were added/changed: remind user to clear PrestaShop cache +- [ ] If Smarty templates changed: cache clear may be needed + +## 3. Deployment +- [ ] Files ready to be synced via FTP (ftp-kr) +- [ ] No sensitive data (passwords, API keys) committed + +## 4. Git +- [ ] Changes committed with descriptive message +- [ ] No unnecessary files staged (.vscode cache files excluded) + +## 5. Testing +- [ ] No automated tests in this project - manual testing required +- [ ] Remind user to test in browser after FTP sync + +## Notes +- Admin panel folder: `admin658c34/` (obfuscated name) +- empikmarketplace module can override product list view in BO (see NOTATKI.md) diff --git a/.serena/project.yml b/.serena/project.yml new file mode 100644 index 00000000..1f3bf6b2 --- /dev/null +++ b/.serena/project.yml @@ -0,0 +1,126 @@ +# the name by which the project can be referenced within Serena +project_name: "interblue.pl" + + +# list of languages for which language servers are started; choose from: +# al bash clojure cpp csharp +# csharp_omnisharp dart elixir elm erlang +# fortran fsharp go groovy haskell +# java julia kotlin lua markdown +# matlab nix pascal perl php +# php_phpactor powershell python python_jedi r +# rego ruby ruby_solargraph rust scala +# swift terraform toml typescript typescript_vts +# vue yaml zig +# (This list may be outdated. For the current list, see values of Language enum here: +# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py +# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) +# Note: +# - For C, use cpp +# - For JavaScript, use typescript +# - For Free Pascal/Lazarus, use pascal +# Special requirements: +# Some languages require additional setup/installations. +# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers +# When using multiple languages, the first language server that supports a given file will be used for that file. +# The first language is the default language and the respective language server will be used as a fallback. +# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. +languages: +- php + +# the encoding used by text files in the project +# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings +encoding: "utf-8" + +# The language backend to use for this project. +# If not set, the global setting from serena_config.yml is used. +# Valid values: LSP, JetBrains +# Note: the backend is fixed at startup. If a project with a different backend +# is activated post-init, an error will be returned. +language_backend: + +# whether to use project's .gitignore files to ignore files +ignore_all_files_in_gitignore: true + +# list of additional paths to ignore in this project. +# Same syntax as gitignore, so you can use * and **. +# Note: global ignored_paths from serena_config.yml are also applied additively. +ignored_paths: [] + +# whether the project is in read-only mode +# If set to true, all editing tools will be disabled and attempts to use them will result in an error +# Added on 2025-04-18 +read_only: false + +# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details. +# Below is the complete list of tools for convenience. +# To make sure you have the latest list of tools, and to view their descriptions, +# execute `uv run scripts/print_tool_overview.py`. +# +# * `activate_project`: Activates a project by name. +# * `check_onboarding_performed`: Checks whether project onboarding was already performed. +# * `create_text_file`: Creates/overwrites a file in the project directory. +# * `delete_lines`: Deletes a range of lines within a file. +# * `delete_memory`: Deletes a memory from Serena's project-specific memory store. +# * `execute_shell_command`: Executes a shell command. +# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced. +# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type). +# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type). +# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes. +# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file. +# * `initial_instructions`: Gets the initial instructions for the current project. +# Should only be used in settings where the system prompt cannot be set, +# e.g. in clients you have no control over, like Claude Desktop. +# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol. +# * `insert_at_line`: Inserts content at a given line in a file. +# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol. +# * `list_dir`: Lists files and directories in the given directory (optionally with recursion). +# * `list_memories`: Lists memories in Serena's project-specific memory store. +# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building). +# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context). +# * `read_file`: Reads a file within the project directory. +# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store. +# * `remove_project`: Removes a project from the Serena configuration. +# * `replace_lines`: Replaces a range of lines within a file with new content. +# * `replace_symbol_body`: Replaces the full definition of a symbol. +# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen. +# * `search_for_pattern`: Performs a search for a pattern in the project. +# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase. +# * `switch_modes`: Activates modes by providing a list of their names +# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information. +# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task. +# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed. +# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store. +excluded_tools: [] + +# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default) +included_optional_tools: [] + +# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools. +# This cannot be combined with non-empty excluded_tools or included_optional_tools. +fixed_tools: [] + +# list of mode names to that are always to be included in the set of active modes +# The full set of modes to be activated is base_modes + default_modes. +# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply. +# Otherwise, this setting overrides the global configuration. +# Set this to [] to disable base modes for this project. +# Set this to a list of mode names to always include the respective modes for this project. +base_modes: + +# list of mode names that are to be activated by default. +# The full set of modes to be activated is base_modes + default_modes. +# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply. +# Otherwise, this overrides the setting from the global configuration (serena_config.yml). +# This setting can, in turn, be overridden by CLI parameters (--mode). +default_modes: + +# initial prompt for the project. It will always be given to the LLM upon activating the project +# (contrary to the memories, which are loaded on demand). +initial_prompt: "" + +# time budget (seconds) per tool call for the retrieval of additional symbol information +# such as docstrings or parameter information. +# This overrides the corresponding setting in the global configuration; see the documentation there. +# If null or missing, use the setting from the global configuration. +symbol_info_budget: diff --git a/.vscode/ftp-kr.json b/.vscode/ftp-kr.json index 45cc6ca8..a50740aa 100644 --- a/.vscode/ftp-kr.json +++ b/.vscode/ftp-kr.json @@ -4,7 +4,7 @@ "password": "Project&*Pro12**!", "remotePath": "/", "protocol": "ftp", - "port": 0, + "port": 21, "fileNameEncoding": "utf8", "autoUpload": true, "autoDelete": false, @@ -13,6 +13,7 @@ "ignore": [ ".git", "/.vscode", + "/.serena", "/.claude" ] } \ No newline at end of file diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 5b9284af..7e1655ea 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -1,5 +1,5 @@ { - "ftp://ftp.interblue.pl@project-pro@interblue.pl": { + "ftp://ftp.interblue.pl:21@project-pro@interblue.pl": { "1_index_sitemap.xml": { "type": "-", "size": 355, @@ -117,15 +117,15 @@ }, "google-merchant_id-1.xml": { "type": "-", - "size": 18328944, + "size": 18278915, "lmtime": 0, - "modified": true + "modified": false }, ".htaccess": { "type": "-", "size": 87379, "lmtime": 0, - "modified": true + "modified": false }, ".htaccess.2025-10-16-1760598489": { "type": "-", @@ -208,7 +208,7 @@ }, "info.php": { "type": "-", - "size": 3298, + "size": 3309, "lmtime": 0, "modified": false }, @@ -253,6 +253,12 @@ "modified": false }, "modules": {}, + "NOTATKI.md": { + "type": "-", + "size": 467, + "lmtime": 0, + "modified": false + }, "Odstąpienie_od_umowy_informacja.pdf": { "type": "-", "size": 271044, diff --git a/info.php b/info.php index 700e244e..e50882f8 100644 --- a/info.php +++ b/info.php @@ -1,4 +1,5 @@ 'mysql', diff --git a/modules/dpdpoland/AdminOrdersOverride.gif b/modules/dpdpoland/AdminOrdersOverride.gif new file mode 100644 index 0000000000000000000000000000000000000000..be9175d6f9cbd54c6c7346cb43c21edbd97e6cc5 GIT binary patch literal 265 zcmZ?wbhEHb6krfwIKse?mX>z(=+UK1m)^T~ucxPH+qP}*-@mV_s=9XV+RT|VfByVg zQc|*a@7{Im)}1+XrlqCj`Sa&frcC+&|9@6i76TDL@h1x-JA)8|4oEG?P6pPt1uA_h zne&_`DL9@saJ^&FB%m>2?VB2XiH;WKh6WZk_hSnhGECT&+zuRAAjLJoO)pWvaB6F+ zuwsFL$l_yH7hL61=w#-6C}F{x(jMUFrK-fj!r#oxt**w!T_eQCDA>@%&(7V}ro<;y jHA9()okv(XjhBy!eKI#^U$;^-qY4iLL;GeWMFwjCH11XL literal 0 HcmV?d00001 diff --git a/modules/dpdpoland/AdminOrdersOverride.php b/modules/dpdpoland/AdminOrdersOverride.php new file mode 100644 index 00000000..7268e4c0 --- /dev/null +++ b/modules/dpdpoland/AdminOrdersOverride.php @@ -0,0 +1,241 @@ +delete = true; + } + + /** + * Displays additional buttons in orders list + * + * @param null|string $token BackOffice token + */ + public function displayListFooter($token = null) + { + echo ''; + echo '

+ + +

'; + + echo ' + + + + + '; + if (isset($this->_includeTab) && count($this->_includeTab)) + echo '

'; + } + + /** + * Displays orders list + * + * @param null|string $token BackOffice token + */ + public function displayListContent($token = null) + { + global $currentIndex, $cookie; + $currency = new Currency(_PS_CURRENCY_DEFAULT_); + + $id_category = 1; // default categ + + $irow = 0; + if ($this->_list AND isset($this->fieldsDisplay['position'])) + { + $positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); + sort($positions); + } + if ($this->_list) + { + $isCms = false; + + Module::getInstanceByName('dpdpoland'); + $exceptions = DpdPolandPackage::getLabelExceptions(); + + if (preg_match('/cms/Ui', $this->identifier)) + $isCms = true; + $keyToGet = 'id_'.($isCms ? 'cms_' : '').'category'.(in_array($this->identifier, array('id_category', 'id_cms_category')) ? '_parent' : ''); + foreach ($this->_list as $tr) + { + $id = $tr[$this->identifier]; + echo 'identifier,$this->identifiersDnd) ? ' id="tr_'.(($id_category = (int)(Tools::getValue('id_'.($isCms ? 'cms_' : '').'category', '1'))) ? $id_category : '').'_'.$id.'_'.$tr['position'].'"' : '').($irow++ % 2 ? ' class="alt_row"' : '').' '.((isset($tr['color']) AND $this->colorOnBackground) ? 'style="background-color: '.$tr['color'].'"' : '').'> + '; + if ($this->delete AND (!isset($this->_listSkipDelete) OR !in_array($id, $this->_listSkipDelete))) + echo ''; + echo ''; + foreach ($this->fieldsDisplay as $key => $params) + { + $tmp = explode('!', $key); + $key = isset($tmp[1]) ? $tmp[1] : $tmp[0]; + echo ' + noLink) OR !$this->noLink)) + echo ' onclick="document.location = \''.$currentIndex.'&'.$this->identifier.'='.$id.($this->view? '&view' : '&update').$this->table.'&token='.($token != null ? $token : $this->token).'\'">'.(isset($params['prefix']) ? $params['prefix'] : ''); + else + echo '>'; + if (isset($params['active']) AND isset($tr[$key])) + $this->_displayEnableLink($token, $id, $tr[$key], $params['active'], Tools::getValue('id_category'), Tools::getValue('id_product')); + elseif (isset($params['activeVisu']) AND isset($tr[$key])) + echo ''.($tr[$key] ? $this->l('Enabled') : $this->l('Disabled')).''; + elseif (isset($params['position'])) + { + if ($this->_orderBy == 'position' AND $this->_orderWay != 'DESC') + { + echo ' + '.$this->l('Down').''; + + echo ' + '.$this->l('Up').''; } + else + echo (int)($tr[$key] + 1); + } + elseif (isset($params['image'])) + { + // item_id is the product id in a product image context, else it is the image id. + $item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id; + // If it's a product image + if (isset($tr['id_image'])) + { + $image = new Image((int)$tr['id_image']); + $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$image->getExistingImgPath().'.'.$this->imageType; + }else + $path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)($tr['id_image']) : '').'.'.$this->imageType; + + echo cacheImage($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType); + } + elseif (isset($params['icon']) AND (isset($params['icon'][$tr[$key]]) OR isset($params['icon']['default']))) + echo ''.$tr[$key]).''; + elseif (isset($params['price'])) + echo Tools::displayPrice($tr[$key], (isset($params['currency']) ? Currency::getCurrencyInstance((int)($tr['id_currency'])) : $currency), false); + elseif (isset($params['float'])) + echo rtrim(rtrim($tr[$key], '0'), '.'); + elseif (isset($params['type']) AND $params['type'] == 'date') + echo Tools::displayDate($tr[$key], (int)$cookie->id_lang); + elseif (isset($params['type']) AND $params['type'] == 'datetime') + echo Tools::displayDate($tr[$key], (int)$cookie->id_lang, true); + elseif (isset($tr[$key])) + { + $echo = ($key == 'price' ? round($tr[$key], 2) : isset($params['maxlength']) ? Tools::substr($tr[$key], 0, $params['maxlength']).'...' : $tr[$key]); + echo isset($params['callback']) ? call_user_func_array(array($this->className, $params['callback']), array($echo, $tr)) : $echo; + } + else + echo '--'; + + echo (isset($params['suffix']) ? $params['suffix'] : ''). + ''; + } + + if ($this->edit OR $this->delete OR ($this->view AND $this->view !== 'noActionColumn')) + { + echo ''; + if ($this->view) + $this->_displayViewLink($token, $id); + + if (!in_array($id, $exceptions)) { + $this->_displayPrinta4Link($token, $id); + $this->_displayPrintlabelLink($token, $id); + } + + echo ''; + } + echo ''; + } + } + } + + /** + * Displays link used to print A4 format label + * + * @param string $token BackOffice token + * @param int $id Order identifier + */ + private function _displayPrinta4Link($token, $id) + { + global $currentIndex; + + $_cacheLang['printa4'] = $this->l('Print A4 format label'); + Module::getInstanceByName('dpdpoland'); + + echo ' + + '.$_cacheLang['printa4'].''; + } + + /** + * Displays link used to print label format label + * + * @param string $token BackOffice token + * @param int $id Order identifier + */ + private function _displayPrintlabelLink($token, $id) + { + global $currentIndex; + + $_cacheLang['printlabel'] = $this->l('Print label format label'); + Module::getInstanceByName('dpdpoland'); + + echo ' + + '.$_cacheLang['printlabel'].''; + } + + /** + * Main controller (tab) function used to make actions in page + */ + public function postProcess() + { + parent::postProcess(); + + if (Tools::isSubmit('submitBulkprint_a4order')) { + $module_instance = Module::getInstanceByName('dpdpoland'); + + if ($errors = $module_instance->printMultipleLabels(DpdPolandConfiguration::PRINTOUT_FORMAT_A4)) { + $this->_errors = $errors; + } + } + + if (Tools::isSubmit('submitBulkprint_labelorder')) { + $module_instance = Module::getInstanceByName('dpdpoland'); + + if ($errors = $module_instance->printMultipleLabels(DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL)) { + $this->_errors = $errors; + } + } + + if (Tools::isSubmit('printa4formatlabel')) { + $module_instance = Module::getInstanceByName('dpdpoland'); + + if ($error = $module_instance->printSingleLabel(DpdPolandConfiguration::PRINTOUT_FORMAT_A4)) { + $this->_errors[] = $error; + } + } + + if (Tools::isSubmit('printlabelformatlabel')) { + $module_instance = Module::getInstanceByName('dpdpoland'); + + if ($error = $module_instance->printSingleLabel(DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL)) { + $this->_errors[] = $error; + } + } + } +} diff --git a/modules/dpdpoland/backward_compatibility/Context.php b/modules/dpdpoland/backward_compatibility/Context.php new file mode 100644 index 00000000..5f1f3604 --- /dev/null +++ b/modules/dpdpoland/backward_compatibility/Context.php @@ -0,0 +1,347 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + require_once(_PS_MODULE_DIR_ . '/mobile_theme/Mobile_Detect.php'); + +// Retro 1.3, 'class_exists' cause problem with autoload... +if (version_compare(_PS_VERSION_, '1.4', '<')) +{ + // Not exist for 1.3 + class Shop extends ObjectModel + { + public $id = 1; + public $id_shop_group = 1; + + public function __construct() + { + } + + + public static function getShops() + { + return array( + array('id_shop' => 1, 'name' => 'Default shop') + ); + } + + public static function getCurrentShop() + { + return 1; + } + } + + class Logger + { + public static function AddLog($message, $severity = 2) + { + $fp = fopen(dirname(__FILE__).'/../logs.txt', 'a+'); + fwrite($fp, '['.(int)$severity.'] '.Tools::safeOutput($message)); + fclose($fp); + } + } + +} + +// Not exist for 1.3 and 1.4 +class Context +{ + /** + * @var Context + */ + protected static $instance; + + /** + * @var Cart + */ + public $cart; + + /** + * @var Customer + */ + public $customer; + + /** + * @var Cookie + */ + public $cookie; + + /** + * @var Link + */ + public $link; + + /** + * @var Country + */ + public $country; + + /** + * @var Employee + */ + public $employee; + + /** + * @var Controller + */ + public $controller; + + /** + * @var Language + */ + public $language; + + /** + * @var Currency + */ + public $currency; + + /** + * @var AdminTab + */ + public $tab; + + /** + * @var Shop + */ + public $shop; + + /** + * @var Smarty + */ + public $smarty; + + /** + * @ var Mobile Detect + */ + public $mobile_detect; + + /** + * @var boolean|string mobile device of the customer + */ + protected $mobile_device; + + public function __construct() + { + global $cookie, $cart, $smarty, $link; + + $this->tab = null; + + $this->cookie = $cookie; + $this->cart = $cart; + $this->smarty = $smarty; + $this->link = $link; + + $this->controller = new ControllerBackwardModule(); + if (is_object($cookie)) + { + $this->currency = new Currency((int)$cookie->id_currency); + $this->language = new Language((int)$cookie->id_lang); + $this->country = new Country((int)$cookie->id_country); + $this->customer = new CustomerBackwardModule((int)$cookie->id_customer); + $this->employee = new Employee((int)$cookie->id_employee); + } + else + { + $this->currency = null; + $this->language = null; + $this->country = null; + $this->customer = null; + $this->employee = null; + } + + $this->shop = new ShopBackwardModule(); + + if ((bool)Configuration::get('PS_MOBILE_DEVICE')) + $this->mobile_detect = new Mobile_Detect(); + } + + public function getMobileDevice() + { + if (is_null($this->mobile_device)) + { + $this->mobile_device = false; + if ($this->checkMobileContext()) + { + switch ((int)Configuration::get('PS_MOBILE_DEVICE')) + { + case 0: // Only for mobile device + if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + case 1: // Only for touchpads + if ($this->mobile_detect->isTablet() && !$this->mobile_detect->isMobile()) + $this->mobile_device = true; + break; + case 2: // For touchpad or mobile devices + if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet()) + $this->mobile_device = true; + break; + } + } + } + + return $this->mobile_device; + } + + protected function checkMobileContext() + { + return isset($_SERVER['HTTP_USER_AGENT']) + && (bool)Configuration::get('PS_MOBILE_DEVICE') + && !Context::getContext()->cookie->no_mobile; + } + + /** + * Get a singleton context + * + * @return Context + */ + public static function getContext() + { + if (!isset(self::$instance)) + self::$instance = new Context(); + return self::$instance; + } + + /** + * Clone current context + * + * @return Context + */ + public function cloneContext() + { + return clone($this); + } + + /** + * @return int Shop context type (Shop::CONTEXT_ALL, etc.) + */ + public static function shop() + { + if (!self::$instance->shop->getContextType()) + return ShopBackwardModule::CONTEXT_ALL; + return self::$instance->shop->getContextType(); + } +} + +/** + * Class Shop for Backward compatibility + */ +class ShopBackwardModule extends Shop +{ + const CONTEXT_ALL = 1; + + public $id = 1; + public $id_shop_group = 1; + + + public function getContextType() + { + return ShopBackwardModule::CONTEXT_ALL; + } + + // Simulate shop for 1.3 / 1.4 + public function getID() + { + return 1; + } + + /** + * Get shop theme name + * + * @return string + */ + public function getTheme() + { + return _THEME_NAME_; + } + + public function isFeatureActive() + { + return false; + } +} + +/** + * Class Controller for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class ControllerBackwardModule +{ + /** + * @param $js_uri + * @return void + */ + public function addJS($js_uri) + { + Tools::addJS($js_uri); + } + + /** + * @param $css_uri + * @param string $css_media_type + * @return void + */ + public function addCSS($css_uri, $css_media_type = 'all') + { + Tools::addCSS($css_uri, $css_media_type); + } + + public function addJquery() + { + if (_PS_VERSION_ < '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.4.4.min.js'); + elseif (_PS_VERSION_ >= '1.5') + $this->addJS(_PS_JS_DIR_.'jquery/jquery-1.7.2.min.js'); + } + +} + +/** + * Class Customer for a Backward compatibility + * Allow to use method declared in 1.5 + */ +class CustomerBackwardModule extends Customer +{ + public $logged = false; + /** + * Check customer informations and return customer validity + * + * @since 1.5.0 + * @param boolean $with_guest + * @return boolean customer validity + */ + public function isLogged($with_guest = false) + { + if (!$with_guest && $this->is_guest == 1) + return false; + + /* Customer is valid only if it can be load and if object password is the same as database one */ + if ($this->logged == 1 && $this->id && Validate::isUnsignedId($this->id) && Customer::checkPassword($this->id, $this->passwd)) + return true; + return false; + } +} diff --git a/modules/dpdpoland/backward_compatibility/Display.php b/modules/dpdpoland/backward_compatibility/Display.php new file mode 100644 index 00000000..309e8579 --- /dev/null +++ b/modules/dpdpoland/backward_compatibility/Display.php @@ -0,0 +1,48 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Class allow to display tpl on the FO + */ +class BWDisplay extends FrontController +{ + // Assign template, on 1.4 create it else assign for 1.5 + public function setTemplate($template) + { + if (_PS_VERSION_ >= '1.5') + parent::setTemplate($template); + else + $this->template = $template; + } + + // Overload displayContent for 1.4 + public function displayContent() + { + parent::displayContent(); + + echo Context::getContext()->smarty->fetch($this->template); + } +} diff --git a/modules/dpdpoland/backward_compatibility/backward.ini b/modules/dpdpoland/backward_compatibility/backward.ini new file mode 100644 index 00000000..6520fb7a --- /dev/null +++ b/modules/dpdpoland/backward_compatibility/backward.ini @@ -0,0 +1 @@ +version = 0.4 \ No newline at end of file diff --git a/modules/dpdpoland/backward_compatibility/backward.php b/modules/dpdpoland/backward_compatibility/backward.php new file mode 100644 index 00000000..21f9eb41 --- /dev/null +++ b/modules/dpdpoland/backward_compatibility/backward.php @@ -0,0 +1,55 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +/** + * Backward function compatibility + * Need to be called for each module in 1.4 + */ + +// Get out if the context is already defined +if (!in_array('Context', get_declared_classes())) + require_once(dirname(__FILE__).'/Context.php'); + +// Get out if the Display (BWDisplay to avoid any conflict)) is already defined +if (!in_array('BWDisplay', get_declared_classes())) + require_once(dirname(__FILE__).'/Display.php'); + +// If not under an object we don't have to set the context +if (!isset($this)) + return; +else if (isset($this->context)) +{ + // If we are under an 1.5 version and backoffice, we have to set some backward variable + if (_PS_VERSION_ >= '1.5' && isset($this->context->employee->id) && $this->context->employee->id && isset(AdminController::$currentIndex) && !empty(AdminController::$currentIndex)) + { + global $currentIndex; + $currentIndex = AdminController::$currentIndex; + } + return; +} + +$this->context = Context::getContext(); +$this->smarty = $this->context->smarty; diff --git a/modules/dpdpoland/backward_compatibility/index.php b/modules/dpdpoland/backward_compatibility/index.php new file mode 100644 index 00000000..b856f563 --- /dev/null +++ b/modules/dpdpoland/backward_compatibility/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/dpdpoland/changelog.txt b/modules/dpdpoland/changelog.txt new file mode 100644 index 00000000..5fc8d92d --- /dev/null +++ b/modules/dpdpoland/changelog.txt @@ -0,0 +1,202 @@ +# 4.5.0 + Added: + - Install script for Prestashop 1.7 + +# 4.4.0 + Added: + - SwipBox shipping method + +# 4.3.0 + Added: + - Support for Easycheckout + - Support for One Page Checkout - PrestaTeam - Prestashop 1.7 + - Support for One Page Checkout - PrestaTeam - Prestashop 8 + - Support for The Checkout - PrestaSmart + - Support for One Page Checkout - PrestaSmart + +# 4.2.0 + Added: + - Support for international Pickup Points + Changed: + - Pickup Point address in BO + - Error messages + +# 4.1.0 + Added: + - Support for save pickup number as Guest + - Iframe allow geolocation + Fixed: + - Load iframe for SuperCheckout + - String escape in admin order + - Get country for shipping cost external + +# 4.0.1 + Modify: + - Install script + +# 4.0.0 + Added: + - Support for external modules + - Support for SuperCheckout + +# 3.0.0 + Modify: + - DPD Pickup maps select from popup (prestashop 1.7 and 8) + +# 2.0.0 + Added: + - Support for Prestashop 8 + +# 1.6.8 + Modify: + - In transit email translate + +# 1.6.7 + Modify: + - Save the email address for the delivery address + + Fixed: + - Calculate the weight of shipping package + - Grouping the contents of the shipping package + +# 1.6.6 + Modify: + - Receiver email address from shipping form when is filled and from customer when is empty + +# 1.6.5 + Added: + - Security + +# 1.6.4 + Fixed: + - Order button for PUDO shipping methods + - Shipping method when free shipping for weight range + - Order a courier - show range when available only one + Modify: + - Change search country ISO by country name without shop lang + +# 1.6.3 + Modify: + - DPD ADR service + +# 1.6.2 + Added: + - DPD Food service with limit date + - DPD ADR service + +# 1.6.1 + Fixed: + - CSV: DPD Pickup with COD + +# 1.6.0 + Added: + - Additional products shipping cost + - DPD Pickup with COD + - DPD Pickup point in order page + Changed: + - Help pages + - Shippings method logo + - DPD Pickup translations + Fixed: + - Shipping method visibility when settlement by price + - Compatibility shippings method on order page + +# 1.5.1 + Added: + - Default weight + - Default printer type + - DPD Service - DPD_SATURDAY + - DPD Service - DPD_TODAY + - DPD Service - DPD_FOOD + - Parcel content source for Ref1, Ref2 + - Generate shipping from list on Prestashop 1.7 + - Generate labels from list on Prestashop 1.7 + - Pickup order with COD + - Back office: Sort parcel list + - Back office: Parcel list add fields + Fixed: + - MultiShop configuration + - Visibility pickup map on order screen + - Shipping method visibility + - Generate shipping for many product + - Remove parcel + Changed: + - Changed service WSDL generateSpedLabelsV4 to generateSpedLabelsV6 + - Grouping name for parcel content + +# 1.4.5 + Added: + - Text boxes for receiver address - order details + - Modify email address + - Addresses for guest account + +# 1.4.4 [2021-02-28] + Added: + - Prestashop 1.7.7.X support + - Duty service + Changed: + - New tracking URL + - Retrieving a home or mobile phone number + +# 1.4.3 [2020-12-06] + Fixed: + - Shipping price for selected currency + +# 1.4.2 [2020-09-28] + Fixed: + - Print manifest with duplicated content + +# 1.4.1 [2020-09-26] + Changed: + - Tracking URL + Fixed: + - Show addresses in admin order + - Finish order without pudo premissions + - Remove print_l for pickup order + - Show pickup map for prestashop 1.6.X - One-page checkout + +# 1.4.0 [2020-09-13] + Added: + - Pickup history + - Ability to enable Error and Debug logs + - Ability to disable sending an email with shipping number + - Support for the {meta products} in the e-mail confirming the shipment + - Adaptation to prestashop 1.7.6.X + - Polish language translations + Fixed: + - Shipping price from csv price list + - Possibility of marking the delivery for the selected country + +# 1.3.0 [2019-10-20] + Added: + - Missing Polish translations + - CLIENT PARAMETERS in "Arrange Pickup" tab + Removed: + - Printing labels from admin order list + - Remove unused Customer FID + Changed: + - WSDL environment changed from text to list + - Changed service WSDL generateSpedLabelsV1 to generateSpedLabelsV4 + - Changed service WSDL generateProtocolV1 to generateProtocolV2 + - Changed service WSDL packagesPickupCallV3 to packagesPickupCallV4 + - Changed licence information + - Moved Master FID field + - CLIENT PARAMETERS not required + +# 1.2.8 [2019-03-13] + Added: + - DPD Next Day and DPD Express services + Fixed: + - Phone not saving when selecting pickup point carrier + +# 1.2.4 + Fixed: + - A problem where if home phone was empty but had spaces in string it would be displayed in address instead of mobile phone + +_________________________________________________________________ +Added for new features. +Changed for changes in existing functionality. +Deprecated for once-stable features removed in upcoming releases. +Removed for deprecated features removed in this release. +Fixed for any bug fixes. +Security to invite users to upgrade in case of vulnerabilities. \ No newline at end of file diff --git a/modules/dpdpoland/classes/CSV.php b/modules/dpdpoland/classes/CSV.php new file mode 100644 index 00000000..8fb4e165 --- /dev/null +++ b/modules/dpdpoland/classes/CSV.php @@ -0,0 +1,280 @@ + _DPDPOLAND_PRICE_RULE_DB_, + 'primary' => 'id_csv', + 'multilang' => false, + 'multishop' => true, + 'fields' => array( + 'id_csv' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'iso_country' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'price_from' => array('type' => self::TYPE_STRING, 'validate' => 'isFloat'), + 'price_to' => array('type' => self::TYPE_STRING, 'validate' => 'isFloat'), + 'weight_from' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'weight_to' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'parcel_price' => array('type' => self::TYPE_STRING, 'validate' => 'isFloat'), + 'cod_price' => array('type' => self::TYPE_STRING, 'validate' => 'isFloat'), + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects data from database about price rules + * + * @param string|int $start From which element data should be taken + * @param string|int $limit How many elements should be taken + * @return array|false|mysqli_result|null|PDOStatement|resource Price rules data + */ + public static function getAllData($start = '', $limit = '') + { + return DB::getInstance()->executeS(' + SELECT `id_csv`, `iso_country`, `price_from`, `price_to`, `weight_from`, `weight_to`, `parcel_price`, + `cod_price`, `id_carrier` + FROM `'._DB_PREFIX_._DPDPOLAND_PRICE_RULE_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '.($start && $limit ? 'LIMIT '.(int)$start.', '.(int)$limit : '') + ); + } + + /** + * Deletes all price rules for current shop + * + * @return bool Price rules deleted successfully + */ + public static function deleteAllData() + { + return DB::getInstance()->execute(' + DELETE FROM `'._DB_PREFIX_._DPDPOLAND_PRICE_RULE_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '); + } + + /** + * Collects price rules data of current shop + * + * @return array|false|mysqli_result|null|PDOStatement|resource Price rules data + */ + public static function getCSVData() + { + return DB::getInstance()->executeS(' + SELECT `iso_country`, `price_from`, `price_to`, `weight_from`, `weight_to`, `parcel_price`, `id_carrier`, + `cod_price` + FROM `'._DB_PREFIX_._DPDPOLAND_PRICE_RULE_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '); + } + + /** + * Returns carrier price according to cart products / parameters + * + * @param float $total_weight Sum of products weight + * @param int $id_carrier Carrier ID + * @param Cart $cart Cart object + * @return bool|int|float Carrier price + */ + public static function getPrice($total_weight, $id_carrier, Cart $cart) + { + if ($id_country = (int)Tools::getValue('id_country')) + $iso_country = Country::getIsoById($id_country); + else + { + $address = new Address((int)$cart->id_address_delivery); + $iso_country = Country::getIsoById((int)$address->id_country); + } + + if(!$iso_country) + $iso_country = 'PL'; + + $cart_total_price = $cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING); + $id_currency_pl = Currency::getIdByIsoCode(_DPDPOLAND_CURRENCY_ISO_, (int)Context::getContext()->shop->id); + $currency_from = new Currency((int)$cart->id_currency); + $currency_to = new Currency((int)$id_currency_pl); + $cart_total_price = Tools::convertPriceFull($cart_total_price, $currency_from, $currency_to); + + $price_rules = DB::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_._DPDPOLAND_PRICE_RULE_DB_.'` + WHERE (`iso_country` = "'.pSQL($iso_country).'" OR `iso_country` = "*") + AND (`weight_from` <= "'.pSQL($total_weight).'" + AND `weight_to` >= "'.pSQL($total_weight).'" + OR `price_from` <= "'.pSQL($cart_total_price).'" + AND `price_to` >= "'.pSQL($cart_total_price).'") + AND `id_carrier` = "'.(int)$id_carrier.'" + AND `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '); + + if (!$price_rules) + return false; + + $available_prices_count = count($price_rules); + + for ($i = 0; $i < $available_prices_count; $i++) + if ($price_rules[$i]['iso_country'] != '*' && !Country::getByIso($price_rules[$i]['iso_country'])) //if country is not deleted + unset($price_rules[$i]); + + if (!$price_rules) + return false; + + $matching_price_rule = null; + if (is_array($price_rules)) { + foreach ($price_rules as $price_rule) { + if ($price_rule['price_from'] <= $cart_total_price && + $price_rule['price_to'] > $cart_total_price && + $price_rule['weight_from'] <= $total_weight && + $price_rule['weight_to'] > $total_weight + ) { + $matching_price_rule = $price_rule; + break; + } + } + } + + if (null == $matching_price_rule) { + $matching_price_rule = $price_rules[0]; //accept first matching rule + } + + if (!$matching_price_rule['cod_price']) + $matching_price_rule['cod_price'] = 0; //CSV validation allows empty value of COD price + + $price = $matching_price_rule['parcel_price']; + + if ($id_carrier == _DPDPOLAND_STANDARD_COD_ID_ || $id_carrier == _DPDPOLAND_PUDO_COD_ID_) + $price += $matching_price_rule['cod_price']; + + return $price; + } +} diff --git a/modules/dpdpoland/classes/Carrier.php b/modules/dpdpoland/classes/Carrier.php new file mode 100644 index 00000000..80632137 --- /dev/null +++ b/modules/dpdpoland/classes/Carrier.php @@ -0,0 +1,100 @@ + _DPDPOLAND_CARRIER_DB_, + 'primary' => 'id_dpdpoland_carrier', + 'multilang_shop' => true, + 'multishop' => true, + 'fields' => array( + 'id_dpdpoland_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_carrier' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_reference' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Returns carrier reference according to it's current ID + * + * @param int $id_carrier Carrier ID + * @return false|null|string Carrier reference + */ + public static function getReferenceByIdCarrier($id_carrier) + { + return DB::getInstance()->getValue(' + SELECT `id_reference` + FROM `'._DB_PREFIX_._DPDPOLAND_CARRIER_DB_.'` + WHERE `id_carrier` = "'.(int)$id_carrier.'" + '); + } + + /** + * Returns carrier newest ID according to it's reference + * + * @param int $id_reference Carrier reference + * @return false|null|string Carrier ID + */ + public static function getIdCarrierByReference($id_reference) + { + return DB::getInstance()->getValue(' + SELECT MAX(`id_carrier`) + FROM `'._DB_PREFIX_._DPDPOLAND_CARRIER_DB_.'` + WHERE `id_reference` = "'.(int)$id_reference.'" + '); + } +} diff --git a/modules/dpdpoland/classes/Configuration.php b/modules/dpdpoland/classes/Configuration.php new file mode 100644 index 00000000..80f22631 --- /dev/null +++ b/modules/dpdpoland/classes/Configuration.php @@ -0,0 +1,557 @@ +getSettings(); + } + + /** + * Saves module settings into database + * + * @return bool Module settings saved successfully + */ + public static function saveConfiguration() + { + $success = true; + $id_shop = Shop::getContextShopID(true); + $id_shop_group = Shop::getContextShopGroupID(true); + + $success &= Configuration::updateValue(self::LOGIN, Tools::getValue(self::LOGIN)); + + $password = Tools::getValue(self::PASSWORD); + if (isset($password) && $password != null && $password != "") { + $phpEncryption = null; + if (version_compare(_PS_VERSION_, '1.7.0.0', '<')) + $phpEncryption = new Rijndael('_RIJNDAEL_KEY_', '_RIJNDAEL_IV_'); + else + $phpEncryption = new PhpEncryption(_NEW_COOKIE_KEY_); + + $encryptedPassword = $phpEncryption->encrypt($password); + $success &= Configuration::updateValue(self::PASSWORD, $encryptedPassword); + } + + $success &= Configuration::updateValue(self::CLIENT_NUMBER, Tools::getValue(self::CLIENT_NUMBER)); + + $client_name = DB::getInstance()->getValue(' + SELECT `name` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PAYER_NUMBERS_DB_ . '` + WHERE `payer_number` = "' . pSQL(Configuration::get(self::CLIENT_NUMBER, null, $id_shop_group, $id_shop)) . '" + AND `id_shop` = "' . (int)Context::getContext()->shop->id . '" + '); + + $success &= Configuration::updateValue(self::CLIENT_NAME, $client_name); + $success &= Configuration::updateValue(self::NAME_SURNAME, Tools::getValue(self::NAME_SURNAME)); + $success &= Configuration::updateValue(self::ADDRESS, Tools::getValue(self::ADDRESS)); + $success &= Configuration::updateValue(self::POSTCODE, Tools::getValue(self::POSTCODE)); + $success &= Configuration::updateValue(self::CITY, Tools::getValue(self::CITY)); + $success &= Configuration::updateValue(self::EMAIL, Tools::getValue(self::EMAIL)); + $success &= Configuration::updateValue(self::PHONE, Tools::getValue(self::PHONE)); + $success &= Configuration::updateValue(self::CUSTOMER_COMPANY, Tools::getValue(self::CUSTOMER_COMPANY)); + $success &= Configuration::updateValue(self::CUSTOMER_NAME, Tools::getValue(self::CUSTOMER_NAME)); + $success &= Configuration::updateValue(self::CUSTOMER_PHONE, Tools::getValue(self::CUSTOMER_PHONE)); + $success &= Configuration::updateValue(self::CUSTOMER_FID, Tools::getValue(self::CUSTOMER_FID)); + $success &= Configuration::updateValue(self::PRICE_CALCULATION_TYPE, Tools::getValue(self::PRICE_CALCULATION_TYPE)); + $success &= Configuration::updateValue(self::CARRIER_STANDARD, (int)Tools::isSubmit(self::CARRIER_STANDARD)); + $success &= Configuration::updateValue(self::CARRIER_STANDARD_COD, (int)Tools::isSubmit(self::CARRIER_STANDARD_COD)); + $success &= Configuration::updateValue(self::CARRIER_CLASSIC, (int)Tools::isSubmit(self::CARRIER_CLASSIC)); + $success &= Configuration::updateValue(self::CARRIER_PUDO, (int)Tools::isSubmit(self::CARRIER_PUDO)); + $success &= Configuration::updateValue(self::CARRIER_PUDO_COD, (int)Tools::isSubmit(self::CARRIER_PUDO_COD)); + $success &= Configuration::updateValue(self::CARRIER_SWIPBOX, (int)Tools::isSubmit(self::CARRIER_SWIPBOX)); + $success &= Configuration::updateValue(self::WEIGHT_CONVERSATION_RATE, Tools::getValue(self::WEIGHT_CONVERSATION_RATE)); + $success &= Configuration::updateValue(self::DIMENSION_CONVERSATION_RATE, Tools::getValue(self::DIMENSION_CONVERSATION_RATE)); + $success &= Configuration::updateValue(self::WS_URL, Tools::getValue(self::WS_URL)); + + $success &= Configuration::updateValue(self::ADDITIONAL_REF1, Tools::getValue(self::ADDITIONAL_REF1)); + $success &= Configuration::updateValue(self::ADDITIONAL_REF2, Tools::getValue(self::ADDITIONAL_REF2)); + $success &= Configuration::updateValue(self::ADDITIONAL_CUSTOMER_DATA_1, Tools::getValue(self::ADDITIONAL_CUSTOMER_DATA_1)); + + $success &= Configuration::updateValue(self::REF1_DYNAMIC, Tools::getValue(self::REF1_DYNAMIC)); + $success &= Configuration::updateValue(self::REF2_DYNAMIC, Tools::getValue(self::REF2_DYNAMIC)); + $success &= Configuration::updateValue(self::CUSTOMER_DATA_DYNAMIC, Tools::getValue(self::CUSTOMER_DATA_DYNAMIC)); + + $success &= Configuration::updateValue(self::REF1_STATIC, Tools::getValue(self::REF1_STATIC)); + $success &= Configuration::updateValue(self::REF2_STATIC, Tools::getValue(self::REF2_STATIC)); + $success &= Configuration::updateValue(self::CUSTOMER_DATA_STATIC, Tools::getValue(self::CUSTOMER_DATA_STATIC)); + $success &= Configuration::updateValue(self::DECLARED_VALUE, Tools::getValue(self::DECLARED_VALUE)); + $success &= Configuration::updateValue(self::CUD, Tools::getValue(self::CUD)); + $success &= Configuration::updateValue(self::ROD, Tools::getValue(self::ROD)); + $success &= Configuration::updateValue(self::DPDE, Tools::getValue(self::DPDE)); + $success &= Configuration::updateValue(self::DPDND, Tools::getValue(self::DPDND)); + $success &= Configuration::updateValue(self::DPDFOOD, Tools::getValue(self::DPDFOOD)); + $success &= Configuration::updateValue(self::DPDLQ, Tools::getValue(self::DPDLQ)); + $success &= Configuration::updateValue(self::DPDTODAY, Tools::getValue(self::DPDTODAY)); + $success &= Configuration::updateValue(self::DPDSATURDAY, Tools::getValue(self::DPDSATURDAY)); + $success &= Configuration::updateValue(self::DUTY, Tools::getValue(self::DUTY)); + $success &= Configuration::updateValue(self::LOG_MODE, Tools::getValue(self::LOG_MODE)); + $success &= Configuration::updateValue(self::DEFAULT_PRINTER_TYPE, Tools::getValue(self::DEFAULT_PRINTER_TYPE)); + $success &= Configuration::updateValue(self::DEFAULT_WEIGHT, Tools::getValue(self::DEFAULT_WEIGHT)); + $success &= Configuration::updateValue(self::DISABLE_SEND_SHIPPING_MAIL, Tools::getValue(self::DISABLE_SEND_SHIPPING_MAIL)); + $success &= Configuration::updateValue(self::PARCEL_CONTENT_SOURCE, Tools::getValue(self::PARCEL_CONTENT_SOURCE)); + $success &= Configuration::updateValue(self::CUSTOM_CART, Tools::getValue(self::CUSTOM_CART)); + + + foreach (DpdPoland::getPaymentModules() as $payment_module) + $success &= Configuration::updateValue( + self::COD_MODULE_PREFIX . $payment_module['name'], (int)Tools::isSubmit(self::COD_MODULE_PREFIX . $payment_module['name']) + ); + + return $success; + } + + /** + * Collects settings from database + * Assigns settings values for class variables + */ + private function getSettings() + { + $this->login = $this->getSetting(self::LOGIN, $this->login); + $password = $this->getSetting(self::PASSWORD, $this->password); + if (isset($password)) { + $phpEncryption = null; + if (version_compare(_PS_VERSION_, '1.7.0.0', '<')) + $phpEncryption = new Rijndael('_RIJNDAEL_KEY_', '_RIJNDAEL_IV_'); + else + $phpEncryption = new PhpEncryption(_NEW_COOKIE_KEY_); + $this->password = $phpEncryption->decrypt($password); + } + + $this->client_number = $this->getSetting(self::CLIENT_NUMBER, $this->client_number); + $this->client_name = $this->getSetting(self::CLIENT_NAME, $this->client_name); + $this->customer_company = $this->getSetting(self::CUSTOMER_COMPANY, $this->customer_company); + $this->customer_name = $this->getSetting(self::CUSTOMER_NAME, $this->customer_name); + $this->customer_phone = $this->getSetting(self::CUSTOMER_PHONE, $this->customer_phone); + $this->customer_fid = $this->getSetting(self::CUSTOMER_FID, $this->customer_fid); + $this->price_calculation_type = $this->getSetting(self::PRICE_CALCULATION_TYPE, $this->price_calculation_type); + $this->carrier_standard = $this->getSetting(self::CARRIER_STANDARD, $this->carrier_standard); + $this->carrier_standard_cod = $this->getSetting(self::CARRIER_STANDARD_COD, $this->carrier_standard_cod); + $this->carrier_classic = $this->getSetting(self::CARRIER_CLASSIC, $this->carrier_classic); + $this->carrier_pudo = $this->getSetting(self::CARRIER_PUDO, $this->carrier_pudo); + $this->carrier_pudo_cod = $this->getSetting(self::CARRIER_PUDO_COD, $this->carrier_pudo_cod); + $this->carrier_swipbox = $this->getSetting(self::CARRIER_SWIPBOX, $this->carrier_swipbox); + $this->weight_conversation_rate = $this->getSetting(self::WEIGHT_CONVERSATION_RATE, $this->weight_conversation_rate); + $this->dimension_conversation_rate = $this->getSetting(self::DIMENSION_CONVERSATION_RATE, $this->dimension_conversation_rate); + $this->ws_url = $this->getSetting(self::WS_URL, $this->ws_url); + + $this->ref1 = $this->getSetting(self::ADDITIONAL_REF1, $this->ref1); + $this->ref2 = $this->getSetting(self::ADDITIONAL_REF2, $this->ref2); + $this->customer_data_1 = $this->getSetting(self::ADDITIONAL_CUSTOMER_DATA_1, $this->customer_data_1); + + $this->ref1_dynamic = $this->getSetting(self::REF1_DYNAMIC, $this->ref1_dynamic); + $this->ref2_dynamic = $this->getSetting(self::REF2_DYNAMIC, $this->ref2_dynamic); + $this->customer_data_dynamic = $this->getSetting(self::CUSTOMER_DATA_DYNAMIC, $this->customer_data_dynamic); + + $this->ref1_static = $this->getSetting(self::REF1_STATIC, $this->ref1_static); + $this->ref2_static = $this->getSetting(self::REF2_STATIC, $this->ref2_static); + $this->customer_data_static = $this->getSetting(self::CUSTOMER_DATA_STATIC, $this->customer_data_static); + $this->declared_value = $this->getSetting(self::DECLARED_VALUE, $this->declared_value); + $this->cud = $this->getSetting(self::CUD, $this->cud); + $this->rod = $this->getSetting(self::ROD, $this->rod); + $this->dpde = $this->getSetting(self::DPDE, $this->dpde); + $this->dpdnd = $this->getSetting(self::DPDND, $this->dpdnd); + $this->dpdtoday = $this->getSetting(self::DPDTODAY, $this->dpdtoday); + $this->dpdfood = $this->getSetting(self::DPDFOOD, $this->dpdfood); + $this->dpdlq = $this->getSetting(self::DPDLQ, $this->dpdlq); + $this->dpdsaturday = $this->getSetting(self::DPDSATURDAY, $this->dpdsaturday); + $this->duty = $this->getSetting(self::DUTY, $this->duty); + $this->log_mode = $this->getSetting(self::LOG_MODE, $this->log_mode); + $this->default_printer_type = $this->getSetting(self::DEFAULT_PRINTER_TYPE, $this->default_printer_type); + $this->default_weight = $this->getSetting(self::DEFAULT_WEIGHT, $this->default_weight); + $this->disable_send_shipping_mail = $this->getSetting(self::DISABLE_SEND_SHIPPING_MAIL, $this->disable_send_shipping_mail); + $this->parcel_content_source = $this->getSetting(self::PARCEL_CONTENT_SOURCE, $this->parcel_content_source); + $this->custom_cart = $this->getSetting(self::CUSTOM_CART, $this->custom_cart); + + } + + /** + * Returns a setting from database + * + * @param string $name Setting name + * @param string $default_value Default setting value + * @return string Setting value + */ + private function getSetting($name, $default_value) + { + $id_shop = Shop::getContextShopID(true); + $id_shop_group = Shop::getContextShopGroupID(true); + + return Configuration::get($name, null, $id_shop_group, $id_shop) !== false ? Configuration::get($name, null, $id_shop_group, $id_shop) : $default_value; + } + + /** + * Deletes settings from database + * + * @return bool Settings deleted successfully + */ + public static function deleteConfiguration() + { + $success = true; + + $success &= self::deleteByNames(array( + self::LOGIN, self::PASSWORD, self::CLIENT_NUMBER, self::CLIENT_NAME, self::NAME_SURNAME, self::ADDRESS, + self::POSTCODE, self::CITY, self::EMAIL, self::PHONE, self::CUSTOMER_COMPANY, self::CUSTOMER_NAME, self::CUSTOMER_PHONE, + self::CUSTOMER_FID, self::PRICE_CALCULATION_TYPE, self::CARRIER_STANDARD, self::CARRIER_STANDARD_COD, + self::CARRIER_CLASSIC, self::WEIGHT_CONVERSATION_RATE, self::DIMENSION_CONVERSATION_RATE, self::WS_URL, self::CARRIER_STANDARD_ID, + self::CARRIER_STANDARD_COD_ID, self::CARRIER_CLASSIC_ID, self::ADDITIONAL_REF1, self::ADDITIONAL_REF2, self::ADDITIONAL_CUSTOMER_DATA_1, + self::REF1_DYNAMIC, self::REF2_DYNAMIC, self::CUSTOMER_DATA_DYNAMIC, self::REF1_STATIC, self::REF2_STATIC, self::CUSTOMER_DATA_STATIC, + self::CARRIER_PUDO, self::CARRIER_PUDO_ID, self::DECLARED_VALUE, self::CUD, self::ROD, self::DPDE, self::DPDND, self::DUTY, self::LOG_MODE, + self::DEFAULT_WEIGHT, self::DEFAULT_PRINTER_TYPE, self::DISABLE_SEND_SHIPPING_MAIL, self::CARRIER_PUDO_COD, self::CARRIER_PUDO_COD_ID, self::CARRIER_SWIPBOX_ID, self::CUSTOM_CART + )); + + foreach (DpdPoland::getPaymentModules() as $payment_module) + $success &= Configuration::deleteByName(self::COD_MODULE_PREFIX . $payment_module['name']); + + return $success; + } + + /** + * Deletes settings from database by their names + * + * @param array $names Settings names list + * @return bool Settings deleted successfully + */ + private static function deleteByNames($names) + { + $success = true; + + foreach ($names as $name) + $success &= Configuration::deleteByName($name); + + return $success; + } + + /** + * Deletes a single setting from database + * + * @param string $name Setting name + * @return bool Setting deleted successfully + */ + public static function deleteByName($name) + { + return Configuration::deleteByName($name); + } + + /** + * Checks if required settings are filled + * + * @return bool Required settings are filled + */ + public static function checkRequiredConfiguration() + { + $configuration_obj = new DpdPolandConfiguration(); + + if (!$configuration_obj->login || + !$configuration_obj->password || + !$configuration_obj->client_number || + !$configuration_obj->client_name || + !$configuration_obj->weight_conversation_rate || + !$configuration_obj->dimension_conversation_rate || + !$configuration_obj->ws_url || + !$configuration_obj->customer_fid) + return false; + + if (DpdPolandSenderAddress::getAddressesCount() <= 0) { + return false; + } + + return true; + } + + /** + * Returns zones which are assigned to a carrier + * + * @param int $id_carrier Carrier ID + * @return array|false|mysqli_result|null|PDOStatement|resource Carrier zones + */ + public static function getCarrierZones($id_carrier) + { + return DB::getInstance()->executeS(' + SELECT `id_zone` + FROM `' . _DB_PREFIX_ . 'carrier_zone` + WHERE `id_carrier` = "' . (int)$id_carrier . '" + '); + } + + /** + * Assigns PrestaShop zones for DPD carriers + * + * @return bool Zones assigned successfully + */ + public static function saveZonesForCarriers() + { + $configuration = new DpdPolandConfiguration(); + + $id_shop = Shop::getContextShopID(true); + $id_shop_group = Shop::getContextShopGroupID(true); + + if ($configuration->carrier_classic) { + $id_carrier_classic = (int)Configuration::get(DpdPolandConfiguration::CARRIER_CLASSIC_ID, null, $id_shop_group, $id_shop); + $classic_carrier_obj = DpdPolandService::getCarrierByReference((int)$id_carrier_classic); + + if (Validate::isLoadedObject($classic_carrier_obj)) + $id_carrier_classic = $classic_carrier_obj->id; + + if (!self::removeZonesForCarrier($id_carrier_classic) || !self::saveZoneForCarrier('classic', $id_carrier_classic)) + return false; + } + + if ($configuration->carrier_pudo) { + $id_carrier_pudo = (int)Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_ID, null, $id_shop_group, $id_shop); + $pudo_carrier_obj = DpdPolandService::getCarrierByReference((int)$id_carrier_pudo); + + if (Validate::isLoadedObject($pudo_carrier_obj)) + $id_carrier_pudo = $pudo_carrier_obj->id; + + if (!self::removeZonesForCarrier($id_carrier_pudo) || !self::saveZoneForCarrier('pudo', $id_carrier_pudo)) + return false; + } + + if ($configuration->carrier_pudo_cod) { + $id_carrier_pudo_cod = (int)Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_COD_ID, null, $id_shop_group, $id_shop); + $pudo_cod_carrier_obj = DpdPolandService::getCarrierByReference((int)$id_carrier_pudo_cod); + + if (Validate::isLoadedObject($pudo_cod_carrier_obj)) + $id_carrier_pudo_cod = $pudo_cod_carrier_obj->id; + + if (!self::removeZonesForCarrier($id_carrier_pudo_cod) || !self::saveZoneForCarrier('pudo_cod', $id_carrier_pudo_cod)) + return false; + } + + if ($configuration->carrier_standard) { + $id_carrier_standard = (int)Configuration::get(DpdPolandConfiguration::CARRIER_STANDARD_ID, null, $id_shop_group, $id_shop); + $carrier_standard_obj = DpdPolandService::getCarrierByReference((int)$id_carrier_standard); + + if (Validate::isLoadedObject($carrier_standard_obj)) + $id_carrier_standard = $carrier_standard_obj->id; + + if (!self::removeZonesForCarrier($id_carrier_standard) || !self::saveZoneForCarrier('standard', $id_carrier_standard)) + return false; + } + + if ($configuration->carrier_standard_cod) { + $id_carrier_standard_cod = (int)Configuration::get(DpdPolandConfiguration::CARRIER_STANDARD_COD_ID, null, $id_shop_group, $id_shop); + $carrier_standard_cod_obj = DpdPolandService::getCarrierByReference((int)$id_carrier_standard_cod); + + if (Validate::isLoadedObject($carrier_standard_cod_obj)) + $id_carrier_standard_cod = $carrier_standard_cod_obj->id; + + if (!self::removeZonesForCarrier($id_carrier_standard_cod) || !self::saveZoneForCarrier('standard_cod', $id_carrier_standard_cod)) + return false; + } + + return true; + } + + /** + * Removes zones for carrier + * + * @param int $id_carrier Carrier ID + * @return bool Zones removed from carrier + */ + private static function removeZonesForCarrier($id_carrier) + { + return DB::getInstance()->execute(' + DELETE FROM `' . _DB_PREFIX_ . 'carrier_zone` + WHERE `id_carrier` = "' . (int)$id_carrier . '" + '); + } + + /** + * Saves zone for carrier into database + * + * @param string $type Service type + * @param int $id_carrier Carrier ID + * @return bool Carrier zones saved successfully + */ + private static function saveZoneForCarrier($type, $id_carrier) + { + foreach (Zone::getZones() as $zone) { + if (Tools::getValue($type . '_' . (int)$zone['id_zone'])) { + if (!DB::getInstance()->execute(' + INSERT INTO `' . _DB_PREFIX_ . 'carrier_zone` + (`id_carrier`, `id_zone`) + VALUES + ("' . (int)$id_carrier . '", "' . (int)$zone['id_zone'] . '") + ')) { + return false; + } + } + } + + return true; + } +} diff --git a/modules/dpdpoland/classes/Country.php b/modules/dpdpoland/classes/Country.php new file mode 100644 index 00000000..4f4aad40 --- /dev/null +++ b/modules/dpdpoland/classes/Country.php @@ -0,0 +1,192 @@ +id_shop = (int)Context::getContext()->shop->id; + } + + /** + * @var array Class variables and their validation types + */ + public static $definition = array( + 'table' => _DPDPOLAND_COUNTRY_DB_, + 'primary' => 'id_dpdpoland_country', + 'multilang_shop' => true, + 'multishop' => true, + 'fields' => array( + 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'enabled' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects list data and prepares it to be displayed + * + * @param string $order_by List order by criteria + * @param string $order_way List sorting way (ascending, descending) + * @param string $filter Criteria by which list is filtered + * @param int $start From which element list will be displayed + * @param int $pagination How many elements will be displayed in list + * @return array|false|mysqli_result|null|PDOStatement|resource Collected list data + */ + public function getList($order_by, $order_way, $filter, $start, $pagination) + { + $order_way = Validate::isOrderWay($order_way) ? $order_way : 'ASC'; + + $id_shop = (int)Context::getContext()->shop->id; + $id_lang = (int)Context::getContext()->language->id; + + if (version_compare(_PS_VERSION_, '1.5', '<')) + $countries = DB::getInstance()->executeS(' + SELECT + c.`id_country` AS `id_country`, + cl.`name` AS `name`, + c.`iso_code` AS `iso_code`, + IF(dpdc.`enabled` IS NULL, 1, dpdc.`enabled`) AS `enabled` + FROM `'._DB_PREFIX_.'country` c + LEFT JOIN `'._DB_PREFIX_._DPDPOLAND_COUNTRY_DB_.'` dpdc ON (dpdc.`id_country` = c.`id_country` AND dpdc.`id_shop` = "'.(int)$id_shop.'") + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = c.`id_country` AND cl.`id_lang` = "'.(int)$id_lang.'")' + .$filter + .($order_by && $order_way ? ' ORDER BY `'.bqSQL($order_by).'` '.pSQL($order_way) : '') + .($start !== null && $pagination !== null ? ' LIMIT '.(int)$start.', '.(int)$pagination : '') + ); + else + $countries = DB::getInstance()->executeS(' + SELECT + c.`id_country` AS `id_country`, + cl.`name` AS `name`, + c.`iso_code` AS `iso_code`, + IF(dpdc.`enabled` IS NULL, 1, dpdc.`enabled`) AS `enabled` + FROM `'._DB_PREFIX_.'country` c + LEFT JOIN `'._DB_PREFIX_._DPDPOLAND_COUNTRY_DB_.'` dpdc ON (dpdc.`id_country` = c.`id_country` AND dpdc.`id_shop` = "'.(int)$id_shop.'") + LEFT JOIN `'._DB_PREFIX_.'country_shop` cs ON (cs.`id_country` = c.`id_country`) + LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = c.`id_country` AND cl.`id_lang` = "'.(int)$id_lang.'") + WHERE cs.`id_shop` = "'.(int)$id_shop.'" ' + .$filter + .($order_by && $order_way ? ' ORDER BY `'.bqSQL($order_by).'` '.pSQL($order_way) : '') + .($start !== null && $pagination !== null ? ' LIMIT '.(int)$start.', '.(int)$pagination : '') + ); + + if (!$countries) + $countries = array(); + + return $countries; + } + + /** + * Returns DPD country ID according to PrestaShop country + * + * @param int $id_country PrestaShop country ID + * @return false|null|string DPD country ID + */ + public static function getIdByCountry($id_country) + { + $id_shop = (int)Context::getContext()->shop->id; + + return DB::getInstance()->getValue(' + SELECT `id_dpdpoland_country` + FROM `'._DB_PREFIX_._DPDPOLAND_COUNTRY_DB_.'` + WHERE `id_shop` = "'.(int)$id_shop.'" + AND `id_country` = "'.(int)$id_country.'" + '); + } + + /** + * Collects data about disabled countries + * + * @return array Disabled countries IDs + */ + public static function getDisabledCountriesIDs() + { + $id_shop = (int)Context::getContext()->shop->id; + + $countries = DB::getInstance()->executeS(' + SELECT `id_country` + FROM `'._DB_PREFIX_._DPDPOLAND_COUNTRY_DB_.'` + WHERE `id_shop` = "'.(int)$id_shop.'" + AND `enabled` = "0" + '); + + if (!$countries) + $countries = array(); + + $countries_array = array(); + + foreach ($countries as $country) + $countries_array[] = $country['id_country']; + + return $countries_array; + } +} diff --git a/modules/dpdpoland/classes/Log.php b/modules/dpdpoland/classes/Log.php new file mode 100644 index 00000000..08dffbf6 --- /dev/null +++ b/modules/dpdpoland/classes/Log.php @@ -0,0 +1,34 @@ +setFilename(_DPDPOLAND_MODULE_DIR_."/log/logs.log"); + $logger->logDebug($message); + } + + public static function addError($message) + { + if(!in_array(Configuration::get(DpdPolandConfiguration::LOG_MODE), array(self::LOG_DEBUG, self::LOG_ERROR))) + return; + + $logger = new FileLogger(0); + $logger->setFilename(_DPDPOLAND_MODULE_DIR_."/log/logs.log"); + $logger->logError($message); + } +} diff --git a/modules/dpdpoland/classes/Manifest.php b/modules/dpdpoland/classes/Manifest.php new file mode 100644 index 00000000..08d76995 --- /dev/null +++ b/modules/dpdpoland/classes/Manifest.php @@ -0,0 +1,244 @@ + _DPDPOLAND_MANIFEST_DB_, + 'primary' => 'id_manifest', + 'multilang' => false, + 'multishop' => false, + 'fields' => array( + 'id_manifest' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_manifest_ws' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_package_ws' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects list of packages IDs + * + * @return array Packages IDs + */ + public function getPackages() + { + $packages_ids = array(); + + $packages = Db::getInstance()->executeS(' + SELECT `id_package_ws` + FROM `'._DB_PREFIX_._DPDPOLAND_MANIFEST_DB_.'` + WHERE `id_manifest_ws` = "'.(int)$this->id_manifest_ws.'" + '); + + foreach ($packages as $package) + $packages_ids[] = $package['id_package_ws']; + + return $packages_ids; + } + + /** + * Collects list data and prepares it to be displayed + * + * @param string $order_by List order by criteria + * @param string $order_way List sorting way (ascending, descending) + * @param string $filter Criteria by which list is filtered + * @param int $start From which element list will be displayed + * @param int $pagination How many elements will be displayed in list + * @return array|false|mysqli_result|null|PDOStatement|resource Collected list data + */ + public function getList($order_by, $order_way, $filter, $start, $pagination) + { + $order_way = Validate::isOrderWay($order_way) ? $order_way : 'ASC'; + + return Db::getInstance()->executeS(' + SELECT m.`id_manifest_ws` AS `id_manifest_ws`, + COUNT(p.`id_parcel`) AS `count_parcels`, + COUNT(DISTINCT m.`id_package_ws`) AS `count_orders`, + m.`date_add` AS `date_add` + FROM `'._DB_PREFIX_._DPDPOLAND_MANIFEST_DB_.'` m + LEFT JOIN `'._DB_PREFIX_._DPDPOLAND_PARCEL_DB_.'` p ON (p.`id_package_ws` = m.`id_package_ws`) + GROUP BY `id_manifest_ws` + '.$filter.' + ORDER BY `'.bqSQL($order_by).'` '.pSQL($order_way). + ($start !== null && $pagination !== null ? ' LIMIT '.(int)$start.', '.(int)$pagination : '') + ); + } + + /** + * Checks if all fields of sender addresses are valid + * + * @param array $package_ids Package IDs + * @return bool Sender addresses are valid + */ + public static function validateSenderAddresses($package_ids) + { + if (!is_array($package_ids)) + return false; + + $first_package = new DpdPolandPackage((int)$package_ids[0]); + $first_package_address = new Address((int)$first_package->id_address_sender); + + $address_keys = array('country', 'company', 'lastname', 'firstname', 'address1', 'address2', 'postcode', 'city', 'phone'); + $address = array(); + + foreach ($address_keys as $key) + if (isset($first_package_address->$key)) + $address[$key] = $first_package_address->$key; + else + return false; + + foreach ($package_ids as $package_id) + { + $package = new DpdPolandPackage((int)$package_id); + $sender_address = new Address((int)$package->id_address_sender); + $current_package_sender_address = array(); + + foreach ($address_keys as $key) + if (isset($sender_address->$key)) + $current_package_sender_address[$key] = $sender_address->$key; + else + return false; + + $differences = array_diff_assoc($address, $current_package_sender_address); + + if (!empty($differences)) + return false; + } + + return true; + } + + /** + * Returns manifest WebService ID according to package ID + * + * @param int|string $id_package_ws Package ID + * @return false|null|string Manifest ID + */ + public static function getManifestIdWsByPackageIdWs($id_package_ws) + { + return Db::getInstance()->getValue(' + SELECT `id_manifest_ws` + FROM `'._DB_PREFIX_._DPDPOLAND_MANIFEST_DB_.'` + WHERE `id_package_ws` = "'.(int)$id_package_ws.'" + '); + } + + /** + * Returns package ID according to Manifest ID + * + * @param int|string $id_manifest_ws Manifest ID + * @return false|null|string Package ID + */ + public function getPackageIdWsByManifestIdWs($id_manifest_ws) + { + return Db::getInstance()->getValue(' + SELECT `id_package_ws` + FROM `'._DB_PREFIX_._DPDPOLAND_MANIFEST_DB_.'` + WHERE `id_manifest_ws` = "'.(int)$id_manifest_ws.'" + '); + } + + /** + * Creates and returns package object instance + * + * @return DpdPolandPackage instance + */ + public function getPackageInstance() + { + if (!$this->id_package_ws) + $this->id_package_ws = $this->getPackageIdWsByManifestIdWs($this->id_manifest_ws); + + return new DpdPolandPackage($this->id_package_ws); + } + + /** + * Generates manifest + * + * @param string $output_doc_format Document format + * @param string $output_doc_page_format Document page format + * @param string $policy Policy type + * @return bool Manifest generated successfully + */ + public function generate($output_doc_format = 'PDF', $output_doc_page_format = 'LBL_PRINTER', $policy = 'STOP_ON_FIRST_ERROR') + { + if (!$this->webservice) + $this->webservice = new DpdPolandManifestWS; + + return $this->webservice->generate($this, $output_doc_format, $output_doc_page_format, $policy); + } + + /** + * Generates multiple manifests + * + * @param array $package_ids Packages IDs + * @param string $output_doc_format Document format + * @param string $output_doc_page_format Document page format + * @param string $policy Policy type + * @return bool Multiple manifests generated successfully + */ + public function generateMultiple($package_ids, $output_doc_format = 'PDF', $output_doc_page_format = 'LBL_PRINTER', $policy = 'STOP_ON_FIRST_ERROR') + { + if (!$this->webservice) + $this->webservice = new DpdPolandManifestWS; + + return $this->webservice->generateMultiple($package_ids, $output_doc_format, $output_doc_page_format, $policy); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/ObjectModel.php b/modules/dpdpoland/classes/ObjectModel.php new file mode 100644 index 00000000..f7ffa791 --- /dev/null +++ b/modules/dpdpoland/classes/ObjectModel.php @@ -0,0 +1,148 @@ +getCallerClassName(); // child class name + + if (isset($caller_class_name::$definition)) + { + $this->tables = array($caller_class_name::$definition['table']); + $this->table = $caller_class_name::$definition['table']; + $this->identifier = $caller_class_name::$definition['primary']; + + foreach ($caller_class_name::$definition['fields'] as $field_name => $field) + { + if (!in_array($field_name, array('id_shop', 'date_upd', 'date_add'))) + { + $validate_rule = (isset($field['validate'])) ? $field['validate'] : 'isAnything'; + $this->fieldsValidate[$field_name] = $validate_rule; + + if (isset($field['required'])) + array_push($this->fieldsRequired, $field_name); + + if (isset($field['size'])) + $this->fieldsSize[$field_name] = $field['size']; + } + } + } + } + + return parent::__construct($id); + } + + /** + * Returns class name from which functions are called + * + * @return string Caller class name + */ + private function getCallerClassName() + { + return get_class($this); + } + + /** + * Collects object fields data + * + * @return array Object fields data + */ + public function getFields() + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + parent::validateFields(); + + $caller_class_name = $this->getCallerClassName(); // child class name + $fields = array(); + + if (isset($caller_class_name::$definition)) + { + foreach ($caller_class_name::$definition['fields'] as $field_name => $field) + { + if ($field_name == $this->identifier && isset($this->$field_name)) + $fields[$field_name] = $this->$field_name; + else + { + switch ($field['type']) + { + case 1: + $fields[$field_name] = (int)$this->$field_name; + break; + case 2: + $fields[$field_name] = (bool)$this->$field_name; + break; + case 3: + case 5: + case 6: + $fields[$field_name] = $this->$field_name; + break; + case 4: + $fields[$field_name] = (float)$this->$field_name; + break; + case 7: + $fields[$field_name] = $this->$field_name; + break; + } + } + } + } + + return $fields; + } + else + return parent::getFields(); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/Package.php b/modules/dpdpoland/classes/Package.php new file mode 100644 index 00000000..0de2f3b9 --- /dev/null +++ b/modules/dpdpoland/classes/Package.php @@ -0,0 +1,448 @@ + _DPDPOLAND_PACKAGE_DB_, + 'primary' => 'id_package', + 'multilang' => false, + 'multishop' => false, + 'fields' => array( + 'id_package' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_package_ws' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'sessionId' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'sessionType' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'payerNumber' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'id_address_sender' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_address_delivery' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'cod_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'declaredValue_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'ref1' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'ref2' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'additional_info' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'labels_printed' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'id_sender_address' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'cud' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'rod' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'dpde' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'dpdnd' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'dpdtoday' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'dpdsaturday' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'dpdfood' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'dpdfood_limit_date' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'dpdlq' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'duty' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), + 'duty_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice'), + 'duty_currency' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * DpdPolandPackage constructor + * Object identified by id_package_ws rather than id_package + * + * @param null|int $id_package_ws Used only as a primary field by ObjectModel + */ + public function __construct($id_package_ws = null) + { + $id_package = $this->getPackageIdByPackageIdWs($id_package_ws); + + parent::__construct($id_package); + } + + /** + * Returns package ID according to package ID received from WebServices + * + * @param int|string $id_package_ws Package WebServices ID + * @return false|null|string Package ID + */ + private function getPackageIdByPackageIdWs($id_package_ws) + { + return Db::getInstance()->getValue(' + SELECT `id_package` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` + WHERE `id_package_ws` = "' . (int)$id_package_ws . '" + '); + } + + /** + * Removes packages duplicates for order to have only one package + * + * @return bool Packages duplicates removed successfully + */ + public function removeOrderDuplicates() + { + $id_last_package_by_order = Db::getInstance()->getValue(' + SELECT `id_package` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` + WHERE `id_order` = "' . (int)$this->id_order . '" + ORDER BY `id_package` DESC + '); + + return Db::getInstance()->execute(' + DELETE FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` + WHERE `id_order` = "' . (int)$this->id_order . '" + AND `id_package` != "' . (int)$id_last_package_by_order . '" + '); + } + + /** + * Creates package instance according to order ID + * + * @param int $id_order Order ID + * @return DpdPolandPackage object instance + */ + public static function getInstanceByIdOrder($id_order) + { + $id_package_ws = Db::getInstance()->getValue(' + SELECT `id_package_ws` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` + WHERE `id_order` = "' . (int)$id_order . '" + ORDER BY `id_package` DESC + '); + + return new DpdPolandPackage($id_package_ws); + } + + /** + * Checks if current package has printed labels + * + * @return int Printed labels count + */ + public function isManifestPrinted() + { + return (int)Db::getInstance()->getValue(' + SELECT COUNT(`id_manifest_ws`) + FROM `' . _DB_PREFIX_ . _DPDPOLAND_MANIFEST_DB_ . '` + WHERE `id_package_ws`=' . (int)$this->id_package_ws + ); + } + + /** + * Returns formatted session type + * + * @return string Formatted session type + */ + public function getSessionType() + { + return $this->sessionType == 'international' ? 'INTERNATIONAL' : 'DOMESTIC'; + } + + /** + * Collects list data and prepares it to be displayed + * + * @param string $order_by List order by criteria + * @param string $order_way List sorting way (ascending, descending) + * @param string $filter Criteria by which list is filtered + * @param int $start From which element list will be displayed + * @param int $pagination How many elements will be displayed in list + * @return array|false|mysqli_result|null|PDOStatement|resource Collected list data + */ + public function getList($order_by, $order_way, $filter, $start, $pagination) + { + $order_way = Validate::isOrderWay($order_way) ? $order_way : 'ASC'; + + $id_shop = (int)Context::getContext()->shop->id; + $id_lang = (int)Context::getContext()->language->id; + + $list = DB::getInstance()->executeS(' + SELECT + p.`id_package_ws` AS `id_package_ws`, + p.`date_add` AS `date_add`, + p.`id_order` AS `id_order`, + (SELECT COUNT(par.`id_parcel`) + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_ . '` par + WHERE par.`id_package_ws` = p.`id_package_ws`) AS `count_parcel`, + (SELECT parc.`waybill` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_ . '` parc + WHERE parc.`id_package_ws` = p.`id_package_ws` + ORDER BY parc.`id_parcel` + LIMIT 1) AS `package_number`, + CONCAT(a.`firstname`, " ", a.`lastname`) AS `receiver`, + cl.`name` AS `country`, + a.`postcode` AS `postcode`, + a.`city` AS `city`, + CONCAT(a.`address1`, " ", a.`address2`) AS `address`, + p.`ref1` AS `ref1`, + p.`ref2` AS `ref2`, + p.`additional_info` AS `additional_info` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` p + LEFT JOIN `' . _DB_PREFIX_ . 'orders` o ON (o.`id_order` = p.`id_order`) + LEFT JOIN `' . _DB_PREFIX_ . 'address` a ON (a.`id_address` = p.`id_address_delivery`) + LEFT JOIN `' . _DB_PREFIX_ . 'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = "' . (int)$id_lang . '") + WHERE ' . (version_compare(_PS_VERSION_, '1.5', '<') ? '' : 'o.`id_shop` = "' . (int)$id_shop . '" AND ') . ' + NOT EXISTS( + SELECT m.`id_manifest_ws` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_MANIFEST_DB_ . '` m + WHERE m.`id_package_ws` = p.`id_package_ws` + ) ' . + $filter . + ($order_by && $order_way ? ' ORDER BY `' . bqSQL($order_by) . '` ' . pSQL($order_way) : '') . + ($start !== null && $pagination !== null ? ' LIMIT ' . (int)$start . ', ' . (int)$pagination : '') + ); + + if (!$list) + $list = array(); + + return $list; + } + + /** + * Splits packages into groups + * according to session type + * + * @param array $ids Packages WebServices IDs + * @return array Formatted packages groups + */ + public static function separatePackagesBySession($ids) + { + $international_packages = array(); + $domestic_packages = array(); + + foreach ($ids as $id_package_ws) { + $package = new DpdPolandPackage((int)$id_package_ws); + $session_type = $package->getSessionType(); + if ($session_type == 'INTERNATIONAL') + $international_packages[] = (int)$id_package_ws; + elseif ($session_type == 'DOMESTIC') + $domestic_packages[] = (int)$id_package_ws; + } + + return array('INTERNATIONAL' => $international_packages, 'DOMESTIC' => $domestic_packages); + } + + /** + * Assigns parcel for package + * + * @param array $parcel Parcel data + * @param string $additional_info Order additional info + * @param boolean $dpdlq Is dpd LQ service + */ + public function addParcel($parcel, $additional_info, $dpdlq) + { + $parcel = array( + 'content' => $parcel['content'], + 'customerData1' => $additional_info, + 'customerData2' => null, + 'customerData3' => null, + 'reference' => Tools::strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')) . '_' . (int)$parcel['number'], + 'sizeX' => (float)$parcel['length'], + 'sizeY' => (float)$parcel['width'], + 'sizeZ' => (float)$parcel['height'], + 'weight' => (float)$parcel['weight'], + 'weightAdr' => $dpdlq == true && isset($parcel['adr']) && ($parcel['adr'] == 'true' || $parcel['adr'] == 'on') ? (float)$parcel['weight_adr'] : null + ); + + $this->parcels[] = $parcel; + } + + + /** + * Generates multiple labels for selected packages + * + * @param array $waybills Packages waybills + * @param string $outputDocPageFormat Document page format + * @param string $session_type Session type (DOMESTIC, INTERNATIONAL) + * @param string $outputLabelType + * @return bool Multiple labels generated successfully + */ + public function generateMultipleLabels($waybills, $outputDocPageFormat = 'A4', $session_type = 'INTERNATIONAL', $outputLabelType = 'BIC3') + { + if (!$this->webservice) + $this->webservice = new DpdPolandPackageWS; + + return $this->webservice->generateMultipleLabels($waybills, $outputDocPageFormat, $session_type, $outputLabelType); + } + + /** + * Generates package labels + * + * @param string $outputDocFormat Document format + * @param string $outputDocPageFormat Document page format + * @param string $policy Policy type + * @param string $outputLabelType + * @return bool Labels generated successfully + */ + public function generateLabels($outputDocFormat = 'PDF', $outputDocPageFormat = 'A4', $policy = 'STOP_ON_FIRST_ERROR', $outputLabelType = 'BIC3') + { + if (!$this->webservice) + $this->webservice = new DpdPolandPackageWS; + + return $this->webservice->generateLabels($this, $outputDocFormat, $outputDocPageFormat, $policy, $outputLabelType); + } + + /** + * Generates labels for selected packages + * + * @param array $package_ids Packages IDs + * @param string $outputDocFormat Document format + * @param string $outputDocPageFormat Document page format + * @param string $policy Policy type + * @param string $outputLabelType + * @return bool Labels generated successfully + */ + public function generateLabelsForMultiplePackages($package_ids, $outputDocFormat = 'PDF', $outputDocPageFormat = 'LBL_PRINTER', $policy = 'STOP_ON_FIRST_ERROR', $outputLabelType = 'BIC3') + { + if (!$this->webservice) + $this->webservice = new DpdPolandPackageWS; + + return $this->webservice->generateLabelsForMultiplePackages($package_ids, $outputDocFormat, $outputDocPageFormat, $policy, $outputLabelType); + } + + /** + * Collects sender address according to package + * + * @param int|string $package_number Package number + * @return array Sender address data + */ + public function getSenderAddress() + { + if (!$this->webservice) + $this->webservice = new DpdPolandPackageWS; + + return $this->webservice->getSenderAddress($this->id_sender_address); + } + + /** + * Collects data about order which has no saved shipments + * + * @return array Orders which has no saved shipments + */ + public static function getLabelExceptions() + { + $orders = Db::getInstance()->executeS(' + SELECT `id_order` + FROM `' . _DB_PREFIX_ . 'orders` + '); + + if (empty($orders)) { + return array(); + } + + $orders_ids = array(); + + foreach ($orders as $order) { + $orders_ids[] = (int)$order['id_order']; + } + + $packages = Db::getInstance()->executeS(' + SELECT `id_order` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` + '); + + if (empty($packages)) { + return $orders_ids; + } + + $package_orders_ids = array(); + + foreach ($packages as $package) { + $package_orders_ids[] = $package['id_order']; + } + + return array_diff($orders_ids, $package_orders_ids); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/Parcel.php b/modules/dpdpoland/classes/Parcel.php new file mode 100644 index 00000000..3277a78f --- /dev/null +++ b/modules/dpdpoland/classes/Parcel.php @@ -0,0 +1,296 @@ + _DPDPOLAND_PARCEL_DB_, + 'primary' => 'id_parcel', + 'multilang' => false, + 'multishop' => false, + 'fields' => array( + 'id_parcel' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_package_ws' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'waybill' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'content' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'weight_adr' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'height' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'length' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'width' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'number' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects orders waybills data + * + * @param array $orders_ids Orders IDs + * @return array|false|mysqli_result|null|PDOStatement|resource Orders Waybills + */ + public static function getOrdersWaybills(array $orders_ids) + { + if (empty($orders_ids)) { + return array(); + } + + $waybills = Db::getInstance()->executeS(' + SELECT parc.`waybill`, pack.`sessionType` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` pack + LEFT JOIN `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_ . '` parc + ON (parc.`id_package_ws` = pack.`id_package_ws`) + WHERE pack.`id_order` IN (' . implode(',', $orders_ids) . ') + '); + + return $waybills; + } + + /** + * Collects parcels data for order + * + * @param int $id_order Order ID + * @param null|int|string $id_package_ws Package WebServices ID + * @return array|false|mysqli_result|null|PDOStatement|resource Order parcels + * @throws PrestaShopDatabaseException + */ + public static function getParcels($id_order, $id_package_ws = null) + { + if ($id_package_ws) { + $parcels = Db::getInstance()->executeS(' + SELECT `id_parcel`, `content`, `weight`, `height`, `length`, `width`, `number`, `weight_adr` + FROM `' . bqSQL(_DB_PREFIX_ . self::$definition['table']) . '` + WHERE `id_package_ws`=' . (int)$id_package_ws + ); + return $parcels; + } + + $products = DpdPolandParcelProduct::getShippedProducts($id_order); + + $parcels = array(); + + $weight = $height = $length = $width = 0; + + $products_count = count($products); + + if ($products_count == 1) { + $product = reset($products); + $height = DpdPoland::convertDimension($product['height']); + $length = DpdPoland::convertDimension($product['length']); + $width = DpdPoland::convertDimension($product['width']); + } + + $content = DpdPolandParcel::getParcelContent($products); + + foreach ($products as $product) { + $weight += DpdPoland::convertWeight($product['weight']); + } + + $parcels[] = array( + 'number' => 1, + 'content' => $content, + 'weight' => $weight, + 'height' => sprintf('%.6f', $height), + 'length' => sprintf('%.6f', $length), + 'width' => sprintf('%.6f', $width), + 'weight_adr' => 0.0 + ); + + return $parcels; + } + + private static function getContentBySKU(array $products) + { + $content = ''; + $products_count = count($products); + + foreach ($products as $product) { + $content .= $product['reference']; + + if (--$products_count) + $content .= ', '; + } + return $content; + } + + private static function getContentByProductId(array $products) + { + $content = ''; + $products_count = count($products); + + foreach ($products as $product) { + $content .= $product['id_product'] . '_' . $product['id_product_attribute']; + + if (--$products_count) + $content .= ', '; + } + return $content; + + } + + private static function getContentByProductName(array $products) + { + $content = ''; + $products_count = count($products); + + foreach ($products as $product) { + $content .= $product['name']; + + if (--$products_count) + $content .= ', '; + } + return $content; + + } + + /** + * Return parcel content + * @param $settings + * @param array $products + */ + public static function getParcelContent(array $products) + { + $settings = new DpdPolandConfiguration; + switch ($settings->parcel_content_source) { + case DpdPolandConfiguration::PARCEL_CONTENT_SOURCE_SKU: + return DpdPolandParcel::getContentBySKU($products); + case DpdPolandConfiguration::PARCEL_CONTENT_SOURCE_PRODUCT_ID: + return DpdPolandParcel::getContentByProductId($products); + case DpdPolandConfiguration::PARCEL_CONTENT_SOURCE_PRODUCT_NAME: + return DpdPolandParcel::getContentByProductName($products); + default: + return ''; + } + } + + /** + * Collects list data and prepares it to be displayed + * + * @param string $order_by List order by criteria + * @param string $order_way List sorting way (ascending, descending) + * @param string $filter Criteria by which list is filtered + * @param int $start From which element list will be displayed + * @param int $pagination How many elements will be displayed in list + * @return array|false|mysqli_result|null|PDOStatement|resource Collected list data + */ + public function getList($order_by, $order_way, $filter, $start, $pagination) + { + $order_way = Validate::isOrderWay($order_way) ? $order_way : 'ASC'; + + $id_shop = (int)Context::getContext()->shop->id; + $id_lang = (int)Context::getContext()->language->id; + + $list = DB::getInstance()->executeS(' + SELECT + p.`id_order` AS `id_order`, + par.`waybill` AS `id_parcel`, + CONCAT(a.`firstname`, " ", a.`lastname`) AS `receiver`, + cl.`name` AS `country`, + a.`postcode` AS `postcode`, + a.`city` AS `city`, + CONCAT(a.`address1`, " ", a.`address2`) AS `address`, + p.`date_add` AS `date_add` + FROM `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_ . '` par + LEFT JOIN `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` p ON (p.`id_package_ws` = par.`id_package_ws`) + LEFT JOIN `' . _DB_PREFIX_ . 'orders` o ON (o.`id_order` = p.`id_order`) + LEFT JOIN `' . _DB_PREFIX_ . 'address` a ON (a.`id_address` = p.`id_address_delivery`) + LEFT JOIN `' . _DB_PREFIX_ . 'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = "' . (int)$id_lang . '")' . + (version_compare(_PS_VERSION_, '1.5', '<') ? ' ' : 'WHERE o.`id_shop` = "' . (int)$id_shop . '" ') . + $filter . + ($order_by && $order_way ? ' ORDER BY `' . bqSQL($order_by) . '` ' . pSQL($order_way) : '') . + ($start !== null && $pagination !== null ? ' LIMIT ' . (int)$start . ', ' . (int)$pagination : '') + ); + + if (!$list) + $list = array(); + + return $list; + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/ParcelProduct.php b/modules/dpdpoland/classes/ParcelProduct.php new file mode 100644 index 00000000..e180e478 --- /dev/null +++ b/modules/dpdpoland/classes/ParcelProduct.php @@ -0,0 +1,254 @@ + _DPDPOLAND_PARCEL_PRODUCT_DB_, + 'primary' => 'id_parcel_product', + 'multilang' => false, + 'multishop' => false, + 'fields' => array( + 'id_parcel' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), + 'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects data about parcels products details + * + * @param array $parcels Parcels + * @return array Parcels products data + */ + public static function getProductDetailsByParcels($parcels) + { + $products = array(); + + foreach ($parcels as $parcel) + { + if (isset($parcel['id_parcel'])) + { + if ($products_array = self::getProductByIdParcel($parcel['id_parcel'])) + { + foreach ($products_array as $product) + { + if (self::isLabelPrinted($parcel['id_parcel'])) + { + $product_data = self::getProductNameAndWeight($parcel['id_parcel'], $product['id_product'], + $product['id_product_attribute']); + $products[] = array_merge($product, array( + 'name' => $product_data['name'], + 'weight' => (float)$product_data['weight'], + 'id_parcel' => (int)$parcel['id_parcel'], + 'reference' => $product['reference'] + )); + } + else + { + $product_obj = new Product($product['id_product']); + $combination = new Combination($product['id_product_attribute']); + + $products[] = array_merge($product, array( + 'name' => (version_compare(_PS_VERSION_, '1.5', '<') ? + $product_obj->name[(int)Context::getContext()->language->id] : + Product::getProductName($product['id_product'], $product['id_product_attribute'])), + 'weight' => (float)$combination->weight + (float)$product_obj->weight, + 'id_parcel' => (int)$parcel['id_parcel'], + 'reference' => $product['reference'] + )); + } + } + } + } + } + + return $products; + } + + /** + * Collects products IDs according to parcel + * + * @param int $id_parcel Parcel ID + * @return array|false|mysqli_result|null|PDOStatement|resource Parcel products IDs + */ + private static function getProductByIdParcel($id_parcel) + { + return Db::getInstance()->executeS(' + SELECT dp.`id_product`, dp.`id_product_attribute`, p.`reference` + FROM `'._DB_PREFIX_.bqSQL(self::$definition['table']).'` dp + LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = dp.`id_product`) + WHERE dp.`id_parcel`='.(int)$id_parcel + ); + } + + /** + * Collects and formats data about order shipped products + * + * @param int $id_order Order ID + * @param array $products Products information + * @return array Shipped products data + */ + public static function getShippedProducts($id_order, $products = array()) + { + $order = is_object($id_order) ? $id_order : new Order((int)$id_order); + + if (!$products) + $products = $order->getProductsDetail(); + + $shipped_products = array(); + + foreach ($products as $product) + { + if (isset($product['product_quantity'])) + $quantity = (int)$product['product_quantity']; + elseif (isset($product['quantity'])) + $quantity = (int)$product['quantity']; + else + $quantity = 1; + + self::extractAndFormatProductData($product); + + for ($i = 0; $i < $quantity; $i++) + $shipped_products[] = $product; + } + + return $shipped_products; + } + + /** + * Collects and formats needed products data + * + * @param array $product Product properties + */ + private static function extractAndFormatProductData(&$product) + { + $id_product = isset($product['product_id']) ? (int)$product['product_id'] : (int)$product['id_product']; + $id_product_attribute = isset($product['product_attribute_id']) ? (int)$product['product_attribute_id'] : + (int)$product['id_product_attribute']; + $product_name = isset($product['product_name']) ? $product['product_name'] : $product['name']; + $product_weight = isset($product['product_weight']) ? $product['product_weight'] : $product['weight']; + + if (isset($product['id_parcel'])) + $id_parcel = (int)$product['id_parcel']; + + $product = array( + 'id_product' => $id_product, + 'id_product_attribute' => $id_product_attribute, + 'name' => $product_name, + 'weight' => DpdPoland::convertWeight($product_weight), + 'width' => isset($product['width']) ? DpdPoland::convertDimension($product['width']) : null, + 'height' => isset($product['height']) ? DpdPoland::convertDimension($product['height']) : null, + 'length' => isset($product['height']) ? DpdPoland::convertDimension($product['depth']) : null, + 'reference' => $product['reference'] + ); + + if (isset($id_parcel)) + $product['id_parcel'] = $id_parcel; + } + + /** + * Checks if label is printed and record about it was saved in database + * + * @param int $id_parcel Parcel ID + * @return bool Label was printed + */ + private static function isLabelPrinted($id_parcel) + { + return (bool)DB::getInstance()->getValue(' + SELECT pac.`labels_printed` + FROM `'._DB_PREFIX_._DPDPOLAND_PARCEL_DB_.'` par + LEFT JOIN `'._DB_PREFIX_._DPDPOLAND_PACKAGE_DB_.'` pac ON (pac.`id_package_ws` = par.`id_package_ws`) + WHERE par.`id_parcel` = "'.(int)$id_parcel.'" + '); + } + + /** + * Collects product name and weight + * + * @param int $id_parcel Parcel ID + * @param int $id_product Product ID + * @param int $id_product_attribute Product combination ID + * @return array|bool|null|object Product name and weight + */ + private static function getProductNameAndWeight($id_parcel, $id_product, $id_product_attribute) + { + return DB::getInstance()->getRow(' + SELECT `name`, `weight` + FROM `'._DB_PREFIX_._DPDPOLAND_PARCEL_PRODUCT_DB_.'` + WHERE `id_parcel` = "'.(int)$id_parcel.'" + AND `id_product` = "'.(int)$id_product.'" + AND `id_product_attribute` = "'.(int)$id_product_attribute.'" + '); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/PayerNumber.php b/modules/dpdpoland/classes/PayerNumber.php new file mode 100644 index 00000000..85869387 --- /dev/null +++ b/modules/dpdpoland/classes/PayerNumber.php @@ -0,0 +1,123 @@ +id_shop = (int)Context::getContext()->shop->id; + } + + /** + * @var array Class variables and their validation types + */ + public static $definition = array( + 'table' => _DPDPOLAND_PAYER_NUMBERS_DB_, + 'primary' => 'id_dpdpoland_payer_number', + 'multilang_shop' => true, + 'multishop' => true, + 'fields' => array( + 'payer_number' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Checks if payer number exists in database + * + * @param string $number Payer number + * @param null|int $id_shop Shop ID + * @return bool Payer number exists in database + */ + public static function payerNumberExists($number, $id_shop = null) + { + if ($id_shop === null) + $id_shop = (int)Context::getContext()->shop->id; + + return (bool)DB::getInstance()->getValue(' + SELECT `id_dpdpoland_payer_number` + FROM `'._DB_PREFIX_._DPDPOLAND_PAYER_NUMBERS_DB_.'` + WHERE `payer_number` = "'.pSQL($number).'" + AND `id_shop` = "'.(int)$id_shop.'" + '); + } + + /** + * Collects data of merchant payer numbers saved in database + * + * @param null|int $id_shop Shop ID + * @return array|false|mysqli_result|null|PDOStatement|resource Payer numbers + */ + public static function getPayerNumbers($id_shop = null) + { + if ($id_shop === null) + $id_shop = (int)Context::getContext()->shop->id; + + return DB::getInstance()->executeS(' + SELECT `id_dpdpoland_payer_number`, `payer_number`, `name` + FROM `'._DB_PREFIX_._DPDPOLAND_PAYER_NUMBERS_DB_.'` + WHERE `id_shop` = "'.(int)$id_shop.'" + '); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/PickupHistory.php b/modules/dpdpoland/classes/PickupHistory.php new file mode 100644 index 00000000..1ed31e00 --- /dev/null +++ b/modules/dpdpoland/classes/PickupHistory.php @@ -0,0 +1,188 @@ + _DPDPOLAND_PICKUP_HISTORY_DB_, + 'primary' => 'id_pickup_history', + 'multilang' => false, + 'multishop' => true, + 'fields' => array( + 'order_number' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'sender_address' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'sender_company' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'sender_name' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'sender_phone' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'pickup_date' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'pickup_time' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'type' => array('type' => self::TYPE_STRING, 'validate' => 'isAnything'), + 'envelope' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'package' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'pallet' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects list data and prepares it to be displayed + * + * @param string $order_by List order by criteria + * @param string $order_way List sorting way (ascending, descending) + * @param string $filter Criteria by which list is filtered + * @param int $start From which element list will be displayed + * @param int $pagination How many elements will be displayed in list + * @return array|false|mysqli_result|null|PDOStatement|resource Collected list data + */ + public static function getList($order_by, $order_way, $filter, $start, $pagination) + { + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_._DPDPOLAND_PICKUP_HISTORY_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '.$filter.' + ORDER BY `'.bqSQL($order_by).'` '.pSQL(Validate::isOrderWay($order_way) ? $order_way : 'ASC'). + ($start !== null && $pagination !== null ? ' LIMIT '.(int)$start.', '.(int)$pagination : '') + ); + } + + + /** + * Calculates how many addresses are saved in current shop + * + * @return int count + */ + public static function getCourierOrderCount() + { + return (int)Db::getInstance()->getValue(' + SELECT COUNT(`id_pickup_history`) + FROM `'._DB_PREFIX_._DPDPOLAND_PICKUP_HISTORY_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/SenderAddress.php b/modules/dpdpoland/classes/SenderAddress.php new file mode 100644 index 00000000..9f7d9ba9 --- /dev/null +++ b/modules/dpdpoland/classes/SenderAddress.php @@ -0,0 +1,175 @@ + _DPDPOLAND_SENDER_ADDRESS_DB_, + 'primary' => 'id_sender_address', + 'multilang' => false, + 'multishop' => false, + 'fields' => array( + 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), + 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isName'), + 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber'), + 'address' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress'), + 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName'), + 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail'), + 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode'), + 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), + 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate') + ) + ); + + /** + * Collects list data and prepares it to be displayed + * + * @param string $order_by List order by criteria + * @param string $order_way List sorting way (ascending, descending) + * @param string $filter Criteria by which list is filtered + * @param int $start From which element list will be displayed + * @param int $pagination How many elements will be displayed in list + * @return array|false|mysqli_result|null|PDOStatement|resource Collected list data + */ + public function getList($order_by, $order_way, $filter, $start, $pagination) + { + $order_way = Validate::isOrderWay($order_way) ? $order_way : 'ASC'; + + return Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_._DPDPOLAND_SENDER_ADDRESS_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '.$filter.' + ORDER BY `'.bqSQL($order_by).'` '.pSQL($order_way). + ($start !== null && $pagination !== null ? ' LIMIT '.(int)$start.', '.(int)$pagination : '') + ); + } + + /** + * Collects and returns data about sender addresses saved in current shop + * + * @return array Sender addresses + */ + public static function getAddresses() + { + $result = array(); + + $addresses = Db::getInstance()->executeS(' + SELECT `id_sender_address`, `alias` + FROM `'._DB_PREFIX_._DPDPOLAND_SENDER_ADDRESS_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '); + + if (!$addresses) { + return $result; + } + + foreach ($addresses as $address) { + $result[$address['id_sender_address']] = $address['alias']; + } + + return $result; + } + + /** + * Calculates how many addresses are saved in current shop + * + * @return int Sender addresses count + */ + public static function getAddressesCount() + { + return (int)Db::getInstance()->getValue(' + SELECT COUNT(`id_sender_address`) + FROM `'._DB_PREFIX_._DPDPOLAND_SENDER_ADDRESS_DB_.'` + WHERE `id_shop` = "'.(int)Context::getContext()->shop->id.'" + '); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/classes/index.php b/modules/dpdpoland/classes/index.php new file mode 100644 index 00000000..7b8d55ba --- /dev/null +++ b/modules/dpdpoland/classes/index.php @@ -0,0 +1,29 @@ + + + dpdpoland + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/dpdpoland/config/index.php b/modules/dpdpoland/config/index.php new file mode 100644 index 00000000..e5e655f9 --- /dev/null +++ b/modules/dpdpoland/config/index.php @@ -0,0 +1,29 @@ + + + dpdpoland + + + + + + 1 + 1 + + \ No newline at end of file diff --git a/modules/dpdpoland/controllers/arrange_pickup.controller.php b/modules/dpdpoland/controllers/arrange_pickup.controller.php new file mode 100644 index 00000000..6eae392c --- /dev/null +++ b/modules/dpdpoland/controllers/arrange_pickup.controller.php @@ -0,0 +1,347 @@ +rules = array( + 'customerCompany' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Customer company name'), + 'required' => true + ), + 'customerName' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Customer name and surname'), + 'required' => true + ), + 'customerPhone' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Customer tel. No.'), + 'required' => true + ), + 'pickupDate' => array( + 'validate' => 'isDate', + 'fieldname' => $this->l('Date of pickup'), + 'required' => true + ), + 'pickupTime' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Timeframe of pickup'), + 'required' => true + ), + 'orderType' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Shipment type'), + 'required' => true + ), + 'orderContent' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('General shipment content'), + 'required' => false + ), + 'dox' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Envelopes'), + 'required' => false + ), + 'doxCount' => array( + 'validate' => 'isUnsignedInt', + 'fieldname' => $this->l('Number of envelopes'), + 'required' => true, + 'dependency' => 'dox' + ), + 'parcels' => array( + 'validate' => 'isUnsignedInt', + 'fieldname' => $this->l('Parcels'), + 'required' => false + ), + 'parcelsCount' => array( + 'validate' => 'isUnsignedInt', + 'fieldname' => $this->l('Number of parcels'), + 'required' => true, + 'dependency' => 'parcels' + ), + 'parcelsWeight' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Summary weight'), + 'required' => true, + 'dependency' => 'parcels' + ), + 'parcelMaxWeight' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Weight of the heaviest item'), + 'required' => true, + 'dependency' => 'parcels' + ), + 'parcelMaxHeight' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Height of the tallest item'), + 'required' => true, + 'dependency' => 'parcels' + ), + 'parcelMaxDepth' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Length of the largest item'), + 'required' => true, + 'dependency' => 'parcels' + ), + 'parcelMaxWidth' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Width of the longest item'), + 'required' => true, + 'dependency' => 'parcels' + ), + 'pallet' => array( + 'validate' => 'isAnything', + 'fieldname' => $this->l('Pallets'), + 'required' => false + ), + 'palletsCount' => array( + 'validate' => 'isUnsignedInt', + 'fieldname' => $this->l('Number of pallets'), + 'required' => true, + 'dependency' => 'pallet' + ), + 'palletsWeight' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Summary weight'), + 'required' => true, + 'dependency' => 'pallet' + ), + 'palletMaxWeight' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Weight of the heaviest item'), + 'required' => true, + 'dependency' => 'pallet' + ), + 'palletMaxHeight' => array( + 'validate' => 'isUnsignedFloat', + 'fieldname' => $this->l('Height of the tallest item'), + 'required' => true, + 'dependency' => 'pallet' + ) + ); + } + + /** + * Returns arrange pickup data parameter + * + * @param string $name Parameter name + * @return mixed|null Arrange pickup data value + */ + public function __get($name) + { + return isset($this->data[$name]) ? $this->data[$name] : null; + } + + /** + * Checks if given date is weekend + * + * @param datetime $date Date + * @return bool Given date is weekend + */ + public static function isWeekend($date) + { + return (date('N', strtotime($date)) >= 6); + } + + /** + * Displays Arrange Pickup page content + * + * @return string Page content in HTML + */ + public function getPage() + { + $date = date('Y-m-d'); + $pickup_date = (Tools::getValue('pickupDate') ? Tools::getValue('pickupDate') : + ($this->isWeekend($date) ? date('Y-m-d', strtotime('next monday')) : $date)); + $sender_addresses = DpdPolandSenderAddress::getAddresses(); + + $this->context->smarty->assign(array( + 'settings' => new DpdPolandConfiguration, + 'pickupDate' => $pickup_date, + 'sender_addresses' => $sender_addresses + )); + + if (version_compare(_PS_VERSION_, '1.6', '>=')) + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/arrange_pickup_16.tpl'); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/arrange_pickup.tpl'); + } + + /** + * Checks if time frames are valid + * + * @param array $timeframes Time frames + * @param int $poland_time_in_seconds Poland country current time in seconds + * @param bool $is_today Is time frames of today + */ + public static function validateTimeframes(&$timeframes, $poland_time_in_seconds, $is_today) + { + $count_timeframes = count($timeframes); + + for ($i = 0; $i < $count_timeframes; $i++) + { + if (!isset($timeframes[$i]['range'])) + { + unset($timeframes[$i]); + continue; + } + + $end_time = explode('-', $timeframes[$i]['range']); + $end_time = strtotime($end_time[1]); + + if ($is_today && round(abs($end_time - $poland_time_in_seconds) / 60) < 120) + unset($timeframes[$i]); + } + } + + /** + * Creates additional time frame which wraps other time frames from first to last + * + * @param array $pickup_timeframes Time frames + * @return bool|string Additional time frame + */ + public static function createExtraTimeframe($pickup_timeframes) + { + if (!$pickup_timeframes || !isset($pickup_timeframes[0]['range'])) + return false; + + $extra_time_from = null; + $extra_time_to = null; + + foreach ($pickup_timeframes as $frame) + { + if (isset($frame['range'])) + { + list($pickup_time_from, $pickup_time_to) = explode('-', $frame['range']); + + if (!$extra_time_from || (str_replace(':', '', $pickup_time_from) < str_replace(':', '', $extra_time_from))) + $extra_time_from = $pickup_time_from; + if (!$extra_time_to || (str_replace(':', '', $pickup_time_to) > str_replace(':', '', $extra_time_to))) + $extra_time_to = $pickup_time_to; + } + } + + if (!$extra_time_from || !$extra_time_to) + return false; + + if ($extra_time_from.'-'.$extra_time_to == $pickup_timeframes[0]['range']) + return false; + + return $extra_time_from.'-'.$extra_time_to; + } + + /** + * Collects and returns Arrange Pickup data + * + * @return array Arrange Pickup data + */ + public function getData() + { + if (!$this->data) + foreach (array_keys($this->rules) as $element) + $this->data[$element] = Tools::getValue($element); + + return $this->data; + } + + /** + * Checks if Arrange Pickup parameters are valid + * + * @return bool Arrange Pickup parameters are valid + */ + public function validate() + { + $date = Tools::getValue('pickupDate'); + + if (!Validate::isDateFormat($date)) + { + self::$errors[] = $this->l('Wrong date format'); + return false; + } + + if (strtotime($date) < strtotime(date('Y-m-d'))) + { + self::$errors[] = $this->l('Date can not be earlier than').' '.date('Y-m-d'); + return false; + } + + if ($this->isWeekend($date)) + { + self::$errors[] = $this->l('Weekends can not be chosen'); + return false; + } + + if (!$this->dox && !$this->parcels && !$this->pallet) + { + self::$errors[] = $this->l('At least one service must be selected'); + return false; + } + + foreach ($this->rules as $element => $rules) + { + if (!isset($rules['dependency']) || (isset($rules['dependency']) && $this->{$rules['dependency']})) + { + if ($rules['required'] && !$this->$element) + { + self::$errors[] = sprintf($this->l('The "%s" field is required.'), $rules['fieldname']); + return false; + } + elseif ($this->$element && method_exists('Validate', $rules['validate']) && + !call_user_func(array('Validate', $rules['validate']), $this->$element)) + { + self::$errors[] = sprintf($this->l('The "%s" field is invalid.'), $rules['fieldname']); + return false; + } + } + } + + return true; + } +} \ No newline at end of file diff --git a/modules/dpdpoland/controllers/configuration.controller.php b/modules/dpdpoland/controllers/configuration.controller.php new file mode 100644 index 00000000..ef07612a --- /dev/null +++ b/modules/dpdpoland/controllers/configuration.controller.php @@ -0,0 +1,260 @@ + $module->displayName, + 'name' => $payment_module['name'] + ); + } + + $this->context->smarty->assign(array( + 'saveAction' => $this->module_instance->module_url, + 'settings' => $configuration_obj, + 'payer_numbers' => DpdPolandPayerNumber::getPayerNumbers(), + 'payment_modules' => $payment_modules, + 'zones' => Zone::getZones(), + 'carrier_zones' => array( + 'classic' => $this->getZonesForCarrier(DpdPolandConfiguration::CARRIER_CLASSIC_ID), + 'standard' => $this->getZonesForCarrier(DpdPolandConfiguration::CARRIER_STANDARD_ID), + 'standard_cod' => $this->getZonesForCarrier(DpdPolandConfiguration::CARRIER_STANDARD_COD_ID), + 'pudo' => $this->getZonesForCarrier(DpdPolandConfiguration::CARRIER_PUDO_ID), + 'pudo_cod' => $this->getZonesForCarrier(DpdPolandConfiguration::CARRIER_PUDO_COD_ID), + 'swipbox' => $this->getZonesForCarrier(DpdPolandConfiguration::CARRIER_SWIPBOX_ID) + ) + )); + + if (version_compare(_PS_VERSION_, '1.6', '>=')) + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/configuration_16.tpl'); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/configuration.tpl'); + } + + /** + * Collects and returns carrier zones + * + * @param int|string $carrier_type Carrier type + * @return array Carrier zones + */ + private function getZonesForCarrier($carrier_type) + { + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'service.php'); + + $id_carrier = (int)Configuration::get($carrier_type); + $carrier = DpdPolandService::getCarrierByReference((int)$id_carrier); + + if (Validate::isLoadedObject($carrier)) + $id_carrier = $carrier->id; + + $carrier_zones = DpdPolandConfiguration::getCarrierZones((int)$id_carrier); + $carrier_zones_list = array(); + + foreach ($carrier_zones as $zone) + $carrier_zones_list[] = $zone['id_zone']; + + return $carrier_zones_list; + } + + /** + * Creates selected DPD sevices (carriers) + * Deletes other DPD carriers + */ + public function createDeleteCarriers() + { + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_classic.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_standard.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_standard_cod.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_pudo.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_pudo_cod.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_.'dpd_swipbox.service.php'); + + if (Tools::getValue(DpdPolandConfiguration::CARRIER_SWIPBOX)) + { + if (!DpdPolandCarrierSwipBoxService::install()) + self::$errors[] = $this->l('Could not save DPD Poland Swip Box service'); + } + else + { + if (!DpdPolandCarrierSwipBoxService::delete()) + self::$errors[] = $this->l('Could not delete DPD Poland Swip Box service'); + } + + if (Tools::getValue(DpdPolandConfiguration::CARRIER_PUDO)) + { + if (!DpdPolandCarrierPudoService::install()) + self::$errors[] = $this->l('Could not save DPD Poland Reception Point Pickup service'); + } + else + { + if (!DpdPolandCarrierPudoService::delete()) + self::$errors[] = $this->l('Could not delete DPD Poland Reception Point Pickup service'); + } + + if (Tools::getValue(DpdPolandConfiguration::CARRIER_PUDO_COD)) + { + if (!DpdPolandCarrierPudoCodService::install()) + self::$errors[] = $this->l('Could not save DPD Poland Reception Point Pickup with COD service'); + } + else + { + if (!DpdPolandCarrierPudoCodService::delete()) + self::$errors[] = $this->l('Could not delete DPD Poland Reception Point Pickup with COD service'); + } + + if (Tools::getValue(DpdPolandConfiguration::CARRIER_CLASSIC)) + { + if (!DpdPolandCarrierClassicService::install()) + self::$errors[] = $this->l('Could not save DPD international shipment (DPD Classic) service'); + } + else + { + if (!DpdPolandCarrierClassicService::delete()) + self::$errors[] = $this->l('Could not delete DPD international shipment (DPD Classic) service'); + } + + if (Tools::getValue(DpdPolandConfiguration::CARRIER_STANDARD)) + { + if (!DpdPolandCarrierStandardService::install()) + self::$errors[] = $this->l('Could not save DPD domestic shipment - Standard service'); + } + else + { + if (!DpdPolandCarrierStandardService::delete()) + self::$errors[] = $this->l('Could not delete DPD domestic shipment - Standard service'); + } + + if (Tools::getValue(DpdPolandConfiguration::CARRIER_STANDARD_COD)) + { + if (!DpdPolandCarrierStandardCODService::install()) + self::$errors[] = $this->l('Could not save DPD domestic shipment - Standard with COD service'); + } + else + { + if (!DpdPolandCarrierStandardCODService::delete()) + self::$errors[] = $this->l('Could not delete DPD domestic shipment - Standard with COD service'); + } + } + + /** + * Checks if settings are valid before saving them + */ + public function validateSettings() + { + if (!Tools::getValue(DpdPolandConfiguration::LOGIN)) + self::$errors[] = $this->l('Login can not be empty'); + $configuration_obj = new DpdPolandConfiguration(); + if (!isset($configuration_obj->password) && !Tools::getValue(DpdPolandConfiguration::PASSWORD)) + self::$errors[] = $this->l('Password can not be empty'); + + if (!Tools::getValue(DpdPolandConfiguration::CLIENT_NUMBER)) + self::$errors[] = $this->l('Default client number must be set'); + + if (Tools::isSubmit(DpdPolandConfiguration::CARRIER_STANDARD_COD)) + { + $checked = false; + + foreach (DpdPoland::getPaymentModules() as $payment_module) + if (Tools::isSubmit(DpdPolandConfiguration::COD_MODULE_PREFIX.$payment_module['name'])) + $checked = true; + + if (!$checked) + self::$errors[] = $this->l('At least one COD payment method must be checked'); + } + + if (!Tools::getValue(DpdPolandConfiguration::WEIGHT_CONVERSATION_RATE)) + self::$errors[] = $this->l('Weight conversation rate can not be empty'); + elseif (!Validate::isUnsignedFloat(Tools::getValue(DpdPolandConfiguration::WEIGHT_CONVERSATION_RATE))) + self::$errors[] = $this->l('Weight conversation rate is not valid'); + + if (!Tools::getValue(DpdPolandConfiguration::DIMENSION_CONVERSATION_RATE)) + self::$errors[] = $this->l('Dimension conversation rate can not be empty'); + elseif (!Validate::isUnsignedFloat(Tools::getValue(DpdPolandConfiguration::DIMENSION_CONVERSATION_RATE))) + self::$errors[] = $this->l('Dimension conversation rate is not valid'); + + if (!Tools::getValue(DpdPolandConfiguration::CUSTOMER_FID)) + self::$errors[] = $this->l('Customer FID can not be empty'); + elseif (!ctype_alnum(Tools::getValue(DpdPolandConfiguration::CUSTOMER_FID))) + self::$errors[] = $this->l('Customer FID is not valid'); + + if (!Tools::getValue(DpdPolandConfiguration::WS_URL)) + self::$errors[] = $this->l('Web Services URL can not be empty'); + elseif (!Validate::isUrl(Tools::getValue(DpdPolandConfiguration::WS_URL))) + self::$errors[] = $this->l('Web Services URL is not valid'); + } + + /** + * Saves settings into database + */ + public function saveSettings() + { + if (DpdPolandConfiguration::saveConfiguration()) + { + if (!DpdPolandConfiguration::saveZonesForCarriers()) + DpdPoland::addFlashError($this->l('Settings saved successfully but could not assign zones for carriers')); + else + { + DpdPoland::addFlashMessage($this->l('Settings saved successfully')); + Tools::redirectAdmin($this->module_instance->module_url.'&menu=configuration'); + } + } + else + DpdPoland::addFlashError($this->l('Could not save settings')); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/controllers/controller.php b/modules/dpdpoland/controllers/controller.php new file mode 100644 index 00000000..61a7e5b6 --- /dev/null +++ b/modules/dpdpoland/controllers/controller.php @@ -0,0 +1,206 @@ +context = Context::getContext(); + $this->module_instance = Module::getInstanceByName('dpdpoland'); + $this->child_class_name = get_class($this); + } + + /** + * Translates texts + * + * @param string $text Text + * @return string Translated text + */ + protected function l($text) + { + $child_class_name = $this->child_class_name; + $reflection = new ReflectionClass($child_class_name); + $filename = $reflection->hasConstant('FILENAME') ? + $reflection->getConstant('FILENAME') : false; + + return $this->module_instance->l($text, $filename); + } + + /** + * Collects and formats lists filter parameters + * + * @param array $keys_array Filter keys + * @param string $table Database table name + * @return string Formatted filter query + */ + protected function getFilterQuery($keys_array = array(), $table) + { + $sql = ''; + + foreach ($keys_array as $key) + if ($this->context->cookie->__isset($table.'Filter_'.$key)) + { + $value = $this->context->cookie->{$table.'Filter_'.$key}; + if (Validate::isSerializedArray($value)) + { + $date = $this->module_instance->unSerialize($value); + + if (!empty($date[0])) + $sql .= '`'.bqSQL($key).'` > "'.pSQL($date[0]).'" AND '; + + if (!empty($date[1])) + $sql .= '`'.bqSQL($key).'` < "'.pSQL($date[1]).'" AND '; + } + else + { + if ($value != '') + $sql .= '`'.bqSQL($key).'` LIKE "%'.pSQL($value).'%" AND '; + } + } + + if ($sql) + $sql = ' HAVING '.Tools::substr($sql, 0, -4); // remove 'AND ' from the end of query + + return $sql; + } + + /** + * Prepares list data to be displayed in page + * + * @param array $keys_array Filter keys + * @param string $table Database table name + * @param string $model Class name + * @param string $default_order_by Default sorting value + * @param string $default_order_way Default sorting way value + * @param string $menu_page Current menu page + * @param null $selected_pagination + */ + public function prepareListData($keys_array, $table, $model, $default_order_by, $default_order_way, $menu_page) + { + if (Tools::isSubmit('submitFilterButton'.$table)) + { + foreach ($_POST as $key => $value) + { + if (strpos($key, $table.'Filter_') !== false) // looking for filter values in $_POST + { + if (is_array($value)) + $this->context->cookie->$key = serialize($value); + else + $this->context->cookie->$key = $value; + } + } + } + + if (Tools::isSubmit('submitReset'.$table)) + { + foreach ($keys_array as $key) + { + if ($this->context->cookie->__isset($table.'Filter_'.$key)) + { + $this->context->cookie->__unset($table.'Filter_'.$key); + $_POST[$table.'Filter_'.$key] = null; + } + } + } + + if (version_compare(_PS_VERSION_, '1.6', '>=')) + $page = (int)Tools::getValue('submitFilterButton'.$table); + else + $page = (int)Tools::getValue('submitFilter'.$table); + + if (!$page) + $page = 1; + + $selected_pagination = (int)Tools::getValue('pagination', $this->default_pagination); + $start = ($selected_pagination * $page) - $selected_pagination; + + $order_by = Tools::getValue($table.'OrderBy', $default_order_by); + $order_way = Tools::getValue($table.'OrderWay', $default_order_way); + + $filter = $this->getFilterQuery($keys_array, $table); + + $table_data = $model->getList($order_by, $order_way, $filter, $start, $selected_pagination); + $list_total = count($model->getList($order_by, $order_way, $filter, null, null)); + + $total_pages = ceil($list_total / $selected_pagination); + + if (!$total_pages) + $total_pages = 1; + + $this->context->smarty->assign(array( + 'full_url' => $this->module_instance->module_url.'&menu='.$menu_page.'&'.$table.'OrderBy='.$order_by.'&'.$table.'OrderWay='.$order_way, + 'table_data' => $table_data, + 'page' => $page, + 'selected_pagination' => $selected_pagination, + 'pagination' => $this->pagination, + 'total_pages' => $total_pages, + 'list_total' => $list_total, + 'filters_has_value' => (bool)$filter, + 'order_by' => $order_by, + 'order_way' => $order_way, + 'order_link' => 'index.php?controller=AdminOrders&vieworder&token='.Tools::getAdminTokenLite('AdminOrders') + )); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/controllers/countryList.controller.php b/modules/dpdpoland/controllers/countryList.controller.php new file mode 100644 index 00000000..3cb83f14 --- /dev/null +++ b/modules/dpdpoland/controllers/countryList.controller.php @@ -0,0 +1,191 @@ +pagination[0]); + $order_by = Tools::getValue('CountryOrderBy', self::DEFAULT_ORDER_BY); + $order_way = Tools::getValue('CountryOrderWay', self::DEFAULT_ORDER_WAY); + + DpdPoland::addFlashMessage($this->l('Country status changed successfully')); + + $redirect_url = $this->module_instance->module_url; + $redirect_url .= '&menu=country_list&pagination='.$selected_pagination; + $redirect_url .= '&CountryOrderBy='.$order_by; + $redirect_url .= '&CountryOrderWay='.$order_way; + $redirect_url .= '&submitFilterCountries='.$page; + + die(Tools::redirectAdmin($redirect_url)); + } + + /** + * Sets enable / disable value for multiple countries + * + * @param array $countries Selected countries + * @param bool $disable Is action to disable countries + */ + public function changeEnabledMultipleCountries($countries = array(), $disable = false) + { + foreach ($countries as $id_country) + if (!$this->changeEnabled((int)$id_country, $disable)) + self::$errors[] = sprintf($this->l('Could not change country status, ID: %s'), $id_country); + + if (!empty(self::$errors)) + { + $this->module_instance->outputHTML( + $this->module_instance->displayErrors( + self::$errors + ) + ); + + reset(self::$errors); + } + else + { + $page = (int)Tools::getValue('submitFilterCountries'); + + if (!$page) + $page = 1; + + $selected_pagination = (int)Tools::getValue('pagination', $this->pagination[0]); + $order_by = Tools::getValue('CountryOrderBy', self::DEFAULT_ORDER_BY); + $order_way = Tools::getValue('CountryOrderWay', self::DEFAULT_ORDER_WAY); + + DpdPoland::addFlashMessage($this->l('Selected countries statuses changed successfully')); + + $redirect_url = $this->module_instance->module_url; + $redirect_url .= '&menu=country_list&pagination='.$selected_pagination; + $redirect_url .= '&CountryOrderBy='.$order_by; + $redirect_url .= '&CountryOrderWay='.$order_way; + $redirect_url .= '&submitFilterCountries='.$page; + + die(Tools::redirectAdmin($redirect_url)); + } + } + + /** + * Changes country status + * + * @param int $id_country Country ID + * @param bool $disable Disable or enable action + * @return bool Status changed successfully + */ + public function changeEnabled($id_country, $disable = false) + { + $country_obj = new DpdPolandCountry(DpdPolandCountry::getIdByCountry((int)$id_country)); + $country_obj->enabled = $disable ? 0 : 1; + $country_obj->id_country = (int)$id_country; + return $country_obj->save(); + } + + /** + * Prepares list data to be displayed in page + * + * @return string Page content in HTML + */ + public function getListHTML() + { + $keys_array = array('id_country', 'name', 'iso_code', 'enabled'); + $this->prepareListData($keys_array, 'Countries', new DpdPolandCountry(), self::DEFAULT_ORDER_BY, self::DEFAULT_ORDER_WAY, 'country_list'); + + if (version_compare(_PS_VERSION_, '1.6', '>=')) + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/country_list_16.tpl'); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/country_list.tpl'); + } + + /** + * Disables specific DPD countries during module installation + * + * @return bool Countries disabled successfully + */ + public static function disableDefaultCountries() + { + $context = Context::getContext(); + + if (version_compare(_PS_VERSION_, '1.5', '<')) + { + foreach (Country::getCountries((int)$context->language->id) as $country) + if (!in_array($country['iso_code'], DpdPolandCountry::$default_enabled_countries) + && !self::disableCountryById($context, (int)$country['id_country'])) + return false; + } + else + foreach (array_keys(Shop::getShops()) as $id_shop) + foreach (Country::getCountriesByIdShop($id_shop, Configuration::get('PS_LANG_DEFAULT')) as $country) + if (!in_array($country['iso_code'], DpdPolandCountry::$default_enabled_countries) + && !self::disableCountryById($context, (int)$country['id_country'], (int)$id_shop)) + return false; + + return true; + } + + /** + * Disables specific DPD country + * + * @param Context $context Context object + * @param int $id_country Country ID + * @param null|int $id_shop Shop ID + * @return bool Country disabled successfully + */ + private static function disableCountryById($context, $id_country, $id_shop = null) + { + if ($id_shop === null) + $id_shop = (int)$context->shop->id; + + $dpdpoland_country = new DpdPolandCountry(); + $dpdpoland_country->id_country = (int)$id_country; + $dpdpoland_country->id_shop = (int)$id_shop; + $dpdpoland_country->enabled = 0; + + return $dpdpoland_country->save(); + } +} diff --git a/modules/dpdpoland/controllers/csv.controller.php b/modules/dpdpoland/controllers/csv.controller.php new file mode 100644 index 00000000..cc9acb06 --- /dev/null +++ b/modules/dpdpoland/controllers/csv.controller.php @@ -0,0 +1,671 @@ +setCSVTitles(); + } + + /** + * Prepares CSV file titles + */ + private function setCSVTitles() + { + $this->csv_titles = array( + 'iso_country' => $this->l('Country'), + 'price_from' => $this->l('Cart price from (PLN)'), + 'price_to' => $this->l('Cart price to (PLN)'), + 'weight_from' => $this->l('Parcel weight from (kg)'), + 'weight_to' => $this->l('Parcel weight to (kg)'), + 'parcel_price' => $this->l('Parcel price (PLN)'), + 'id_carrier' => $this->l('Carrier'), + 'cod_price' => $this->l('COD cost (PLN)') + ); + } + + /** + * Displays price rules page content + * + * @return string + */ + public function getCSVPage() + { + $selected_pagination = Tools::getValue('pagination', '20'); + $page = Tools::getValue('current_page', '1'); + $start = ($selected_pagination * $page) - $selected_pagination; + + $selected_products_data = DpdPolandCSV::getAllData($start, $selected_pagination); + $list_total = count(DpdPolandCSV::getAllData()); + $pagination = array(20, 50, 100, 300); + + $total_pages = ceil($list_total / $selected_pagination); + + if (!$total_pages) + $total_pages = 1; + + $this->context->smarty->assign(array( + 'saveAction' => $this->module_instance->module_url.'&menu=csv', + 'csv_data' => $selected_products_data, + 'page' => $page, + 'total_pages' => $total_pages, + 'pagination' => $pagination, + 'list_total' => $list_total, + 'selected_pagination' => $selected_pagination + )); + + if (version_compare(_PS_VERSION_, '1.6', '>=')) + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/csv_16.tpl'); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_.'admin/csv.tpl'); + } + + /** + * Deletes all price rules for current shop + */ + public function deleteCSV() + { + if (DpdPolandCSV::deleteAllData()) + DpdPoland::addFlashMessage($this->l('Price rules deleted successfully')); + else + DpdPoland::addFlashError($this->l('Price rules could not be deleted')); + + Tools::redirectAdmin($this->module_instance->module_url.'&menu=csv'); + } + + /** + * Generates CSV file according to saved price rules + */ + public function generateCSV() + { + $csv_data = array($this->csv_titles); + $csv_data = array_merge($csv_data, DpdPolandCSV::getCSVData()); + $this->arrayToCSV($csv_data, _DPDPOLAND_CSV_FILENAME_.'.csv', _DPDPOLAND_CSV_DELIMITER_); + } + + /** + * Sets CSV rules to be downloadable as CSV data + * + * @param array $array Price rules + * @param string $filename CSV file name + * @param string $delimiter CSV file delimiter + */ + private function arrayToCSV($array, $filename, $delimiter) + { + // open raw memory as file so no temp files needed, you might run out of memory though + $f = fopen('php://memory', 'w'); + // loop over the input array + foreach ($array as $line) + { + // generate csv lines from the inner arrays + fputcsv($f, $line, $delimiter); + } + // rewrind the "file" with the csv lines + fseek($f, 0); + // tell the browser it's going to be a csv file + header('Content-Type: application/csv; charset=utf-8'); + // tell the browser we want to save it instead of displaying it + header('Content-Disposition: attachement; filename="'.$filename.'"'); + // make php send the generated csv lines to the browser + fpassthru($f); + exit; + } + + /** + * Validates uploaded CSV file data + * + * @param array $csv_data CSV data + * @return array|bool Error messages | CSV data is valid + */ + public function validateCSVData($csv_data) + { + $errors = array(); + + if (!$this->validateCSVStructure($csv_data)) + { + $errors[] = $this->l('Wrong CSV file structure or empty lines'); + return $errors; + } + + if (!$this->validatePLNCurrency()) + { + $errors[] = $this->l('PLN currency must be installed before CSV import.'); + return $errors; + } + + $countries_validation = $this->validateCSVCountries($csv_data); + + if ($countries_validation !== true) + { + if (!empty($countries_validation[0])) + $errors[] = $this->l('Country: country code does not exist in your PrestaShop system. Invalid lines:').' '.$countries_validation[0]; + if (!empty($countries_validation[1])) + $errors[] = sprintf($this->l('Country: country "*" can be used only with carrier ID %d. Invalid lines:'), _DPDPOLAND_CLASSIC_ID_). + ' '.$countries_validation[1]; + if (!empty($countries_validation[2])) + $errors[] = sprintf($this->l('Country: country code PL can be used only with carrier ID %1$d, %2$d, %3$d, %4$d, %5$d. Invalid lines:'), + _DPDPOLAND_STANDARD_ID_, _DPDPOLAND_STANDARD_COD_ID_, _DPDPOLAND_PUDO_ID_, _DPDPOLAND_PUDO_COD_ID_, _DPDPOLAND_SWIPBOX_ID_).' '.$countries_validation[2]; + if (!empty($countries_validation[3])) + $errors[] = sprintf($this->l('Country: international shipping is compatible only with carrier ID %d. Invalid lines:'), + _DPDPOLAND_CLASSIC_ID_).' '.$countries_validation[3]; + } + + $price_from_validation = $this->validateCSVPriceFrom($csv_data); + + if ($price_from_validation !== true) + $errors[] = $this->l('Price (From): invalid lines:').' '.$price_from_validation; + + $price_to_validation = $this->validateCSVPriceTo($csv_data); + + if ($price_to_validation !== true) + $errors[] = $this->l('Price (To): invalid lines:').' '.$price_to_validation; + + $weight_from_validation = $this->validateCSVWeightFrom($csv_data); + + if ($weight_from_validation !== true) + $errors[] = $this->l('Weight (From): invalid lines:').' '.$weight_from_validation; + + $weight_to_validation = $this->validateCSVWeightTo($csv_data); + + if ($weight_to_validation !== true) + $errors[] = $this->l('Weight (To): invalid lines:').' '.$weight_to_validation; + + $parcel_prices_validation = $this->validateCSVParcelPrices($csv_data); + + if ($parcel_prices_validation !== true) + $errors[] = $this->l('Parcel price (PLN): invalid lines:').' '.$parcel_prices_validation; + + $carrier_validation = $this->validateCSVCarriers($csv_data); + + if ($carrier_validation !== true) + $errors[] = $this->l('Carrier: invalid lines:').' '.$carrier_validation; + + $cod_price = $this->validateCSVCODPrice($csv_data); + + if ($cod_price !== true) + { + if (!empty($cod_price[0])) + $errors[] = $this->l('COD cost (PLN): Value should be >=0. Invalid lines:').' '.$cod_price[0]; + if (!empty($cod_price[1])) + $errors[] = $this->l('COD cost (PLN): It\'s possible to use COD only with "DPD domestic shipment - Standard with COD". Leave empty COD field otherwise. Invalid lines:').' '.$cod_price[1]; + if (!empty($cod_price[2])) + $errors[] = $this->l('COD cost (PLN): COD is available only in Poland. Leave empty COD field otherwise. Invalid lines:').' '.$cod_price[2]; + } + + if (!empty($errors)) + return $errors; + + return true; + } + + /** + * Checks if PLN currency is installed + * + * @return bool PLN currency exists in PrestaShop + */ + private function validatePLNCurrency() + { + return (bool)Currency::getIdByIsoCode('PLN'); + } + + /** + * Checks if CSV file structure is valid + * + * @param array $csv_data CSV data + * @return bool CSV file structure is valid + */ + private function validateCSVStructure($csv_data) + { + $csv_data_count = count($csv_data); + for ($i = 0; $i < $csv_data_count; $i++) + if (!isset($csv_data[$i][DpdPolandCSV::COLUMN_COD_PRICE])) + return false; + + return true; + } + + /** + * Validates country column in CSV data + * + * @param array $csv_data CSV data + * @return array|bool Countries are valid + */ + private function validateCSVCountries($csv_data) + { + $csv_data_count = count($csv_data); //number of CSV data lines without titles + $wrong_countries = ''; + $wrong_star_countries = ''; + $wrong_pl_countries = ''; + $wrong_not_pl_countries = ''; + + for ($i = 0; $i < $csv_data_count; $i++) + { + $country_validation = $this->validateCSVCountry($csv_data[$i][DpdPolandCSV::COLUMN_COUNTRY], $csv_data[$i][DpdPolandCSV::COLUMN_CARRIER]); + + if ($country_validation !== true) + { + switch ($country_validation) + { + case self::STAR_COUNTRY_ERROR: + $wrong_star_countries .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + break; + case self::PRESTASHOP_COUNTRY_ERROR: + $wrong_countries .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + break; + case self::PL_COUNTRY_ERROR: + $wrong_pl_countries .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + break; + case self::NOT_PL_COUNTRY_ERROR: + $wrong_not_pl_countries .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + break; + default: + break; + } + } + } + + if (!empty($wrong_countries)) + $wrong_countries = Tools::substr($wrong_countries, 0, -2); //remove last two symbols (comma & space) + + if (!empty($wrong_star_countries)) + $wrong_star_countries = Tools::substr($wrong_star_countries, 0, -2); //remove last two symbols (comma & space) + + if (!empty($wrong_pl_countries)) + $wrong_pl_countries = Tools::substr($wrong_pl_countries, 0, -2); //remove last two symbols (comma & space) + + if (!empty($wrong_not_pl_countries)) + $wrong_not_pl_countries = Tools::substr($wrong_not_pl_countries, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_countries) && empty($wrong_star_countries) && empty($wrong_pl_countries) && empty($wrong_not_pl_countries) ? true : + array($wrong_countries, $wrong_star_countries, $wrong_pl_countries, $wrong_not_pl_countries); + } + + /** + * Validates CSV rule country + * + * @param string $iso_code Country ISO code + * @param int $id_carrier Carrier ID + * @return bool|int Country is valid + */ + private function validateCSVCountry($iso_code, $id_carrier) + { + if ($iso_code === '*') + if ($id_carrier == _DPDPOLAND_CLASSIC_ID_) + return true; + else + return self::STAR_COUNTRY_ERROR; + + if (!Country::getByIso($iso_code)) + return self::PRESTASHOP_COUNTRY_ERROR; + + if ($iso_code == self::POLAND_ISO_CODE) + if ($id_carrier == _DPDPOLAND_STANDARD_ID_ || + $id_carrier == _DPDPOLAND_STANDARD_COD_ID_ || + $id_carrier == _DPDPOLAND_PUDO_ID_ || + $id_carrier == _DPDPOLAND_SWIPBOX_ID_ || + $id_carrier == _DPDPOLAND_PUDO_COD_ID_) + return true; + else + return self::PL_COUNTRY_ERROR; + else + if ($id_carrier == _DPDPOLAND_CLASSIC_ID_) + return true; + else + return self::NOT_PL_COUNTRY_ERROR; + } + + /** + * Validates Price From field + * + * @param array $csv_data CSV file data + * @return bool|string Price From field is valid + */ + private function validateCSVPriceFrom($csv_data) + { + $wrong_prices = ''; + $csv_data_count = count($csv_data); + + for ($i = 0; $i < $csv_data_count; $i++) + if (!Validate::isFloat($csv_data[$i][DpdPolandCSV::COLUMN_PRICE_FROM]) || + $csv_data[$i][DpdPolandCSV::COLUMN_PRICE_FROM] < 0) + $wrong_prices .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if (!empty($wrong_prices)) + $wrong_prices = Tools::substr($wrong_prices, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_prices) ? true : $wrong_prices; + } + + /** + * Validates Price To field + * + * @param array $csv_data CSV file data + * @return bool|string Price To field is valid + */ + private function validateCSVPriceTo($csv_data) + { + $wrong_prices = ''; + $csv_data_count = count($csv_data); + + for ($i = 0; $i < $csv_data_count; $i++) + if (!Validate::isFloat($csv_data[$i][DpdPolandCSV::COLUMN_PRICE_TO]) || + $csv_data[$i][DpdPolandCSV::COLUMN_PRICE_TO] <= 0 || + $csv_data[$i][DpdPolandCSV::COLUMN_PRICE_TO] < $csv_data[$i][DpdPolandCSV::COLUMN_PRICE_FROM]) + $wrong_prices .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if (!empty($wrong_prices)) + $wrong_prices = Tools::substr($wrong_prices, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_prices) ? true : $wrong_prices; + } + + /** + * Validates Weight From field + * + * @param array $csv_data CSV file data + * @return bool|string Weight From field is valid + */ + private function validateCSVWeightFrom($csv_data) + { + $wrong_weights = ''; + $csv_data_count = count($csv_data); + + for ($i = 0; $i < $csv_data_count; $i++) + if (!Validate::isFloat($csv_data[$i][DpdPolandCSV::COLUMN_WEIGHT_FROM]) || + $csv_data[$i][DpdPolandCSV::COLUMN_WEIGHT_FROM] < 0) + $wrong_weights .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if (!empty($wrong_weights)) + $wrong_weights = Tools::substr($wrong_weights, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_weights) ? true : $wrong_weights; + } + + /** + * Validates Weight To field + * + * @param array $csv_data CSV file data + * @return bool|string Weight To field is valid + */ + private function validateCSVWeightTo($csv_data) + { + $wrong_weights = ''; + $csv_data_count = count($csv_data); + for ($i = 0; $i < $csv_data_count; $i++) + if (!Validate::isFloat($csv_data[$i][DpdPolandCSV::COLUMN_WEIGHT_TO]) || + $csv_data[$i][DpdPolandCSV::COLUMN_WEIGHT_TO] <= 0 || + $csv_data[$i][DpdPolandCSV::COLUMN_WEIGHT_TO] < $csv_data[$i][DpdPolandCSV::COLUMN_WEIGHT_FROM]) + $wrong_weights .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if (!empty($wrong_weights)) + $wrong_weights = Tools::substr($wrong_weights, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_weights) ? true : $wrong_weights; + } + + /** + * Validates carrier price field + * + * @param array $csv_data CSV file data + * @return bool|string carrier price field is valid + */ + private function validateCSVParcelPrices($csv_data) + { + $wrong_prices = ''; + $csv_data_count = count($csv_data); + for ($i = 0; $i < $csv_data_count; $i++) + if (!Validate::isFloat($csv_data[$i][DpdPolandCSV::COLUMN_PARCEL_PRICE]) || + $csv_data[$i][DpdPolandCSV::COLUMN_PARCEL_PRICE] < 0) + $wrong_prices .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if (!empty($wrong_prices)) + $wrong_prices = Tools::substr($wrong_prices, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_prices) ? true : $wrong_prices; + } + + /** + * Validates carrier ID field + * + * @param array $csv_data CSV file data + * @return bool|string Carrier ID field is valid + */ + private function validateCSVCarriers($csv_data) + { + $available_methods = array(_DPDPOLAND_STANDARD_ID_, _DPDPOLAND_STANDARD_COD_ID_, _DPDPOLAND_CLASSIC_ID_, _DPDPOLAND_PUDO_ID_, _DPDPOLAND_PUDO_COD_ID_, _DPDPOLAND_SWIPBOX_ID_); + $wrong_methods = ''; + $csv_data_count = count($csv_data); + + for ($i = 0; $i < $csv_data_count; $i++) + if (!in_array($csv_data[$i][DpdPolandCSV::COLUMN_CARRIER], $available_methods) && $csv_data[$i][DpdPolandCSV::COLUMN_CARRIER] !== '*') + $wrong_methods .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if (!empty($wrong_methods)) + $wrong_methods = Tools::substr($wrong_methods, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_methods) ? true : $wrong_methods; + } + + /** + * Validates COD additional price field + * + * @param array $csv_data CSV file data + * @return array|bool COD additional price field is valid + */ + private function validateCSVCODPrice($csv_data) + { + $wrong_price = ''; + $wrong_price_method = ''; + $wrong_price_country = ''; + $csv_data_count = count($csv_data); + + for ($i = 0; $i < $csv_data_count; $i++) + { + if (!empty($csv_data[$i][DpdPolandCSV::COLUMN_COD_PRICE])) + { + if (!Validate::isFloat($csv_data[$i][DpdPolandCSV::COLUMN_COD_PRICE]) || + $csv_data[$i][DpdPolandCSV::COLUMN_COD_PRICE] < 0) + $wrong_price .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + else + { + if ($csv_data[$i][DpdPolandCSV::COLUMN_CARRIER] != _DPDPOLAND_STANDARD_COD_ID_ && $csv_data[$i][DpdPolandCSV::COLUMN_CARRIER] != _DPDPOLAND_PUDO_COD_ID_) + $wrong_price_method .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + + if ($csv_data[$i][DpdPolandCSV::COLUMN_COUNTRY] !== self::POLAND_ISO_CODE) + $wrong_price_country .= ($i + self::DEFAULT_FIRST_LINE_INDEX).', '; + } + } + } + + if (!empty($wrong_price)) + $wrong_price = Tools::substr($wrong_price, 0, -2); //remove last two symbols (comma & space) + + if (!empty($wrong_price_method)) + $wrong_price_method = Tools::substr($wrong_price_method, 0, -2); //remove last two symbols (comma & space) + + if (!empty($wrong_price_country)) + $wrong_price_country = Tools::substr($wrong_price_country, 0, -2); //remove last two symbols (comma & space) + + return empty($wrong_price) && empty($wrong_price_method) && empty($wrong_price_country) ? true : + array($wrong_price, $wrong_price_method, $wrong_price_country); + } + + /** + * Checks if uploaded file has no errors and if extension is 'csv'. + * + * @param string $file_name File name + * @return bool Uploaded file is valid + */ + private function isUploadedCsvValid($file_name) + { + if (!isset($_FILES[$file_name])) + return false; + + if (!empty($_FILES[$file_name]['error'])) + return false; + + if (!preg_match('/.*\.csv$/i', $_FILES[$file_name]['name'])) + return false; + + return true; + } + + /** + * Reads CSV file line by line and collects it's data + * + * @return array|bool CSV file content + */ + public function readCSVData() + { + if (!$this->isUploadedCsvValid(DpdPolandCSV::CSV_FILE)) + return false; + + $csv_data = array(); + $row = 0; + + if (($handle = fopen($_FILES[DpdPolandCSV::CSV_FILE]['tmp_name'], 'r')) !== false) { + while (($data = fgetcsv($handle, 1000, _DPDPOLAND_CSV_DELIMITER_)) !== false) { + if (!$data) { + continue; + } + + $csv_data_line = array(); + $row++; + + if ($row == 1) { + continue; + } + + $num = count($data); + $row++; + + for ($i = 0; $i < $num; $i++) { + $csv_data_line[] = $data[$i]; + } + + $csv_data[] = $csv_data_line; + } + + fclose($handle); + } + + return $csv_data; + } + + /** + * Saves price rules into database + * + * @param array $csv_data Valid CSV data + * @return bool Price rules saved successfully + */ + public function saveCSVData($csv_data) + { + if (!DpdPolandCSV::deleteAllData()) { + return false; + } + + foreach ($csv_data as $data) + { + $csv_obj = new DpdPolandCSV(); + $csv_obj->id_shop = (int)$this->context->shop->id; + $csv_obj->iso_country = $data[DpdPolandCSV::COLUMN_COUNTRY]; + $csv_obj->price_from = $data[DpdPolandCSV::COLUMN_PRICE_FROM]; + $csv_obj->price_to = $data[DpdPolandCSV::COLUMN_PRICE_TO]; + $csv_obj->weight_from = $data[DpdPolandCSV::COLUMN_WEIGHT_FROM]; + $csv_obj->weight_to = $data[DpdPolandCSV::COLUMN_WEIGHT_TO]; + $csv_obj->parcel_price = $data[DpdPolandCSV::COLUMN_PARCEL_PRICE]; + $csv_obj->id_carrier = $data[DpdPolandCSV::COLUMN_CARRIER]; + $csv_obj->cod_price = $data[DpdPolandCSV::COLUMN_COD_PRICE]; + + if (!$csv_obj->save()) { + return false; + } + } + + return true; + } +} \ No newline at end of file diff --git a/modules/dpdpoland/controllers/dpd_classic.service.php b/modules/dpdpoland/controllers/dpd_classic.service.php new file mode 100644 index 00000000..2d7cb4c9 --- /dev/null +++ b/modules/dpdpoland/controllers/dpd_classic.service.php @@ -0,0 +1,128 @@ +deleted) + return true; + else { + $carrier->deleted = 0; + return (bool)$carrier->save(); + } + + $carrier_classic = new DpdPolandCarrierClassicService(); + + $carrier = new Carrier(); + $carrier->name = $carrier_classic->module_instance->l('DPD international shipment (DPD Classic)', self::FILENAME); + $carrier->active = 1; + $carrier->is_free = 0; + $carrier->shipping_handling = 1; + $carrier->shipping_external = 1; + $carrier->shipping_method = 1; + $carrier->max_width = 0; + $carrier->max_height = 0; + $carrier->max_depth = 0; + $carrier->max_weight = 0; + $carrier->grade = 0; + $carrier->is_module = 1; + $carrier->need_range = 1; + $carrier->range_behavior = 1; + $carrier->external_module_name = $carrier_classic->module_instance->name; + $carrier->url = _DPDPOLAND_TRACKING_URL_; + + $delay = array(); + + foreach (Language::getLanguages(false) as $language) + $delay[$language['id_lang']] = $carrier_classic->module_instance->l('DPD international shipment (DPD Classic)', self::FILENAME); + + $carrier->delay = $delay; + + if (!$carrier->save()) + return false; + + $dpdpoland_carrier = new DpdPolandCarrier(); + $dpdpoland_carrier->id_carrier = (int)$carrier->id; + $dpdpoland_carrier->id_reference = (int)$carrier->id; + + if (!$dpdpoland_carrier->save()) + return false; + + if (!copy(_DPDPOLAND_IMG_DIR_ . DpdPolandCarrierClassicService::IMG_DIR . '/' . _DPDPOLAND_CLASSIC_ID_ . '.' . + DpdPolandCarrierClassicService::IMG_EXTENSION, _PS_SHIP_IMG_DIR_ . '/' . (int)$carrier->id . '.jpg')) + return false; + + $zones = Zone::getZones(false); + foreach ($zones as $zone) + $carrier->addZone((int)$zone["id_zone"]); + + if (!$range_obj = $carrier->getRangeObject()) + return false; + + $range_obj->id_carrier = (int)$carrier->id; + $range_obj->delimiter1 = 0; + $range_obj->delimiter2 = 1; + + if (!$range_obj->add()) + return false; + + if (!self::assignCustomerGroupsForCarrier($carrier)) + return false; + + if (!Configuration::updateValue(DpdPolandConfiguration::CARRIER_CLASSIC_ID, (int)$carrier->id)) + return false; + + return true; + } + + /** + * Deletes DPD carrier + * + * @return bool DPD carrier deleted successfully + */ + public static function delete() + { + $id_shop = Shop::getContextShopID(true); + $id_shop_group = Shop::getContextShopGroupID(true); + return (bool)self::deleteCarrier((int)Configuration::get(DpdPolandConfiguration::CARRIER_CLASSIC_ID, null, $id_shop_group, $id_shop)); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/controllers/dpd_pudo.service.php b/modules/dpdpoland/controllers/dpd_pudo.service.php new file mode 100644 index 00000000..e69de29b diff --git a/modules/dpdpoland/controllers/dpd_pudo_cod.service.php b/modules/dpdpoland/controllers/dpd_pudo_cod.service.php new file mode 100644 index 00000000..5c24608d --- /dev/null +++ b/modules/dpdpoland/controllers/dpd_pudo_cod.service.php @@ -0,0 +1,131 @@ +deleted) + return true; + else { + $carrier->deleted = 0; + return (bool)$carrier->save(); + } + + $carrier_pudo = new DpdPolandCarrierPudoCodService(); + + $carrier = new Carrier(); + $carrier->name = $carrier_pudo->module_instance->l('DPD Poland Reception Point Pickup with COD', self::FILENAME); + $carrier->active = 1; + $carrier->is_free = 0; + $carrier->shipping_handling = 1; + $carrier->shipping_external = 1; + $carrier->shipping_method = 1; + $carrier->max_width = 0; + $carrier->max_height = 0; + $carrier->max_depth = 0; + $carrier->max_weight = 0; + $carrier->grade = 0; + $carrier->is_module = 1; + $carrier->need_range = 1; + $carrier->range_behavior = 1; + $carrier->external_module_name = $carrier_pudo->module_instance->name; + $carrier->url = _DPDPOLAND_TRACKING_URL_; + + $delay = array(); + + foreach (Language::getLanguages(false) as $language) + $delay[$language['id_lang']] = $carrier_pudo->module_instance->l('DPD Poland Reception Point Pickup with COD', self::FILENAME); + + $carrier->delay = $delay; + + if (!$carrier->save()) + return false; + + $dpdpoland_carrier = new DpdPolandCarrier(); + $dpdpoland_carrier->id_carrier = (int)$carrier->id; + $dpdpoland_carrier->id_reference = (int)$carrier->id; + + if (!$dpdpoland_carrier->save()) + return false; + + if (!copy(_DPDPOLAND_IMG_DIR_ . DpdPolandCarrierPudoCodService::IMG_DIR . '/' . _DPDPOLAND_PUDO_COD_ID_ . '.' . + DpdPolandCarrierPudoCodService::IMG_EXTENSION, _PS_SHIP_IMG_DIR_ . '/' . (int)$carrier->id . '.jpg')) + return false; + + $zones = Zone::getZones(false); + foreach ($zones as $zone) + $carrier->addZone((int)$zone["id_zone"]); + + if (!$range_obj = $carrier->getRangeObject()) + return false; + + $range_obj->id_carrier = (int)$carrier->id; + $range_obj->delimiter1 = 0; + $range_obj->delimiter2 = 1; + + if (!$range_obj->add()) + return false; + + if (!self::assignCustomerGroupsForCarrier($carrier)) + return false; + + if (!Configuration::updateValue(DpdPolandConfiguration::CARRIER_PUDO_COD_ID, (int)$carrier->id)) + return false; + + return true; + } + + /** + * Deletes DPD carrier + * + * @return bool DPD carrier deleted successfully + */ + public static function delete() + { + $id_shop = Shop::getContextShopID(true); + $id_shop_group = Shop::getContextShopGroupID(true); + return (bool)self::deleteCarrier((int)Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_COD_ID, null, $id_shop_group, $id_shop)); + } +} \ No newline at end of file diff --git a/modules/dpdpoland/dpdpoland.ajax.php b/modules/dpdpoland/dpdpoland.ajax.php new file mode 100644 index 00000000..8b818058 --- /dev/null +++ b/modules/dpdpoland/dpdpoland.ajax.php @@ -0,0 +1,134 @@ +name)) exit; + +if (Tools::isSubmit('save_pudo_id')) { + echo $module_instance->savePudoMapCodeFrontend(); + exit; +} + +if (Tools::isSubmit('call_pudo_address')) { + $pudo_code = Tools::getValue('pudo_code'); + $pudoAddress = $module_instance->pudoService->getPudoAddress($pudo_code); + if ($pudoAddress != null) { + $parts = array_filter([ + $pudoAddress->company, + $pudoAddress->address1, + trim($pudoAddress->postcode . ' ' . $pudoAddress->city) + ]); + + echo implode(', ', $parts); + } + else + echo $pudo_code; + + exit; +} + +if (Tools::isSubmit('call_has_pudo_cod')) { + $pudo_code = Tools::getValue('pudo_code'); + echo $module_instance->pudoService->hasCodService($pudo_code); + + exit; +} + +if (Tools::isSubmit('getFormattedAddressHTML')) { + $id_address = (int)Tools::getValue('id_address'); + echo $module_instance->getFormattedAddressHTML($id_address); + exit; +} + +if (Tools::isSubmit('getFormattedSenderAddressHTML')) { + $id_address = (int)Tools::getValue('id_address'); + echo $module_instance->getFormattedSenderAddressHTML($id_address); + exit; +} + +if (Tools::isSubmit('getProducts')) { + echo json_encode($module_instance->searchProducts(Tools::getValue('q'))); + exit; +} + +if (Tools::isSubmit('savePackagePrintLabels')) { + if (!$id_package_ws = $module_instance->savePackageFromPost()) { + die(json_encode(array( + 'error' => reset(DpdPoland::$errors) + ))); + } + + $printout_format = Tools::getValue('dpdpoland_printout_format'); + + if ($printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL && $printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_A4) + $printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL; + + die(json_encode(array( + 'error' => false, + 'id_package_ws' => (int)$id_package_ws, + 'link_to_labels_pdf' => '?printLabels&id_package_ws=' . (int)$id_package_ws . '&printout_format=' . $printout_format . '&token=' . Tools::getValue('token') + ))); +} + +if (Tools::isSubmit('printLabels')) { + $printout_format = Tools::getValue('dpdpoland_printout_format'); + + if ($printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL && $printout_format != DpdPolandConfiguration::PRINTOUT_FORMAT_A4) + $printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL; + + die(json_encode(array( + 'error' => false, + 'link_to_labels_pdf' => '?printLabels&id_package_ws=' . (int)Tools::getValue('id_package_ws') . + '&printout_format=' . $printout_format . '&token=' . Tools::getValue('token') + ))); +} + +if (Tools::getValue('addDPDClientNumber')) { + $result = $module_instance->addDPDClientNumber(); + die(json_encode($result)); +} + +if (Tools::getValue('deleteDPDClientNumber')) { + $result = $module_instance->deleteDPDClientNumber(); + die(json_encode($result)); +} + +if (Tools::getValue('getPayerNumbersTableHTML')) { + $html = $module_instance->getPayerNumbersTableHTML(); + die(json_encode($html)); +} + +if (Tools::getValue('calculateTimeLeft')) { + $time_left = $module_instance->calculateTimeLeft(); + die(json_encode($time_left)); +} + +if (Tools::getValue('getTimeFrames')) { + $html = $module_instance->getTimeFrames(); + die(json_encode($html)); +} \ No newline at end of file diff --git a/modules/dpdpoland/dpdpoland.lang.php b/modules/dpdpoland/dpdpoland.lang.php new file mode 100644 index 00000000..4f4bfef1 --- /dev/null +++ b/modules/dpdpoland/dpdpoland.lang.php @@ -0,0 +1,157 @@ +module_instance = Module::getInstanceByName('dpdpoland'); + + $this->translations = array( + '1002' => $this->module_instance->l('ERROR_INCORRECT_WEIGHT_FOR_COUNTRY', self::FILENAME), + '1003' => $this->module_instance->l('ERROR_INCORRECT_PARCELS_COUNT_FOR_DOX', self::FILENAME), + '1004' => $this->module_instance->l('ERROR_GUARANTEE_TIMEFIXED_OUT_OF_RANGE', self::FILENAME), + '1005' => $this->module_instance->l('ERROR_DECLARED_VALUE_AMOUNT_OUT_OF_RANGE', self::FILENAME), + '1008' => $this->module_instance->l('ERROR_COD_AMOUNT_OUT_OF_RANGE', self::FILENAME), + '1009' => $this->module_instance->l('ERROR_INCORRECT_COD_CURRENCY_FOR_PL', self::FILENAME), + '1011' => $this->module_instance->l('ERROR_INCORRECT_WEIGHT', self::FILENAME), + '1013' => $this->module_instance->l('ERROR_PALLET_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1014' => $this->module_instance->l('ERROR_DUTY_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1015' => $this->module_instance->l('ERROR_CARRY_IN_NOT_AVAILABLE_FOR_PAYER_FID', self::FILENAME), + '1016' => $this->module_instance->l('ERROR_COD_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1017' => $this->module_instance->l('ERROR_ROD_NOT_AVAILBLE_FOR_COUNTRY', self::FILENAME), + '1018' => $this->module_instance->l('ERROR_CUD_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1019' => $this->module_instance->l('ERROR_CARRY_IN_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1020' => $this->module_instance->l('ERROR_IN_PERS_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1021' => $this->module_instance->l('ERROR_PRIV_PERS_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1022' => $this->module_instance->l('ERROR_DOX_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1023' => $this->module_instance->l('ERROR_SELF_COL_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1024' => $this->module_instance->l('ERROR_GUARANTEE_TIME0930_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1025' => $this->module_instance->l('ERROR_GUARANTEE_TIME1200_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1026' => $this->module_instance->l('ERROR_GUARANTEE_TIMEFIXED_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1028' => $this->module_instance->l('ERROR_GUARANTEE_SATURDAY_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1030' => $this->module_instance->l('ERROR_GUARANTEE_B2C_NOT_AVAILABLE_FOR_COUNTRY', self::FILENAME), + '1032' => $this->module_instance->l('ERROR_GUARANTEE_TIME0930_NOT_AVAILABLE_FOR_POSTAL_CODE', self::FILENAME), + '1033' => $this->module_instance->l('ERROR_GUARANTEE_TIME1200_NOT_AVAILABLE_FOR_POSTAL_CODE', self::FILENAME), + '1034' => $this->module_instance->l('ERROR_GUARANTEE_INTER_NOT_AVAILABLE_FOR_POSTAL_CODE', self::FILENAME), + '1036' => $this->module_instance->l('ERROR_PALLET_NOT_AVAILABLE_FOR_POSTAL_CODE', self::FILENAME), + '1037' => $this->module_instance->l('ERROR_CARRYIN_NOT_AVAILABLE_FOR_POSTAL_CODE', self::FILENAME), + '1038' => $this->module_instance->l('ERROR_GUARANTEE_B2C_NOT_AVAILABLE_FOR_PAYER_FID', self::FILENAME), + '1039' => $this->module_instance->l('ERROR_INCORRECT_GUARANTEE_B2C_RANGE', self::FILENAME), + '1042' => $this->module_instance->l('ERROR_INCORRECT_PAYMENT_TYPE', self::FILENAME), + '1043' => $this->module_instance->l('ERROR_INCORRECT_PARCELS_COUNT_FOR_CARRYIN', self::FILENAME), + '1044' => $this->module_instance->l('ERROR_INCORRECT_WEIGHT_FOR_CARRYIN', self::FILENAME), + '1045' => $this->module_instance->l('ERROR_PARCEL_SIZE_X_OUT_OF_RANGE', self::FILENAME), + '1046' => $this->module_instance->l('ERROR_PARCEL_SIZE_Y_OUT_OF_RANGE', self::FILENAME), + '1047' => $this->module_instance->l('ERROR_PARCEL_SIZE_Z_OUT_OF_RANGE', self::FILENAME), + '1048' => $this->module_instance->l('ERROR_PARCEL_SIZES_EXCEEDED_DIMENISIONS_80X120X180', self::FILENAME), + '1049' => $this->module_instance->l('ERROR_INT_PARCEL_SIZES_EXCEEDED_300', self::FILENAME), + '1051' => $this->module_instance->l('ERROR_PARCEL_SIZES_EXCEEDED_300', self::FILENAME), + '1052' => $this->module_instance->l('ERROR_PARCEL_CAPACITY_EXCEEDED', self::FILENAME), + '1053' => $this->module_instance->l('ERROR_PARCEL_SIZE_X_EXCEEDED', self::FILENAME), + '1054' => $this->module_instance->l('ERROR_PARCEL_SIZE_Y_EXCEEDED', self::FILENAME), + '1055' => $this->module_instance->l('ERROR_PARCEL_SIZE_Z_EXCEEDED', self::FILENAME), + '1056' => $this->module_instance->l('ERROR_RECEIVER_NAME_MAX_SIZE_EXCEEDED', self::FILENAME), + '1057' => $this->module_instance->l('ERROR_RECEIVER_COMPANY_MAX_SIZE_EXCEEDED', self::FILENAME), + '1058' => $this->module_instance->l('ERROR_RECEIVER_ADDRESS_MAX_SIZE_EXCEEDED', self::FILENAME), + '1059' => $this->module_instance->l('ERROR_RECEIVER_CITY_MAX_SIZE_EXCEEDED', self::FILENAME), + '1060' => $this->module_instance->l('ERROR_RECEIVER_EMAIL_MAX_SIZE_EXCEEDED', self::FILENAME), + '1061' => $this->module_instance->l('ERROR_RECEIVER_PHONE_MAX_SIZE_EXCEEDED', self::FILENAME), + '1062' => $this->module_instance->l('ERROR_EMPTY_RECEIVER_ADDRESS', self::FILENAME), + '1063' => $this->module_instance->l('ERROR_EMPTY_RECEIVER_CITY', self::FILENAME), + '1064' => $this->module_instance->l('ERROR_EMPTY_RECEIVER_NAME_AND_COMPANY', self::FILENAME), + '1065' => $this->module_instance->l('ERROR_SENDER_NAME_MAX_SIZE_EXCEEDED', self::FILENAME), + '1066' => $this->module_instance->l('ERROR_SENDER_COMPANY_MAX_SIZE_EXCEEDED', self::FILENAME), + '1067' => $this->module_instance->l('ERROR_SENDER_ADDRESS_MAX_SIZE_EXCEEDED', self::FILENAME), + '1068' => $this->module_instance->l('ERROR_SENDER_CITY_MAX_SIZE_EXCEEDED', self::FILENAME), + '1069' => $this->module_instance->l('ERROR_SENDER_EMAIL_MAX_SIZE_EXCEEDED', self::FILENAME), + '1070' => $this->module_instance->l('ERROR_SENDER_PHONE_MAX_SIZE_EXCEEDED', self::FILENAME), + '1071' => $this->module_instance->l('ERROR_EMPTY_SENDER_ADDRESS', self::FILENAME), + '1072' => $this->module_instance->l('ERROR_EMPTY_SENDER_CITY', self::FILENAME), + '1073' => $this->module_instance->l('ERROR_EMPTY_SENDER_NAME_AND_COMPANY', self::FILENAME), + '1074' => $this->module_instance->l('ERROR_REF1_MAX_SIZE_EXCEEDED', self::FILENAME), + '1075' => $this->module_instance->l('ERROR_REF2_MAX_SIZE_EXCEEDED', self::FILENAME), + '1076' => $this->module_instance->l('ERROR_REF3_MAX_SIZE_EXCEEDED', self::FILENAME), + '1077' => $this->module_instance->l('ERROR_PARCEL_CONTENT_MAX_SIZE_EXCEEDED', self::FILENAME), + '1078' => $this->module_instance->l('ERROR_PARCEL_CUSTOMER_DATA1_MAX_SIZE_EXCEEDED', self::FILENAME), + '1079' => $this->module_instance->l('ERROR_PARCEL_CUSTOMER_DATA2_MAX_SIZE_EXCEEDED', self::FILENAME), + '1080' => $this->module_instance->l('ERROR_PARCEL_CUSTOMER_DATA3_MAX_SIZE_EXCEEDED', self::FILENAME), + '1081' => $this->module_instance->l('ERROR_INCORRECT_SENDER_COUNTRY', self::FILENAME), + '1082' => $this->module_instance->l('ERROR_INCORRECT_RECEIVER_COUNTRY', self::FILENAME), + '1085' => $this->module_instance->l('ERROR_GUARANTEE_TIMEFIXED_INCORRECT_FORMAT', self::FILENAME), + '1086' => $this->module_instance->l('ERROR_CARRY_IN_FOR_GABARIT_WEIGHT', self::FILENAME), + '1087' => $this->module_instance->l('ERROR_IN_PERS_REQUIRES_RECEIVER_NAME', self::FILENAME), + '1088' => $this->module_instance->l('ERROR_PALLET_INCORRECT_FOR_WEIGHT', self::FILENAME), + '1110' => $this->module_instance->l('ERROR_SIZE_X_OUT_OF_RANGE', self::FILENAME), + '1111' => $this->module_instance->l('ERROR_SIZE_Y_OUT_OF_RANGE', self::FILENAME), + '1112' => $this->module_instance->l('ERROR_SIZE_Z_OUT_OF_RANGE', self::FILENAME), + '2005' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_CUD_EXCLUDING', self::FILENAME), + '2006' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_CARRY_IN_EXCLUDING', self::FILENAME), + '2007' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_COD_EXCLUDING', self::FILENAME), + '2008' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_DECL_VALUE_EXCLUDING', self::FILENAME), + '2009' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_DOX_EXCLUDING', self::FILENAME), + '2010' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_DUTY_EXCLUDING', self::FILENAME), + '2011' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_IN_PERS_EXCLUDING', self::FILENAME), + '2012' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_PALLET_EXCLUDING', self::FILENAME), + '2013' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_PRIV_PERS_EXCLUDING', self::FILENAME), + '2014' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_ROD_EXCLUDING', self::FILENAME), + '2015' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_SELF_COL_EXCLUDING', self::FILENAME), + '2016' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_TIME0930_EXCLUDING', self::FILENAME), + '2017' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_TIME1200_EXCLUDING', self::FILENAME), + '2018' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_TIMEFIXED_EXCLUDING', self::FILENAME), + '2019' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_OVERTIME2_EXCLUDING', self::FILENAME), + '2020' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_B2C_EXCLUDING', self::FILENAME), + '2021' => $this->module_instance->l('ERROR_DEDICATED_DELIVERY_TIRES_EXCLUDING', self::FILENAME) + ); + } + + /** + * Returns translated error message according to error code + * + * @param int $id_translation Error code from WebServices + * @return mixed|string Error message + */ + public function getTranslation($id_translation) + { + if (isset($this->translations[(int)$id_translation])) + return $this->translations[(int)$id_translation]; + + return ''; + } + + public function getTranslationByCode($errorCode) + { + if ($errorCode === "NOT_FOUND") + return $this->module_instance->l('NOT_FOUND', self::FILENAME); + + return $errorCode; + } +} \ No newline at end of file diff --git a/modules/dpdpoland/dpdpoland.pdf.php b/modules/dpdpoland/dpdpoland.pdf.php new file mode 100644 index 00000000..be304179 --- /dev/null +++ b/modules/dpdpoland/dpdpoland.pdf.php @@ -0,0 +1,75 @@ +name)) exit; + +if (Tools::isSubmit('printLabels')) +{ + $cookie = new Cookie(_DPDPOLAND_COOKIE_); + if (isset($cookie->dpdpoland_package_id)) + { + $package_id = $cookie->dpdpoland_package_id; + $printout_format = $cookie->dpdpoland_printout_format; + unset($cookie->dpdpoland_package_id); + unset($cookie->dpdpoland_printout_format); + $cookie->write(); + $package = new DpdPolandPackage((int)$package_id); + $pdf_file_contents = $package->generateLabels('PDF', $printout_format); + + ob_end_clean(); + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="package_labels_'.(int)Tools::getValue('id_package_ws').'.pdf"'); + echo $pdf_file_contents; + exit; + } + + $package = new DpdPolandPackage((int)Tools::getValue('id_package_ws')); + + if ($pdf_file_contents = $package->generateLabels()) + { + $cookie->dpdpoland_package_id = (int)Tools::getValue('id_package_ws'); + + $printout_format = Tools::getValue('printout_format'); + if (!in_array($printout_format, array(DpdPolandConfiguration::PRINTOUT_FORMAT_A4, DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL))) + $printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_A4; + + $cookie->dpdpoland_printout_format = $printout_format; + Tools::redirectAdmin(Tools::getValue('returnOnErrorTo').'&scrollToShipment'); + exit; + } + else + { + DpdPoland::addFlashError(reset(DpdPolandPackageWS::$errors)); + Tools::redirectAdmin(Tools::getValue('returnOnErrorTo').'&scrollToShipment'); + exit; + } +} + +if (Tools::isSubmit('downloadModuleCSVSettings')) +{ + include_once(_DPDPOLAND_CONTROLLERS_DIR_.'csv.controller.php'); + $controller = new DpdPolandCSVController; + $controller->generateCSV(); +} \ No newline at end of file diff --git a/modules/dpdpoland/dpdpoland.php b/modules/dpdpoland/dpdpoland.php new file mode 100644 index 00000000..0c5d8408 --- /dev/null +++ b/modules/dpdpoland/dpdpoland.php @@ -0,0 +1,2836 @@ +name = 'dpdpoland'; + $this->tab = 'shipping_logistics'; + $this->version = '4.5.0'; + $this->author = 'DPD Polska Sp. z o.o.'; + + parent::__construct(); + + $this->displayName = $this->l('DPD Polska Sp. z o.o.'); + $this->description = $this->l('DPD Polska Sp. z o.o. shipping module'); + $this->bootstrap = true; + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + $this->context = new Context; + $this->smarty = $this->context->smarty; + $this->context->smarty->assign('ps14', true); + } + if (version_compare(_PS_VERSION_, '1.7.7.0', '>=')) { + $this->context->smarty->assign('ps17', true); + } + + $this->pudoService = new PudoService; + + $this->setModuleUrl(); + + $this->labelService = new LabelService; + $this->configurationService = new ConfigurationService; + + $this->translate(); + + } + + private function translate() + { + $this->l('Package in transit', 'dpdpoland'); + $this->l('Delivery address', 'dpdpoland'); + } + + /** + * Sets module BackOffice URL + */ + private function setModuleUrl() + { + if (defined('_PS_ADMIN_DIR_')) { + $this->module_url = self::CURRENT_INDEX . Tools::getValue('token') . '&configure=' . $this->name . + '&tab_module=' . $this->tab . '&module_name=' . $this->name; + } + } + + /** + * Module installation function + * + * @return bool Module is installed successfully + */ + public function install() + { + if (version_compare(_PS_VERSION_, '1.7', '<') || version_compare(_PS_VERSION_, '1.8', '>=')) { + $this->_errors[] = $this->l('Module version not supported. Please install module dedicated for this Prestashop version'); + + return false; + } + + if (!extension_loaded('soap')) { + $this->_errors[] = $this->l('Soap Client lib is not installed'); + + return false; + } + + if (!$this->installDatabaseTables()) { + $this->_errors[] = $this->l('Could not install database tables'); + + return false; + } + + $current_date = date('Y-m-d H:i:s'); + $shops = Shop::getShops(); + + foreach (array_keys($shops) as $id_shop) { + if (!$this->saveCSVRule((int)$id_shop, 'PL', '0', '0.5', '0', '', _DPDPOLAND_STANDARD_ID_, $current_date, $current_date, '0', '1000') + || !$this->saveCSVRule((int)$id_shop, 'PL', '0', '0.5', '0', '0', _DPDPOLAND_STANDARD_COD_ID_, $current_date, $current_date, '0', '1000') + || !$this->saveCSVRule((int)$id_shop, 'GB', '0', '0.5', '0', '', _DPDPOLAND_CLASSIC_ID_, $current_date, $current_date, '0', '1000') + || !$this->saveCSVRule((int)$id_shop, '*', '0', '0.5', '0', '', _DPDPOLAND_CLASSIC_ID_, $current_date, $current_date, '0', '1000') + ) { + return false; + } + } + + if (!parent::install() || + !$this->registerHook('adminOrder') || + !$this->registerHook('paymentTop') || + !$this->registerHook('header') || + !$this->registerHook('displayCarrierExtraContent') || + !$this->registerHook('actionFrontControllerSetMedia') + ) { + return false; + } + + $isPrestaShopVersionOver177 = version_compare(_PS_VERSION_, '1.7.7', '>='); + $isPrestaShopVersionBefore15 = version_compare(_PS_VERSION_, '1.5', '<'); + if (!$isPrestaShopVersionBefore15) { + if (!$this->registerHook('displayBeforeCarrier') || + !$this->registerHook('actionValidateOrder') + ) { + return false; + } + } + + if (!$isPrestaShopVersionBefore15) { + if ($isPrestaShopVersionOver177 && !$this->registerHook('actionOrderGridDefinitionModifier')) + return false; + else + if (!$this->registerHook('displayAdminOrdersListAfter')) //TODO handle this hook + return false; + } + + /** + * this hook is needed only in PS 1.4 + * used to track DpdPoland carriers references + * higher versions than 1.4 already have this functionality + */ + if (version_compare(_PS_VERSION_, '1.5', '<') && !$this->registerHook('updateCarrier')) { + return false; + } + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + if (!$this->registerHook('beforeCarrier')) { + return false; + } + } + + if (version_compare(_PS_VERSION_, '1.5', '<') && !$this->installModuleOverrides()) { + return false; + } + + if (version_compare(_PS_VERSION_, '1.5', '>=') && !$this->registerHook('displayBackofficeHeader')) { + return false; + } + + if (version_compare(_PS_VERSION_, '1.5', '<') && !$this->registerHook('newOrder')) { + return false; + } + + if (version_compare(_PS_VERSION_, '1.', '>=') && !$this->registerHook('displayBackofficeHeader')) { + return false; + } + + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'countryList.controller.php'); + + if (!DpdPolandCountryListController::disableDefaultCountries()) { + return false; + } + + DpdPolandLog::addLog('Installed module'); + return true; + } + + /** + * Sets specific class name for admin orders list override + * + * @return bool Override class name set successfully + */ + private function installModuleOverrides() + { + return Db::getInstance()->execute(' + UPDATE `' . _DB_PREFIX_ . 'tab` + SET `class_name` = "AdminOrdersOverride", + `module` = "' . pSQL($this->name) . '" + WHERE `class_name` = "AdminOrders" + '); + } + + /** + * Removes specific class name used to set override for orders list + * + * @return bool Override class name removed successfully + */ + private function uninstallModuleOverrides() + { + if (!Db::getInstance()->execute(' + UPDATE `' . _DB_PREFIX_ . 'tab` + SET `class_name` = "AdminOrders", + `module` = "" + WHERE `class_name` = "AdminOrdersOverride" + ')) { + return false; + } + + return true; + } + + /** + * Creates database tables used for module + * + * @return bool Database tables created successfully + */ + private function installDatabaseTables() + { + $sql = array(); + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_PRICE_RULE_DB_ . '` ( + `id_csv` int(11) NOT NULL AUTO_INCREMENT, + `id_shop` int(11) NOT NULL, + `date_add` datetime DEFAULT NULL, + `date_upd` datetime DEFAULT NULL, + `iso_country` varchar(255) NOT NULL, + `price_from` decimal(20,6) NOT NULL, + `price_to` decimal(20,6) NOT NULL, + `weight_from` decimal(20,6) NOT NULL, + `weight_to` decimal(20,6) NOT NULL, + `parcel_price` float NOT NULL, + `cod_price` varchar(255) NOT NULL, + `id_carrier` varchar(11) NOT NULL, + PRIMARY KEY (`id_csv`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_PAYER_NUMBERS_DB_ . '` ( + `id_dpdpoland_payer_number` int(11) NOT NULL AUTO_INCREMENT, + `id_shop` int(11) NOT NULL, + `payer_number` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_dpdpoland_payer_number`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_COUNTRY_DB_ . '` ( + `id_dpdpoland_country` int(11) NOT NULL AUTO_INCREMENT, + `id_shop` int(11) NOT NULL, + `id_country` int(11) NOT NULL, + `enabled` tinyint(1) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_dpdpoland_country`,`id_shop`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_MANIFEST_DB_ . '` ( + `id_manifest` int(11) NOT NULL AUTO_INCREMENT, + `id_manifest_ws` int(11) NOT NULL, + `id_package_ws` int(11) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_manifest`), + UNIQUE KEY `id_manifest_ws` (`id_manifest_ws`,`id_package_ws`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '` ( + `id_package` int(11) NOT NULL AUTO_INCREMENT, + `id_package_ws` int(11) NOT NULL, + `id_order` int(10) NOT NULL, + `sessionId` int(11) NOT NULL, + `sessionType` varchar(50) NOT NULL, + `payerNumber` varchar(255) NOT NULL, + `id_address_sender` int(10) NOT NULL, + `id_address_delivery` int(10) NOT NULL, + `cod_amount` decimal(17,2) DEFAULT NULL, + `declaredValue_amount` decimal(17,2) DEFAULT NULL, + `ref1` varchar(255) DEFAULT NULL, + `ref2` varchar(255) DEFAULT NULL, + `additional_info` text, + `labels_printed` tinyint(1) NOT NULL DEFAULT "0", + `id_sender_address` int(11) NOT NULL, + `cud` tinyint(1) NOT NULL, + `rod` tinyint(1) NOT NULL, + `dpde` tinyint(1) NOT NULL, + `dpdnd` tinyint(1) NOT NULL, + `dpdtoday` tinyint(1) NOT NULL DEFAULT "0", + `dpdsaturday` tinyint(1) NOT NULL DEFAULT "0", + `dpdfood` tinyint(1) NOT NULL DEFAULT "0", + `dpdfood_limit_date` varchar(15) DEFAULT NULL, + `dpdlq` tinyint(1) NOT NULL DEFAULT "0", + `duty` tinyint(1) NOT NULL, + `duty_amount` decimal(17,2) DEFAULT NULL, + `duty_currency` varchar(3) DEFAULT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_package`), + UNIQUE KEY `id_package_ws` (`id_package_ws`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_ . '` ( + `id_parcel` int(11) NOT NULL, + `id_package_ws` int(11) NOT NULL, + `waybill` varchar(50) NOT NULL, + `content` text NOT NULL, + `weight` decimal(20,6) NOT NULL, + `weight_adr` decimal(20,6) NULL, + `height` decimal(20,6) NOT NULL, + `length` decimal(20,6) NOT NULL, + `width` decimal(20,6) NOT NULL, + `number` int(5) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_parcel`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_CARRIER_DB_ . '` ( + `id_dpdpoland_carrier` int(10) NOT NULL AUTO_INCREMENT, + `id_carrier` int(10) NOT NULL, + `id_reference` int(10) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_dpdpoland_carrier`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_PRODUCT_DB_ . '` ( + `id_parcel_product` int(10) NOT NULL AUTO_INCREMENT, + `id_parcel` int(11) NOT NULL, + `id_product` int(10) NOT NULL, + `id_product_attribute` int(10) NOT NULL, + `name` varchar(255) NOT NULL, + `weight` decimal(20,6) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_parcel_product`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_SENDER_ADDRESS_DB_ . '` ( + `id_sender_address` int(10) NOT NULL AUTO_INCREMENT, + `alias` varchar(50) NOT NULL, + `company` varchar(50) NOT NULL, + `name` varchar(80) NOT NULL, + `address` varchar(255) NOT NULL, + `city` varchar(50) NOT NULL, + `email` varchar(80) NOT NULL, + `postcode` varchar(20) NOT NULL, + `phone` varchar(50) NOT NULL, + `id_shop` int(10) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_sender_address`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . _DPDPOLAND_PICKUP_HISTORY_DB_ . '` ( + `id_pickup_history` int(10) NOT NULL AUTO_INCREMENT, + `order_number` varchar(255) NULL, + `sender_address` varchar(255) NULL, + `sender_company` varchar(255) NULL, + `sender_name` varchar(255) NULL, + `sender_phone` varchar(50) NULL, + `pickup_date` datetime NULL, + `pickup_time` varchar(50) NULL, + `type` varchar(50) NULL, + `envelope` int(10) NULL, + `package` int(10) NULL, + `package_weight_all` decimal(20,6) NULL, + `package_heaviest_weight` decimal(20,6) NULL, + `package_heaviest_width` decimal(20,6) NULL, + `package_heaviest_length` decimal(20,6) NULL, + `package_heaviest_height` decimal(20,6) NULL, + `pallet` int(10) NULL, + `pallet_weight` decimal(20,6) NULL, + `pallet_heaviest_weight` decimal(20,6) NULL, + `pallet_heaviest_height` decimal(20,6) NULL, + `id_shop` int(10) NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_pickup_history`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8'; + + $sql[] = ' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'dpdpoland_pudo_cart` ( + `pudo_code` VARCHAR(255) NOT NULL, + `id_cart` int(11) NOT NULL, + PRIMARY KEY (`id_cart`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;'; + + foreach ($sql as $query) { + if (!$r = Db::getInstance()->execute($query)) { + return false; + } + } + + return true; + } + + /** + * Creates CSV price rule + * + * @param int $id_shop Shop ID + * @param string $iso_country Country ISO code + * @param float $weight_from Amount of weight from which price rule is applied + * @param float $weight_to Amount of weight to which price rule is applied + * @param float $parcel_price Carrier price + * @param float $cod_price Additional COD carrier price value + * @param int $id_carrier Carrier ID + * @param string|datetime $date_add Date when CSV price is saved + * @param string|datetime $date_upd Last date when CSV price was updated + * @param $price_from + * @param $price_to + * @return bool CSV price rule created successfully + * @throws PrestaShopDatabaseException + * @throws PrestaShopException + */ + private function saveCSVRule($id_shop, $iso_country, $weight_from, $weight_to, $parcel_price, $cod_price, $id_carrier, $date_add, $date_upd, $price_from, $price_to) + { + DpdPolandLog::addLog('SaveCSVRule'); + + $csv = new DpdPolandCSV(); + $csv->id_shop = (int)$id_shop; + $csv->iso_country = $iso_country; + $csv->weight_from = $weight_from; + $csv->weight_to = $weight_to; + $csv->price_from = $price_from; + $csv->price_to = $price_to; + $csv->parcel_price = $parcel_price; + $csv->cod_price = $cod_price; + $csv->id_carrier = $id_carrier; + $csv->date_add = $date_add; + $csv->date_upd = $date_upd; + + return $csv->add(); + } + + /** + * Uninstalls module + * + * @return bool Module uninstalled successfully + */ + public function uninstall() + { + DpdPolandLog::addLog('uninstall module'); + + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_classic.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_standard.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_standard_cod.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_pudo.service.php'); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_pudo_cod.service.php'); + + if (!$this->uninstallModuleOverrides()) { + return false; + } + + return + parent::uninstall() && + DpdPolandCarrierClassicService::delete() && + DpdPolandCarrierStandardService::delete() && + DpdPolandCarrierStandardCODService::delete() && + DpdPolandCarrierPudoService::delete() && + DpdPolandCarrierPudoCodService::delete() && + DpdPolandConfiguration::deleteConfiguration() && + $this->dropTables() && + Configuration::deleteByName(DpdPolandWS::DEBUG_FILENAME); + } + + /** + * Removes module database tables + * + * @return bool Module database tables removed successfully + */ + private function dropTables() + { + return DB::getInstance()->execute(' + DROP TABLE IF EXISTS + `' . _DB_PREFIX_ . _DPDPOLAND_PRICE_RULE_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_PAYER_NUMBERS_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_COUNTRY_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_MANIFEST_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_PACKAGE_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_PARCEL_PRODUCT_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_CARRIER_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_SENDER_ADDRESS_DB_ . '`, + `' . _DB_PREFIX_ . _DPDPOLAND_PICKUP_HISTORY_DB_ . '`, + `' . _DB_PREFIX_ . 'dpdpoland_pudo_cart` + '); + } + + /** + * Checks if Soap Client is installed and enabled in current server + * + * @return bool Soap Client exists in server + */ + private function soapClientExists() + { + return (bool)class_exists('SoapClient'); + } + + /** + * Main module function used to display pages content + * + * @return bool|string Module content + * @throws PrestaShopException + */ + public function getContent() + { + $this->html .= $this->getContentHeader(); + + if (!$this->soapClientExists()) + return $this->adminDisplayWarning($this->l('SoapClient class is missing')); + + if (_DPDPOLAND_DEBUG_MODE_) + $this->displayDebugInfo(); + + $this->displayFlashMessagesIfIsset(); + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + $this->addJS(_DPDPOLAND_JS_URI_ . 'backoffice.js'); + $this->addCSS(_DPDPOLAND_CSS_URI_ . 'backoffice.css'); + $this->addCSS(_DPDPOLAND_CSS_URI_ . 'toolbar.css'); + } else { + $this->context->controller->addJS(_DPDPOLAND_JS_URI_ . 'backoffice.js'); + $this->context->controller->addCSS(_DPDPOLAND_CSS_URI_ . 'backoffice.css'); + } + + $this->setGlobalVariablesForAjax(); + $this->html .= $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/global_variables.tpl'); + + $country_currency_error_message_text = $this->l('PL country and PLN currency must be installed; CURL must be enabled'); + $configuration_error_message_text = $this->l('Module is not configured yet. Please check required settings and add at least one sender address'); + + $current_page = Tools::getValue('menu'); + $required_configuration = DpdPolandConfiguration::checkRequiredConfiguration(); + + if (!$current_page && !$required_configuration) + $current_page = 'configuration'; + + switch ($current_page) { + case 'arrange_pickup': + $this->addDateTimePickerPlugins(); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'arrange_pickup.controller.php'); + + $controller = new DpdPolandArrangePickUpController; + + if (Tools::isSubmit('requestPickup')) { + $data = $controller->getData(); + + if ($controller->validate()) { + $pickup = new DpdPolandPickup; + + foreach ($data as $element => $value) + $pickup->$element = $value; + + if (!$pickup->arrange()) + $this->html .= $this->displayError(reset(DpdPolandPickup::$errors)); + else { + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'pickupHistoryList.controller.php'); + $pickupHistoryListController = new DpdPolandPickupHistoryListController; + $pickupHistoryListController->save($pickup); + + $error_message = sprintf($this->l('Pickup was successfully arranged. Number of order is: %d'), $pickup->id_pickup); + self::addFlashMessage($error_message); + + $redirect_uri = $this->module_url . '&menu=arrange_pickup'; + Tools::redirectAdmin($redirect_uri); + } + } else + $this->html .= $this->displayError(reset(DpdPolandArrangePickUpController::$errors)); + } + + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Arrange PickUp'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + $this->html .= $controller->getPage(); + break; + case 'pickup_history': + $this->addDateTimePickerPlugins(); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'pickupHistoryList.controller.php'); + + $controller = new DpdPolandPickupHistoryListController; + + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Pickup history'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + $this->html .= $controller->getListHTML(); + break; + case 'sender_address_form': + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'senderAddressForm.controller.php'); + + $controller = new DpdPolandSenderAddressFormController(); + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Sender address'))); + $this->displayNavigation(); + + $controller->controllerActions(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<')) + $this->displayShopRestrictionWarning(); + + $this->html .= $controller->getForm(); + break; + case 'configuration': + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'configuration.controller.php'); + + $controller = new DpdPolandConfigurationController; + + if (Tools::isSubmit(DpdPolandConfigurationController::SETTINGS_SAVE_ACTION)) { + $controller->validateSettings(); + $controller->createDeleteCarriers(); + + if (!DpdPolandConfigurationController::$errors) + $controller->saveSettings(); + else + $this->html .= $this->displayErrors(DpdPolandConfigurationController::$errors); + } + + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Settings'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<')) + $this->displayShopRestrictionWarning(); + + $this->html .= $controller->getSettingsPage(); + break; + case 'csv': + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'csv.controller.php'); + + $controller = new DpdPolandCSVController; + + if (Tools::isSubmit(DpdPolandCSVController::SETTINGS_SAVE_CSV_ACTION)) { + $csv_data = $controller->readCSVData(); + if ($csv_data === false) { + self::addFlashError($this->l('Wrong CSV file')); + Tools::redirectAdmin($this->module_url . '&menu=csv'); + } + + $message = $controller->validateCSVData($csv_data); + if ($message !== true) + $this->html .= $this->displayErrors($message); + else { + if ($controller->saveCSVData($csv_data)) + self::addFlashMessage($this->l('CSV data was successfully saved')); + else + self::addFlashError($this->l('CSV data could not be saved')); + + Tools::redirectAdmin($this->module_url . '&menu=csv'); + } + } + + if (Tools::isSubmit(DpdPolandCSVController::SETTINGS_DELETE_CSV_ACTION)) + $controller->deleteCSV(); + + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('CSV prices import'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<') && Shop::getContext() != Shop::CONTEXT_SHOP) { + $this->html .= $this->displayWarnings(array( + $this->l('CSV management is disabled when all shops or group of shops are selected'))); + break; + } + + $this->html .= $controller->getCSVPage(); + break; + case 'help': + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Help'))); + $this->displayNavigation(); + $this->html .= $this->displayHelp(); + break; + case 'manifest_list': + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Manifest list'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<') && Shop::getContext() != Shop::CONTEXT_SHOP) { + $this->html .= $this->displayWarnings(array( + $this->l('Manifests functionality is disabled when all shops or group of shops are chosen'))); + break; + } + + $this->addDateTimePickerPlugins(); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'manifestList.controller.php'); + $manifest_list_controller = new DpdPolandManifestListController(); + + if (Tools::isSubmit('printManifest')) { + $id_manifest_ws = (int)Tools::getValue('id_manifest_ws'); + $manifest_list_controller->printManifest((int)$id_manifest_ws); + } + + $this->html .= $manifest_list_controller->getListHTML(); + break; + case 'sender_address': + $this->context->smarty->assign(array( + 'breadcrumb' => array($this->displayName, $this->l('Sender addresses')), + 'form_url' => $this->module_url . '&menu=sender_address_form' + )); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<') && Shop::getContext() != Shop::CONTEXT_SHOP) { + $this->html .= $this->displayWarnings(array( + $this->l('Addresses management is disabled when all shops or group of shops are chosen'))); + break; + } + + if (!$required_configuration) + $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'senderAddressList.controller.php'); + $sender_address_controller = new DpdPolandSenderAddressListController(); + + $sender_address_controller->controllerActions(); + + $this->html .= $sender_address_controller->getListHTML(); + break; + case 'parcel_history_list': + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Parcels history'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<') && Shop::getContext() != Shop::CONTEXT_SHOP) { + $this->html .= $this->displayWarnings(array( + $this->l('Parcels functionality is disabled when all shops or group of shops are chosen'))); + break; + } + + $this->addDateTimePickerPlugins(); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'parcelHistoryList.controller.php'); + $parcel_history_list_controller = new DpdPolandParcelHistoryController(); + $this->html .= $parcel_history_list_controller->getList(); + break; + case 'country_list': + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Shipment countries'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<') && Shop::getContext() != Shop::CONTEXT_SHOP) { + $this->html .= $this->displayWarnings(array( + $this->l('Countries functionality is disabled when all shops or group of shops are chosen'))); + break; + } + + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'countryList.controller.php'); + $country_list_controller = new DpdPolandCountryListController(); + + if (Tools::getValue('disable_country') && $id_country = Tools::getValue('id_country')) + if ($country_list_controller->changeEnabled((int)$id_country, true)) + $country_list_controller->displaySuccessStatusChangingMessage(); + else + $this->displayError($this->l('Could not change country status')); + + if (Tools::getValue('enable_country') && $id_country = Tools::getValue('id_country')) + if ($country_list_controller->changeEnabled((int)$id_country)) + $country_list_controller->displaySuccessStatusChangingMessage(); + else + $this->displayError($this->l('Could not change country status')); + + if (Tools::isSubmit('disableCountries')) { + if ($countries = Tools::getValue('CountriesBox')) + $country_list_controller->changeEnabledMultipleCountries($countries, true); + else + $this->html .= $this->displayError($this->l('No selected countries')); + } + + if (Tools::isSubmit('enableCountries')) { + if ($countries = Tools::getValue('CountriesBox')) + $country_list_controller->changeEnabledMultipleCountries($countries); + else + $this->html .= $this->displayError($this->l('No selected countries')); + } + + $this->html .= $country_list_controller->getListHTML(); + break; + case 'packages_list': + default: + $this->context->smarty->assign('breadcrumb', array($this->displayName, $this->l('Packages'))); + $this->displayNavigation(); + + if (!$this->checkModuleAvailability()) + return $this->html .= $this->displayErrors(array($country_currency_error_message_text)); + + if (!$required_configuration) + return $this->html .= $this->displayErrors(array($configuration_error_message_text)); + + if (!version_compare(_PS_VERSION_, '1.5', '<') && Shop::getContext() != Shop::CONTEXT_SHOP) { + $this->html .= $this->displayWarnings(array( + $this->l('Packages functionality is disabled when all shops or group of shops are chosen'))); + break; + } + + $this->addDateTimePickerPlugins(); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'packageList.controller.php'); + + if (Tools::isSubmit('printManifest')) + DpdPolandPackageListController::printManifest($this); + + if (Tools::isSubmit('printLabelsA4Format')) + DpdPolandPackageListController::printLabels(DpdPolandConfiguration::PRINTOUT_FORMAT_A4); + + if (Tools::isSubmit('printLabelsLabelFormat')) + DpdPolandPackageListController::printLabels(DpdPolandConfiguration::PRINTOUT_FORMAT_LABEL); + + $package_list_controller = new DpdPolandPackageListController(); + $this->html .= $package_list_controller->getList(); + break; + } + + return $this->html; + } + + /** + * Displays specific DPD info block in every module page + * + * @return string DPD info block HTML content + */ + private function getContentHeader() + { + $this->context->smarty->assign(array( + 'module_display_name' => $this->displayName, + 'ps_16' => version_compare(_PS_VERSION_, '1.6', '>=') + )); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/content_header.tpl'); + } + + /** + * Displays warning message that module is in DEBUG mode + */ + private function displayDebugInfo() + { + $warning_message = $this->l('Module is in DEBUG mode'); + + if (DpdPoland::getConfig(DpdPolandWS::DEBUG_FILENAME)) { + if (version_compare(_PS_VERSION_, '1.5', '<')) + $warning_message .= $this->l(', file:') . ' ' . _DPDPOLAND_MODULE_URI_ . DpdPoland::getConfig(DpdPolandWS::DEBUG_FILENAME); + else + $warning_message .= '
+ + ' . $this->l('View debug file') . ' + '; + } + + if (version_compare(_PS_VERSION_, '1.5', '<')) + $this->html .= $this->displayWarnings(array($warning_message)); + else + $this->adminDisplayWarning($warning_message); + } + + /** + * Displays help page content + * + * @return string Help page HTML content + */ + private function displayHelp() + { + if (Tools::isSubmit('print_pdf')) { + $filename = 'dpdpoland_eng.pdf'; + if (Tools::isSubmit('polish')) + $filename = 'dpdpoland_pol.pdf'; + + ob_end_clean(); + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="' . $this->l('manual') . '.pdf"'); + readfile(_PS_MODULE_DIR_ . 'dpdpoland/manual/' . $filename); + exit; + } + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/help.tpl'); + } + + /** + * Checks if module fits into minimal requirements to be available for use + * + * @return bool Module is available for management + */ + private function checkModuleAvailability() + { + return (bool)Country::getByIso(self::POLAND_ISO_CODE) && + (bool)Currency::getIdByIsoCode(_DPDPOLAND_CURRENCY_ISO_) && (bool)function_exists('curl_init'); + } + + /** + * Assigns into Smarty some variables which are used for AJAX + */ + private function setGlobalVariablesForAjax() + { + $this->context->smarty->assign(array( + 'dpdpoland_ajax_uri' => _DPDPOLAND_AJAX_URI_, + 'dpdpoland_pdf_uri' => _DPDPOLAND_PDF_URI_, + 'dpdpoland_token' => sha1(_COOKIE_KEY_ . $this->name), + 'dpdpoland_id_shop' => (int)$this->context->shop->id, + 'dpdpoland_id_lang' => (int)$this->context->language->id, + 'dpdpoland_order_uri' => $this->getCurrentOrderLink() + )); + } + + /** + * Builds a link of current order + * + * @return string Link of current order + */ + private function getCurrentOrderLink() + { + $id_order = (int)Tools::getValue('id_order'); + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + return 'index.php?tab=AdminOrdersOverride&id_order=' . (int)$id_order . '&vieworder&token=' . + Tools::getAdminTokenLite('AdminOrdersOverride'); + } + + return 'index.php?controller=AdminOrders&id_order=' . (int)$id_order . '&vieworder&token=' . + Tools::getAdminTokenLite('AdminOrders'); + } + + /** + * Saves package from order management page + * Used via AJAX + * + * @return bool Package saved successfully + */ + public function savePackageFromPost() + { + $savePackages = new ShippingService; + $result = $savePackages->savePackageFromPost((array)$savePackages->mapShippingModel(), Tools::getValue('dpdpoland_PayerNumber')); + if (count($result) == 0) { + self::$errors = $savePackages::$errors; + return null; + } + + return $result[0]; + } + + /** + * Validates address + * + * @param int $id_address Address ID + * @param int $id_method Service ID + * @return bool Address is valid + */ + public static function validateAddressForPackageSession($id_address, $id_method) + { + $address = new Address($id_address); + $country = Country::getIsoById((int)$address->id_country); + + if ($country == self::POLAND_ISO_CODE && $id_method == _DPDPOLAND_CLASSIC_ID_ || + $country != self::POLAND_ISO_CODE && $id_method == _DPDPOLAND_STANDARD_ID_ || + $country != self::POLAND_ISO_CODE && $id_method == _DPDPOLAND_STANDARD_COD_ID_ || + $country != self::POLAND_ISO_CODE && $id_method == _DPDPOLAND_PUDO_ID_ || + $country != self::POLAND_ISO_CODE && $id_method == _DPDPOLAND_PUDO_COD_ID_ || + $country != self::POLAND_ISO_CODE && $id_method == _DPDPOLAND_SWIPBOX_ID_) + return false; + + return true; + } + + + /** + * Loads datepicker / timepicker plugins + */ + private function addDateTimePickerPlugins() + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + return includeDatepicker(null); + + $this->context->controller->addJqueryUI(array( + 'ui.slider', // for datetimepicker + 'ui.datepicker' // for datetimepicker + )); + + $this->context->controller->addJS(array( + _DPDPOLAND_JS_URI_ . 'jquery.bpopup.min.js', + _PS_JS_DIR_ . 'jquery/plugins/timepicker/jquery-ui-timepicker-addon.js' // for datetimepicker + )); + + if (version_compare(_PS_VERSION_, '1.6', '<')) + $this->addCSS(_PS_JS_DIR_ . 'jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'); // for datetimepicker + } + + /** + * Displays warning message when all shops or group of shops is chosen + */ + private function displayShopRestrictionWarning() + { + if (Shop::getContext() == Shop::CONTEXT_GROUP) { + $this->html .= $this->displayWarnings(array($this->l('You have chosen a group of shops, all the changes will be set for all shops in this group'))); + DpdPolandLog::addLog('displayShopRestrictionWarning() You have chosen a group of shops, all the changes will be set for all shops in this group'); + } + + if (Shop::getContext() == Shop::CONTEXT_ALL) { + $this->html .= $this->displayWarnings(array($this->l('You have chosen all shops, all the changes will be set for all shops'))); + DpdPolandLog::addLog('displayShopRestrictionWarning() You have chosen all shops, all the changes will be set for all shops'); + } + } + + /** + * Displays HTML content in current page + * + * @param string $html HTML content + */ + public function outputHTML($html) + { + $this->html .= $html; + } + + /** + * Loads CSS files on PS 1.4 + * + * @param string $css_uri CSS file URL address + */ + public static function addCSS($css_uri) + { + echo ''; + } + + /** + * Loads JS files on PS 1.4 + * + * @param string $js_uri JS file URL address + */ + public static function addJS($js_uri) + { + echo ''; + } + + /** + * Displays navigation menu + */ + private function displayNavigation() + { + if (version_compare(_PS_VERSION_, '1.6', '>=')) + $this->context->smarty->assign('meniutabs', $this->initNavigation16()); + + $this->context->smarty->assign('module_link', $this->module_url); + $this->html .= $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/navigation.tpl'); + } + + /** + * Assigns menu items + * + * @return array Menu items + */ + private function initNavigation16() + { + $menu_tabs = array( + 'arrange_pickup' => array( + 'short' => 'Arrange Pickup', + 'desc' => $this->l('Arrange Pickup'), + 'href' => $this->module_url . '&menu=arrange_pickup', + 'active' => false, + 'imgclass' => 'icon-calendar' + ), + 'pickup_history' => array( + 'short' => 'Pickup history', + 'desc' => $this->l('Pickup history'), + 'href' => $this->module_url . '&menu=pickup_history', + 'active' => false, + 'imgclass' => 'icon-truck' + ), + 'packages_list' => array( + 'short' => 'Packages list', + 'desc' => $this->l('Packages list'), + 'href' => $this->module_url . '&menu=packages_list', + 'active' => false, + 'imgclass' => 'icon-list' + ), + 'manifest_list' => array( + 'short' => 'Manifest list', + 'desc' => $this->l('Manifest list'), + 'href' => $this->module_url . '&menu=manifest_list', + 'active' => false, + 'imgclass' => 'icon-th' + ), + 'parcel_history_list' => array( + 'short' => 'Parcels history', + 'desc' => $this->l('Parcels history'), + 'href' => $this->module_url . '&menu=parcel_history_list', + 'active' => false, + 'imgclass' => 'icon-history' + ), + 'country_list' => array( + 'short' => 'Shipment countries', + 'desc' => $this->l('Shipment countries'), + 'href' => $this->module_url . '&menu=country_list', + 'active' => false, + 'imgclass' => 'icon-globe' + ), + 'csv' => array( + 'short' => 'CSV prices import', + 'desc' => $this->l('CSV prices import'), + 'href' => $this->module_url . '&menu=csv', + 'active' => false, + 'imgclass' => 'icon-file' + ), + 'sender_address' => array( + 'short' => 'Sender', + 'desc' => $this->l('Sender addresses'), + 'href' => $this->module_url . '&menu=sender_address', + 'active' => false, + 'imgclass' => 'icon-home' + ), + 'configuration' => array( + 'short' => 'Settings', + 'desc' => $this->l('Settings'), + 'href' => $this->module_url . '&menu=configuration', + 'active' => false, + 'imgclass' => 'icon-cogs' + ), + 'help' => array( + 'short' => 'Help', + 'desc' => $this->l('Help'), + 'href' => $this->module_url . '&menu=help', + 'active' => false, + 'imgclass' => 'icon-info-circle' + ), + ); + + $current_page = Tools::getValue('menu'); + $required_configuration = DpdPolandConfiguration::checkRequiredConfiguration(); + + if (!$current_page) { + if (!$required_configuration) + $current_page = 'configuration'; + else + $current_page = 'packages_list'; + } + + if ($current_page == 'sender_address_form') { + $current_page = 'sender_address'; + } + + if (in_array($current_page, array( + 'arrange_pickup', + 'pickup_history', + 'packages_list', + 'manifest_list', + 'parcel_history_list', + 'country_list', + 'configuration', + 'csv', + 'help', + 'sender_address' + ))) + $menu_tabs[$current_page]['active'] = true; + + return $menu_tabs; + } + + /** + * Adds success message into current session + * + * @param string $msg Success message text + */ + public static function addFlashMessage($msg) + { + $messages_controller = new DpdPolandMessagesController(); + $messages_controller->setSuccessMessage($msg); + + DpdPolandLog::addLog($msg); + } + + /** + * Adds error message into current session + * + * @param string $msg Error message text + */ + public static function addFlashError($msg) + { + $messages_controller = new DpdPolandMessagesController(); + + if (is_array($msg)) { + DpdPolandLog::addError(json_encode($msg)); + foreach ($msg as $message) + $messages_controller->setErrorMessage($message); + } else { + DpdPolandLog::addError($msg); + $messages_controller->setErrorMessage($msg); + } + + } + + /** + * Displays success message only until page reload + */ + private function displayFlashMessagesIfIsset() + { + $messages_controller = new DpdPolandMessagesController(); + + if ($success_message = $messages_controller->getSuccessMessage()) + $this->html .= $this->displayConfirmation($success_message); + + if ($error_message = $messages_controller->getErrorMessage()) + $this->html .= $this->displayErrors($error_message); + } + + /** + * Displays error message + * + * @param string|array $errors Error message(s) + * @return string Error message + */ + public function displayErrors($errors) + { + if (!is_array($errors)) + $errors = array($errors); + + DpdPolandLog::addError(json_encode($errors)); + $this->context->smarty->assign('errors', $errors); + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/errors.tpl'); + } + + /** + * Displays warning message + * + * @param string|array $warnings Warning message(s) + * @return string + */ + public function displayWarnings($warnings) + { + DpdPolandLog::addLog($warnings); + $this->context->smarty->assign('warnings', $warnings); + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/warnings.tpl'); + } + + /** + * Checks if field exists in GET or POST + * Returns value from GET or POST if exists + * + * @param string $name Field name + * @param null|string $default_value Field default value + * @return mixed|null Field value + */ + public static function getInputValue($name, $default_value = null) + { + return (Tools::isSubmit($name)) ? Tools::getValue($name) : $default_value; + } + + /** + * Returns service ID according to carrier + * + * @param int $id_carrier Carrier ID + * @return bool|int Service ID + */ + public static function getMethodIdByCarrierId($id_carrier) + { + if (!$id_reference = self::getReferenceIdByCarrierId($id_carrier)) + return false; + + switch ($id_reference) { + case DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_STANDARD_ID): + return _DPDPOLAND_STANDARD_ID_; + case DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_STANDARD_COD_ID): + return _DPDPOLAND_STANDARD_COD_ID_; + case DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_CLASSIC_ID): + return _DPDPOLAND_CLASSIC_ID_; + case DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_PUDO_ID): + return _DPDPOLAND_PUDO_ID_; + case DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_PUDO_COD_ID): + return _DPDPOLAND_PUDO_COD_ID_; + case DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_SWIPBOX_ID): + return _DPDPOLAND_SWIPBOX_ID_; + default: + return false; + } + } + + /** + * Returns carrier reference according to its ID + * + * @param int $id_carrier Carrier ID + * @return false|null|string Carrier reference + */ + public static function getReferenceIdByCarrierId($id_carrier) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + return DpdPolandCarrier::getReferenceByIdCarrier($id_carrier); + + return Db::getInstance()->getValue(' + SELECT `id_reference` + FROM `' . _DB_PREFIX_ . 'carrier` + WHERE `id_carrier`=' . (int)$id_carrier + ); + } + + /** + * Returns formatted sender address + * + * @param int $id_sender_address Sender address ID + * @param bool|int $id_address Existing PrestaShop address ID + * @return array Formatted sender address + */ + private function getSenderAddress($id_sender_address, $id_address = false) + { + if ($id_address) { + $address = new Address((int)$id_address); + return array( + 'company' => $address->company, + 'name' => $address->firstname, + 'street' => $address->address1 . ' ' . $address->address2, + 'postcode' => $address->postcode, + 'city' => $address->city, + 'country' => $address->address2, + 'email' => $address->other, + 'phone' => $address->phone + ); + } + + $id_lang = version_compare(_PS_VERSION_, '1.5', '>=') ? $this->context->language->id : 1; + + $id_country = Country::getByIso('PL'); + $country = new Country($id_country, $id_lang); + + $sender_address = new DpdPolandSenderAddress((int)$id_sender_address); + + return array( + 'company' => $sender_address->company, + 'name' => $sender_address->name, + 'street' => $sender_address->address, + 'postcode' => self::convertPostcode($sender_address->postcode), + 'city' => $sender_address->city, + 'country' => $country->name, + 'email' => $sender_address->email, + 'phone' => $sender_address->phone + ); + } + + /** + * Returns formatted recipient address + * + * @param int $id_address Recipient address ID + * @return array Formatted address + */ + private function getRecipientAddress($id_address) + { + $address = new Address((int)$id_address); + $country = new Country((int)$address->id_country, $this->context->language->id); + $customer = new Customer((int)$address->id_customer); + + return array( + 'company' => $address->company, + 'firstname' => $address->firstname, + 'lastname' => $address->lastname, + 'street' => $address->address1 . ' ' . $address->address2, + 'postcode' => $address->postcode, + 'city' => $address->city, + 'country' => $country->name, + 'email' => isset($address->other) && !empty(trim($address->other)) ? $address->other : $customer->email, + 'phone' => isset($address->phone) && !empty(trim($address->phone)) && str_replace(' ', '', $address->phone) ? $address->phone : $address->phone_mobile + ); + } + + /** + * Returns recipient address in HTML format + * + * @param int $id_address Address ID + * @return string Address in HTML format + */ + public function getFormattedAddressHTML($id_address) + { + $this->context->smarty->assign('address', $this->getRecipientAddress($id_address)); + + if (version_compare(_PS_VERSION_, '1.7.7.0', '>=')) + $template = 'address_input_17'; + else + $template = version_compare(_PS_VERSION_, '1.6', '>=') ? 'address_input_16' : 'address_input'; + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/' . $template . '.tpl'); + } + + /** + * Returns sender address in HTML format + * + * @param int $id_address Address ID + * @return string Address in HTML format + */ + public function getFormattedSenderAddressHTML($id_address) + { + $this->context->smarty->assign('address', $this->getSenderAddress($id_address)); + + if (version_compare(_PS_VERSION_, '1.7.7.0', '>=')) + $template = 'address_17'; + else + $template = version_compare(_PS_VERSION_, '1.6', '>=') ? 'address_16' : 'address'; + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/' . $template . '.tpl'); + } + + /** + * Checks if there are any COD payment methods installed in PrestaShop + * + * @return bool COD method is available + */ + public static function CODMethodIsAvailable() + { + return (bool)count(DpdPoland::getPaymentModules()); + } + + /** + * Searches for products information according to query + * + * @param string $query Keyword for products search + * @return array Products information + */ + public function searchProducts($query) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) { + $sql = ' + SELECT p.`id_product`, pl.`name`, p.`weight` + FROM `' . _DB_PREFIX_ . 'category_product` cp + LEFT JOIN `' . _DB_PREFIX_ . 'product` p ON (p.`id_product` = cp.`id_product`) + LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = "' . + (int)$this->context->language->id . '") + WHERE pl.`name` LIKE \'%' . pSQL($query) . '%\' + OR p.`ean13` LIKE \'%' . pSQL($query) . '%\' + OR p.`upc` LIKE \'%' . pSQL($query) . '%\' + OR p.`reference` LIKE \'%' . pSQL($query) . '%\' + OR p.`supplier_reference` LIKE \'%' . pSQL($query) . '%\' + GROUP BY `id_product` + ORDER BY pl.`name` ASC + '; + } else { + $sql = new DbQuery(); + $sql->select('p.`id_product`, pl.`name`, p.`weight`'); + $sql->from('category_product', 'cp'); + $sql->leftJoin('product', 'p', 'p.`id_product` = cp.`id_product`'); + $sql->join(Shop::addSqlAssociation('product', 'p')); + $sql->leftJoin('product_lang', 'pl', ' + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = ' . (int)$this->context->language->id . Shop::addSqlRestrictionOnLang('pl') + ); + + $where = 'pl.`name` LIKE \'%' . pSQL($query) . '%\' + OR p.`ean13` LIKE \'%' . pSQL($query) . '%\' + OR p.`upc` LIKE \'%' . pSQL($query) . '%\' + OR p.`reference` LIKE \'%' . pSQL($query) . '%\' + OR p.`supplier_reference` LIKE \'%' . pSQL($query) . '%\' + OR p.`id_product` IN (SELECT id_product FROM ' . _DB_PREFIX_ . 'product_supplier sp WHERE `product_supplier_reference` LIKE \'%' . + pSQL($query) . '%\')'; + $sql->groupBy('`id_product`'); + $sql->orderBy('pl.`name` ASC'); + + if (Combination::isFeatureActive()) { + $sql->leftJoin('product_attribute', 'pa', 'pa.`id_product` = p.`id_product`'); + $sql->join(Shop::addSqlAssociation('product_attribute', 'pa', false)); + $where .= ' OR pa.`reference` LIKE \'%' . pSQL($query) . '%\''; + } + $sql->where($where); + } + + $result = Db::getInstance()->executeS($sql); + + if (!$result) + return array('found' => false, 'notfound' => $this->l('No product has been found.')); + + foreach ($result as &$product) { + $product['id_product_attribute'] = Product::getDefaultAttribute($product['id_product']); + $product['weight_numeric'] = $product['weight']; + $product['parcel_content'] = DpdPolandParcel::getParcelContent((array)$product); + $product['weight'] = sprintf('%.3f', $product['weight']) . ' ' . _DPDPOLAND_DEFAULT_WEIGHT_UNIT_; + } + + return array( + 'products' => $result, + 'found' => true + ); + } + + /** + * Saves DPD client number + * Used via AJAX + * + * @return array Success / Error messages + */ + public function addDPDClientNumber() + { + $number = Tools::getValue('client_number'); + $name = Tools::getValue('name'); + $id_shop = (int)Tools::getValue('id_shop', Context::getContext()->shop->id); + $error = ''; + + if (!$number) + $error .= $this->l('DPD client number is required') . '
'; + elseif (!ctype_alnum($number)) + $error .= $this->l('DPD client number is not valid') . '
'; + + if (!$name) + $error .= $this->l('Client name is required') . '
'; + elseif (!Validate::isName($name)) + $error .= $this->l('Client name is not valid') . '
'; + + if (empty($error)) { + require_once(_DPDPOLAND_CLASSES_DIR_ . 'PayerNumber.php'); + + if (DpdPolandPayerNumber::payerNumberExists($number, $id_shop)) + $error .= $this->l('DPD client number already exists') . '
'; + else { + $payer_number_obj = new DpdPolandPayerNumber(); + $payer_number_obj->payer_number = $number; + $payer_number_obj->name = $name; + $payer_number_obj->id_shop = $id_shop; + if (!$payer_number_obj->save()) + $error .= $this->l('DPD client number / name could not be saved') . '
'; + } + } + + $success = $this->l('DPD client number / name saved successfully'); + + if ($error != '') + DpdPolandLog::addError($error); + + return array( + 'error' => $error, + 'message' => $success + ); + } + + /** + * Deletes DPD client number + * Used via AJAX + * + * @return array Success / Error messages + */ + public function deleteDPDClientNumber() + { + $id_number = Tools::getValue('client_number'); + $error = ''; + + $configuration_obj = new DpdPolandConfiguration(); + + $payer_number_obj = new DpdPolandPayerNumber((int)$id_number); + $current_number = $payer_number_obj->payer_number; + if (!$payer_number_obj->delete()) + $error .= $this->l('Could not delete DPD client number / name'); + + if ($current_number == $configuration_obj->client_number) + if (!DpdPolandConfiguration::deleteByName(DpdPolandConfiguration::CLIENT_NUMBER) || + !DpdPolandConfiguration::deleteByName(DpdPolandConfiguration::CLIENT_NAME)) + $error .= $this->l('Could not delete default client number setting'); + + $success = $this->l('DPD client number / name deleted successfully'); + + if ($error != '') + DpdPolandLog::addError($error); + + return array( + 'error' => $error, + 'message' => $success + ); + } + + /** + * Returns information about payment modules + * which are installed into PrestaShop + * + * @return array|false|mysqli_result|null|PDOStatement|resource Payment modules + */ + public static function getPaymentModules() + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' + SELECT DISTINCT h.`id_hook`, m.`name`, hm.`position` + FROM `' . _DB_PREFIX_ . 'module_country` mc + LEFT JOIN `' . _DB_PREFIX_ . 'module` m ON m.`id_module` = mc.`id_module` + INNER JOIN `' . _DB_PREFIX_ . 'module_group` mg ON (m.`id_module` = mg.`id_module`) + LEFT JOIN `' . _DB_PREFIX_ . 'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `' . _DB_PREFIX_ . 'hook` h ON hm.`id_hook` = h.`id_hook` + WHERE h.`name` = \'payment\' + AND m.`active` = 1 + ORDER BY hm.`position`, m.`name` DESC + '); + return Module::getPaymentModules(); + } + + /** + * Returns payer numbers in HTML format + * + * @return string Payer numbers in HTML format + */ + public function getPayerNumbersTableHTML() + { + $configuration_obj = new DpdPolandConfiguration(); + + $this->context->smarty->assign(array( + 'settings' => $configuration_obj, + 'payer_numbers' => DpdPolandPayerNumber::getPayerNumbers() + )); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/payer_numbers_table.tpl'); + } + + /** + * Calculates how much time it is left for arrange pickup + * + * @return bool|float|int Calculated time + */ + public function calculateTimeLeft() + { + $current_timeframe = Tools::getValue('timeframe'); + $current_date = Tools::getValue('date'); + + if (!$current_timeframe) + return false; + + $end_time = explode('-', $current_timeframe); + if (!isset($end_time[1])) + return 0; + + $end_time_in_seconds = strtotime($end_time[1]); + $poland_time_obj = new DateTime(null, new DateTimeZone('Europe/Warsaw')); + $poland_time_in_seconds = strtotime($poland_time_obj->format('H:i:s')); + $days_left = strtotime($current_date) - strtotime(date('Y-m-d')); + $time_left = round(($end_time_in_seconds + $days_left - $poland_time_in_seconds) / 60); + + if ($time_left < 0) + $time_left = 0; + + return $time_left; + } + + /** + * Collects information about time frames when carrier is available for arrange pickup + * + * @return string Timeframes in HTML format + */ + public function getTimeFrames() + { + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'arrange_pickup.controller.php'); + + $current_date = Tools::getValue('date'); + + $is_date_valid = true; + + if (!Validate::isDate($current_date)) { + DpdPolandPickup::$errors = array($this->l('Wrong date format')); + $is_date_valid = false; + } elseif (strtotime($current_date) < strtotime(date('Y-m-d'))) { + DpdPolandPickup::$errors = array($this->l('Date can not be earlier than') . ' ' . date('Y-m-d')); + $is_date_valid = false; + } elseif (DpdPolandArrangePickUpController::isWeekend($current_date)) { + DpdPolandPickup::$errors = array($this->l('Weekends can not be chosen')); + $is_date_valid = false; + } + + if (!$is_date_valid) { + $this->context->smarty->assign(array( + 'settings' => new DpdPolandConfiguration, + 'timeFrames' => false + )); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/timeframes.tpl'); + } + + $pickup = new DpdPolandPickup; + $is_today = (bool)(date('Ymd') == date('Ymd', strtotime($current_date))); + + $pickup_timeframes = $pickup->getCourierTimeframes(); + + $system_timezone = date_default_timezone_get(); + date_default_timezone_set('Europe/Warsaw'); + + $poland_time_in_seconds = strtotime(date('H:i:s')); + + DpdPolandArrangePickUpController::validateTimeframes($pickup_timeframes, $poland_time_in_seconds, $is_today); + if (empty($pickup_timeframes)) { + DpdPolandPickup::$errors = array($this->l('No timeframes')); + $pickup_timeframes = false; + } + + $this->context->smarty->assign(array( + 'settings' => new DpdPolandConfiguration, + 'timeFrames' => $pickup_timeframes + )); + + $extra_timeframe = DpdPolandArrangePickUpController::createExtraTimeframe($pickup_timeframes); + if ($extra_timeframe !== false) + $this->context->smarty->assign('extra_timeframe', $extra_timeframe); + + date_default_timezone_set($system_timezone); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'admin/timeframes.tpl'); + } + + /** + * Converts PrestaShop weight units into DPD weight units + * + * @param float $weight Weight + * @return float Converted weight + */ + public static function convertWeight($weight) + { + if (!$conversation_rate = DpdPoland::getConfig(DpdPolandConfiguration::WEIGHT_CONVERSATION_RATE)) + $conversation_rate = 1; + + return (float)$weight * (float)$conversation_rate; + } + + /** + * Converts PrestaShop dimension units into DPD weight units + * + * @param float $value Dimension + * @return string Converted dimension + */ + public static function convertDimension($value) + { + if (!$conversation_rate = DpdPoland::getConfig(DpdPolandConfiguration::DIMENSION_CONVERSATION_RATE)) + $conversation_rate = 1; + + return sprintf('%.6f', (float)$value * (float)$conversation_rate); + } + + /** + * Formats postcode into the one which is accepted by WebServices + * + * @param string $postcode Postcode + * @return bool|string Converted postcode + */ + public static function convertPostcode($postcode) + { + if (!$postcode) + return null; + return Tools::strtoupper(preg_replace('/[^a-zA-Z0-9]+/', '', $postcode)); + } + + /** + * Module block in order management page + * + * @param $params Hook parameters + * @return string Module content in HTML format + */ + public function hookAdminOrder($params) + { + if (!$this->soapClientExists()) + return ''; + + if (!DpdPolandConfiguration::checkRequiredConfiguration()) { + $settings_page_link = version_compare(_PS_VERSION_, '1.5', '<') ? $this->getModuleSettingsPageLink14() : + $this->context->link->getAdminLink('AdminModules') . '&configure=' . $this->name . '&menu=configuration'; + + $this->context->smarty->assign(array( + 'displayBlock' => false, + 'moduleSettingsLink' => $settings_page_link + )); + } else { + $this->displayFlashMessagesIfIsset(); // PDF error might be set as flash error + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + $this->addJS(_PS_JS_DIR_ . 'jquery/jquery.scrollTo-1.4.2-min.js'); + $this->addJS(_PS_JS_DIR_ . 'jquery/jquery-ui-1.8.10.custom.min.js'); + $this->addJS(_PS_JS_DIR_ . 'jquery/accordion/accordion.ui.js'); + $this->addJS(_PS_JS_DIR_ . 'jquery/jquery.autocomplete.js'); + $this->addJS(_DPDPOLAND_JS_URI_ . 'adminOrder.js'); + $this->addCSS(_DPDPOLAND_CSS_URI_ . 'adminOrder.css'); + $this->addCSS(_PS_CSS_DIR_ . 'jquery-ui-1.8.10.custom.css'); + $this->addCSS(_DPDPOLAND_CSS_URI_ . 'pudo-common.css'); + } else { + $this->context->controller->addJqueryUI(array( + 'ui.core', + 'ui.widget', + 'ui.accordion' + )); + + $this->context->controller->addJqueryPlugin('scrollTo'); + + $this->context->controller->addJS(_DPDPOLAND_JS_URI_ . 'adminOrder.js'); + $this->context->controller->addCSS(_DPDPOLAND_CSS_URI_ . 'adminOrder.css'); + $this->context->controller->addCSS(_DPDPOLAND_CSS_URI_ . 'pudo-common.css'); + } + + $order = new Order((int)$params['id_order']); + $package = DpdPolandPackage::getInstanceByIdOrder((int)$order->id); + $parcels = DpdPolandParcel::getParcels((int)$order->id, $package->id_package_ws); + $products = DpdPolandParcelProduct::getShippedProducts((int)$order->id, DpdPolandParcelProduct::getProductDetailsByParcels($parcels)); + + $settings = new DpdPolandConfiguration; + $customer = new Customer((int)$order->id_customer); + + $selectedPayerNumber = ($package->payerNumber) ? $package->payerNumber : $settings->client_number; + $selectedRecipientIdAddress = ($package->id_address_delivery) ? $package->id_address_delivery : $order->id_address_delivery; + + $id_currency_pl = Currency::getIdByIsoCode(_DPDPOLAND_CURRENCY_ISO_, (int)$this->context->shop->id); + $currency_to = new Currency((int)$id_currency_pl); + $currency_from = new Currency($order->id_currency); + + $id_method = $this->getMethodIdByCarrierId((int)$order->id_carrier); + $isPudoWithCod = false; + if ($id_method) // if order shipping method is one of DPD shipping methods + { + $payment_method_compatible = false; + + $is_cod_module = Configuration::get(DpdPolandConfiguration::COD_MODULE_PREFIX . $order->module, null, $order->id_shop_group, $order->id_shop); + + if ($id_method == _DPDPOLAND_STANDARD_COD_ID_ && $is_cod_module || + $id_method == _DPDPOLAND_STANDARD_ID_ && !$is_cod_module || + $id_method == _DPDPOLAND_CLASSIC_ID_ && !$is_cod_module || + $id_method == _DPDPOLAND_PUDO_ID_ && !$is_cod_module || + $id_method == _DPDPOLAND_SWIPBOX_ID_ && !$is_cod_module || + $id_method == _DPDPOLAND_PUDO_COD_ID_ && $is_cod_module) + $payment_method_compatible = true; + + if ($id_method == _DPDPOLAND_PUDO_ID_ && $is_cod_module) + $isPudoWithCod = true; + } else + $payment_method_compatible = true; + + if (!$payment_method_compatible || $isPudoWithCod) { + $error_message = ''; + if ($isPudoWithCod) { + $error_message .= $this->l('Selected payment method is COD.') . '
'; + } + if (!$payment_method_compatible) { + $error_message .= $this->l('Your payment method and Shipping method is not compatible.') . '
'; + $error_message .= ' ' . $this->l('If delivery address is not Poland, then COD payment method is not supported.') . '
'; + $error_message .= ' ' . $this->l('If delivery address is Poland and payment method is COD please use shipping method DPD Domestic + COD.') . + '
'; + $error_message .= ' ' . $this->l('If delivery address is Poland and no COD payment is used please select DPD Domestic shipping method.'); + } + + $this->context->smarty->assign('compatibility_warning_message', $error_message); + + DpdPolandLog::addLog($error_message); + } + + if (!DpdPoland::validateAddressForPackageSession((int)$selectedRecipientIdAddress, (int)$id_method)) { + $error_message = $this->l('Your delivery address is not compatible with the selected shipping method.') . ' ' . + $this->l('DPD Poland Domestic is available only if delivery address is Poland.') . ' ' . + $this->l('DPD International shipping method is available only if delivery address is not Poland.'); + $this->context->smarty->assign('address_warning_message', $error_message); + + DpdPolandLog::addLog($error_message); + } + + $cookie = new Cookie(_DPDPOLAND_COOKIE_); + require_once(_DPDPOLAND_CONTROLLERS_DIR_ . 'service.php'); + $dpdpoland_id_pudo_carrier = DpdPolandService::getCarrierByReference(Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_ID, null, $order->id_shop_group, $order->id_shop)); + $dpdpoland_id_pudo_cod_carrier = DpdPolandService::getCarrierByReference(Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_COD_ID, null, $order->id_shop_group, $order->id_shop)); + $dpdpoland_id_swipbox_carrier = DpdPolandService::getCarrierByReference(Configuration::get(DpdPolandConfiguration::CARRIER_SWIPBOX_ID, null, $order->id_shop_group, $order->id_shop)); + $sender_addresses = DpdPolandSenderAddress::getAddresses(); + + $order_price_in_default_currency = Tools::convertPrice($order->total_paid_tax_incl, $currency_from); + $order_price_in_pln = Tools::convertPrice($order_price_in_default_currency, $currency_to); + $order_price_in_pln = round($order_price_in_pln, 2); + + if ($id_method == _DPDPOLAND_PUDO_ID_ || $id_method == _DPDPOLAND_PUDO_COD_ID_ || $id_method == _DPDPOLAND_SWIPBOX_ID_ || $package->id_package_ws != null) { + $pudo_code = $this->getPudoCode($order); + $pudoAddressObj = $this->pudoService->getPudoAddress( + $pudo_code, + $order->id_customer, + isset($currentAddress->phone_mobile) && !empty(trim($currentAddress->phone_mobile)) ? + $currentAddress->phone_mobile : + $currentAddress->phone + ); + + $pudo_address = implode(', ', array_filter([ + $pudoAddressObj->company, + $pudoAddressObj->address1, + trim($pudoAddressObj->postcode . ' ' . $pudoAddressObj->city) + ])); + + } else { + $pudo_code = null; + $pudo_address = null; + } + + $this->context->smarty->assign(array( + 'sender_addresses' => $sender_addresses, + 'displayBlock' => true, + 'order' => $order, + 'id_order' => $order->id, + 'messages' => $this->html, // Flash messages + 'package' => $package, + 'loaded_object' => Validate::isLoadedObject($package), + 'selected_id_method' => self::getMethodIdByCarrierId($order->id_carrier), + 'settings' => $settings, + 'payerNumbers' => DpdPolandPayerNumber::getPayerNumbers(), + 'selectedPayerNumber' => $selectedPayerNumber, + 'products' => $products, + 'parcels' => $parcels, + 'recipientAddresses' => $this->getRecipientAddresses($customer, $selectedRecipientIdAddress), + 'selectedRecipientIdAddress' => $selectedRecipientIdAddress, + 'recipientAddress' => $this->getRecipientAddress($selectedRecipientIdAddress), + 'currency_from' => $currency_from, + 'currency_to' => $currency_to, + 'redirect_and_open' => $cookie->dpdpoland_package_id, + 'printout_format' => $cookie->dpdpoland_printout_format, + 'default_ref1' => $this->configurationService->getDefaultRef1($order, $products), + 'default_ref2' => $this->configurationService->getDefaultRef2($order, $products), + 'default_customer_data_1' => $this->configurationService->getDefaultCustomerData1($order, $products), + 'dpdpoland_id_pudo_carrier' => $dpdpoland_id_pudo_carrier, + 'dpdpoland_id_pudo_cod_carrier' => $dpdpoland_id_pudo_cod_carrier, + 'dpdpoland_id_swipbox_carrier' => $dpdpoland_id_swipbox_carrier, + 'order_price_pl' => $order_price_in_pln, + 'parcel_content_source' => $settings->parcel_content_source, + 'is_cod_payment_method' => Configuration::get(DpdPolandConfiguration::COD_MODULE_PREFIX . $order->module, null, $order->id_shop_group, $order->id_shop), + 'pudo_code' => $pudo_code, + 'pudo_address' => $pudo_address + )); + + $this->setGlobalVariablesForAjax(); + } + + if (version_compare(_PS_VERSION_, '1.6', '<')) + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'hook/adminOrder.tpl'); + if (version_compare(_PS_VERSION_, '1.7.7.0', '>=')) + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'hook/adminOrder_17.tpl'); + + return $this->context->smarty->fetch(_DPDPOLAND_TPL_DIR_ . 'hook/adminOrder_16.tpl'); + } + + private function getRecipientAddresses($customer, $selectedRecipientIdAddress) + { + $customerAddresses = $customer->getAddresses($this->context->language->id); + + if (!$selectedRecipientIdAddress) + return $customerAddresses; + + $selectedAddress = new Address((int)$selectedRecipientIdAddress); + + if (!$this->addressExistsInArray($selectedRecipientIdAddress, $customerAddresses)) { + array_push($customerAddresses, + array( + 'id_address' => $selectedAddress->id, + 'id_country' => $selectedAddress->id_country, + 'id_state' => $selectedAddress->id_state, + 'id_manufacturer' => $selectedAddress->id_manufacturer, + 'id_supplier' => $selectedAddress->id_supplier, + 'id_warehouse' => $selectedAddress->id_warehouse, + 'alias' => $selectedAddress->alias, + 'company' => $selectedAddress->company, + 'firstname' => $selectedAddress->firstname, + 'lastname' => $selectedAddress->lastname, + 'address1' => $selectedAddress->address1, + 'address2' => $selectedAddress->address2, + 'postcode' => $selectedAddress->postcode, + 'city' => $selectedAddress->city, + 'phone' => $selectedAddress->phone, + 'phone_mobile' => isset($selectedAddress->phone_mobile) && !empty(trim($selectedAddress->phone_mobile)) ? $selectedAddress->phone_mobile : $selectedAddress->phone, + 'country' => $selectedAddress->country) + ); + } + + return $customerAddresses; + } + + private function addressExistsInArray($entry, $array) + { + foreach ($array as $compare) { + if ($compare['id_address'] == $entry) { + return true; + } + } + return false; + } + + /** + * Hook used to filter out non COD payment methods if DPD COD carrier was selected + * + * @param $params + * @return null|void + */ + public function hookPaymentTop($params) + { + if (version_compare(_PS_VERSION_, '1.5', '<')) + return $this->disablePaymentMethods(); + + if (!Validate::isLoadedObject($this->context->cart) || !$this->context->cart->id_carrier) + return null; + + $method_id = self::getMethodIdByCarrierId((int)$this->context->cart->id_carrier); + + $cache_id = 'exceptionsCache'; + $exceptionsCache = (Cache::isStored($cache_id)) ? Cache::retrieve($cache_id) : array(); // existing cache + $controller = (DpdPoland::getConfig('PS_ORDER_PROCESS_TYPE') == 0) ? 'order' : 'orderopc'; + $id_hook = Hook::getIdByName('displayPayment'); // ID of hook we are going to manipulate + + if ($paymentModules = DpdPoland::getPaymentModules()) { + foreach ($paymentModules as $module) { + $is_cod_module = DpdPoland::getConfig(DpdPolandConfiguration::COD_MODULE_PREFIX . $module['name']); + + if ($method_id == _DPDPOLAND_STANDARD_COD_ID_ && !$is_cod_module || + $method_id == _DPDPOLAND_STANDARD_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_CLASSIC_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_PUDO_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_SWIPBOX_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_PUDO_COD_ID_ && !$is_cod_module) { + $module_instance = Module::getInstanceByName($module['name']); + + if (Validate::isLoadedObject($module_instance)) { + $key = (int)$id_hook . '-' . (int)$module_instance->id; + $exceptionsCache[$key][$this->context->shop->id][] = $controller; + } + } + } + + Cache::store($cache_id, $exceptionsCache); + } + + return null; + } + + /** + * Filters out non COD payment methods if DPD COD carrier was selected on PS 1.4 + */ + private function disablePaymentMethods() + { + $method_id = self::getMethodIdByCarrierId((int)$this->context->cart->id_carrier); + + if ($paymentModules = DpdPoland::getPaymentModules()) { + foreach ($paymentModules as $module) { + $is_cod_module = DpdPoland::getConfig(DpdPolandConfiguration::COD_MODULE_PREFIX . $module['name']); + + if ($method_id == _DPDPOLAND_STANDARD_COD_ID_ && !$is_cod_module || + $method_id == _DPDPOLAND_STANDARD_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_CLASSIC_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_PUDO_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_SWIPBOX_ID_ && $is_cod_module || + $method_id == _DPDPOLAND_PUDO_COD_ID_ && !$is_cod_module) { + $module_instance = Module::getInstanceByName($module['name']); + + if (Validate::isLoadedObject($module_instance)) + $module_instance->currencies = array(); + } + } + } + } + + /** + * Saves carrier ID according to its reference on PS 1.4 + * + * @param $params Hook parameters with carrier information + */ + public function hookUpdateCarrier($params) + { + $id_reference = (int)DpdPolandCarrier::getReferenceByIdCarrier((int)$params['id_carrier']); + $id_carrier = (int)$params['carrier']->id; + + $dpdpoland_carrier = new DpdPolandCarrier(); + $dpdpoland_carrier->id_carrier = (int)$id_carrier; + $dpdpoland_carrier->id_reference = (int)$id_reference; + $dpdpoland_carrier->save(); + } + + /** + * Sets carrier price + * + * @param Cart $cart Cart object + * @param float $shipping_cost Shipping cost + * @return bool|mixed Carrier price + */ + public function getOrderShippingCost($cart, $shipping_cost) + { + return $this->getOrderShippingCostExternal($cart); + } + + /** + * Sets carrier price + * + * @param Cart $cart Cart object + * @return bool|mixed Calculated carrier price + */ + public function getOrderShippingCostExternal($cart) + { + if (!$this->soapClientExists() || !$this->checkModuleAvailability()) + return false; + + $disabled_countries_ids = DpdPolandCountry::getDisabledCountriesIDs(); + + $id_country = (int)Tools::getValue('id_country'); + + if (!$id_country) { + $country = Address::getCountryAndState((int)$cart->id_address_delivery); + + $id_country = is_array($country) ? $country['id_country'] : $country; + + if (!$id_country) { + $id_country = Country::getByIso('PL'); + } + } + + if (!$id_method = self::getMethodIdByCarrierId($this->id_carrier)) { + self::$carriers[$this->id_carrier] = false; + return false; + } + + if (!$id_country || in_array($id_country, $disabled_countries_ids) && $id_method == _DPDPOLAND_CLASSIC_ID_) + return false; + + if ($id_country) + $zone = Country::getIdZone($id_country); + else + return false; + + if (!$this->id_carrier) + return false; + + $is_poland_country = $this->isPolandCountry((int)$id_country); + + if ($is_poland_country && $id_method == _DPDPOLAND_CLASSIC_ID_ || + !$is_poland_country && $id_method == _DPDPOLAND_STANDARD_COD_ID_ || + !$is_poland_country && $id_method == _DPDPOLAND_STANDARD_ID_ || + !$is_poland_country && $id_method == _DPDPOLAND_PUDO_ID_ || + !$is_poland_country && $id_method == _DPDPOLAND_SWIPBOX_ID_ || + !$is_poland_country && $id_method == _DPDPOLAND_PUDO_COD_ID_ + ) { + return false; + } + + if (isset(self::$carriers[$this->id_carrier])) + return self::$carriers[$this->id_carrier]; + + $total_weight = self::convertWeight($cart->getTotalWeight()); + $products = $cart->getProducts(); + $additional_shipping_cost = $this->getAdditionalShippingCost($products); + + if (DpdPoland::getConfig(DpdPolandConfiguration::PRICE_CALCULATION_TYPE) == DpdPolandConfiguration::PRICE_CALCULATION_PRESTASHOP) { + $carrier = new Carrier($this->id_carrier); + + $price = null; + if ($carrier->shipping_method == Carrier::SHIPPING_METHOD_WEIGHT || $carrier->shipping_method == Carrier::SHIPPING_METHOD_DEFAULT) { + $deliveryPrice = $carrier->getDeliveryPriceByWeight($total_weight, $zone); + $price = $deliveryPrice + $additional_shipping_cost; + } else if ($carrier->shipping_method == Carrier::SHIPPING_METHOD_PRICE) { + $order_total = $cart->getOrderTotal(true, Cart::ONLY_PRODUCTS); + $price = $carrier->getDeliveryPriceByPrice($order_total, $zone) + $additional_shipping_cost; + } + + if ($price === null && $carrier->shipping_method != Carrier::SHIPPING_METHOD_FREE) + return false; + + $id_currency_pl = Currency::getIdByIsoCode(_DPDPOLAND_CURRENCY_ISO_, (int)$this->context->shop->id); + $currency_from = new Currency((int)$id_currency_pl); + $currency_to = $this->context->currency; + + self::$carriers[$this->id_carrier] = Tools::convertPriceFull($price, $currency_from, $currency_to); + return self::$carriers[$this->id_carrier]; + } + + $price = DpdPolandCSV::getPrice($total_weight, $id_method, $cart); + + if ($price === false) + return false; + + $id_currency_pl = Currency::getIdByIsoCode(_DPDPOLAND_CURRENCY_ISO_, (int)$this->context->shop->id); + $currency_from = new Currency((int)$id_currency_pl); + $currency_to = $this->context->currency; + + self::$carriers[$this->id_carrier] = Tools::convertPriceFull($price, $currency_from, $currency_to); + return self::$carriers[$this->id_carrier]; + } + + /** + * Checks if country ID belongs to PL country + * + * @param int $id_country Country ID + * @return bool ID belongs to PL country + */ + private function isPolandCountry($id_country) + { + if (!$id_country) { + return false; + } + + return $id_country == Country::getByIso(self::POLAND_ISO_CODE); + } + + /** + * Unserializes serialized value + * + * @param string $serialized Serialized value + * @param bool $object + * @return bool|mixed Unserialized value + */ + public function unSerialize($serialized, $object = false) + { + if (method_exists('Tools', 'unSerialize')) + return Tools::unSerialize($serialized, $object); + + if (is_string($serialized) && (strpos($serialized, 'O:') === false || !preg_match('/(^|;|{|})O:[0-9]+:"/', $serialized)) && !$object || $object) + return @unserialize($serialized); + + return false; + } + + + /** + * Prints multiple labels for selected orders + * + * @param string $printout_format Printout format (A4 or label) + * @return array|null Error message + */ + public function printMultipleLabels($printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_A4, $orders = null) + { + return $this->labelService->printMultipleLabels($printout_format, $orders); + } + + + /** + * Prints labels for selected orders + * + * @param array $packages Selected packages + * @param string $printout_format Printout format (A4, label) + * @return array|void Error message + */ + private function printLabelsFromOrdersList(array $packages, $printout_format) + { + $pdf_directory = $pdf_directory = _PS_MODULE_DIR_ . 'dpdpoland/pdf/'; + + foreach ($packages as $id_package) { + $package = new DpdPolandPackage((int)$id_package); + + if ($pdf_file_contents = $package->generateLabels('PDF', $printout_format)) { + $fp = fopen($pdf_directory . 'label_' . (int)$id_package . '.pdf', 'a'); + + if (!$fp) { + if (version_compare(_PS_VERSION_, '1.5', '<')) { + return array($this->l('Could not create PDF file. Please check module folder permissions')); + } + + $this->context->controller->errors[] = + $this->l('Could not create PDF file. Please check module folder permissions'); + + return; + } + + fwrite($fp, $pdf_file_contents); + fclose($fp); + } + } + + include_once(_PS_MODULE_DIR_ . 'dpdpoland/libraries/PDFMerger/PDFMerger.php'); + + $pdf = new PDFMerger; + + foreach ($packages as $id_package) { + $label_pdf_path = $pdf_directory . 'label_' . (int)$id_package . '.pdf'; + $pdf->addPDF($label_pdf_path, 'all'); + } + + $pdf->merge('file', $pdf_directory . 'multiple_label.pdf'); + + ob_end_clean(); + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="labels_' . time() . '.pdf"'); + readfile($pdf_directory . 'multiple_label.pdf'); + + foreach ($packages as $id_package) { + if (file_exists($pdf_directory . 'label_' . $id_package . '.pdf') && + is_writable($pdf_directory . 'label_' . $id_package . '.pdf') + ) { + unlink($pdf_directory . 'label_' . $id_package . '.pdf'); + } + } + + if (file_exists($pdf_directory . 'multiple_label.pdf') && is_writable($pdf_directory . 'multiple_label.pdf')) { + unlink($pdf_directory . 'multiple_label.pdf'); + } + + $url = $this->context->link->getAdminLink('AdminOrders'); + Tools::redirectAdmin($url); + } + + /** + * Prints label in PDF format + * + * @param string $printout_format Printout format (A4, label) + * @return array|null|string|void Error message + */ + public function printSingleLabel($printout_format = DpdPolandConfiguration::PRINTOUT_FORMAT_A4) + { + $id_order = (int)Tools::getValue('id_order'); + $order = new Order((int)$id_order); + + if (!Validate::isLoadedObject($order)) { + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + return $this->l('Order does not exist'); + } + + $this->context->controller->errors[] = $this->l('Order does not exist'); + + return null; + } + + $package = DpdPolandPackage::getInstanceByIdOrder((int)$id_order); + + if (!$package->id_package_ws) { + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + DpdPolandLog::addError('Label is not saved for #%d order'); + return sprintf($this->l('Label is not saved for #%d order'), (int)$id_order); + } + + $this->context->controller->errors[] = + sprintf($this->l('Label is not saved for #%d order'), (int)$id_order); + + DpdPolandLog::addError(json_encode($this->context->controller->errors)); + return null; + } + + return $this->printLabelsFromOrdersList(array($package->id_package_ws), $printout_format); + } + + /** + * Loads CSS / JS files in PrestaShop BackOffice + */ + public function hookDisplayBackofficeHeader() + { + if (Tools::getValue('controller') == 'AdminOrders') { + $this->context->controller->addJS(_DPDPOLAND_JS_URI_ . 'adminorders.js'); + + if (version_compare(_PS_VERSION_, '1.7.7.0', '>=')) + $this->context->controller->addJS(_DPDPOLAND_JS_URI_ . 'adminOrder_1.7.js'); + } + } + + public function hookActionOrderGridDefinitionModifier($params) + { + $params['definition']->getBulkActions()->add( + (new SubmitBulkAction('dpdpoland_generate_shipping_list_with_label')) + ->setName($this->l('DPD Polska - generate shipping and labels')) + ->setOptions([ + 'submit_route' => 'dpdpoland_generate_shipping_list_with_label', + 'submit_method' => 'POST' + ]) + ); + + $params['definition']->getBulkActions()->add( + (new SubmitBulkAction('dpdpoland_generate_shipping_list')) + ->setName($this->l('DPD Polska - generate shipping')) + ->setOptions([ + 'submit_route' => 'dpdpoland_generate_shipping_list', + 'submit_method' => 'POST' + ]) + ); + + $params['definition']->getBulkActions()->add( + (new SubmitBulkAction('dpdpoland_generate_shipping_label')) + ->setName($this->l('DPD Polska - generate labels')) + ->setOptions([ + 'submit_route' => 'dpdpoland_generate_shipping_label', + 'submit_method' => 'POST' + ]) + ); + } + + /** + * Loads CSS / JS files in PrestaShop FrontOffice + */ + public function hookHeader() + { + } + + /** + * Generates module settings page link + * Used on PS 1.4 + * + * @return string Settings page link + */ + private function getModuleSettingsPageLink14() + { + return 'index.php?tab=AdminModules&token=' . Tools::getAdminTokenLite('AdminModules') . + '&configure=dpdpoland&menu=configuration'; + } + + /** + * @param array $params Available keys: cart, order, customer, currency, orderStatus + */ + public function hookActionValidateOrder($params) + { + /** @var Order $order */ + $order = $params['order']; + + $dpdpoland_id_pudo_carrier = Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_ID, null, $order->id_shop_group, $order->id_shop); + $dpdpoland_id_pudo_cod_carrier = Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_COD_ID, null, $order->id_shop_group, $order->id_shop); + $dpdpoland_id_swipbox_carrier = Configuration::get(DpdPolandConfiguration::CARRIER_SWIPBOX_ID, null, $order->id_shop_group, $order->id_shop); + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + $id_order_carrier = (int)DpdPolandCarrier::getReferenceByIdCarrier((int)$order->id_carrier); + } else { + $carrier = new Carrier($order->id_carrier); + $id_order_carrier = $carrier->id_reference; + } + + // If order carrier is not pudo service then do nothing + if ($id_order_carrier != (int)$dpdpoland_id_pudo_carrier && + $id_order_carrier != (int)$dpdpoland_id_pudo_cod_carrier && + $id_order_carrier != (int)$dpdpoland_id_swipbox_carrier) { + return; + } + + $pudoCode = $this->getPudoCode($order); + + if (!$pudoCode) { + return; + } + + $currentAddress = new Address($order->id_address_delivery); + + $address = $this->pudoService->getPudoAddress( + $pudoCode, + $order->id_customer, + isset($currentAddress->phone_mobile) && !empty(trim($currentAddress->phone_mobile)) ? + $currentAddress->phone_mobile : + $currentAddress->phone + ); + + if (null == $address) { + return; + } + + $order->id_address_delivery = $address->id; + $order->save(); + } + + /** + * @param array $params + */ + public function hookNewOrder(array $params) + { + /** @var Order $order */ + $order = $params['order']; + + $dpdpoland_id_pudo_carrier = Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_ID, null, $order->id_shop_group, $order->id_shop); + $dpdpoland_id_pudo_cod_carrier = Configuration::get(DpdPolandConfiguration::CARRIER_PUDO_COD_ID, null, $order->id_shop_group, $order->id_shop); + $dpdpoland_id_swipbox_carrier = Configuration::get(DpdPolandConfiguration::CARRIER_SWIPBOX_ID, null, $order->id_shop_group, $order->id_shop); + + if (version_compare(_PS_VERSION_, '1.5', '<')) { + $id_order_carrier = (int)DpdPolandCarrier::getReferenceByIdCarrier((int)$order->id_carrier); + } else { + $carrier = new Carrier($order->id_carrier); + $id_order_carrier = $carrier->id_reference; + } + + // If order carrier is not pudo service then do nothing + if ($id_order_carrier != (int)$dpdpoland_id_pudo_carrier && + $id_order_carrier != (int)$dpdpoland_id_pudo_cod_carrier && + $id_order_carrier != (int)$dpdpoland_id_swipbox_carrier) { + return; + } + + $pudoCode = $this->getPudoCode($order); + + if (!$pudoCode) { + return; + } + + $currentAddress = new Address($order->id_address_delivery); + + $address = $this->pudoService->getPudoAddress( + $pudoCode, + $order->id_customer, + isset($currentAddress->phone_mobile) && !empty(trim($currentAddress->phone_mobile)) ? $currentAddress->phone_mobile : $currentAddress->phone + ); + + if (null == $address) { + return; + } + + $order->id_address_delivery = $address->id; + $order->save(); + } + + /** + * This method will save pudo code selected in FrontOffice and associate it with cart for later use + * + * @param string|null $pudo_code + * @param int|null $id_cart + * + * @return bool + */ + public function savePudoMapCodeFrontend() + { + $savePackages = new ShippingService; + return $savePackages->savePudoMapCodeFrontend(); + } + + public static function getConfig($key) + { + $id_shop = Shop::getContextShopID(true); + $id_shop_group = Shop::getContextShopGroupID(true); + return Configuration::get($key, null, $id_shop_group, $id_shop); + } + + /** + * @param Order $order + * @return false|string + */ + private function getPudoCode(Order $order) + { + $pudoCode = Db::getInstance()->getValue(' + SELECT `pudo_code` + FROM `' . _DB_PREFIX_ . 'dpdpoland_pudo_cart` + WHERE `id_cart` = ' . (int)$order->id_cart . ' + '); + return $pudoCode; + } + + /** + * @param array|null $products + * @return float + */ + private function getAdditionalShippingCost(array $products) + { + $additional_shipping_cost = 0; + foreach ($products as $product) { + if (!$product['is_virtual']) { + $additional_shipping_cost += $product['additional_shipping_cost'] * $product['cart_quantity']; + } + } + return $additional_shipping_cost; + } + + public function hookActionFrontControllerSetMedia() + { + $dpdpoland_id_pudo_carrier = Carrier::getCarrierByReference(DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_PUDO_ID)); + $dpdpoland_id_pudo_cod_carrier = Carrier::getCarrierByReference(DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_PUDO_COD_ID)); + $dpdpoland_id_swipbox_carrier = Carrier::getCarrierByReference(DpdPoland::getConfig(DpdPolandConfiguration::CARRIER_SWIPBOX_ID)); + + $pudo_iframe_url = PickupIframeService::getPickupIframeUrl(false, false, (int)$this->context->cart->id); + $pudo_iframe_url_cod = PickupIframeService::getPickupIframeUrl(true, false, (int)$this->context->cart->id); + $pudo_iframe_swipbox_url = PickupIframeService::getPickupIframeUrl(false, true, (int)$this->context->cart->id); + + Media::addJsDef([ + 'dpdpoland_id_pudo_carrier' => $dpdpoland_id_pudo_carrier != null ? (int)$dpdpoland_id_pudo_carrier->id : null, + 'dpdpoland_id_pudo_cod_carrier' => $dpdpoland_id_pudo_cod_carrier != null ? (int)$dpdpoland_id_pudo_cod_carrier->id : null, + 'dpdpoland_id_swipbox_carrier' => $dpdpoland_id_swipbox_carrier != null ? (int)$dpdpoland_id_swipbox_carrier->id : null, + 'dpdpoland_ajax_uri' => _DPDPOLAND_AJAX_URI_, + 'dpdpoland_token' => sha1(_COOKIE_KEY_ . $this->name), + 'dpdpoland_session' => Tools::getToken(false), + 'dpdpoland_cart' => (int)$this->context->cart->id, + 'dpdpoland_iframe_url' => $pudo_iframe_url, + 'dpdpoland_iframe_swipbox_url' => $pudo_iframe_swipbox_url, + 'dpdpoland_iframe_cod_url' => $pudo_iframe_url_cod, + ]); + + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-common-js', + 'modules/' . $this->name . '/js/pudo-common.js' + ); + + $this->context->controller->registerStylesheet( + 'dpdpoland-pudo-common-css', + 'modules/' . $this->name . '/css/pudo-common.css' + ); + + $custom_cart = DpdPoland::getConfig(DpdPolandConfiguration::CUSTOM_CART); + $custom_cart_array = array( + DpdPolandConfiguration::CUSTOM_CHECKOUT_SUPERCHECKOUT, + DpdPolandConfiguration::CUSTOM_CHECKOUT_EASYCHECKOUT, + DpdPolandConfiguration::CUSTOM_CHECKOUT_OPC_PRESTASMART, + DpdPolandConfiguration::CUSTOM_CHECKOUT_THECHECKOUT_PRESTASMART, + DpdPolandConfiguration::CUSTOM_CHECKOUT_OPC_PRESTATEAM_8, + DpdPolandConfiguration::CUSTOM_CHECKOUT_OPC_PRESTATEAM_1_7 + ); + + if (in_array($custom_cart, $custom_cart_array)) { + $this->context->controller->registerStylesheet( + 'dpdshipping-pudo-customcheckout-css', + 'modules/' . $this->name . '/css/pudo-customcheckout.css' + ); + switch ($custom_cart) { + case DpdPolandConfiguration::CUSTOM_CHECKOUT_SUPERCHECKOUT: + $this->registerSuperCheckoutMedia(); + break; + case DpdPolandConfiguration::CUSTOM_CHECKOUT_EASYCHECKOUT: + $this->registerEasyCheckoutMedia(); + break; + case DpdPolandConfiguration::CUSTOM_CHECKOUT_OPC_PRESTASMART: + $this->registerOpcPrestaSmartCheckoutMedia(); + break; + case DpdPolandConfiguration::CUSTOM_CHECKOUT_OPC_PRESTATEAM_8: + $this->registerOpcPrestaTeam8CheckoutMedia(); + break; + case DpdPolandConfiguration::CUSTOM_CHECKOUT_OPC_PRESTATEAM_1_7: + $this->registerOpcPrestaTeam17CheckoutMedia(); + break; + case DpdPolandConfiguration::CUSTOM_CHECKOUT_THECHECKOUT_PRESTASMART: + $this->registerTheCheckoutPrestaSmartMedia(); + break; + } + } else { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-default-js', + 'modules/' . $this->name . '/js/pudo-default.js' + ); + + $this->context->controller->registerStylesheet( + 'dpdpoland-pudo-default-css', + 'modules/' . $this->name . '/css/pudo-default.css' + ); + } + } + + public function hookDisplayCarrierExtraContent($params) + { + $this->context->smarty->assign(array( + 'dpdpoland_pudo_iframe_js' => $this->context->link->getBaseLink() . '/modules/dpdpoland/js/dpdpoland-pudo-iframe.js', + 'dpdpoland_swipbox_iframe_js' => $this->context->link->getBaseLink() . '/modules/dpdpoland/js/dpdpoland-swipbox-iframe.js', + 'dpdpoland_pudo_cod_iframe_js' => $this->context->link->getBaseLink() . '/modules/dpdpoland/js/dpdpoland-pudo-cod-iframe.js', + )); + + $id_method = $this->getMethodIdByCarrierId((int)$params['carrier']['id']); + if ($id_method == _DPDPOLAND_PUDO_ID_) { + + return $this->display( + __FILE__, + 'views/templates/hook/carrier-extra-content-pudo.tpl' + ); + } + + if ($id_method == _DPDPOLAND_PUDO_COD_ID_) { + return $this->display( + __FILE__, + 'views/templates/hook/carrier-extra-content-pudo-cod.tpl' + ); + } + + if ($id_method == _DPDPOLAND_SWIPBOX_ID_) { + return $this->display( + __FILE__, + 'views/templates/hook/carrier-extra-content-swipbox.tpl' + ); + } + + return ''; + } + + public function registerSuperCheckoutMedia(): void + { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-supercheckout-js', + 'modules/' . $this->name . '/js/pudo-supercheckout.js' + ); + } + + public function registerEasyCheckoutMedia(): void + { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-easycheckout-js', + 'modules/' . $this->name . '/js/pudo-easycheckout.js' + ); + } + + private function registerOpcPrestaSmartCheckoutMedia() + { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-opcprestasmart-js', + 'modules/' . $this->name . '/js/pudo-opc-prestasmart.js' + ); + } + + private function registerOpcPrestaTeam8CheckoutMedia() + { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-opcprestapeam-js', + 'modules/' . $this->name . '/js/pudo-opc-prestateam-8.js' + ); + } + + private function registerOpcPrestaTeam17CheckoutMedia() + { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-opcprestapeam-js', + 'modules/' . $this->name . '/js/pudo-opc-prestateam-1.7.js' + ); + } + + private function registerTheCheckoutPrestaSmartMedia() + { + $this->context->controller->registerJavascript( + 'dpdpoland-pudo-thecheckout-prestasmart-js', + 'modules/' . $this->name . '/js/pudo-thecheckout-prestasmart.js' + ); + } +} diff --git a/modules/dpdpoland/en.php b/modules/dpdpoland/en.php new file mode 100644 index 00000000..d250c39b --- /dev/null +++ b/modules/dpdpoland/en.php @@ -0,0 +1,397 @@ +dpdpoland_e14e32e9af6abe9075e171d1e699d2b1'] = 'DPD Polska sp. z o.o.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_cf6bdbe90ce14e8574b95617ddecd62b'] = 'DPD Polska sp. z o.o. shipping module'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD domestic shipment - Standard'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD domestic shipment - Standard with COD'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_d2069e632908fea7573dca46cc582f17'] = 'DPD international shipment (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_d0949e93073cf252d5687ee5714e98fe'] = 'Module is in DEBUG mode'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_2e780f41b60cc7adce7ec82c077b1328'] = 'View debug file'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_6881bfc8704c70e00cdccd3a889c656e'] = 'PL country and PLN currency must be installed; CURL must be enabled'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b9ef6fb0879ec82c0446bda7233f01a2'] = 'Module is not configured yet. Please check required settings'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_df6c55d89e6ab2b9bb40dac719af0ad3'] = 'Arrange PickUp'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_c02d804fa902ea3b9cf1372e91c6c07d'] = 'CSV prices import'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_17472ee8349195ad503c351f0707635d'] = 'CSV management is disabled when all shops or group of shops are selected'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Help'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_7be24e7f2e42a87f6eed6461ee6019c3'] = 'Manifest list'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_133b95b4eff09dd92f6fb89365cfc5c9'] = 'Manifests functionality is disabled when all shops or group of shops are chosen'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_defa603474fa0b26abf74e04cf3f37dc'] = 'Parcels history'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_76eabb488f3d8677aa8456f6cf8e3cd6'] = 'Parcels functionality is disabled when all shops or group of shops are chosen'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_9e4af51bbda475a4c3f1be6d0d8ca79b'] = 'Shipment countries'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_adf178668a06fd135f315626c64cfcab'] = 'Countries functionality is disabled when all shops or group of shops are chosen'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_27fe4eb3edbaff8f250e2d51f7462681'] = 'Packages'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_662903aaf4484465ea3685e7eda39631'] = 'Packages functionality is disabled when all shops or group of shops are chosen'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_1fc78230db5bda0cce0fe26f8308b0e1'] = 'Parcel #%d does not exists'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_185f3a44910c149fb3932fe466a67c39'] = 'Unable to save product #%s to parcel #%d'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_2fe4721acab2b52c4ed95fffbbc5d56e'] = 'You have chosen a group of shops, all the changes will be set for all shops in this group'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_437e0167a401ddea924849640e08bfe0'] = 'You have chosen all shops, all the changes will be set for all shops'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_dc5982c9e79b6dfbd6f2b0bbdaddb972'] = 'DPD client number is required'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_1e00bbef535c75b71d1763a3580a1e5e'] = 'DPD client number is not valid'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b2a5b30126d6c7beef59e4c719ebcb11'] = 'Client name is required'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_f99abd737754e44ba1954da710986e94'] = 'Client name is not valid'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_9b36b4083416f24c568a5db65cefb775'] = 'DPD client number already exists'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_bb5edb204502b74d1dc141b4c4d5c8ca'] = 'DPD client number / name could not be saved'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_c8ef9bdc2f02d07dc6079c73c2a63266'] = 'DPD client number / name saved successfully'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_346a047982b951c1884d870bdde83732'] = 'Could not delete DPD client number / name'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_27ec7e6bbcee87d7bcaee9bdefc45e09'] = 'Could not delete default client number setting'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_3bf8fa7e6f2443cc31ed07a933f7f265'] = 'DPD client number / name deleted successfully'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.ws_0de36710a01a183e825821bd8c114678'] = 'Could not connect to webservice server. Please check webservice URL'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.ws_34e10ce9a0142bdf21b53c412f9b8971'] = 'Missing WebServices configuration data'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_557ce4d7ebf32761d89025560b39988e'] = 'Date of pickup'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_b01578a8d93f59f03da1295d41224835'] = 'Timeframe of pickup'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_f4b4439e9f3732ee91a5321a88fca1d0'] = 'Shipment type'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_417e0d7ca5c467a90ad6281f8dbdc902'] = 'General shipment content'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_fa9218f2927bf28f67029569c2c86b58'] = 'Envelopes'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_188512a8e454a4459576581f17c4cf24'] = 'Number of envelopes'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_3e9e1484cdd872f48f218fcf0a0ac882'] = 'Parcels'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_8c74ac4eaa2b297614fb822143339da2'] = 'Number of parcels'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_d0af198cb80a8b9fb791ecfe537ae058'] = 'Summary weight'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_5ad6a9b6909709fda6a6260140a577f2'] = 'Weight of the heaviest item'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_b566a0262a11710fec1bdefe70a9af75'] = 'Height of the tallest item'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_8cd26badce05229f3b4aef08e937e45f'] = 'Length of the largest item'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_63e5bd6e3ba8c6f7b3673adb344b0acb'] = 'Width of the longest item'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_3f9cff795224f5232cca142b122d6d46'] = 'Pallets'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_4e68f204aa87d54877bae0682c91e945'] = 'Number of pallets'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_2d3e1556af332fb39dbb336b7dbd815c'] = 'Pickup was successfully arranged. Number of order is: %d'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_e9db232320d68ed823146c578c4e57e8'] = 'At least one service must be selected'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_ca032b19074848f60a64765cf1a2b902'] = 'The \"%s\" field is required.'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_d3351a5a321eff4a2b2dd23f91014a09'] = 'The \"%s\" field is invalid.'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_6295e9fb03aee799ad17c1a7051bce54'] = 'Could not save DPD international shipment (DPD Classic) service'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_81f6684cb92278192ea83e1e2d52b1a5'] = 'Could not delete DPD international shipment (DPD Classic) service'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d86de4cac15afc1d6bde5b95679e6bf5'] = 'Could not save DPD domestic shipment - Standard service'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_4095eb6e01f03f08bec8a018d6af4e42'] = 'Could not delete DPD domestic shipment - Standard service'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_e60eef2b54e550e3aa0765a8534bf851'] = 'Could not save DPD domestic shipment - Standard with COD service'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_096d9693810ab908011699bc2683d8b4'] = 'Could not delete DPD domestic shipment - Standard with COD service'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2a691c13904a57bf08a9a97d6a29bb73'] = 'Login can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_50ae1a2cad21b6d7b4b8caa4df0ee128'] = 'Password can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_f1bc76917b4b9eefae0a2c2f249eae3e'] = 'Password is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_516f2bab6ea17ccfb2881d2d7244f2d0'] = 'Default client number must be set'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_43a51a7515589e5d0da53d6d34d92165'] = 'Company name can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_f1010bd631c658108fb79ee8a8e15b48'] = 'Company name is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2630937e141eb50884534de42d5e5ee2'] = 'Name and Surname can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_60f899abeec0138f8c0eb005baa445ec'] = 'Name and surname are not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_aa8d12747028e054f46691ff7356dfcd'] = 'Address can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_024d391fbc28c4feae076f242b5e9663'] = 'Address is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_7b83329279ee90c78179e9bca6e71e36'] = 'Postal code not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_a3d30200506ef2f8f64f9da626fab198'] = 'Postal code is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d1935ae9107bc14513878b353a40ad66'] = 'City can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_caff49a1a94d0a314aeb172fefe2c6b5'] = 'City is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2e33dfccd5912a2b071d30460bd072dd'] = 'Email can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_a1d11f0c167629d356bc2cbdbbf9950f'] = 'Email is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_b9f7e2d6505c78b639bbf411b1fdf53d'] = 'Tel. No. can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_e3d6fd38c0970a247a2efe6135189b26'] = 'Tel. No. is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_ab86bd3c2acbfe84e03c9f25ddfec749'] = 'At least one COD payment method must be checked'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_352dc479bd09930c3741d4d2b08f52ad'] = 'Weight conversation rate can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_6d2fcce4872f354734a5ab22522bbc22'] = 'Weight conversation rate is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_02cc06808d47444a9b6070a70223937d'] = 'Dimension conversation rate can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d6069dd010a2c50fbbd7b1e0c05def48'] = 'Dimension conversation rate is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d8731cfb7b2fcc4d4a9a6d93a15b340f'] = 'Customer company name can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_10a5edb2f28bbeadcbe2ceb7452dd21b'] = 'Customer company name is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d744cb91532d27fc295efb095ca35a7a'] = 'Customer name and surname can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_36eab302759930b2e87b5f58c82038b8'] = 'Customer name and surname is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_aa897175306dbf694b3c8aecc348820c'] = 'Customer tel. No. can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_c67952f0dd83b2025c62ae00d7d11e2a'] = 'Customer tel. No. is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_49164735e5be270db81a0b37c22c32b0'] = 'Customer FID can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_8189ae3b628cd0a0a01b9e85516163dc'] = 'Customer FID is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d6534487cf5e32f16491d0177581cf40'] = 'Master FID can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d57cce4f5f6024b838e22710d8b23baa'] = 'Master FID is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_ab4e2671faf3a670e8e0c59beffb9529'] = 'Web Services URL can not be empty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_e4f36ce03f2b1d1c4c875ace06a7de2c'] = 'Web Services URL is not valid'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_fe016d3b990c2a9dd72ab6b45892f2ae'] = 'Settings saved successfully'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_95fc952eb3f8cdf77b8fd878ec312099'] = 'Could not save settings'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_a108e14a7baadb5f412289e78e6e8cd4'] = 'Could not change country status'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_dcadd34de7e627ea1da1dfe62b6cf424'] = 'No selected countries'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_811e14e4f6a0a810bd7134b0efee372c'] = 'Country status changed successfully'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_5d9b9872005f3cf1a4def3fb3528eba9'] = 'Could not change country status, ID: %s'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_243911a3d5a8cd0425b6445f1226409c'] = 'Selected countries statuses changed successfully'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_192faee3a49294fda6d13c0b121a1e4f'] = 'Parcel weight from (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_60ae6f36eeef0bd69b3589cb4197ea29'] = 'Parcel weight to (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_5a3110fd78c7e72bf6f793bbb22f1a27'] = 'Parcel price (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_914419aa32f04011357d3b604a86d7eb'] = 'Carrier'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_cc22f9c1c006612224c8f14fcb8618a9'] = 'COD cost (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_8d751864a3f79a19d2e06e2acf4234f2'] = 'Wrong CSV file'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_e3fb87f38c7ff3e310a8206daa79f82a'] = 'CSV data was successfully saved'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_37dc8118fa211f43b2ca2a52a6ee787d'] = 'CSV data could not be saved'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_db913c2ee13ffcfa8220f9082f55555d'] = 'Price rules deleted successfully'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_7d2d424cfc11ed9b4428825cd834b1fd'] = 'Price rules could not be deleted'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_7a93533b6e32e4c65ccd7f3785a4d086'] = 'Wrong CSV file structure or empty lines'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_45d626539112348088b22e53c8f42c31'] = 'PLN currency must be installed before CSV import.'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_269b83bdcdbede79ca4372e4cca0b550'] = 'Country: country code does not exists in your PrestaShop system - invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_f1f970c877f6b5d05c0b06114f6e8d51'] = 'Weight (From): invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_d2a7fae53a6ad2f729990f1f5d3a329d'] = 'Weight (To): invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_d8c27219c58175bf167fe761745c7b18'] = 'Parcel price (PLN): invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_5eebaf4c4354c2fa66c9a23f8625be48'] = 'Carrier: invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_2b1254f68ef36bf8144fe8f5d3998b9b'] = 'COD cost (PLN): Value should be >=0. Invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_fa7efd29ee54335b8eee557c0896272e'] = 'COD cost (PLN): It\'s possible to use COD only with \"DPD domestic shipment - Standard with COD\". Leave empty COD field otherwise. Invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_abdd02f527c5fea88a2f261f966d97e6'] = 'COD cost (PLN): COD is available only in Poland. Leave empty COD field otherwise. Invalid lines:'; +$_MODULE['<{dpdpoland}prestashop>dpd_classic.service_d2069e632908fea7573dca46cc582f17'] = 'DPD international shipment (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>dpd_standard.service_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD domestic shipment - Standard'; +$_MODULE['<{dpdpoland}prestashop>dpd_standard_cod.service_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD domestic shipment - Standard with COD'; +$_MODULE['<{dpdpoland}prestashop>manifest_a7927259433038cdaab4fedd3891fc2c'] = 'Manifests of DOMESTIC shipments cannot be mixed with INTERNATIONAL shipments'; +$_MODULE['<{dpdpoland}prestashop>package_fb14705e99f84ade2bbdb747ab45c028'] = 'Customer does not exists'; +$_MODULE['<{dpdpoland}prestashop>package_83ef8de8a773717790a7db47d7893c22'] = 'Receiver address does not exists'; +$_MODULE['<{dpdpoland}prestashop>package_706aefe3f1a249726beddd13681060d3'] = 'Package was successfully created but we were unable to save its data locally'; +$_MODULE['<{dpdpoland}prestashop>package_a7927259433038cdaab4fedd3891fc2c'] = 'Manifests of DOMESTIC shipments cannot be mixed with INTERNATIONAL shipments'; +$_MODULE['<{dpdpoland}prestashop>pickup_88f4da5ddbc4666535176a1251cb4d8f'] = 'Error code: %s, fields: %s'; +$_MODULE['<{dpdpoland}prestashop>pickup_443a89770439e69c92ec317079d15fbb'] = 'Order number is undefined'; +$_MODULE['<{dpdpoland}prestashop>pickup_789d957565edc09c2a436fca63b30c03'] = 'Cannot get TimeFrames from webservices. Please check if sender\'s postal code is typed in correctly'; +$_MODULE['<{dpdpoland}prestashop>address_5e116ceb48a98fb755f22df7ea1e2396'] = 'Company name:'; +$_MODULE['<{dpdpoland}prestashop>address_2e07aecf995754708a89dd0766cce085'] = 'Name and surname:'; +$_MODULE['<{dpdpoland}prestashop>address_72b6d26677f7289a541e4fdbf4c8ca53'] = 'Street and house no.:'; +$_MODULE['<{dpdpoland}prestashop>address_da67a6777d9e5451375f8ab27e15af8b'] = 'Postal code:'; +$_MODULE['<{dpdpoland}prestashop>address_bffb711ec36f280459d11dce315da72f'] = 'City:'; +$_MODULE['<{dpdpoland}prestashop>address_f64be5eef68442a8f50cf535b92ad3e4'] = 'Country:'; +$_MODULE['<{dpdpoland}prestashop>address_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>address_0936b8d13555e80a1e3b4382274f06bd'] = 'Tel. No.'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_7d06182c98480873fd25664fb3f7a698'] = 'Sender address'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_94880bda83bda77c5692876700711f15'] = 'Poland'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_3f2bbf3ee64eb0d86ebe7730b3c6ccde'] = 'Sender address must be specified in settings first'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_40f404095c708619cdd4d0f808a9570e'] = 'Date and time for pickup'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_d76cabde06a3b3f49b88d0bedfd64928'] = 'Date of pickup:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_2f88c2f48e2eaa600cb461062abc5db7'] = 'Order placement is possible only on working days, if you select non working day your order will be realized on first available working day'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_cdaf42bc870c754a964420ba2ac49b02'] = 'Timeframe of pickup:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_209802fb858e2c83205027dbbb5d9e6c'] = 'Package'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_325a369b3c10840846bf208b09e42685'] = 'Shipment type:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_86760af0540a2a6d4b4ca61ef3d6187c'] = 'Domestic'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_8189ecf686157db0c0274c1f49373318'] = 'International'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_e1ed989ed1284aedc6dba9b1680fefaf'] = 'Envelopes:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_ab7702eaa2e0331f91205686efa40d69'] = 'Number of envelopes:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_e1f142b36e05805b333c1e038d95b0d8'] = 'Parcels:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_9fda8e6e97311e1f7d755ac477dea38f'] = 'Number of parcels:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_c4c3afb13f59f8ede266475851fbfbac'] = 'Summary weight (in kg):'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_1abfd647ddf71e80424f3fc60b50e60c'] = 'Weight of the heaviest item (in kg):'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_730b2819f18ff8dd9d1bf5df925f64eb'] = 'Height of the tallest item (in cm):'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_a54fde62a06b28e231fc7fbeb0690abd'] = 'Length of the largest item (in cm):'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_6c5cbb81d5b2cff0dbc530681dafdcc2'] = 'Width of the longest item (in cm):'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_902d421176a411f4d956205e7d5c8059'] = 'Pallets:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_8995f444a649d88c69c5580131df1177'] = 'Number of pallets:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_94966d90747b97d1f0f206c98a8b1ac3'] = 'Send'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_332dc7ba3252c80249de22d335d1ccf3'] = 'Some text for merchants information - to be agreed on.'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_973ddc69a5ff591471c0376488db8579'] = 'Arrange Pickup'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_ea4788705e6873b424c65e91c2846b19'] = 'Cancel'; +$_MODULE['<{dpdpoland}prestashop>configuration_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings'; +$_MODULE['<{dpdpoland}prestashop>configuration_d7ee719da6f2c80eaf00d5538a2517bd'] = 'DPD credentials'; +$_MODULE['<{dpdpoland}prestashop>configuration_051672911a3f1f05efba78a553ef6fe2'] = 'Login:'; +$_MODULE['<{dpdpoland}prestashop>configuration_b341a59d5636ed3d6a819137495b08a0'] = 'Password:'; +$_MODULE['<{dpdpoland}prestashop>configuration_49fbab040daede070f6af9e1da021fad'] = 'DPD client number:'; +$_MODULE['<{dpdpoland}prestashop>configuration_de8df59907fdac33cd15aa585a4cef84'] = 'Client name:'; +$_MODULE['<{dpdpoland}prestashop>configuration_ec211f7c20af43e742bf2570c3cb84f9'] = 'Add'; +$_MODULE['<{dpdpoland}prestashop>configuration_436a25178dc1cd89996743d657142bd2'] = 'Default client number:'; +$_MODULE['<{dpdpoland}prestashop>configuration_c9cc8cce247e49bae79f15173ce97354'] = 'Save'; +$_MODULE['<{dpdpoland}prestashop>configuration_19f823c6453c2b1ffd09cb715214813d'] = 'Required field'; +$_MODULE['<{dpdpoland}prestashop>configuration_58d579673df0c3e3c03a9692e1263952'] = 'Senders data'; +$_MODULE['<{dpdpoland}prestashop>configuration_5e116ceb48a98fb755f22df7ea1e2396'] = 'Company name:'; +$_MODULE['<{dpdpoland}prestashop>configuration_2e07aecf995754708a89dd0766cce085'] = 'Name and surname:'; +$_MODULE['<{dpdpoland}prestashop>configuration_2bf1d5fae1c321d594fdedf05058f709'] = 'Address:'; +$_MODULE['<{dpdpoland}prestashop>configuration_3011ea97a695e0d9ea2a9a38bb60f8e4'] = 'Company name or First and surname is mandatory'; +$_MODULE['<{dpdpoland}prestashop>configuration_da67a6777d9e5451375f8ab27e15af8b'] = 'Postal code:'; +$_MODULE['<{dpdpoland}prestashop>configuration_bffb711ec36f280459d11dce315da72f'] = 'City:'; +$_MODULE['<{dpdpoland}prestashop>configuration_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{dpdpoland}prestashop>configuration_94880bda83bda77c5692876700711f15'] = 'Poland'; +$_MODULE['<{dpdpoland}prestashop>configuration_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>configuration_230ff5a82d6f00782ac18f7d7dd594e8'] = 'Tel. No.:'; +$_MODULE['<{dpdpoland}prestashop>configuration_a000119beed256188e530a804bb79ef4'] = 'Active shiping services'; +$_MODULE['<{dpdpoland}prestashop>configuration_4aeaca207f10d8b2a25475f3f135a4ac'] = 'DPD domestic shipment - Standard:'; +$_MODULE['<{dpdpoland}prestashop>configuration_f03584af7399afb18d478900e06b025c'] = 'DPD domestic shipment - Standard with COD:'; +$_MODULE['<{dpdpoland}prestashop>configuration_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD domestic shipment - Standard with COD'; +$_MODULE['<{dpdpoland}prestashop>configuration_d66f656d939860707d874607f42500f9'] = 'RULE: DPD Polska sp. z o.o. allows payment on the delivery ONLY by cash. In your payment modules you have available this types of payment, please mark those payment methods that support this rule.'; +$_MODULE['<{dpdpoland}prestashop>configuration_961489f954ec2135d8094496df2ac259'] = 'DPD international shipment (DPD Classic):'; +$_MODULE['<{dpdpoland}prestashop>configuration_d2069e632908fea7573dca46cc582f17'] = 'DPD international shipment (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>configuration_c2ce0e9a6aa6854e42ce2354208bfc1e'] = 'Please note that after module installation carriers are not created.'; +$_MODULE['<{dpdpoland}prestashop>configuration_d6576c8f0f67964194302b2fe773b9b9'] = 'Price calculation'; +$_MODULE['<{dpdpoland}prestashop>configuration_42d054e877c92fa2201f38d2159cd490'] = 'Shipping price calculation method:'; +$_MODULE['<{dpdpoland}prestashop>configuration_5cd4346a553c6168b4d296232d24ad65'] = 'Weight measurement units conversation'; +$_MODULE['<{dpdpoland}prestashop>configuration_c31a6a651c1080cb4c1716eadfe856cd'] = 'System default weight units:'; +$_MODULE['<{dpdpoland}prestashop>configuration_10df976caf081bfa86d39f626456e1da'] = 'DPD weight units:'; +$_MODULE['<{dpdpoland}prestashop>configuration_5d984b2060bfae52a2abe2e9f05def92'] = 'Conversation rate:'; +$_MODULE['<{dpdpoland}prestashop>configuration_3d98ce8c59b0f830f296f902efe42ef0'] = 'Conversation rate from system to DPD weight units. If your system uses the same weight units as DPD then leave this field blank.'; +$_MODULE['<{dpdpoland}prestashop>configuration_086688900e2a055c719faebe0bfe0c38'] = 'Dimension measurement units conversation'; +$_MODULE['<{dpdpoland}prestashop>configuration_ac594a3e6f56f10169ab633f27eb0e9f'] = 'System default dimension units:'; +$_MODULE['<{dpdpoland}prestashop>configuration_60f05f3f2847d78f32849479929b7ddd'] = 'DPD dimension units:'; +$_MODULE['<{dpdpoland}prestashop>configuration_21a258f58e4e128f018e82bcbc74e64f'] = 'Conversatoin rate from system to DPD dimension units. If your system uses the same dimension units as DPD then leave this field blank.'; +$_MODULE['<{dpdpoland}prestashop>configuration_4473b41d1a4095be325afd76182eeb4f'] = 'General WS parameters'; +$_MODULE['<{dpdpoland}prestashop>configuration_d56e808757f47edcf82ff3fec2a93704'] = 'Customer company name:'; +$_MODULE['<{dpdpoland}prestashop>configuration_65de6f35022d3cf8490f9a0c5efc2643'] = 'Customer name and surname:'; +$_MODULE['<{dpdpoland}prestashop>configuration_13d7b53519833fc35b46e1f5eb08cead'] = 'Customer tel. No.:'; +$_MODULE['<{dpdpoland}prestashop>configuration_5cd9a6211e54713fa09670b9a06a7820'] = 'Customer FID:'; +$_MODULE['<{dpdpoland}prestashop>configuration_d0424144fb77191573ef83a495abb98f'] = 'Master FID:'; +$_MODULE['<{dpdpoland}prestashop>configuration_6c0729f778568e67fcc9cc9297240283'] = 'Web Services URL'; +$_MODULE['<{dpdpoland}prestashop>configuration_2ca9c180d73e6abdfa19c2d207e5ea0e'] = 'Web Services URL:'; +$_MODULE['<{dpdpoland}prestashop>configuration_5ec828cf7c89f7cb7735abdf8629b844'] = 'Standard URL: http://egproduction.dpd.com/IT4EMWebServices/eshop/'; +$_MODULE['<{dpdpoland}prestashop>country_list_193cfc9be3b995831c6af2fea6650e60'] = 'Page'; +$_MODULE['<{dpdpoland}prestashop>country_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Display'; +$_MODULE['<{dpdpoland}prestashop>country_list_dd8921b41e0279a02c6a26a509241700'] = 'result(s)'; +$_MODULE['<{dpdpoland}prestashop>country_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filter'; +$_MODULE['<{dpdpoland}prestashop>country_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset'; +$_MODULE['<{dpdpoland}prestashop>country_list_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>country_list_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{dpdpoland}prestashop>country_list_ad68f9bafd9bf2dcf3865dac55662fd5'] = 'ISO code'; +$_MODULE['<{dpdpoland}prestashop>country_list_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Enabled'; +$_MODULE['<{dpdpoland}prestashop>country_list_93cba07454f06a4a960172bbd6e2a435'] = 'Yes'; +$_MODULE['<{dpdpoland}prestashop>country_list_bafd7322c6e97d25b6299b5d6fe8920b'] = 'No'; +$_MODULE['<{dpdpoland}prestashop>country_list_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disabled'; +$_MODULE['<{dpdpoland}prestashop>country_list_e1ba5c602cbc3752cca2f0f80ee0117f'] = 'No countries'; +$_MODULE['<{dpdpoland}prestashop>country_list_729a51874fe901b092899e9e8b31c97a'] = 'Are you sure?'; +$_MODULE['<{dpdpoland}prestashop>country_list_ab7fd6e250b64a46027a996088fdff74'] = 'Disable selection'; +$_MODULE['<{dpdpoland}prestashop>country_list_ede4759c9afae620fd586628789fa304'] = 'Enable selection'; +$_MODULE['<{dpdpoland}prestashop>csv_f9b167f250a964c308cfe8575dab99de'] = 'Settings |'; +$_MODULE['<{dpdpoland}prestashop>csv_88a2abe73767716fd72aed8725591da5'] = 'Price rules import'; +$_MODULE['<{dpdpoland}prestashop>csv_bebd96a4a11b7c01ff97a513a821c574'] = 'Upload CSV:'; +$_MODULE['<{dpdpoland}prestashop>csv_91412465ea9169dfd901dd5e7c96dd99'] = 'Upload'; +$_MODULE['<{dpdpoland}prestashop>csv_4b56bed0c2ecdfb749ae7dfa7349fd86'] = 'Download CSV:'; +$_MODULE['<{dpdpoland}prestashop>csv_801ab24683a4a8c433c6eb40c48bcd9d'] = 'Download'; +$_MODULE['<{dpdpoland}prestashop>csv_881110e35ba1f9ba37aef045e655c1ed'] = 'Preview imported prices:'; +$_MODULE['<{dpdpoland}prestashop>csv_78945de8de090e90045d299651a68a9b'] = 'Available'; +$_MODULE['<{dpdpoland}prestashop>csv_b6b0216b599f49e6af80a5b55a909734'] = 'carriers'; +$_MODULE['<{dpdpoland}prestashop>csv_78eef451236c53b445e7ba6d5b902f8c'] = '(shipping methods) and their ID\'s:'; +$_MODULE['<{dpdpoland}prestashop>csv_fe2002b422737cfc0766df87109c750a'] = '* DPD domestic shipment - Standard with COD:'; +$_MODULE['<{dpdpoland}prestashop>csv_0dcd5647184d1731b71bc2b4b62f18c7'] = '* DPD international shipment (DPD Classic):'; +$_MODULE['<{dpdpoland}prestashop>csv_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{dpdpoland}prestashop>csv_3a0de12ea59c2c247ab7837d15ade991'] = '- this column should contain the full name of the country (the letters are not case sensitive, or as an abbreviation, e.g. PL, DE, GB.'; +$_MODULE['<{dpdpoland}prestashop>csv_8bcdc441379cbf584638b0589a3f9adb'] = 'Postcode'; +$_MODULE['<{dpdpoland}prestashop>csv_4bcb934420a471b412c662631b9fed5e'] = '- this column includes the post code - the application should accept the domestic post codes in the format of (00-000 or 00000) and international postcodes in the format of numbers + letters up to 7 characters, e.g. inor in Ireland 1.'; +$_MODULE['<{dpdpoland}prestashop>csv_4b08bbe48e297bff8c60c10f17cc4856'] = 'Parcel weight from'; +$_MODULE['<{dpdpoland}prestashop>csv_654242ec1434474a9f528677139a5386'] = '- this column contains the parcel weight which is the lower limit of the weight range for the specified price.'; +$_MODULE['<{dpdpoland}prestashop>csv_4b9664bced247a7e3d5820398dbe02a9'] = 'Parcel weight to'; +$_MODULE['<{dpdpoland}prestashop>csv_35df0b639b79320c9a3746f4a0585915'] = '- this column contains the parcel weight which is the upper limit of the weight range for the specified price.'; +$_MODULE['<{dpdpoland}prestashop>csv_5c792b7fcda62b33ae8d5805718964b9'] = 'Parcel price'; +$_MODULE['<{dpdpoland}prestashop>csv_308d7003f4ba2d580e461848548ab5ae'] = '- in this column the user enters the price in PLN which will be charged to the client for dispatch of one parcel with the weight within the specified weight range.'; +$_MODULE['<{dpdpoland}prestashop>csv_2e01b86887d023c873d0ebb2811e3bd8'] = 'First page'; +$_MODULE['<{dpdpoland}prestashop>csv_16ded2dc32322d80ce2362a47f4d7ef4'] = 'Previous page'; +$_MODULE['<{dpdpoland}prestashop>csv_374bea6cf8bd1e8fd64570b629cc6562'] = 'Next page'; +$_MODULE['<{dpdpoland}prestashop>csv_339aaf6f96935365023a6e4c95c0ba95'] = 'Last page'; +$_MODULE['<{dpdpoland}prestashop>csv_192faee3a49294fda6d13c0b121a1e4f'] = 'Parcel weight from (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_60ae6f36eeef0bd69b3589cb4197ea29'] = 'Parcel weight to (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_5a3110fd78c7e72bf6f793bbb22f1a27'] = 'Parcel price (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_914419aa32f04011357d3b604a86d7eb'] = 'Carrier'; +$_MODULE['<{dpdpoland}prestashop>csv_cc22f9c1c006612224c8f14fcb8618a9'] = 'COD cost (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_f564528cd4716fd14397b32ca0c345bd'] = 'No prices'; +$_MODULE['<{dpdpoland}prestashop>csv_58ed7fc51269deb0030cc40b55e47fb3'] = 'Delete all prices'; +$_MODULE['<{dpdpoland}prestashop>errors_2169b4627df97333ed94d1e30a9b8148'] = '%d errors'; +$_MODULE['<{dpdpoland}prestashop>global_variables_099eb94b23ca0630da8a84205da91ad6'] = 'No COD modules found'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_193cfc9be3b995831c6af2fea6650e60'] = 'Page'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Display'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_dd8921b41e0279a02c6a26a509241700'] = 'result(s)'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filter'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_7b26b01c4e5deea6764e23f57f859a31'] = 'Manifest Number'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_e7c5549bbf8d3f401303b4440534501a'] = 'Number of Parcels'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_ad70456116fb04deb6ee65334cf02bd1'] = 'Number of Orders'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_bea2be7035c3c22f3081d02d160f676c'] = 'Date of printout'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_5da618e8e4b89c66fe86e32cdafde142'] = 'From'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_e12167aa0a7698e6ebc92b4ce3909b53'] = 'To'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_862e7e2976be83770203c5a8197c8eea'] = 'Print manifest'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_d60f54ec9bb09f0d8a16dd7a23c79eef'] = 'There are no manifests yet'; +$_MODULE['<{dpdpoland}prestashop>navigation_973ddc69a5ff591471c0376488db8579'] = 'Arrange Pickup'; +$_MODULE['<{dpdpoland}prestashop>navigation_1959f2f4256262bfcfccb049920df476'] = 'Packages list'; +$_MODULE['<{dpdpoland}prestashop>navigation_7be24e7f2e42a87f6eed6461ee6019c3'] = 'Manifest list'; +$_MODULE['<{dpdpoland}prestashop>navigation_defa603474fa0b26abf74e04cf3f37dc'] = 'Parcels history'; +$_MODULE['<{dpdpoland}prestashop>navigation_9e4af51bbda475a4c3f1be6d0d8ca79b'] = 'Shipment countries'; +$_MODULE['<{dpdpoland}prestashop>navigation_c02d804fa902ea3b9cf1372e91c6c07d'] = 'CSV prices import'; +$_MODULE['<{dpdpoland}prestashop>navigation_f4f70727dc34561dfde1a3c529b6205c'] = 'Settings'; +$_MODULE['<{dpdpoland}prestashop>navigation_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Help'; +$_MODULE['<{dpdpoland}prestashop>package_list_193cfc9be3b995831c6af2fea6650e60'] = 'Page'; +$_MODULE['<{dpdpoland}prestashop>package_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Display'; +$_MODULE['<{dpdpoland}prestashop>package_list_dd8921b41e0279a02c6a26a509241700'] = 'result(s)'; +$_MODULE['<{dpdpoland}prestashop>package_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filter'; +$_MODULE['<{dpdpoland}prestashop>package_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset'; +$_MODULE['<{dpdpoland}prestashop>package_list_c004ddb608f079bc80ce406f6d27724c'] = 'Printout date'; +$_MODULE['<{dpdpoland}prestashop>package_list_4049d979b8e6b7d78194e96c3208a5a5'] = 'Order number'; +$_MODULE['<{dpdpoland}prestashop>package_list_e7c5549bbf8d3f401303b4440534501a'] = 'Number of Parcels'; +$_MODULE['<{dpdpoland}prestashop>package_list_a9d093d11bc6e98b0c8e586ffa545c85'] = 'Receiver'; +$_MODULE['<{dpdpoland}prestashop>package_list_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{dpdpoland}prestashop>package_list_572ed696f21038e6cc6c86bb272a3222'] = 'Postal code'; +$_MODULE['<{dpdpoland}prestashop>package_list_57d056ed0984166336b7879c2af3657f'] = 'City'; +$_MODULE['<{dpdpoland}prestashop>package_list_dd7bf230fde8d4836917806aff6a6b27'] = 'Address'; +$_MODULE['<{dpdpoland}prestashop>package_list_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{dpdpoland}prestashop>package_list_5da618e8e4b89c66fe86e32cdafde142'] = 'From'; +$_MODULE['<{dpdpoland}prestashop>package_list_e12167aa0a7698e6ebc92b4ce3909b53'] = 'To'; +$_MODULE['<{dpdpoland}prestashop>package_list_4351cfebe4b61d8aa5efa1d020710005'] = 'View'; +$_MODULE['<{dpdpoland}prestashop>package_list_cef29e3a250ad945dced5a825c58278e'] = 'No packages'; +$_MODULE['<{dpdpoland}prestashop>package_list_f217fbfafa30da1967ecd3da1f9a45df'] = 'Print selected manifest(s)?'; +$_MODULE['<{dpdpoland}prestashop>package_list_5ad8adf8bcb1c359b87c0f3fb4a87bb7'] = 'Manifest printout'; +$_MODULE['<{dpdpoland}prestashop>package_list_3b2d2f8475efad88c145a284b814010a'] = 'Label duplicate printout'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_193cfc9be3b995831c6af2fea6650e60'] = 'Page'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Display'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_dd8921b41e0279a02c6a26a509241700'] = 'result(s)'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filter'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_d79cf3f429596f77db95c65074663a54'] = 'Order ID'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_c5513c96dedd85c20b7c8ce4d89c1a46'] = 'Parcel Number'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_a9d093d11bc6e98b0c8e586ffa545c85'] = 'Receiver'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_59716c97497eb9694541f7c3d37b1a4d'] = 'Country'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_572ed696f21038e6cc6c86bb272a3222'] = 'Postal code'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_57d056ed0984166336b7879c2af3657f'] = 'City'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_dd7bf230fde8d4836917806aff6a6b27'] = 'Address'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_3513b3d0b07729be9d4649b113728a69'] = 'Shipment date'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_06df33001c1d7187fdd81ea1f5b277aa'] = 'Actions'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_5da618e8e4b89c66fe86e32cdafde142'] = 'From'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_e12167aa0a7698e6ebc92b4ce3909b53'] = 'To'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_4351cfebe4b61d8aa5efa1d020710005'] = 'View'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_766072dc9c8227c158885c628ef15f37'] = 'No parcels history'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_94a07a8c84a4738d80d30bdb4f3c5f45'] = 'Client number'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_0d380be17f8c1b5508dddc0ff5bf8dc6'] = 'Client name'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_7a1920d61156abc05a60135aefe8bc67'] = 'Default'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_f2a6c498fb90ee345d997f888fce3b18'] = 'Delete'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_892a8778e8ee9a7fafc3e7b5c18e4507'] = 'Delete selected client numbers?'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_9e8e981726883fc8124a14c27877db87'] = 'No numbers'; +$_MODULE['<{dpdpoland}prestashop>warnings_b4372757bcd49be89af758f485f8666f'] = '%d warnings'; +$_MODULE['<{dpdpoland}prestashop>adminorder_aad9c2452ad2af0a0731c349e4308f1f'] = 'All products should be assigned to a particular parcel!'; +$_MODULE['<{dpdpoland}prestashop>adminorder_459d31643ac6afd02cb05e37b4cd62c2'] = 'DPD Polska sp. z o.o. shipping'; +$_MODULE['<{dpdpoland}prestashop>adminorder_1a721faf2df53972bfd0831c64b6146d'] = 'collapse'; +$_MODULE['<{dpdpoland}prestashop>adminorder_31407b18c5a9dd810565caedda2d0e42'] = 'expand'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d0949e93073cf252d5687ee5714e98fe'] = 'Module is in DEBUG mode'; +$_MODULE['<{dpdpoland}prestashop>adminorder_2e780f41b60cc7adce7ec82c077b1328'] = 'View debug file'; +$_MODULE['<{dpdpoland}prestashop>adminorder_092052146ff023c4bd1f904846dfc00c'] = 'Shipment mode:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD domestic shipment - Standard'; +$_MODULE['<{dpdpoland}prestashop>adminorder_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD domestic shipment - Standard with COD'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d2069e632908fea7573dca46cc582f17'] = 'DPD international shipment (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c171a57242868e49d3608da466642580'] = 'DPD client number (Payer):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c66d035abc5a2df1dded3f17486ed89c'] = 'Sender:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c3e885b15c648365e50fc2126d698f7e'] = 'Sender address can be changed in module settings page.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_3841356b3344dcaf14dbccbe6e2b6fae'] = 'Recipient:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_5e69f9d5bc6e6f0d29abb4990c21595d'] = 'Recipient address:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_eb6a633d6af6b5e6819f4ed4884c9bb3'] = 'COD:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_72d691a9e17cc6098782639bf0538184'] = 'Enter the amount of COD'; +$_MODULE['<{dpdpoland}prestashop>adminorder_fd9d62700b7f3063c3e08b6266e5bf43'] = 'Valuable parcel:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_3821d89292f0543e98ac2c7cd0779e43'] = 'Leave blank if service is not needed'; +$_MODULE['<{dpdpoland}prestashop>adminorder_1e3578cde9a2a7d29fd8fe188dde1a20'] = 'Additional shipment information:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_83fa39a28a4d159061c408fbd6a249e7'] = 'Order ID:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_129142cc236a68ed5288614ce1f911fb'] = 'Reference number 1'; +$_MODULE['<{dpdpoland}prestashop>adminorder_db2d9ca9b008f4cdb2c5902adaa84fdc'] = 'Invoice number:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_4ab7be371a4f201c7a97a876ed0d59b3'] = 'Reference number 2'; +$_MODULE['<{dpdpoland}prestashop>adminorder_9cbf474d9a3d5deae6e47a2cede2f536'] = 'Group the products in your shipment into parcels'; +$_MODULE['<{dpdpoland}prestashop>adminorder_ca92c5cc1d3c1d7d0a5336511faf61ec'] = 'This module lets you organize your products into parcels using the table below. Select parcel number.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>adminorder_deb10517653c255364175796ace3553f'] = 'Product'; +$_MODULE['<{dpdpoland}prestashop>adminorder_8c489d0946f66d17d73f26366a4bf620'] = 'Weight'; +$_MODULE['<{dpdpoland}prestashop>adminorder_f38e9081d395bb971dd1bf81f65f22e6'] = 'Parcel'; +$_MODULE['<{dpdpoland}prestashop>adminorder_11a738dd0c48f1401a059bca54bc119c'] = 'Add product'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d31e97ad5d951fd5703d588011ccd63a'] = 'Begin typing the first letters of the product name, then select the product from the drop-down list.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_0b55aebbd8b86751f6c70c6cf91094b1'] = 'Manage parcels'; +$_MODULE['<{dpdpoland}prestashop>adminorder_adfb1922c661200f46a4a5fee00720fc'] = 'Here you can change parcel parameters, create new parcels'; +$_MODULE['<{dpdpoland}prestashop>adminorder_74d206f6125b574f5156627cac72de0d'] = 'Content of parcel'; +$_MODULE['<{dpdpoland}prestashop>adminorder_91721604210524b7051d99c4c8478715'] = 'Weight (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_20fbaa7c1bf32aa91ed46514737a0687'] = 'Height (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d39e1498c3bd289bb7ed63f790adfb0d'] = 'Length (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_3d0ed3e9145be53d081d10fe37c93290'] = 'Width (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d4250cdd2996e67db50a1fa27ca4379b'] = 'Dimension weight'; +$_MODULE['<{dpdpoland}prestashop>adminorder_89dcc0ff4130fb8e1d64c5ee3c4bb4fc'] = 'When adding new parcel: Additional fee will be charged by DPD PL depending on your DPD PL contract. Price for shipment that was shown to your customer always includes only one parcel per order.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_af0924a4a04778667c6e5afb3024f8da'] = 'Add parcel'; +$_MODULE['<{dpdpoland}prestashop>adminorder_119e5a3da4a4debfbcb786d189d2605d'] = 'It will not be possible to edit shipment after printintig labels.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_5359e0d1b7e3d42fded6e0a420dbaffc'] = 'Save and print labels'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c879cb3351593188d1178647eb2032fe'] = 'Print labels'; +$_MODULE['<{dpdpoland}prestashop>adminorder_f9134937ba5da4d91eead723aee72481'] = 'Current status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_004bf6c9a40003140292e97330236c53'] = 'Action'; +$_MODULE['<{dpdpoland}prestashop>adminorder_ec53a8c4f07baed5d8825072c89799be'] = 'Status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_611528c50da4256e1df65bc386518d70'] = 'Labels printed'; +$_MODULE['<{dpdpoland}prestashop>adminorder_93cba07454f06a4a960172bbd6e2a435'] = 'Yes'; +$_MODULE['<{dpdpoland}prestashop>adminorder_bafd7322c6e97d25b6299b5d6fe8920b'] = 'No'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c91d3279341507c91f2de83a3b174638'] = 'Manifest printed'; +$_MODULE['<{dpdpoland}prestashop>adminorder_b9ef6fb0879ec82c0446bda7233f01a2'] = 'Module is not configured yet. Please check required settings'; +$_MODULE['<{dpdpoland}prestashop>adminorder_6c92285fa6d3e827b198d120ea3ac674'] = 'here'; diff --git a/modules/dpdpoland/index.php b/modules/dpdpoland/index.php new file mode 100644 index 00000000..e5e655f9 --- /dev/null +++ b/modules/dpdpoland/index.php @@ -0,0 +1,29 @@ +D~^4ksN&~-!^Yx zblF|FQ_bP_m2KbD*QV~yUCa@1E^d+;J2SIfF*Cc2p}Y{Q9-DBd3NNRjB7-#mdnj4a literal 0 HcmV?d00001 diff --git a/modules/dpdpoland/logo.png b/modules/dpdpoland/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..983df62ac9cea065420779d50bce0aadb50ab0e6 GIT binary patch literal 3413 zcmV-b4XW~qP)R7bkU|8@HG&e{tosHh_-E+LR;BCa#e)dVMMMq{{Y)T`GuE)k5VaYIqj z2`UpcE)dj-bK?ZJ7|p0jd{hiECdlT-76U@lbkoqR-F=pt4}eQRg9cpgV|_c_b*kQ9 zzgyK?)j%t?vgm|+o++hl@xY;rB z09;{-ylmO_c0{F^XSrYg|v=Bb!D^Q z8pCpssGK2trRPnyjW$x^sr^R3Wnn?X_nfg5QcrE`Lz=^4pxYE)7i9i%+^cfmmqDVX zVj6$TID$7C>*0QnflyEgV0AjMoxM*o3fV_ap~Eh_&K_F?0H)dNq2Iowbs(+rN8mbj zRNXI{U*uw%w(eE2vg&{Mn}$%n$cX#<-J>=U0Kj_cAn|E?K%#fwr&~8CNfzK&0RZJ6 zeFnF=p)CVhvF8|ECcn|(cTT2vqx;)0X1pO7Eunm2i3U_`VYnt>2?I$RorU$(d?tU% z|Cl~*#d$(VbwkQ=ojK;wAZyR3Ksg}j_H*gdt--eBjB$d|JeJEV)KiZn1719!jhuDnw!CM5f^yJH&4aY1T!SLW|4zO;a^{ta-G|095QDI~{bMFnpJK)ZqMPo2zBb?r!#!>z~%1zW9<@ zT?| zDmmD;+H;_E4Meednl#OchJNc}06@viwcbLJ`7JIxe<_!hucv|ofaK}WAj3k|)u%%0 z*CC3ysQ0(|M^q62l+0QOkB^r&4OyF<4rSjL8Vy&u_c+TNOuZbL*^6t>{4|y;ECzXk zfrml_+tw4xfkBC~UR|PDFI~FJlu=xx?2wcSW&al&YtoUO&q_SC8pc^wLI^?G#yxOf zG#QjqVp$w3B?`r0+YgzWZAod}h002h$DKmdDk%E}W-A5-MsU|}e(AAq4NnN6WgGXx zebFRPN{LumqZf>&7MX7czTwS#7MSIm_dAKD*41J~RX5w^Ywsxn{Zj$J61kIVH@xQ% ze=a=j7%}jb%J?JWZOQ3>v!~}eL*QFks}x`)koEMfQ4Q&{Qax($$BfpsM*cw;YG&(P z$9>Tx*fVpx7mr-IdD{bd~8pK`w`CHT6jk|S!e?Nv0QZfes z)5)6xr~Q*TA^JzwOg$VAKBKL~8!;1=oCx2hMeEaB+D81dca{mb^ zdiN^zNLV>ZyJg|a>X3dv5xG=oNre&_E2>@(&eTM`8|1NP)!V8eeJs|G?^F#6DP=5C zaiaWzDYfRR>OQbX>{R14Ih?2q}jUfIyJ?b|`Tk_xeiB%IUlD)mD_Q z+yQOmOt{V(1IwyygxW=!ft${S4}kla;qz{5Z`ph_T^%TROj!kcV*)uD@D@wG<|Gd(^&=D$2v`V~a@3x=7-CCGJ5{;o*gE65rGb=E z<=s8qW{ipVzL3yY9Xj-HY-jI0qEK)k_wyYJq0~CUG;c$YXtTK*CoT`D*mY>F?b4OA zH7Aoo1WWlNR~^_#kAHQ)kNs*ExEsIBlm+;{X&m>#Hp|M76E%^ut^vT!j>AC+u>x3C zvHz?8tK5BPK9^H4QZSc$QJei&0u$=U$Qj3|}{^O*PdJ4CVmATpseIcAv~+nSu~N5XAq-kdIufe-Ie)S>3N+9vnQJH_| zul2iER5uA(@#zT=LU@;VLcUPH`NuiZF72}zXSHzua>dgD2LOzdT9kHapXWT`wWTgo zM;s%B@YZby8dnBfCWOGea5EJBUUUH1ZNHRx))EyTZohnExL9iS7OS7+33F3$6hx(h zMB`E<5A1r21e5d&CO?SSjMZ#P~3(0#Z7_RH5H59|hc@19uzW?0sLGQ9Sy z3$wV~TZ06n#fkFV6OLCRAd!OgaIa!Jd!JXm)_137`ShbW77GBVO}Y$a|G)=FS9xGJ z0D$$ABLD!+k}1c%&c;nt4eJ{r_3v~}qSM@CDv#YX-Q6Jb?|4D=TJSROq)#SkmQOzl z0M_`!0MH2VfhojwO5L5EvJdxx5MuH8WYu=Jh)L7sfn8TfecN9rayc6A+We+)1OUT` z0AN|Mqkd*0f{r2_dEe-;v-;%i%ip&HKLno7Fn^ zg%eSIA_?O{`om?y@EZWu7^g;_cBEW?ODHLu!WWjfHC$Ayum!W?%;)KdPs%=hYJ7zmdG96j*Q&le35C1{nE9LB4@i# zt(1Z&ULAsv26^~uFYZnrm#W)FwNZn{YMdxuO`8p z%E0Q~8??%pX0G!WtyL53X;}*$*K$|_LIH*}6+D`rTBH<|$b0%h)~m~AB9p~?>{)fA z!8Cb;32a;alPSE^oJ@vlSlxwQ`;{DL>(+k-^7)1^M|#dkuAl$}(%+bdf`Wt8yB(z6 zJ0F$)!F!9#lo6K|eR^5z#{Ukg-+8gO#WK4!?l4^cw=Tk!t&P)h`NltSIr%ZRq_lRT zy|zgcrVzl$`0& zBO{C4Sus%nB4j;$A$!4ZrNmPc@4jfFf%Woem9k}vLslO@5B2Z?x1TFM`!{1ho6?!f z%3oto%MRtuCP>`fp&S_WwXBzKxL975q2IdbwzF0p{02^=hddkmg7VmZ-fNnavc+Q~ r2HpyuyuvWzy+;2Fv8+#MHCg@xPtJ)IE?afv00000NkvXXu0mjfV4#!f literal 0 HcmV?d00001 diff --git a/modules/dpdpoland/logo.webp b/modules/dpdpoland/logo.webp new file mode 100644 index 0000000000000000000000000000000000000000..0112f97054aec11116a166af09853f6865b87f36 GIT binary patch literal 1738 zcmV;*1~vIoNk&G(1^@t8MM6+kP&il$0000G0000u001}u06|PpNKXO)01=P`+u9*X z?~llesA${P*tTukwr$(CZQHhOv~A2xev7R9GxM+AtRi9pV4zfWYE=nVXs&dTh%Qz# zi)PNZk1QWAWEROBwn8R#c}0X-6c#o-hWK+vgh@j9cKSxzzjgOF&bQGC()WBLUt=8V z?j!vVG<49t&St3W7gNuqui2rB;x1A<+TLPeoLahn;poN?=gw| zvLKIbs~ZB{Xk*I*_zsT~Bz250v`Qro2yv*C3A~aA05DVCw}yReVPXK7hh)iV{f*)P zz-;@a8j?BMmH|M)%j=y~c2Lp+4=7!B{MAi9-~y%7>?GR3L-ef`gR=PJzq-h;i$lqp zevQuQ9roT~rpk(=ul2Q{TPVr{|U>ctx^X05I0RZzIpGZ0py>90LWxHv(Oh1?WB!1n99`y2tvf=Sm($@fz_tiE5fX#W~h$0u427ql=K=ix=fE`vryR2u& ze-WF6+oU43$`ed(Cs~52&&R(4$zR6XfHPu4q%e`&@&A9p5$p+xR}tD+t}oFG=P(1mF-)@{&pt476={h$C)o-?ecZhnm>JVBfyqR7g&e zN%h-cUl`8{&HGETLRBVOQb>Z34pom6|M4155Z0~TPmY*&ZV;LIPLVB5^<@y8h3zAv zOGO#1P^vn$sssZ809H^qAWQ@R0I(JSodGI20672w030Q-0<@2P6~7($fzUbBeZc1D zr*;EB$!>uCM*W%L0RDCUAFSKZ1IqjMkKo7lTlSOL+cdAQjy&Vw5g(AJ^e*vluhcjAcl>|qU$7r2AG&|F^0V|O{2y>{Ri1GB_E`y+`$rX}9vRN`%6#R#bq>KlyMJXwptBvzEg{AE)M@ zn??Wt{{9uGWF59=l)CC7oeHY1fZb051Z}zo;&@IZtQ}!{Ut2HziUE0T@?I-@{C-T% zknrT3hbaRYT+;vV4?aHkK5ftQ>70MWH*$gVJ;dHg?6B7dM}&)`yOR&hfr8^c&GeVW z<8ZMixv?ODuWUZm8hhcaizU5J{1@u4;Zs{$MH{%m{C_;p9r8td+@;U%QxE`1y9nbR z1NTmXgaN0bem5Ig)SSma_jc%NA~CoYAhrK~&w4a=$5%N#JcaPB=I;na=YONCI~mc^ zLkcWk{|x7{9KnLvq14@974pUL_-394O+g^IH~K!n14r!^%w)jFx}q~6AW16b)(AL7 znoMmNXW&0x{9^Q7wRZY0@p*!MD2nr$Tiq?AUwOWars)nNfH?aB=hC6(EC2hVkK?~R zQ>Z-WPWi~Cc5Gq)gmr!9QB@KruRoi>q^{NB1mjN0<<=lMkZn+xAaToQCc2GJL%L`un+hYO9NXZXHr4ZtMbQ&`ukvG; z#ZaeTGoSx=6}8UiusDBLx~|wu?x#t%A^19_TuT)?nqq8YHL|(HEdeO_*q?qXd)}^& z+m}+*69cU$3oq#J;e4@9zrbdOZl%pdw&77)Nj}+5MCbzx!e%m{2&!GGd1uYyCDjBh zj$G;|Q?1f(K0uq~O2IU9DkJof(To4<`cU1@7D{j2z#>fG%qoiT5EhFF(T_2ieft^| zkZcMw^1m$cfg8?sMkwfyUa&o}p7TEw->tA1ro+5)+P9EM1EhHEo3rSD+fMYW-4^Vm zvKWi$fI6RQK?S0e>?yMJ3Rsngt~DLQm|J;jPZ}UwjqSmiOya||BwpEs*>af2muZWf z0hxBOoHLD^_KSU8XI4J4u$?pvU;bHv@&9X!|M>-f{yQW8{CX|E4}6UDg^E7g$B*y( zzl`)?8K2;1jtQF!w0Zt9jpc{w5N_?C=LZRY=;3zq2A;q(>oa!p9bm0V^<1?>p2JY3 zre4*})wAx%5uNDI0dpdpoland.lang_49b49e618660fd863b6840d99fd65f55'] = 'Błąd danych w usługach dodatkowych'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_cca50fb5d420a823867d1f11210d189f'] = 'Maksymalna waga paczki to 31,5 kg'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_54d1bf92e047677609c917413e52e25f'] = 'Usługa \'DOX\' dostępna tylko dla przesyłek jednopaczkowych'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_4bbb11684f6d2c79280fc54597124e31'] = 'Dozwolony przedział godzin dla usługi \'DPD na godzinę\' to 10:30-16:00'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_cba4ca81e8b0b7daca578b49543d1729'] = 'Usług \"Przesyłka wartościowa\' dostępna dla wartości przesyłki do 500000 PLN'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_f959bb1421c5fb86a58f9895e9239bb8'] = 'Kwota usługi \'COD\' powinna zawierać się w przedziale 0.01 - 12 000 PLN'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_b4a3cbda59e3cf2001f24090ba30fced'] = 'Waluta usługi \'COD\' musi przyjmować wartość PLN'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_87b2912715fb0c2e5f6732b54bc9a6c2'] = 'Maksymalna dopuszczalna waga paczki to 700 kg'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_ab69e7e5f9138455f90688cce314c4b3'] = 'Usługa \'Paleta\' jest dozwolona tylko dla krajów: LT,LV oraz EE'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_191a66dbec95c95332608c6bd40d558e'] = 'Usługa \'Odprawa celna\' jest niedozwolona dla wybranego kraju doręczenia'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_4728a7896087c3c20515f8f589f5dbce'] = 'Usługa \'Wniesienie\' nie jest dostępna dla wybranego numeru klienta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_eb76c8b034b8439c7f989311b89ff53f'] = 'Usługa \'COD\' jest dowzwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_008b82a71f35d59bfa6d5942b1f04e58'] = 'Usługa \'Dokumenty zwrotne\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_81d62240c445a8fa9d1c88e61767c009'] = 'Usługa \'Przesyłka zwrotna\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_be71c568193020cb0943bdd13ddd625f'] = 'Usługa \'Wniesienie\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_9522a5e07cfff4d715520a91fb718fdc'] = 'Usługa \'Do rąk własnych\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_bd1527a12c8453b9941cfff8fc2b7fbc'] = 'Usługa \'Adres prywatny\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_8a143f8295a782168d2a57ccd36d44d6'] = 'Usługa \'DOX\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_2f06d8fe56c1ee0715ad8f56fad39aca'] = 'Usługa \'Odbiór własny\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_3f4f11243e77789ddfa1e8feb00f03ab'] = 'Usługa \'Gwarant 9:30\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_ae1b34f8820c51e7ff04294f7303197d'] = 'Usługa \'Gwarant 12:00\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_ea87c6147afcaea0e94a927a42618e37'] = 'Usługa \'DPD na godzinę\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_7c14120ec48617fdf875b0d5aa4e5433'] = 'Usługa \'Gwarant Sobota\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_c2f320fbd9d90ad90e1fb1ab586cdf10'] = 'Usługa \'Gwarant B2C\' jest dozwolona tylko dla przesyłki krajowej'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_26a8017fcc5e056c411fcf74508fb806'] = 'Usługa \'Gwarant 9:30\' nie jest dozwolona dla wybranego kodu pocztowego odbiorcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_66ae7361ff60bb38853795f71853345f'] = 'Usługa \'Gwarant 12:00\' nie jest dozwolona dla wybranego kodu pocztowego odbiorcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_53b0c601d48a682e2fa80d55951b999c'] = 'Usługa \'Gwarant międzynarodowy\' nie jest dozwolona dla wybranego kodu pocztowego odbiorcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_377f8a29d21fd2a0aed9a6375b5e67b8'] = 'Usługa \'Paleta\' nie jest dozwolona dla wybranego kodu pocztowego odbiorcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_ab2bce8bdf90fbc76f0dfc806c8eb51b'] = 'Usługa \'Wniesienie\' nie jest dozwolona dla wybranego kodu pocztowego odbiorcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_c8c49ab25340daa0f69f891448e6b2a9'] = 'Usługa \'B2C\' nie jest dostępna dla wybranego numeru klienta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_be4a7918fa1ff670a0453c00df6ca2ab'] = 'Niepoprawny przedział czasowy usługi \'B2C\' dla podanego kodu pocztowego odbiorcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_470a22e0b5048863ed93f0f81176a542'] = 'Niepoprawny typ płatności'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_b71f928e3549655f6bd720edefa0365e'] = 'Usługa \'Wniesienie\' jest dostępna tylko dla przesyłek jednopaczkowych'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_7ce897885d6b8dac4c9c17e929ea3213'] = 'Usługa \'Wniesienie\' jest dostępna dla paczek o wadze rzeczywistej od 31,5 do 150 kg'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_d58ed95a7237445296fdc5d61ba6bbee'] = 'Maksymalny wymiar jednego boku paczki to 250 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_a0267f9728cc47804bb7e1c6dcbf0459'] = 'Maksymalny wymiar jednego boku paczki to 250 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_358a8d88499a4f43972278e8b35ae7a4'] = 'Maksymalny wymiar jednego boku paczki to 250 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_763aeaea0fb7246f0dd9d07677399e7c'] = 'Maksymalny dopuszczalny wymiary paczki to 180 cm x120 cm x80 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_7ff217464e7139412e28485908e480eb'] = '3 x dł. boku 1 + 2 x dł. boku 2 + wysokość nie mogą przekroczyć 300 cm, wysokość to najdłuższy bok paczki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_a383a81ac19b40859fa42af2ba266703'] = 'Maksymalna dopuszczalna suma wymiarów paczki to 300 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_3d6cd1886d3c54a4ef5094e792cb5ae9'] = 'Maksymalna dopuszczalna objętość paczki to 0,35 cm4'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_45b171646eacb5282235cc3dd5a5d3cb'] = 'Maksymalna długość paczki to 175 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_8e5100c0115c9156d4b0cdee0eae801f'] = 'Maksymalna długość paczki to 175 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_483f94ea535c60b38944531f38d34e22'] = 'Maksymalna długość paczki to 175 cm'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_6b2f00241edb9f69f4ee562e9a88af34'] = 'Nazwa odbiorcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_b87e0ea228e34bb3c5315df3b2a076bc'] = 'Firma odbiorcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_e22d1cf02270a653149c96caaaec2dc9'] = 'Ulica odbiorcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_6af6990d407dcaf6809a606fc3e87f2c'] = 'Miasto odbiorcy przekracza dozwoloną długość(50)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_2b21117ef6c3490960d5cdf7e6daca61'] = 'Email odbiorcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_d81a95283c4e04aac60711596ea13e18'] = 'Telefon odbiorcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_e62d1b816488b0f965c85a09430010c9'] = 'Ulica odbiorcy nie może być pusta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_89435f4a8df91811208ff44787748b02'] = 'Miasto odbiorcy nie może być puste'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_e8fa963974b7218a7b3fc584eb66bb38'] = 'Nazwa i firma odbiorcy nie mogą być puste'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_379b43e149409ee80008eb690194727b'] = 'Nazwa nadawcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_10a77a8f39fd680cd0aa12ef9fb1b646'] = 'Firma nadawcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_4fd721ba1dc1f51ec0eeada54d4d4bbb'] = 'Ulica nadawcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_529158e2146823e5ea333fb37b105a3e'] = 'Miasto nadawcy przekracza dozwoloną długość(50)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_6afd6792e323c1386d71c2cebd5fdb39'] = 'Email nadawcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_8ed64cf5309b5e1dcf2cbf5bcd862e52'] = 'Telefon nadawcy przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_9c0d18b57c2c97ac4b56f999cbc303c5'] = 'Ulica nadawcy nie może być pusta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_3cc009b7f305df4d0849730c9e003036'] = 'Miasto nadawcy nie może być puste'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_0e27d010d6d0c2178cc74d3d7435f0ed'] = 'Nazwa i firma nadawcy nie mogą być puste'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_77ce4902f0011190eba46676da24bf64'] = 'Numer referencyjny 1 przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_daf6a039318797ed5b73ca1a0cae1aa6'] = 'Numer referencyjny 1 przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_d21b219839819a27e13d08f5b7548c7d'] = 'Numer referencyjny 3 przekracza dozwoloną długość(100)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_6ce8c775a5453ab156e38f65540d62a1'] = 'Zawartość paczki przekracza dozwoloną długość(300)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_b59f7499bfb5cb0e051d856296829626'] = 'Dane klienta 1 przekraczają dozwoloną długość(200)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_ba611ff8b2509fa8e9479293d90a83b9'] = 'Dane klienta 2 przekraczają dozwoloną długość(200)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_ff40b2ca6663fa1a32783932c5a25385'] = 'Dane klienta 3 przekraczają dozwoloną długość(200)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_c7ff083de587a3484c2c6f1d5839e1e2'] = 'Błędny kraj nadania'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_91d5e6837e26e57698bd96be32dead13'] = 'Błędny kraj doręczenia'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_3ccdd90dc2282faaef8e674ab9af4e31'] = 'Wymagany format godziny: HH:MM'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_e81c74576c72f3c616f491df898d04b3'] = 'Usługa \'Wniesienie\' jest dostępna dla paczek o wadze gabarytowej poniżej 312 kg'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_1c6d05ade371f0f0e19abd83047f8c31'] = 'Brak Imienia i Nazwiska Odbiorcy dla usługi \'Doręczenie do rąk własnych\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_c7d824e31562f1efa15ddae0803752a7'] = 'Usługa \'Paleta\' dostępna dla paczek o wadze od 31,5 kg do 700 kg'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_7eff903e1a1089f4d69e8b3ef3c6b541'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Przesyłka zwrotna\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_e29ec6b3e2105d1ee7efa40bc6699910'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Wniesienie\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_659d3cf3ddfa40f66c6ae7b60b54661d'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'COD\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_80f40c2208e5d0aeacd158278dc2665a'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Przesyłka wartościowa\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_83bd0c9ceb7857c2e60492dc3fe4c114'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'DOX\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_1bc24c51aeb5b740dbb08b86b5bf518b'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Odprawa celna\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_a7252ed2ae4b4463dd025d273f9b7666'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Do rąk własnych\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_8c4e933b8a7b79c4fca25210c112a083'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Paleta\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_d57c6154852e4a27ddb9ad4f8f998fd5'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Osoba prywatna\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_72e8f1213e72fad527c491f111cf4588'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Dokumenty zwrotne\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_73ec30c06cdf72821d05284f5d44c961'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Odbiór własny\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_f6224c6a99fa10dcc65fe1a62a5b8d9d'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Gwarant 09:30\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_54ff3c240f1052017d753ceb8dfc3173'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Gwarant 12:00\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_2d1be8526517ae49935418da58fe24d3'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'DPD na godzinę\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_455afa8605810eeaf4f50874da8b1453'] = 'Wybrane usługi wykluczają się wzajemnie: Gwarant sobota, Dedykowane doręczenie'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_a6a6ed74275b0398caf6284672fba248'] = 'Usługa \'Dedykowane doręczenie\' wyklucza się z usługą \'Gwarant B2C\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland.lang_347be40984e59b58b8749611bbc963ed'] = 'Wybrane usługi wykluczają się wzajemnie: Dedykowane doręczenie, Opony Krajowe'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_df399b9e6489d7b428fe242b9ffa0614'] = 'DPD Polska Sp. z o.o.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_4388e1bcd27f4369e0ee085dcfd36988'] = 'DPD Polska Moduł Wysyłkowy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_a2df4b0afaf33f1f5aeeac9d4224532b'] = 'Moduł nie jest kompatybilny z aktualną wersją sklepu. Proszę zainstalować moduł w odpowiedniej wersji.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_43afcf518501900c45f1e78208189d48'] = 'Brak biblioteki obsługującej protokół Soap'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_6a7b06d0570845964f64eb62546ce89f'] = 'Brak klasy obsługującej protokół Soap'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_6881bfc8704c70e00cdccd3a889c656e'] = 'Kraj PL i waluta PLN muszą być zainstalowane; Funkcja cURL musi być aktywowana'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b9ef6fb0879ec82c0446bda7233f01a2'] = 'Moduł nie został skonfigurowany poprawnie. Proszę sprawdzić ustawienia'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_2d3e1556af332fb39dbb336b7dbd815c'] = 'Zlecenie zostało przyjęte do realizacji pod numerem: %d'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_df6c55d89e6ab2b9bb40dac719af0ad3'] = 'Zamów kuriera'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_f4f70727dc34561dfde1a3c529b6205c'] = 'Ustawienia'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_8d751864a3f79a19d2e06e2acf4234f2'] = 'Błędny plik CSV.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_e3fb87f38c7ff3e310a8206daa79f82a'] = 'Dane z pliiku CSV zostały zapisane.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_37dc8118fa211f43b2ca2a52a6ee787d'] = 'Dane z pliiku CSV nie mogą być zapisane.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_c02d804fa902ea3b9cf1372e91c6c07d'] = 'Import cenników (CSV)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_17472ee8349195ad503c351f0707635d'] = 'Import cenników (CSV) jest niedostępny, proszę wybrać sklep'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Pomoc'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_7be24e7f2e42a87f6eed6461ee6019c3'] = 'Lista protokołów'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_133b95b4eff09dd92f6fb89365cfc5c9'] = 'Lista protokołów jest niedostępna, proszę wybrać sklep'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_defa603474fa0b26abf74e04cf3f37dc'] = 'Historia wysyłek'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_76eabb488f3d8677aa8456f6cf8e3cd6'] = 'Historia wysyłek jest niedostępna, proszę wybrać sklep'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_9e4af51bbda475a4c3f1be6d0d8ca79b'] = 'Kraje dostępne w wysyłce'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_adf178668a06fd135f315626c64cfcab'] = 'Lista krajów dostępnych w wysyłce jest niedostępna, proszę wybrać sklep'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_a108e14a7baadb5f412289e78e6e8cd4'] = 'Nie można zmienić status kraju'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_dcadd34de7e627ea1da1dfe62b6cf424'] = 'Nie wybrano żadnego kraju'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_27fe4eb3edbaff8f250e2d51f7462681'] = 'Przesyłki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_662903aaf4484465ea3685e7eda39631'] = 'Lista przesyłek jest niedostępna, proszę wybrać sklep'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_d0949e93073cf252d5687ee5714e98fe'] = 'Moduł działa w trybie DEBUG'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_eb25d061f085939ed608cc5ad6f4f67a'] = ', plik:'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_2e780f41b60cc7adce7ec82c077b1328'] = 'Podgląd pliku logów (DEBUG)'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_3c78b35502b2693fefdfc51cba3a53a5'] = 'instrukcja'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_079b435861f0db79b48b0c84b57ae30d'] = 'Wskazany adres doręczenia jest niezgodny z wybraną metodą wysyłki.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_85ace57ddece4c93754023c098761bf8'] = 'Metoda wysyłki DPD Krajowa (DPD Classic) jest dostępna jedynie dla polskich adresów doręczenie.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_ef990ea7a6f088ed46080aa757b69b62'] = 'Metoda wysyłki DPD Międzynarodowa (DPD Classic International) jest dostępna jedynie dla zagranicznych adresów doręczenia.'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_efd822746347b781e416a379324bc8dc'] = 'Nie udało się zapisać adresu klienta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_7d06182c98480873fd25664fb3f7a698'] = 'Adres nadawcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_3084cbce99cb5d19357a6fbbbf7855db'] = 'Nie udało się zapisać adresu nadawcy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_45d4b3afac71a54470a6cbf828e8cb0d'] = 'Niepoprawny identyfikator metody wysyłki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_e52d022f0fb2160ec1cf7b4122ab9589'] = 'Niepoprawny numer przesyłki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_601080dc24bc02a653a5a9e25cc61f79'] = 'Nie znaleziono danych klienta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_561918c3c49ff748f543e28f5c405d3c'] = 'Wystąpił błąd podczas wysyłania wiadomości email do klienta'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_f465ea6c7866853ecc49286449720ac9'] = 'Nie można zmienić metody wysyłki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_2e03576d5d621365f9d2e38bd3d53814'] = 'Nie znaleziono klienta lub metody wysyłki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_1fc78230db5bda0cce0fe26f8308b0e1'] = 'Paczka #%d nie istnieje'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_185f3a44910c149fb3932fe466a67c39'] = 'Brak możliwości przypisania produktu #%s do paczki #%d\''; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_2fe4721acab2b52c4ed95fffbbc5d56e'] = 'Wybrano grupę sklepów, wszystkie zmiany zostaną zapisane dla wszystkich wybranych sklepów'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_437e0167a401ddea924849640e08bfe0'] = 'Wybrano wszystkie sklepy, wszystkie zmiany zostaną zapisane dla wszystkiech sklepów'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_973ddc69a5ff591471c0376488db8579'] = 'Zamów kuriera'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_1959f2f4256262bfcfccb049920df476'] = 'Przesyłki'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b4be93136a337fcef40c9eb87004c9d0'] = 'Brak produktu'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_dc5982c9e79b6dfbd6f2b0bbdaddb972'] = 'Numer Klienta DPD jest wymagany'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_1e00bbef535c75b71d1763a3580a1e5e'] = 'Numer Klienta DPD jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b2a5b30126d6c7beef59e4c719ebcb11'] = 'Nazwa Klienta DPD jest wymagana'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_f99abd737754e44ba1954da710986e94'] = 'Nazwa Klienta DPD jest niepoprawna'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_9b36b4083416f24c568a5db65cefb775'] = 'Numer Klienta DPD już istnieje'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_bb5edb204502b74d1dc141b4c4d5c8ca'] = 'Nie można zapisać numeru/nazwy Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_c8ef9bdc2f02d07dc6079c73c2a63266'] = 'Numer i nazwa Klienta DPD zapisana poprawnie'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_346a047982b951c1884d870bdde83732'] = 'Nie można usunąć numeru i nazwy Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_27ec7e6bbcee87d7bcaee9bdefc45e09'] = 'Nie można usunąć domyślnego numeru i nazwy Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_3bf8fa7e6f2443cc31ed07a933f7f265'] = 'Usunięto numer i nazwę Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_13f44ac5eb4210ca3bd3c8dd2fc36c88'] = 'Zły format daty'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_e98620878a90c95bd9f811422e5ff386'] = 'Data nie może być wcześniejsza niż'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_73c9c95f3bb8bf48925e86ec31bb924a'] = 'Należy wybrać dzień roboczy'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_a7c25a37304f431000c2c19b03df78d7'] = 'Brak dostępnych przedziałów odbioru'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_62adb5ea6578081c584c950b3c68e059'] = 'Niezgodny sposób dostawy z wybraną metodą płatności'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_1977d6b143e6dde9c23d219bf0a90739'] = 'Metoda płatności za pobraniem (COD) niedostępna dla kraju odbiorcy innego niż Polska'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_ada59a21ad5e5c53bd30acaf1f37869d'] = 'Dla odbiorcy w Polsce i metody płatności za pobraniem (COD), proszę wybrać DPD Krajowa za pobraniem (COD) lub Odbiór w punkcie DPD Pickup - Pobranie'; +$_MODULE['<{dpdpoland}prestashop>dpdpoland_b0c92be6cfc2fe4063022537803f74a8'] = 'Dla odbiorcy w Polsce i płatności innej niż za pobraniem (COD), proszę wybrać DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_557ce4d7ebf32761d89025560b39988e'] = 'Data odbioru'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_b01578a8d93f59f03da1295d41224835'] = 'Przedział godzinowy odbioru'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_f4b4439e9f3732ee91a5321a88fca1d0'] = 'Typ wysyłki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_417e0d7ca5c467a90ad6281f8dbdc902'] = 'Zawartość wysyłki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_fa9218f2927bf28f67029569c2c86b58'] = 'Koperty'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_188512a8e454a4459576581f17c4cf24'] = 'Liczba kopert'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_3e9e1484cdd872f48f218fcf0a0ac882'] = 'Paczki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_8c74ac4eaa2b297614fb822143339da2'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_d0af198cb80a8b9fb791ecfe537ae058'] = 'Waga sumaryczna (kg)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_5ad6a9b6909709fda6a6260140a577f2'] = 'Waga najcięższej (kg)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_b566a0262a11710fec1bdefe70a9af75'] = 'Wysokość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_8cd26badce05229f3b4aef08e937e45f'] = 'Długość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_63e5bd6e3ba8c6f7b3673adb344b0acb'] = 'Szerokość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_3f9cff795224f5232cca142b122d6d46'] = 'Palety'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_4e68f204aa87d54877bae0682c91e945'] = 'Liczba Palet'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_13f44ac5eb4210ca3bd3c8dd2fc36c88'] = 'Zły format danych'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_e98620878a90c95bd9f811422e5ff386'] = 'Wybrana data nie może być wcześniejsza niż'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_73c9c95f3bb8bf48925e86ec31bb924a'] = 'Należy wybrać dzień roboczy'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_e9db232320d68ed823146c578c4e57e8'] = 'Należy wybrać przynajmniej jeden rodzaj pakowania'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_ca032b19074848f60a64765cf1a2b902'] = 'Pole \"%s\" jest wymagane'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup.controller_d3351a5a321eff4a2b2dd23f91014a09'] = 'Wartość pola \"%s\" jest nieprawidłowa'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_6295e9fb03aee799ad17c1a7051bce54'] = 'Błąd techniczny - brak możliwości zapisu sposobu dostawy DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_81f6684cb92278192ea83e1e2d52b1a5'] = 'Błąd techniczny - brak możliwości usunięcia sposobu dostawy DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d86de4cac15afc1d6bde5b95679e6bf5'] = 'Błąd techniczny - brak możliwości zapisu sposobu dostawy DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_4095eb6e01f03f08bec8a018d6af4e42'] = 'Błąd techniczny - brak możliwości usunięcia sposobu dostawy DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_e60eef2b54e550e3aa0765a8534bf851'] = 'Błąd techniczny - brak możliwości zapisu sposobu dostawy DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_096d9693810ab908011699bc2683d8b4'] = 'Błąd techniczny - brak możliwości usunięcia sposobu dostawy DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2a691c13904a57bf08a9a97d6a29bb73'] = 'Login jest wymagany'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_50ae1a2cad21b6d7b4b8caa4df0ee128'] = 'Hasło jest wymagane'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_f1bc76917b4b9eefae0a2c2f249eae3e'] = 'Hasło jest niepoprawne'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_516f2bab6ea17ccfb2881d2d7244f2d0'] = 'Domyślny numer klienta musi być ustawiony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_43a51a7515589e5d0da53d6d34d92165'] = 'Nazwa Firmy musi być wypełniona'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_f1010bd631c658108fb79ee8a8e15b48'] = 'Nazwa Firmy jest niepoprawna'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2630937e141eb50884534de42d5e5ee2'] = 'Imię i Nazwisko musi być wypełnione'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2f1535ecfb146c0960eb31cfbcb51e3d'] = 'Imię i nazwisko jest niepoprawne. Proszę używać jedynie liter i rozdzielić imię i nazwisko spacją.'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_aa8d12747028e054f46691ff7356dfcd'] = 'Adres musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_024d391fbc28c4feae076f242b5e9663'] = 'Adres jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_7b83329279ee90c78179e9bca6e71e36'] = 'Kod pocztowy musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_a3d30200506ef2f8f64f9da626fab198'] = 'Kod pocztowy jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d1935ae9107bc14513878b353a40ad66'] = 'Miejscowość musi być wypełniona'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_caff49a1a94d0a314aeb172fefe2c6b5'] = 'Miejscowość jest niepoprawna'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_2e33dfccd5912a2b071d30460bd072dd'] = 'Pole Email musi być wypełnione'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_a1d11f0c167629d356bc2cbdbbf9950f'] = 'Pole Email jest niepoprawne'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_b9f7e2d6505c78b639bbf411b1fdf53d'] = 'Telefon musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_e3d6fd38c0970a247a2efe6135189b26'] = 'Telefon jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_ab86bd3c2acbfe84e03c9f25ddfec749'] = 'Należy zaznaczyć przynajmniej jedną metodę płatności COD'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_352dc479bd09930c3741d4d2b08f52ad'] = 'Przelicznik wagi nie może być pusty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_6d2fcce4872f354734a5ab22522bbc22'] = 'Przelicznik wagi jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_02cc06808d47444a9b6070a70223937d'] = 'Przelicznik wymiarów nie może być pusty'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d6069dd010a2c50fbbd7b1e0c05def48'] = 'Przelicznik wymiarów jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d8731cfb7b2fcc4d4a9a6d93a15b340f'] = 'Nazwa Firmy Zleceniodawcy musi być wypełniona'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_10a5edb2f28bbeadcbe2ceb7452dd21b'] = 'Nazwa Firmy Zleceniodawcy jest niepoprawna'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d744cb91532d27fc295efb095ca35a7a'] = 'Imię i Nazwisko Zleceniodawcy musi być wypełnione'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_36eab302759930b2e87b5f58c82038b8'] = 'Imię i Nazwisko Zleceniodawcy jest niepoprwane'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_aa897175306dbf694b3c8aecc348820c'] = 'Telefon Zleceniodawcy musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_c67952f0dd83b2025c62ae00d7d11e2a'] = 'Telefon Zleceniodawcy jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_49164735e5be270db81a0b37c22c32b0'] = 'Główny numer Klienta musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_8189ae3b628cd0a0a01b9e85516163dc'] = 'Główny numer Klienta jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d6534487cf5e32f16491d0177581cf40'] = 'Master FID musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_d57cce4f5f6024b838e22710d8b23baa'] = 'Master FID jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_ab4e2671faf3a670e8e0c59beffb9529'] = 'Adres URL webserwisu DPD musi być wypełniony'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_e4f36ce03f2b1d1c4c875ace06a7de2c'] = 'Adres URL webservisu DPD jest niepoprawny'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_c127359802e17aada119cc7e35fa4d87'] = 'Ustawienia zapisane ale nie udało się przypisać stref wysyłkowych'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_fe016d3b990c2a9dd72ab6b45892f2ae'] = 'Ustawienia zapisane'; +$_MODULE['<{dpdpoland}prestashop>configuration.controller_95fc952eb3f8cdf77b8fd878ec312099'] = 'Błąd przy zapisywaniu Ustawień'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_811e14e4f6a0a810bd7134b0efee372c'] = 'Zmieniono status kraju'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_5d9b9872005f3cf1a4def3fb3528eba9'] = 'Nie udało się zmienić statusu kraju, identyfikator: %s'; +$_MODULE['<{dpdpoland}prestashop>countrylist.controller_243911a3d5a8cd0425b6445f1226409c'] = 'Zmieniono status wybranych krajów'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_192faee3a49294fda6d13c0b121a1e4f'] = 'Waga paczki od (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_60ae6f36eeef0bd69b3589cb4197ea29'] = 'Waga paczki do (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_5a3110fd78c7e72bf6f793bbb22f1a27'] = 'Cena za paczkę (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_914419aa32f04011357d3b604a86d7eb'] = 'Sposób dostawy'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_cc22f9c1c006612224c8f14fcb8618a9'] = 'Cena za usługę COD (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_db913c2ee13ffcfa8220f9082f55555d'] = 'Reguły cennikowe usunięte'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_7d2d424cfc11ed9b4428825cd834b1fd'] = 'Błąd podczas usuwania reguł cennikowych'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_7a93533b6e32e4c65ccd7f3785a4d086'] = 'Błędny format pliku CSV, np. puste wiersze'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_45d626539112348088b22e53c8f42c31'] = 'Waluta PLN musi być zainstalowana przed importem cennika z pliku CSV.'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_2daa0ff143f5090432872416711fba68'] = 'Kraj: kod kraju nie istnieje w systemie PrestaShop. Nieprawidłowe wiersze: '; +$_MODULE['<{dpdpoland}prestashop>csv.controller_59bbd1464bf431cceb990b20a4d78e94'] = 'Kraj: wartość “*” w polu kraj może być użyta tylko dla metody wysyłki %d. Nieprawidłowe wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_f69a216993ca1dbbfda7e2db4f292431'] = 'Kraj: kod kraju PL może być użyty tylko dla metody wysyłki ID %1$d lub %2$d. Nieprawidłowe wiersze: '; +$_MODULE['<{dpdpoland}prestashop>csv.controller_091833900387d9ade396a16f41ea5c13'] = 'Kraj: wysyłka międzynarodowa jest kompatybilna tylko ze sposobem dostawy ID % d. Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_f1f970c877f6b5d05c0b06114f6e8d51'] = 'Waga paczki od (kg): Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_d2a7fae53a6ad2f729990f1f5d3a329d'] = 'Waga paczki do (kg): Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_d8c27219c58175bf167fe761745c7b18'] = 'Cena za paczkę (PLN)): Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_5eebaf4c4354c2fa66c9a23f8625be48'] = 'Sposób dostawy: Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_2b1254f68ef36bf8144fe8f5d3998b9b'] = 'Cena za usługę COD (PLN): Wartość powinna być większa od 0. Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_fa7efd29ee54335b8eee557c0896272e'] = 'Cena za usługę COD (PLN): Dostępne jedynie dla sposobu dostawy \"DPD Krajowa za pobraniem (COD)\". Wiersze dla innych sposobów dostawy należy pozostawić puste. Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>csv.controller_abdd02f527c5fea88a2f261f966d97e6'] = 'Cena za usługę COD (PLN): Dostępne jedynie dla wysyłki do Polski. Wiersze dla innych krajów proszę pozostawić puste. Niepoprawne wiersze:'; +$_MODULE['<{dpdpoland}prestashop>dpd_classic.service_d2069e632908fea7573dca46cc582f17'] = 'DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>dpd_standard_cod.service_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>dpd_standard.service_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>manifestlist.controller_5af05d972991494a3d0c6c508c15eddd'] = 'Nie można usunąć starego pliku PDF. Proszę sprawdzić czy moduł posiada uprawnienia do zapisu na dysku.'; +$_MODULE['<{dpdpoland}prestashop>manifestlist.controller_239401843002a1713462f449f6264c23'] = 'Nie można zapisać pliku PDF. Proszę sprawdzić czy moduł posiada uprawnienia do zapisu na dysku.'; +$_MODULE['<{dpdpoland}prestashop>manifest.webservice_a7927259433038cdaab4fedd3891fc2c'] = 'Na protokole nie mogą znajdować się jednocześnie przesyłki krajowe i zagraniczne'; +$_MODULE['<{dpdpoland}prestashop>packagelist.controller_41d4ff7b2e4d15b00321b813167e2abb'] = 'Wydruk protokołu możliwy jedynie dla paczek z tym samym adresem nadania.'; +$_MODULE['<{dpdpoland}prestashop>packagelist.controller_8741263b936ea7ec443f456cf750f7b5'] = 'Nie można usunąć starego pliku PDF. Proszę sprawdzić czy moduł posiada uprawnienia do zapisu na dysku.'; +$_MODULE['<{dpdpoland}prestashop>packagelist.controller_239401843002a1713462f449f6264c23'] = 'Nie można zapisać pliku PDF. Proszę sprawdzić czy moduł posiada uprawnienia do zapisu na dysku.'; +$_MODULE['<{dpdpoland}prestashop>packagelist.controller_37c3189f4ac4f3454b2e2787bfdb151c'] = 'Nie znaleziono etykiety'; +$_MODULE['<{dpdpoland}prestashop>package.webservice_706aefe3f1a249726beddd13681060d3'] = 'Paczka została utworzona ale nie udało się zapisać danych'; +$_MODULE['<{dpdpoland}prestashop>package.webservice_aee9784c03b80d38d3271cde2b252b8d'] = 'Nieznany błąd'; +$_MODULE['<{dpdpoland}prestashop>package.webservice_fb14705e99f84ade2bbdb747ab45c028'] = 'Klient nie istnieje'; +$_MODULE['<{dpdpoland}prestashop>package.webservice_83ef8de8a773717790a7db47d7893c22'] = 'Wybrany adres odbiorcy nie istnieje'; +$_MODULE['<{dpdpoland}prestashop>package.webservice_a7927259433038cdaab4fedd3891fc2c'] = 'Na protokole nie mogą znajdować się jednocześnie przesyłki krajowe i zagraniczne'; +$_MODULE['<{dpdpoland}prestashop>pickup.webservice_88f4da5ddbc4666535176a1251cb4d8f'] = 'Błąd: %s, pola: %s'; +$_MODULE['<{dpdpoland}prestashop>pickup.webservice_443a89770439e69c92ec317079d15fbb'] = 'Numer zlecenia nie został zdefiniowany'; +$_MODULE['<{dpdpoland}prestashop>pickup.webservice_789d957565edc09c2a436fca63b30c03'] = 'Brak dostępnych przedziałów czasowych. Sprawdź poprawność kodu pocztowego nadawcy'; +$_MODULE['<{dpdpoland}prestashop>webservice_0de36710a01a183e825821bd8c114678'] = 'Brak połączenia z webserwisem. Sprawdź adres URL webserwisu'; +$_MODULE['<{dpdpoland}prestashop>address_16_5e116ceb48a98fb755f22df7ea1e2396'] = 'Nazwa Firmy:'; +$_MODULE['<{dpdpoland}prestashop>address_16_2e07aecf995754708a89dd0766cce085'] = 'Imię i nazwisko:'; +$_MODULE['<{dpdpoland}prestashop>address_16_72b6d26677f7289a541e4fdbf4c8ca53'] = 'Adres:'; +$_MODULE['<{dpdpoland}prestashop>address_16_da67a6777d9e5451375f8ab27e15af8b'] = 'Kod pocztowy:'; +$_MODULE['<{dpdpoland}prestashop>address_16_bffb711ec36f280459d11dce315da72f'] = 'Miejscowość:'; +$_MODULE['<{dpdpoland}prestashop>address_16_f64be5eef68442a8f50cf535b92ad3e4'] = 'Kraj:'; +$_MODULE['<{dpdpoland}prestashop>address_16_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>address_16_0936b8d13555e80a1e3b4382274f06bd'] = 'Telefon'; +$_MODULE['<{dpdpoland}prestashop>address_5e116ceb48a98fb755f22df7ea1e2396'] = 'Nazwa Firmy:'; +$_MODULE['<{dpdpoland}prestashop>address_2e07aecf995754708a89dd0766cce085'] = 'Imię i nazwisko:'; +$_MODULE['<{dpdpoland}prestashop>address_72b6d26677f7289a541e4fdbf4c8ca53'] = 'Adres:'; +$_MODULE['<{dpdpoland}prestashop>address_da67a6777d9e5451375f8ab27e15af8b'] = 'Kod pocztowy:'; +$_MODULE['<{dpdpoland}prestashop>address_bffb711ec36f280459d11dce315da72f'] = 'Miejscowość:'; +$_MODULE['<{dpdpoland}prestashop>address_f64be5eef68442a8f50cf535b92ad3e4'] = 'Kraj:'; +$_MODULE['<{dpdpoland}prestashop>address_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>address_0936b8d13555e80a1e3b4382274f06bd'] = 'Telefon:'; +$_MODULE['<{dpdpoland}prestashop>address_17_5e116ceb48a98fb755f22df7ea1e2396'] = 'Nazwa Firmy:'; +$_MODULE['<{dpdpoland}prestashop>address_17_2e07aecf995754708a89dd0766cce085'] = 'Imię i nazwisko:'; +$_MODULE['<{dpdpoland}prestashop>address_17_72b6d26677f7289a541e4fdbf4c8ca53'] = 'Adres:'; +$_MODULE['<{dpdpoland}prestashop>address_17_da67a6777d9e5451375f8ab27e15af8b'] = 'Kod pocztowy:'; +$_MODULE['<{dpdpoland}prestashop>address_17_bffb711ec36f280459d11dce315da72f'] = 'Miejscowość:'; +$_MODULE['<{dpdpoland}prestashop>address_17_f64be5eef68442a8f50cf535b92ad3e4'] = 'Kraj:'; +$_MODULE['<{dpdpoland}prestashop>address_17_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>address_17_0936b8d13555e80a1e3b4382274f06bd'] = 'Telefon'; +$_MODULE['<{dpdpoland}prestashop>address_5e116ceb48a98fb755f22df7ea1e2396'] = 'Nazwa Firmy:'; +$_MODULE['<{dpdpoland}prestashop>address_2e07aecf995754708a89dd0766cce085'] = 'Imię i nazwisko:'; +$_MODULE['<{dpdpoland}prestashop>address_72b6d26677f7289a541e4fdbf4c8ca53'] = 'Adres:'; +$_MODULE['<{dpdpoland}prestashop>address_da67a6777d9e5451375f8ab27e15af8b'] = 'Kod pocztowy:'; +$_MODULE['<{dpdpoland}prestashop>address_bffb711ec36f280459d11dce315da72f'] = 'Miejscowość:'; +$_MODULE['<{dpdpoland}prestashop>address_f64be5eef68442a8f50cf535b92ad3e4'] = 'Kraj:'; +$_MODULE['<{dpdpoland}prestashop>address_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>address_0936b8d13555e80a1e3b4382274f06bd'] = 'Telefon:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_7d06182c98480873fd25664fb3f7a698'] = 'Adres nadania'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_94880bda83bda77c5692876700711f15'] = 'Polska'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_3f2bbf3ee64eb0d86ebe7730b3c6ccde'] = 'Adres nadawcy musi być ustawiony w ustawieniach Modułu Wysyłki DPD Polska'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_40f404095c708619cdd4d0f808a9570e'] = 'Data i godziny odbiorów'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_d76cabde06a3b3f49b88d0bedfd64928'] = 'Data odbioru:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_2f88c2f48e2eaa600cb461062abc5db7'] = 'Zamówienie kuriera DPD możliwe jedynie w dni robocze, w przypadku wyboru dnia wolnego odbiór nastąpi w pierwszym dniu roboczym po wybranej dacie'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_cdaf42bc870c754a964420ba2ac49b02'] = 'Przedział godzinowy odbioru:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_209802fb858e2c83205027dbbb5d9e6c'] = 'Wysyłka'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_325a369b3c10840846bf208b09e42685'] = 'Typ wysyłki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_86760af0540a2a6d4b4ca61ef3d6187c'] = 'Krajowa'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_8189ecf686157db0c0274c1f49373318'] = 'Międzynarodowa'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_e1ed989ed1284aedc6dba9b1680fefaf'] = 'Koperty:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_ab7702eaa2e0331f91205686efa40d69'] = 'Liczba kopert:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_e1f142b36e05805b333c1e038d95b0d8'] = 'Paczki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_9fda8e6e97311e1f7d755ac477dea38f'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_c4c3afb13f59f8ede266475851fbfbac'] = 'Waga sumaryczna (kg)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_1abfd647ddf71e80424f3fc60b50e60c'] = 'Waga najcięższej (kg)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_730b2819f18ff8dd9d1bf5df925f64eb'] = 'Wysokość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_a54fde62a06b28e231fc7fbeb0690abd'] = 'Długość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_6c5cbb81d5b2cff0dbc530681dafdcc2'] = 'Szerokość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_902d421176a411f4d956205e7d5c8059'] = 'Palety'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_8995f444a649d88c69c5580131df1177'] = 'Liczba palet'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_94966d90747b97d1f0f206c98a8b1ac3'] = 'Wyślij zamówienie'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_332dc7ba3252c80249de22d335d1ccf3'] = 'Regulamin zamówienia kuriera dostępny na stronie www.dpd.com.pl'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_ea4788705e6873b424c65e91c2846b19'] = 'Anuluj'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_16_973ddc69a5ff591471c0376488db8579'] = 'Zamów kuriera'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_7d06182c98480873fd25664fb3f7a698'] = 'Adres nadania'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_94880bda83bda77c5692876700711f15'] = 'Polska'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_3f2bbf3ee64eb0d86ebe7730b3c6ccde'] = 'Adres nadawcy musi być ustawiony w ustawieniach Modułu Wysyłki DPD Polska'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_40f404095c708619cdd4d0f808a9570e'] = 'Data i godziny odbiorów'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_d76cabde06a3b3f49b88d0bedfd64928'] = 'Data odbioru:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_2f88c2f48e2eaa600cb461062abc5db7'] = 'Zamówienie kuriera DPD możliwe jedynie w dni robocze, w przypadku wyboru dnia wolnego odbiór nastąpi w pierwszym dniu roboczym po wybranej dacie'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_cdaf42bc870c754a964420ba2ac49b02'] = 'Przedział godzinowy odbioru:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_209802fb858e2c83205027dbbb5d9e6c'] = 'Wysyłka'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_325a369b3c10840846bf208b09e42685'] = 'Typ wysyłki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_86760af0540a2a6d4b4ca61ef3d6187c'] = 'Krajowa'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_8189ecf686157db0c0274c1f49373318'] = 'Międzynarodowa'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_e1ed989ed1284aedc6dba9b1680fefaf'] = 'Koperty:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_ab7702eaa2e0331f91205686efa40d69'] = 'Liczba kopert:'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_e1f142b36e05805b333c1e038d95b0d8'] = 'Paczki'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_9fda8e6e97311e1f7d755ac477dea38f'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_c4c3afb13f59f8ede266475851fbfbac'] = 'Waga sumaryczna (kg)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_1abfd647ddf71e80424f3fc60b50e60c'] = 'Waga najcięższej (kg)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_730b2819f18ff8dd9d1bf5df925f64eb'] = 'Wysokość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_a54fde62a06b28e231fc7fbeb0690abd'] = 'Długość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_6c5cbb81d5b2cff0dbc530681dafdcc2'] = 'Szerokość największej (cm)'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_902d421176a411f4d956205e7d5c8059'] = 'Palety'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_8995f444a649d88c69c5580131df1177'] = 'Liczba palet'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_94966d90747b97d1f0f206c98a8b1ac3'] = 'Wyślij zamówienie'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_332dc7ba3252c80249de22d335d1ccf3'] = 'Regulamin zamówienia kuriera dostępny na stronie www.dpd.com.pl'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_973ddc69a5ff591471c0376488db8579'] = 'Zamów kuriera DPD'; +$_MODULE['<{dpdpoland}prestashop>arrange_pickup_ea4788705e6873b424c65e91c2846b19'] = 'Anuluj'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_8f7f4c1ce7a4f933663d10543562b096'] = 'Więcej o'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_ed22ef10b55fc97c3d85dd96704d0738'] = 'Jako wiodący dostawca standardowych i ekspresowych usług kurierskich w Polsce, DPD tworzy sprawną sieć transportową z ponad 500 oddziałami w 40 krajach. DPD oferuje również indywidualne rozwiązania, które dają dostęp do wszystkich głównych regionów gospodarczych świata.'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_e0dacf33eeeb9776c4e8f1c4e7c6d460'] = 'Rozwiązania DPD z pewnością spełnią wszystkie Twoje wymagania.'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_95970d0985a11275406c6bf8f3686a7d'] = 'Serwis krajowy?'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_1496d26e17e9e463cf3cd4f665eb3709'] = 'Od standardowego doręczenia po przesyłkę , która dotrze do odbiorcy w wyznaczonym czasie następnego dnia – DPD dostarczy szybko i niezawodnie!'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_f38391a227d2280e96dc6a68f319f69f'] = 'Dostawa międzynarodowa?'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_bd128b5439f47f547860af5682892585'] = 'Zaufaj nam – dotrzemy do interesujących Cię rynków na całym świecie szybko i sprawnie!'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_08e4a1a8972a7d3a0cbc718c076680d0'] = 'Paczka za pobraniem?'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_5ab335ae2fa6711044e7b3df711a4bcc'] = 'Skorzystaj z naszego serwisu krajowego! Dostarczymy Twoją przesyłkę, odbiorcy, który uiści odpowiednią opłatę w momencie dostawy. Odbierzemy Twoje pieniądze i bezpiecznie przekażemy je na Twoje konto.'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_6b913c191636b752f3275bb80ff12fa1'] = 'Sprawdź nasze ceny!'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_623db1599af96341e0aa3c109e4b50f8'] = 'Jeśli chcesz skorzystać z naszych usług, skontaktuj się z nami pod adresem:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_2f8a6bf31f3bd67bd2d9720c58b19c9a'] = 'prestashop@dpd.com.pl,'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d3b9b3894502a92b95b6038506168a9b'] = 'a następnie skonfiguruj moduł.'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d7ee719da6f2c80eaf00d5538a2517bd'] = 'Dane konta webserwisu DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_051672911a3f1f05efba78a553ef6fe2'] = 'Login'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_b341a59d5636ed3d6a819137495b08a0'] = 'Hasło'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_49fbab040daede070f6af9e1da021fad'] = 'Numer Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_de8df59907fdac33cd15aa585a4cef84'] = 'Nazwa Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_ec211f7c20af43e742bf2570c3cb84f9'] = 'Dodaj'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_436a25178dc1cd89996743d657142bd2'] = 'Domyślny numer Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_c9cc8cce247e49bae79f15173ce97354'] = 'Zapisz'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_58d579673df0c3e3c03a9692e1263952'] = 'Dane nadawcy'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_5e116ceb48a98fb755f22df7ea1e2396'] = 'Nazwa Firmy'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_2e07aecf995754708a89dd0766cce085'] = 'Imię i nazwisko'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_2bf1d5fae1c321d594fdedf05058f709'] = 'Adres'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_da67a6777d9e5451375f8ab27e15af8b'] = 'Kod pocztowy'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_bffb711ec36f280459d11dce315da72f'] = 'Miejscowość'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_94880bda83bda77c5692876700711f15'] = 'Polska'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_230ff5a82d6f00782ac18f7d7dd594e8'] = 'Telefon:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_a000119beed256188e530a804bb79ef4'] = 'Aktywne sposoby dostawy'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_4aeaca207f10d8b2a25475f3f135a4ac'] = 'DPD Krajowa (DPD Classic):'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_f03584af7399afb18d478900e06b025c'] = 'DPD Krajowa za pobraniem (COD):'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_877229395328b4beffb4a5f3ad891820'] = 'DPD Polska sp. z o.o. pobiera płatność przy doręczeniu TYLKO gotówką. W zainstalowanych modułach płatności są dostępne następujace metody płatności, proszę zaznaczyć metody płatności, które dotyczą płatności przy odbiorze z użyciem gotówki.'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_961489f954ec2135d8094496df2ac259'] = 'DPD Międzynarodowa (DPD Classic International):'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d2069e632908fea7573dca46cc582f17'] = 'DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_c2ce0e9a6aa6854e42ce2354208bfc1e'] = 'Informacja: sposoby wysyłki należy zaznaczyć, by były dostępne dla kupującego'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d3a1a4c4c400b9c73244a77d52b3f251'] = 'Aktywne strefy'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD Classic (standardowe przesyłki krajowe)'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_4fc237a54425f79f7ed49f82f016ecd7'] = 'Proszę zdefiniować przedziały cenowe dla każdego przewoźnika na stronie konfiguracji lub zaimportować plik CSV z przedziałami cenowymi.'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d6576c8f0f67964194302b2fe773b9b9'] = 'Wyliczenie ceny wysyłki'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_42d054e877c92fa2201f38d2159cd490'] = 'Metoda wyliczania ceny wysyłki:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_160a702987cdf041c97df6dbee304216'] = 'CSV'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_f48d3860fd804467ecf07b1ed91c5c1c'] = 'Ustawienia PrestaShop'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_5cd4346a553c6168b4d296232d24ad65'] = 'Przelicznik jednostek wagi'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_c31a6a651c1080cb4c1716eadfe856cd'] = 'Systemowa jednostka wagi:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_10df976caf081bfa86d39f626456e1da'] = 'Jednostka wagi używana w DPD Polska Sp. z o.o.:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_5d984b2060bfae52a2abe2e9f05def92'] = 'Przelicznik:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_f2e4671e2bbb582ca7327026677d76e0'] = 'Przelicznik jednostki wagi systemowej na wagę używaną w DPD Polska (kg). Jeżeli przelicznik jest 1 do 1, w pole należy wpisać: 1'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_086688900e2a055c719faebe0bfe0c38'] = 'Przelicznik jednostek wymiarów'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_ac594a3e6f56f10169ab633f27eb0e9f'] = 'Systemowa jednostka wymiarów:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_60f05f3f2847d78f32849479929b7ddd'] = 'Jednostka wymiarów używana w DPD Polska sp. z o.o.:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_fba04ae95e9228bc2cfbfcaa2ba94bd9'] = 'Przelicznik jednostki wymiarów systemowych na jednostkę wymiarów używanych w DPD Polska (cm). Jeżeli przelicznik jest 1 do 1, w pole należy wpisać: 1'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_4473b41d1a4095be325afd76182eeb4f'] = 'PARAMETRY ZLECENIODAWCY'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d56e808757f47edcf82ff3fec2a93704'] = 'Nazwa Firmy Zleceniodawcy:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_65de6f35022d3cf8490f9a0c5efc2643'] = 'Imię i Nazwisko Zleceniodawcy:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_13d7b53519833fc35b46e1f5eb08cead'] = 'Telefon Zleceniodawcy:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_5cd9a6211e54713fa09670b9a06a7820'] = 'Główny numer Klienta:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_d0424144fb77191573ef83a495abb98f'] = 'Master FID:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_6c0729f778568e67fcc9cc9297240283'] = 'Adres URL webserwisu'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_2ca9c180d73e6abdfa19c2d207e5ea0e'] = 'Adres URL webserwisu:'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_af46d9582c046726ece5ecaf4e54133d'] = 'Standardowy adres URL webserwisu: https://dpdservices.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices?wsdl'; +$_MODULE['<{dpdpoland}prestashop>configuration_8f7f4c1ce7a4f933663d10543562b096'] = 'Więcej o'; +$_MODULE['<{dpdpoland}prestashop>configuration_ed22ef10b55fc97c3d85dd96704d0738'] = 'Jako wiodący dostawca standardowych i ekspresowych usług kurierskich w Polsce, DPD tworzy sprawną sieć transportową z ponad 500 oddziałami w 40 krajach. DPD oferuje również indywidualne rozwiązania, które dają dostęp do wszystkich głównych regionów gospodarczych świata.'; +$_MODULE['<{dpdpoland}prestashop>configuration_e0dacf33eeeb9776c4e8f1c4e7c6d460'] = 'Rozwiązania DPD z pewnością spełnią wszystkie Twoje wymagania.'; +$_MODULE['<{dpdpoland}prestashop>configuration_95970d0985a11275406c6bf8f3686a7d'] = 'Serwis krajowy?'; +$_MODULE['<{dpdpoland}prestashop>configuration_1496d26e17e9e463cf3cd4f665eb3709'] = 'Od standardowego doręczenia po przesyłkę , która dotrze do odbiorcy w wyznaczonym czasie następnego dnia – DPD dostarczy szybko i niezawodnie!'; +$_MODULE['<{dpdpoland}prestashop>configuration_f38391a227d2280e96dc6a68f319f69f'] = 'Dostawa międzynarodowa?'; +$_MODULE['<{dpdpoland}prestashop>configuration_bd128b5439f47f547860af5682892585'] = 'Zaufaj nam – dotrzemy do interesujących Cię rynków na całym świecie szybko i sprawnie!'; +$_MODULE['<{dpdpoland}prestashop>configuration_08e4a1a8972a7d3a0cbc718c076680d0'] = 'Paczka za pobraniem?'; +$_MODULE['<{dpdpoland}prestashop>configuration_5ab335ae2fa6711044e7b3df711a4bcc'] = 'Skorzystaj z naszego serwisu krajowego! Dostarczymy Twoją przesyłkę, odbiorcy, który uiści odpowiednią opłatę w momencie dostawy. Odbierzemy Twoje pieniądze i bezpiecznie przekażemy je na Twoje konto.'; +$_MODULE['<{dpdpoland}prestashop>configuration_6b913c191636b752f3275bb80ff12fa1'] = 'Sprawdź nasze ceny!'; +$_MODULE['<{dpdpoland}prestashop>configuration_623db1599af96341e0aa3c109e4b50f8'] = 'Jeśli chcesz skorzystać z naszych usług, skontaktuj się z nami pod adresem:'; +$_MODULE['<{dpdpoland}prestashop>configuration_2f8a6bf31f3bd67bd2d9720c58b19c9a'] = 'prestashop@dpd.com.pl,'; +$_MODULE['<{dpdpoland}prestashop>configuration_d3b9b3894502a92b95b6038506168a9b'] = 'a następnie skonfiguruj moduł.'; +$_MODULE['<{dpdpoland}prestashop>configuration_f4f70727dc34561dfde1a3c529b6205c'] = 'Ustawienia'; +$_MODULE['<{dpdpoland}prestashop>configuration_d7ee719da6f2c80eaf00d5538a2517bd'] = 'Dane konta webserwisu DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_051672911a3f1f05efba78a553ef6fe2'] = 'Login'; +$_MODULE['<{dpdpoland}prestashop>configuration_b341a59d5636ed3d6a819137495b08a0'] = 'Hasło'; +$_MODULE['<{dpdpoland}prestashop>configuration_49fbab040daede070f6af9e1da021fad'] = 'Numer Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_de8df59907fdac33cd15aa585a4cef84'] = 'Nazwa Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_ec211f7c20af43e742bf2570c3cb84f9'] = 'Dodaj'; +$_MODULE['<{dpdpoland}prestashop>configuration_436a25178dc1cd89996743d657142bd2'] = 'Domyślny numer Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>configuration_c9cc8cce247e49bae79f15173ce97354'] = 'Zapisz'; +$_MODULE['<{dpdpoland}prestashop>configuration_19f823c6453c2b1ffd09cb715214813d'] = 'Pole wymagane'; +$_MODULE['<{dpdpoland}prestashop>configuration_58d579673df0c3e3c03a9692e1263952'] = 'Dane nadawcy'; +$_MODULE['<{dpdpoland}prestashop>configuration_5e116ceb48a98fb755f22df7ea1e2396'] = 'Nazwa Firmy'; +$_MODULE['<{dpdpoland}prestashop>configuration_2e07aecf995754708a89dd0766cce085'] = 'Imię i nazwisko'; +$_MODULE['<{dpdpoland}prestashop>configuration_2bf1d5fae1c321d594fdedf05058f709'] = 'Adres'; +$_MODULE['<{dpdpoland}prestashop>configuration_da67a6777d9e5451375f8ab27e15af8b'] = 'Kod pocztowy'; +$_MODULE['<{dpdpoland}prestashop>configuration_bffb711ec36f280459d11dce315da72f'] = 'Miejscowość'; +$_MODULE['<{dpdpoland}prestashop>configuration_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>configuration_94880bda83bda77c5692876700711f15'] = 'Polska'; +$_MODULE['<{dpdpoland}prestashop>configuration_df1555fe48479f594280a2e03f9a8186'] = 'E-mail:'; +$_MODULE['<{dpdpoland}prestashop>configuration_230ff5a82d6f00782ac18f7d7dd594e8'] = 'Telefon:'; +$_MODULE['<{dpdpoland}prestashop>configuration_a000119beed256188e530a804bb79ef4'] = 'Aktywne sposoby dostawy'; +$_MODULE['<{dpdpoland}prestashop>configuration_4aeaca207f10d8b2a25475f3f135a4ac'] = 'DPD Krajowa (DPD Classic):'; +$_MODULE['<{dpdpoland}prestashop>configuration_f03584af7399afb18d478900e06b025c'] = 'DPD Krajowa za pobraniem (COD):'; +$_MODULE['<{dpdpoland}prestashop>configuration_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>configuration_877229395328b4beffb4a5f3ad891820'] = 'DPD Polska sp. z o.o. pobiera płatność przy doręczeniu TYLKO gotówką. W zainstalowanych modułach płatności są dostępne następujace metody płatności, proszę zaznaczyć metody płatności, które dotyczą płatności przy odbiorze z użyciem gotówki.'; +$_MODULE['<{dpdpoland}prestashop>configuration_961489f954ec2135d8094496df2ac259'] = 'DPD Międzynarodowa (DPD Classic International):'; +$_MODULE['<{dpdpoland}prestashop>configuration_d2069e632908fea7573dca46cc582f17'] = 'DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>configuration_c2ce0e9a6aa6854e42ce2354208bfc1e'] = 'Informacja: sposoby wysyłki należy zaznaczyć, by były dostępne dla kupującego'; +$_MODULE['<{dpdpoland}prestashop>configuration_d3a1a4c4c400b9c73244a77d52b3f251'] = 'Aktywne strefy'; +$_MODULE['<{dpdpoland}prestashop>configuration_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD Classic (standardowe przesyłki krajowe)'; +$_MODULE['<{dpdpoland}prestashop>configuration_4fc237a54425f79f7ed49f82f016ecd7'] = 'Proszę zdefiniować przedziały cenowe dla każdego przewoźnika na stronie konfiguracji lub zaimportować plik CSV z przedziałami cenowymi.'; +$_MODULE['<{dpdpoland}prestashop>configuration_d6576c8f0f67964194302b2fe773b9b9'] = 'Wyliczenie ceny wysyłki'; +$_MODULE['<{dpdpoland}prestashop>configuration_42d054e877c92fa2201f38d2159cd490'] = 'Metoda wyliczania ceny wysyłki:'; +$_MODULE['<{dpdpoland}prestashop>configuration_160a702987cdf041c97df6dbee304216'] = 'CSV'; +$_MODULE['<{dpdpoland}prestashop>configuration_f48d3860fd804467ecf07b1ed91c5c1c'] = 'Ustawienia PrestaShop'; +$_MODULE['<{dpdpoland}prestashop>configuration_5cd4346a553c6168b4d296232d24ad65'] = 'Przelicznik jednostek wagi'; +$_MODULE['<{dpdpoland}prestashop>configuration_c31a6a651c1080cb4c1716eadfe856cd'] = 'Systemowa jednostka wagi:'; +$_MODULE['<{dpdpoland}prestashop>configuration_10df976caf081bfa86d39f626456e1da'] = 'Jednostka wagi używana w DPD Polska Sp. z o.o.:'; +$_MODULE['<{dpdpoland}prestashop>configuration_5d984b2060bfae52a2abe2e9f05def92'] = 'Przelicznik:'; +$_MODULE['<{dpdpoland}prestashop>configuration_f2e4671e2bbb582ca7327026677d76e0'] = 'Przelicznik jednostki wagi systemowej na wagę używaną w DPD Polska (kg). Jeżeli przelicznik jest 1 do 1, w pole należy wpisać: 1'; +$_MODULE['<{dpdpoland}prestashop>configuration_086688900e2a055c719faebe0bfe0c38'] = 'Przelicznik jednostek wymiarów'; +$_MODULE['<{dpdpoland}prestashop>configuration_ac594a3e6f56f10169ab633f27eb0e9f'] = 'Systemowa jednostka wymiarów:'; +$_MODULE['<{dpdpoland}prestashop>configuration_60f05f3f2847d78f32849479929b7ddd'] = 'Jednostka wymiarów używana w DPD Polska sp. z o.o.:'; +$_MODULE['<{dpdpoland}prestashop>configuration_fba04ae95e9228bc2cfbfcaa2ba94bd9'] = 'Przelicznik jednostki wymiarów systemowych na jednostkę wymiarów używanych w DPD Polska (cm). Jeżeli przelicznik jest 1 do 1, w pole należy wpisać: 1'; +$_MODULE['<{dpdpoland}prestashop>configuration_4473b41d1a4095be325afd76182eeb4f'] = 'PARAMETRY ZLECENIODAWCY'; +$_MODULE['<{dpdpoland}prestashop>configuration_d56e808757f47edcf82ff3fec2a93704'] = 'Nazwa Firmy Zleceniodawcy:'; +$_MODULE['<{dpdpoland}prestashop>configuration_65de6f35022d3cf8490f9a0c5efc2643'] = 'Imię i Nazwisko Zleceniodawcy:'; +$_MODULE['<{dpdpoland}prestashop>configuration_13d7b53519833fc35b46e1f5eb08cead'] = 'Telefon Zleceniodawcy:'; +$_MODULE['<{dpdpoland}prestashop>configuration_5cd9a6211e54713fa09670b9a06a7820'] = 'Główny numer Klienta:'; +$_MODULE['<{dpdpoland}prestashop>configuration_d0424144fb77191573ef83a495abb98f'] = 'Master FID:'; +$_MODULE['<{dpdpoland}prestashop>configuration_6c0729f778568e67fcc9cc9297240283'] = 'Adres URL webserwisu'; +$_MODULE['<{dpdpoland}prestashop>configuration_2ca9c180d73e6abdfa19c2d207e5ea0e'] = 'Adres URL webserwisu:'; +$_MODULE['<{dpdpoland}prestashop>configuration_af46d9582c046726ece5ecaf4e54133d'] = 'Standardowy adres URL webserwisu: https://dpdservices.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices?wsdl'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_9e4af51bbda475a4c3f1be6d0d8ca79b'] = 'Kraje dostępne w wysyłce'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_ad68f9bafd9bf2dcf3865dac55662fd5'] = 'Kod ISO'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktywne'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_93cba07454f06a4a960172bbd6e2a435'] = 'TAK'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_bafd7322c6e97d25b6299b5d6fe8920b'] = 'NIE'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_13348442cc6a27032d2b4aa28b75a5d3'] = 'Szukaj'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_526d688f37a86d3c3f27d0c5016eb71d'] = 'Wyczyść'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_b9f5c797ebbf55adccdd8539a65a0241'] = 'Wyłączony'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_e1ba5c602cbc3752cca2f0f80ee0117f'] = 'Brak krajów'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_9ffa4765d2da990741800bbe1ad4e7f8'] = 'Wybierz akcję'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_4c41e0bd957698b58100a5c687d757d9'] = 'Zaznacz wszystko'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_237c7b6874386141a095e321c9fdfd38'] = 'Odznacz wszystko'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_ede4759c9afae620fd586628789fa304'] = 'Aktywuj wybrane'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_ab7fd6e250b64a46027a996088fdff74'] = 'Dezaktywuj wybrane'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>country_list_16_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>country_list_193cfc9be3b995831c6af2fea6650e60'] = 'Strona'; +$_MODULE['<{dpdpoland}prestashop>country_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>country_list_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>country_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtruj'; +$_MODULE['<{dpdpoland}prestashop>country_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset widoku'; +$_MODULE['<{dpdpoland}prestashop>country_list_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>country_list_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>country_list_ad68f9bafd9bf2dcf3865dac55662fd5'] = 'Kod ISO'; +$_MODULE['<{dpdpoland}prestashop>country_list_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktywne'; +$_MODULE['<{dpdpoland}prestashop>country_list_93cba07454f06a4a960172bbd6e2a435'] = 'TAK'; +$_MODULE['<{dpdpoland}prestashop>country_list_bafd7322c6e97d25b6299b5d6fe8920b'] = 'NIE'; +$_MODULE['<{dpdpoland}prestashop>country_list_b9f5c797ebbf55adccdd8539a65a0241'] = 'Nieaktywne'; +$_MODULE['<{dpdpoland}prestashop>country_list_e1ba5c602cbc3752cca2f0f80ee0117f'] = 'Brak krajów'; +$_MODULE['<{dpdpoland}prestashop>country_list_729a51874fe901b092899e9e8b31c97a'] = 'Czy jesteś pewny?'; +$_MODULE['<{dpdpoland}prestashop>country_list_ab7fd6e250b64a46027a996088fdff74'] = 'Dezaktywuj wybrane'; +$_MODULE['<{dpdpoland}prestashop>country_list_ede4759c9afae620fd586628789fa304'] = 'Aktywuj wybrane'; +$_MODULE['<{dpdpoland}prestashop>csv_16_88a2abe73767716fd72aed8725591da5'] = 'Import cenników z pliku CSV'; +$_MODULE['<{dpdpoland}prestashop>csv_16_bebd96a4a11b7c01ff97a513a821c574'] = 'Wczytaj plik CSV:'; +$_MODULE['<{dpdpoland}prestashop>csv_16_91412465ea9169dfd901dd5e7c96dd99'] = 'Wczytaj'; +$_MODULE['<{dpdpoland}prestashop>csv_16_4b56bed0c2ecdfb749ae7dfa7349fd86'] = 'Pobierz plik CSV:'; +$_MODULE['<{dpdpoland}prestashop>csv_16_801ab24683a4a8c433c6eb40c48bcd9d'] = 'Pobierz'; +$_MODULE['<{dpdpoland}prestashop>csv_16_d338b6e97ac60e51a9c665b9f2a62c48'] = 'Podgląd zaimportowanych cen:'; +$_MODULE['<{dpdpoland}prestashop>csv_16_78945de8de090e90045d299651a68a9b'] = 'Dostępne'; +$_MODULE['<{dpdpoland}prestashop>csv_16_b6b0216b599f49e6af80a5b55a909734'] = 'sposoby dostawy'; +$_MODULE['<{dpdpoland}prestashop>csv_16_78eef451236c53b445e7ba6d5b902f8c'] = '(metody wysyłki) i ich identyfikatory: '; +$_MODULE['<{dpdpoland}prestashop>csv_16_d9d59203d3fefd4f48faacae9c680a88'] = '* DPD Krajowa'; +$_MODULE['<{dpdpoland}prestashop>csv_16_fe2002b422737cfc0766df87109c750a'] = '* DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_0dcd5647184d1731b71bc2b4b62f18c7'] = '* DPD Międzynarodowa (DPD Classic International):'; +$_MODULE['<{dpdpoland}prestashop>csv_16_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>csv_16_3a0de12ea59c2c247ab7837d15ade991'] = '- kolumna ta zawiera kraj - skrót dwuliterowy kraju w standardzie ISO np. PL, DE, GB.'; +$_MODULE['<{dpdpoland}prestashop>csv_16_8bcdc441379cbf584638b0589a3f9adb'] = 'Kod poczowy'; +$_MODULE['<{dpdpoland}prestashop>csv_16_4bcb934420a471b412c662631b9fed5e'] = '- kolumna ta zawiera kod pocztowy - kod pocztowy dla Polski należy podać w formacie XXXXX lub XX-XXX, kody pocztowe międzynarodowe mogą być zapisane przy użyciu znaków alfanumerycznych o długości maksymalnej nie wiekszej niż 7 znaków, np. dla Irlandii może to być 1.'; +$_MODULE['<{dpdpoland}prestashop>csv_16_4b08bbe48e297bff8c60c10f17cc4856'] = 'Waga paczki od (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_654242ec1434474a9f528677139a5386'] = '- kolumna ta zawiera informację o początku przedziału wagowego dla danej ceny.'; +$_MODULE['<{dpdpoland}prestashop>csv_16_4b9664bced247a7e3d5820398dbe02a9'] = 'Waga paczki do (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_35df0b639b79320c9a3746f4a0585915'] = '- kolumna ta zawiera informację o końcu przedziału wagowego dla danej ceny.'; +$_MODULE['<{dpdpoland}prestashop>csv_16_5c792b7fcda62b33ae8d5805718964b9'] = 'Cena za paczkę (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_308d7003f4ba2d580e461848548ab5ae'] = '- kolumna ta zawiera informację o cenie jaka zostanie wyliczona za jedną paczkę wysłaną do wskazanego kraju o określonym przedziale wagowym.'; +$_MODULE['<{dpdpoland}prestashop>csv_16_2e01b86887d023c873d0ebb2811e3bd8'] = 'Pierwsza'; +$_MODULE['<{dpdpoland}prestashop>csv_16_16ded2dc32322d80ce2362a47f4d7ef4'] = 'Poprzednia'; +$_MODULE['<{dpdpoland}prestashop>csv_16_193cfc9be3b995831c6af2fea6650e60'] = 'Strona'; +$_MODULE['<{dpdpoland}prestashop>csv_16_374bea6cf8bd1e8fd64570b629cc6562'] = 'Następna'; +$_MODULE['<{dpdpoland}prestashop>csv_16_339aaf6f96935365023a6e4c95c0ba95'] = 'Ostatnia'; +$_MODULE['<{dpdpoland}prestashop>csv_16_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>csv_16_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_192faee3a49294fda6d13c0b121a1e4f'] = 'Waga paczki od (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_60ae6f36eeef0bd69b3589cb4197ea29'] = 'Waga paczki do (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_5a3110fd78c7e72bf6f793bbb22f1a27'] = 'Cena za paczkę (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_914419aa32f04011357d3b604a86d7eb'] = 'Sposób dostawy'; +$_MODULE['<{dpdpoland}prestashop>csv_16_cc22f9c1c006612224c8f14fcb8618a9'] = 'Cena za usługę COD (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_16_f564528cd4716fd14397b32ca0c345bd'] = 'Brak cen'; +$_MODULE['<{dpdpoland}prestashop>csv_16_58ed7fc51269deb0030cc40b55e47fb3'] = 'Usuń wszystkie ceny'; +$_MODULE['<{dpdpoland}prestashop>csv_f9b167f250a964c308cfe8575dab99de'] = 'Ustawienia |'; +$_MODULE['<{dpdpoland}prestashop>csv_88a2abe73767716fd72aed8725591da5'] = 'Import cenników z pliku CSV'; +$_MODULE['<{dpdpoland}prestashop>csv_bebd96a4a11b7c01ff97a513a821c574'] = 'Wczytaj plik CSV:'; +$_MODULE['<{dpdpoland}prestashop>csv_91412465ea9169dfd901dd5e7c96dd99'] = 'Wczytaj'; +$_MODULE['<{dpdpoland}prestashop>csv_4b56bed0c2ecdfb749ae7dfa7349fd86'] = 'Pobierz plik CSV:'; +$_MODULE['<{dpdpoland}prestashop>csv_801ab24683a4a8c433c6eb40c48bcd9d'] = 'Pobierz'; +$_MODULE['<{dpdpoland}prestashop>csv_881110e35ba1f9ba37aef045e655c1ed'] = 'Podgląd zaimportowanych cen:'; +$_MODULE['<{dpdpoland}prestashop>csv_78945de8de090e90045d299651a68a9b'] = 'Dostępne'; +$_MODULE['<{dpdpoland}prestashop>csv_b6b0216b599f49e6af80a5b55a909734'] = 'sposoby dostawy'; +$_MODULE['<{dpdpoland}prestashop>csv_78eef451236c53b445e7ba6d5b902f8c'] = '(metody wysyłki) i ich identyfikatory: '; +$_MODULE['<{dpdpoland}prestashop>csv_d9d59203d3fefd4f48faacae9c680a88'] = '* DPD Krajowa'; +$_MODULE['<{dpdpoland}prestashop>csv_fe2002b422737cfc0766df87109c750a'] = '* DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>csv_0dcd5647184d1731b71bc2b4b62f18c7'] = '* DPD Międzynarodowa (DPD Classic International):'; +$_MODULE['<{dpdpoland}prestashop>csv_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>csv_3a0de12ea59c2c247ab7837d15ade991'] = '- kolumna ta zawiera kraj - skrót dwuliterowy kraju w standardzie ISO np. PL, DE, GB.'; +$_MODULE['<{dpdpoland}prestashop>csv_8bcdc441379cbf584638b0589a3f9adb'] = 'Kod poczowy'; +$_MODULE['<{dpdpoland}prestashop>csv_4bcb934420a471b412c662631b9fed5e'] = '- kolumna ta zawiera kod pocztowy - kod pocztowy dla Polski należy podać w formacie XXXXX lub XX-XXX, kody pocztowe międzynarodowe mogą być zapisane przy użyciu znaków alfanumerycznych o długości maksymalnej nie wiekszej niż 7 znaków, np. dla Irlandii może to być 1.'; +$_MODULE['<{dpdpoland}prestashop>csv_4b08bbe48e297bff8c60c10f17cc4856'] = 'Waga paczki od (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_654242ec1434474a9f528677139a5386'] = '- kolumna ta zawiera informację o początku przedziału wagowego dla danej ceny.'; +$_MODULE['<{dpdpoland}prestashop>csv_4b9664bced247a7e3d5820398dbe02a9'] = 'Waga paczki do (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_35df0b639b79320c9a3746f4a0585915'] = '- kolumna ta zawiera informację o końcu przedziału wagowego dla danej ceny.'; +$_MODULE['<{dpdpoland}prestashop>csv_5c792b7fcda62b33ae8d5805718964b9'] = 'Cena za paczkę (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_308d7003f4ba2d580e461848548ab5ae'] = '- kolumna ta zawiera informację o cenie jaka zostanie wyliczona za jedną paczkę wysłaną do wskazanego kraju o określonym przedziale wagowym.'; +$_MODULE['<{dpdpoland}prestashop>csv_2e01b86887d023c873d0ebb2811e3bd8'] = 'Pierwsza'; +$_MODULE['<{dpdpoland}prestashop>csv_16ded2dc32322d80ce2362a47f4d7ef4'] = 'Poprzednia'; +$_MODULE['<{dpdpoland}prestashop>csv_193cfc9be3b995831c6af2fea6650e60'] = 'Strona'; +$_MODULE['<{dpdpoland}prestashop>csv_374bea6cf8bd1e8fd64570b629cc6562'] = 'Następna'; +$_MODULE['<{dpdpoland}prestashop>csv_339aaf6f96935365023a6e4c95c0ba95'] = 'Ostatnia'; +$_MODULE['<{dpdpoland}prestashop>csv_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>csv_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>csv_192faee3a49294fda6d13c0b121a1e4f'] = 'Waga paczki od (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_60ae6f36eeef0bd69b3589cb4197ea29'] = 'Waga paczki do (kg)'; +$_MODULE['<{dpdpoland}prestashop>csv_5a3110fd78c7e72bf6f793bbb22f1a27'] = 'Cena za paczkę (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_914419aa32f04011357d3b604a86d7eb'] = 'Sposób dostawy'; +$_MODULE['<{dpdpoland}prestashop>csv_cc22f9c1c006612224c8f14fcb8618a9'] = 'Cena za usługę COD (PLN)'; +$_MODULE['<{dpdpoland}prestashop>csv_f564528cd4716fd14397b32ca0c345bd'] = 'Brak cen'; +$_MODULE['<{dpdpoland}prestashop>csv_58ed7fc51269deb0030cc40b55e47fb3'] = 'Usuń wszystkie ceny'; +$_MODULE['<{dpdpoland}prestashop>errors_07213a0161f52846ab198be103b5ab43'] = 'błędy'; +$_MODULE['<{dpdpoland}prestashop>global_variables_099eb94b23ca0630da8a84205da91ad6'] = 'Nie znaleziono metod płatności za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>help_2ef1e4f9bf8b245af3fc7b76eb26dff1'] = 'Instrukcja użytkownika w języku Polskim'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_91a1b5bbdce19dcf3116c938c1cd1285'] = 'Protokół'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_7b26b01c4e5deea6764e23f57f859a31'] = 'Numer protokołu'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_e7c5549bbf8d3f401303b4440534501a'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_ad70456116fb04deb6ee65334cf02bd1'] = 'Liczba zamówień'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_bea2be7035c3c22f3081d02d160f676c'] = 'Data wydruku'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_5da618e8e4b89c66fe86e32cdafde142'] = 'Od'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Do'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_13348442cc6a27032d2b4aa28b75a5d3'] = 'Szukaj'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_526d688f37a86d3c3f27d0c5016eb71d'] = 'Wyczyść'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_862e7e2976be83770203c5a8197c8eea'] = 'Wydruk protokołu'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_16_087fb8756d4add87f2d162304ccd486b'] = 'Brak protokołów'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_193cfc9be3b995831c6af2fea6650e60'] = 'Strona'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtruj'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset widoku'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_7b26b01c4e5deea6764e23f57f859a31'] = 'Numer protokołu'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_e7c5549bbf8d3f401303b4440534501a'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_ad70456116fb04deb6ee65334cf02bd1'] = 'Liczba zamówień'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_bea2be7035c3c22f3081d02d160f676c'] = 'Data wydruku'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_06df33001c1d7187fdd81ea1f5b277aa'] = 'Operacje'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_5da618e8e4b89c66fe86e32cdafde142'] = 'Od'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Do'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_862e7e2976be83770203c5a8197c8eea'] = 'Wydruk protokołu'; +$_MODULE['<{dpdpoland}prestashop>manifest_list_d60f54ec9bb09f0d8a16dd7a23c79eef'] = 'Brak protokołów'; +$_MODULE['<{dpdpoland}prestashop>navigation_973ddc69a5ff591471c0376488db8579'] = 'Zamów Kuriera DPD'; +$_MODULE['<{dpdpoland}prestashop>navigation_1959f2f4256262bfcfccb049920df476'] = 'Przesyłki'; +$_MODULE['<{dpdpoland}prestashop>navigation_7be24e7f2e42a87f6eed6461ee6019c3'] = 'Lista protokołów'; +$_MODULE['<{dpdpoland}prestashop>navigation_defa603474fa0b26abf74e04cf3f37dc'] = 'Historia wysyłek'; +$_MODULE['<{dpdpoland}prestashop>navigation_9e4af51bbda475a4c3f1be6d0d8ca79b'] = 'Kraje dostępne w wysyłce'; +$_MODULE['<{dpdpoland}prestashop>navigation_c02d804fa902ea3b9cf1372e91c6c07d'] = 'Import cenników (CSV)'; +$_MODULE['<{dpdpoland}prestashop>navigation_f4f70727dc34561dfde1a3c529b6205c'] = 'Ustawienia'; +$_MODULE['<{dpdpoland}prestashop>navigation_6a26f548831e6a8c26bfbbd9f6ec61e0'] = 'Pomoc'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_27fe4eb3edbaff8f250e2d51f7462681'] = 'Przesyłki'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_c004ddb608f079bc80ce406f6d27724c'] = 'Data wydruku etykiety'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_4049d979b8e6b7d78194e96c3208a5a5'] = 'Numer zamówienia'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_3e080a600745b2b82d24fb9bb29c1b52'] = 'Numer przesyłki'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_e7c5549bbf8d3f401303b4440534501a'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_a9d093d11bc6e98b0c8e586ffa545c85'] = 'Odbiorca'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_572ed696f21038e6cc6c86bb272a3222'] = 'Kod pocztowy'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_57d056ed0984166336b7879c2af3657f'] = 'Miejscowość'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_dd7bf230fde8d4836917806aff6a6b27'] = 'Adres'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_5da618e8e4b89c66fe86e32cdafde142'] = 'Od'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Do'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_13348442cc6a27032d2b4aa28b75a5d3'] = 'Szukaj'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_526d688f37a86d3c3f27d0c5016eb71d'] = 'Wyczyść'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_4351cfebe4b61d8aa5efa1d020710005'] = 'Podgląd'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_087fb8756d4add87f2d162304ccd486b'] = 'Brak danych do wyświetlenia'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_9ffa4765d2da990741800bbe1ad4e7f8'] = 'Akcja'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_4c41e0bd957698b58100a5c687d757d9'] = 'Zaznacz wszystko'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_237c7b6874386141a095e321c9fdfd38'] = 'Odznacz wszystko'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_5ad8adf8bcb1c359b87c0f3fb4a87bb7'] = 'Wydruk protokołów'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_370c8c7dda6455af81cc9ad18a5657ab'] = 'Duplikat etykiety – etykieciarka'; +$_MODULE['<{dpdpoland}prestashop>package_list_16_8f233402765e1ff010715a282c0ce7e0'] = 'Duplikat etykiety – A4'; +$_MODULE['<{dpdpoland}prestashop>package_list_193cfc9be3b995831c6af2fea6650e60'] = 'Strona'; +$_MODULE['<{dpdpoland}prestashop>package_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>package_list_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>package_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtruj'; +$_MODULE['<{dpdpoland}prestashop>package_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset widoku'; +$_MODULE['<{dpdpoland}prestashop>package_list_c004ddb608f079bc80ce406f6d27724c'] = 'Data wydruku etykiety'; +$_MODULE['<{dpdpoland}prestashop>package_list_4049d979b8e6b7d78194e96c3208a5a5'] = 'Numer zamówienia'; +$_MODULE['<{dpdpoland}prestashop>package_list_3e080a600745b2b82d24fb9bb29c1b52'] = 'Numer przesyłki'; +$_MODULE['<{dpdpoland}prestashop>package_list_e7c5549bbf8d3f401303b4440534501a'] = 'Liczba paczek'; +$_MODULE['<{dpdpoland}prestashop>package_list_a9d093d11bc6e98b0c8e586ffa545c85'] = 'Odbiorca'; +$_MODULE['<{dpdpoland}prestashop>package_list_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>package_list_572ed696f21038e6cc6c86bb272a3222'] = 'Kod pocztowy'; +$_MODULE['<{dpdpoland}prestashop>package_list_57d056ed0984166336b7879c2af3657f'] = 'Miejscowość'; +$_MODULE['<{dpdpoland}prestashop>package_list_dd7bf230fde8d4836917806aff6a6b27'] = 'Adres'; +$_MODULE['<{dpdpoland}prestashop>package_list_06df33001c1d7187fdd81ea1f5b277aa'] = 'Operacje'; +$_MODULE['<{dpdpoland}prestashop>package_list_5da618e8e4b89c66fe86e32cdafde142'] = 'Od'; +$_MODULE['<{dpdpoland}prestashop>package_list_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Do'; +$_MODULE['<{dpdpoland}prestashop>package_list_4351cfebe4b61d8aa5efa1d020710005'] = 'Podgląd'; +$_MODULE['<{dpdpoland}prestashop>package_list_cef29e3a250ad945dced5a825c58278e'] = 'Brak przesyłki'; +$_MODULE['<{dpdpoland}prestashop>package_list_f217fbfafa30da1967ecd3da1f9a45df'] = 'Drukuj protokoły dla wybranych?'; +$_MODULE['<{dpdpoland}prestashop>package_list_5ad8adf8bcb1c359b87c0f3fb4a87bb7'] = 'Wydruk protokołów'; +$_MODULE['<{dpdpoland}prestashop>package_list_370c8c7dda6455af81cc9ad18a5657ab'] = 'Duplikat etykiety – etykieciarka'; +$_MODULE['<{dpdpoland}prestashop>package_list_8f233402765e1ff010715a282c0ce7e0'] = 'Duplikat etykiety – A4'; +$_MODULE['<{dpdpoland}prestashop>_pagination_16_dded9ca4fe86a11c3020558ac9802ab1'] = 'Wyświetl na stronie:'; +$_MODULE['<{dpdpoland}prestashop>_pagination_16_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_defa603474fa0b26abf74e04cf3f37dc'] = 'Historia wysyłek'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_d79cf3f429596f77db95c65074663a54'] = 'ID zamówienia'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_c5513c96dedd85c20b7c8ce4d89c1a46'] = 'Numer paczki'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_a9d093d11bc6e98b0c8e586ffa545c85'] = 'Odbiorca'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_572ed696f21038e6cc6c86bb272a3222'] = 'Kod pocztowy'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_57d056ed0984166336b7879c2af3657f'] = 'Miejscowość'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_dd7bf230fde8d4836917806aff6a6b27'] = 'Adres'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_3513b3d0b07729be9d4649b113728a69'] = 'Data wysyłki'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_5da618e8e4b89c66fe86e32cdafde142'] = 'Od'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_e12167aa0a7698e6ebc92b4ce3909b53'] = 'DO'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_13348442cc6a27032d2b4aa28b75a5d3'] = 'Szukaj'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_526d688f37a86d3c3f27d0c5016eb71d'] = 'Wyczyść'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_4351cfebe4b61d8aa5efa1d020710005'] = 'Podgląd'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_16_766072dc9c8227c158885c628ef15f37'] = 'Brak paczek'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_193cfc9be3b995831c6af2fea6650e60'] = 'Strona'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Wyświetl na stronie'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_dd8921b41e0279a02c6a26a509241700'] = 'wynik(i)'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_d7778d0c64b6ba21494c97f77a66885a'] = 'Filtruj'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset widoku'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_d79cf3f429596f77db95c65074663a54'] = 'ID zamówienia'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_c5513c96dedd85c20b7c8ce4d89c1a46'] = 'Numer paczki'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_a9d093d11bc6e98b0c8e586ffa545c85'] = 'Odbiorca'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_59716c97497eb9694541f7c3d37b1a4d'] = 'Kraj'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_572ed696f21038e6cc6c86bb272a3222'] = 'Kod pocztowy'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_57d056ed0984166336b7879c2af3657f'] = 'Miejscowość'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_dd7bf230fde8d4836917806aff6a6b27'] = 'Adres'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_3513b3d0b07729be9d4649b113728a69'] = 'Data wysyłki'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_06df33001c1d7187fdd81ea1f5b277aa'] = 'Historia'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_5da618e8e4b89c66fe86e32cdafde142'] = 'Od'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_e12167aa0a7698e6ebc92b4ce3909b53'] = 'Do'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_4351cfebe4b61d8aa5efa1d020710005'] = 'Podgląd'; +$_MODULE['<{dpdpoland}prestashop>parcel_history_list_766072dc9c8227c158885c628ef15f37'] = 'Brak paczek'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_94a07a8c84a4738d80d30bdb4f3c5f45'] = 'Numer Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_0d380be17f8c1b5508dddc0ff5bf8dc6'] = 'Nazwa Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_7a1920d61156abc05a60135aefe8bc67'] = 'Domyślny'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_f2a6c498fb90ee345d997f888fce3b18'] = 'Usuń'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_892a8778e8ee9a7fafc3e7b5c18e4507'] = 'Usunać wybrane numery Klienta DPD?'; +$_MODULE['<{dpdpoland}prestashop>payer_numbers_table_9e8e981726883fc8124a14c27877db87'] = 'Brak numerów Klienta DPD'; +$_MODULE['<{dpdpoland}prestashop>timeframes_00db7aae85aecb79c75afca7daa8f22e'] = 'Pozostało'; +$_MODULE['<{dpdpoland}prestashop>timeframes_d39e2f00765d16aaf8cd77b4fd5b770a'] = 'minut do złożenie zlecenia odbioru dla wybranego przedziału'; +$_MODULE['<{dpdpoland}prestashop>warnings_b4372757bcd49be89af758f485f8666f'] = '%d ostrzeżenia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_aad9c2452ad2af0a0731c349e4308f1f'] = 'Wszystkie produkty powinny być przypisane do paczek!'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_9de8e0c21384ddfd634fd87a48f6b3b2'] = 'Pole zmodyfikowane'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_f5248d9b83c683ed331bfa7d2c8775ce'] = 'Wysyłka z DPD Polska'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_1a721faf2df53972bfd0831c64b6146d'] = 'zwiń'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_31407b18c5a9dd810565caedda2d0e42'] = 'rozwiń'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_d0949e93073cf252d5687ee5714e98fe'] = 'Moduł działa w trybie DEBUG'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_2e780f41b60cc7adce7ec82c077b1328'] = 'Podgląd pliku logów (DEBUG)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_092052146ff023c4bd1f904846dfc00c'] = 'Sposób dostawy:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_d2069e632908fea7573dca46cc582f17'] = 'DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_c171a57242868e49d3608da466642580'] = 'Numer Klienta DPD (Płatnik):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_8aace3ec18d83874d22850b7eee93c7d'] = 'Nadawca:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_c3e885b15c648365e50fc2126d698f7e'] = 'Dane adresowe nadawcy mogą być zmienione w ustawieniach modułu DPD Polska.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_5d6103b662f41b07e10687f03aca8fdc'] = 'Odbiorca:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_5e69f9d5bc6e6f0d29abb4990c21595d'] = 'Adres Odbiorcy:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_72d691a9e17cc6098782639bf0538184'] = 'Wartość COD (PLN)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_eb6a633d6af6b5e6819f4ed4884c9bb3'] = 'Za pobraniem (COD):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_3821d89292f0543e98ac2c7cd0779e43'] = 'Pozostaw puste jeżeli nie chcesz skorzystać z tej usługi'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_fd9d62700b7f3063c3e08b6266e5bf43'] = 'Paczka wartościowa:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_1e3578cde9a2a7d29fd8fe188dde1a20'] = 'Uwagi dodatkowe:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_129142cc236a68ed5288614ce1f911fb'] = 'Numer referencyjny 1'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_83fa39a28a4d159061c408fbd6a249e7'] = 'Numer zamówienia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_4ab7be371a4f201c7a97a876ed0d59b3'] = 'Numer referencyjny 2'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_db2d9ca9b008f4cdb2c5902adaa84fdc'] = 'Numer faktury:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_9cbf474d9a3d5deae6e47a2cede2f536'] = 'Przypisz produkty do paczek'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_ca92c5cc1d3c1d7d0a5336511faf61ec'] = 'Używając poniższej tabeli możesz przypisać konkretny produkt do konkretnej paczki.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_deb10517653c255364175796ace3553f'] = 'Produkt'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_8c489d0946f66d17d73f26366a4bf620'] = 'Waga'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_f38e9081d395bb971dd1bf81f65f22e6'] = 'Paczka'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_d31e97ad5d951fd5703d588011ccd63a'] = 'Zacznij wpisywać pierwsze litery nazwy produktu, a następnie wybierz produkt z listy rozwijanej.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_7bb36e0f484d91aeba5d83fe2af63d28'] = 'Szukaj produktu'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_11a738dd0c48f1401a059bca54bc119c'] = 'Dodaj produkt'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_0b55aebbd8b86751f6c70c6cf91094b1'] = 'Zarządzaj paczkami'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_adfb1922c661200f46a4a5fee00720fc'] = 'Tutaj możesz tworzyć nowe paczki i zarządzać ich parametrami'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_74d206f6125b574f5156627cac72de0d'] = 'Zawartość paczki'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_91721604210524b7051d99c4c8478715'] = 'Waga (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_20fbaa7c1bf32aa91ed46514737a0687'] = 'Wysokość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_d39e1498c3bd289bb7ed63f790adfb0d'] = 'Długość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_3d0ed3e9145be53d081d10fe37c93290'] = 'Szerokość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_d4250cdd2996e67db50a1fa27ca4379b'] = 'Waga gabarytowa (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_89dcc0ff4130fb8e1d64c5ee3c4bb4fc'] = 'Dodając paczkę: Dodatkowa opłata będzie doliczona przez DPD Polska sp. z o.o. w zależności od cennika Klienta DPD. Cena prezentowana kupującemu zawsze dotyczy jednej paczki dla zamówienia.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_af0924a4a04778667c6e5afb3024f8da'] = 'Dodaj paczkę'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_a5dc92780d2900af80753034fde4d386'] = 'Po wydruku etykiet nie będzie możliwości edycji danych wysyłki.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_006e74c9a72986777f0e4beb4d170671'] = 'Format wydruku:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_0c2f3adf2a48bab3adb470f4da57f3d0'] = 'A4'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_5a85bf1e6ff978507cc2be5e833b2dd1'] = 'Etykieciarka'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_5359e0d1b7e3d42fded6e0a420dbaffc'] = 'Zapisz i drukuj etykiety'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_c879cb3351593188d1178647eb2032fe'] = 'Drukuj etykiety'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_f9134937ba5da4d91eead723aee72481'] = 'Aktualny status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_004bf6c9a40003140292e97330236c53'] = 'Operacja'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_ec53a8c4f07baed5d8825072c89799be'] = 'Status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_611528c50da4256e1df65bc386518d70'] = 'Etykiety wydrukowane'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_93cba07454f06a4a960172bbd6e2a435'] = 'TAK'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_bafd7322c6e97d25b6299b5d6fe8920b'] = 'NIE'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_c91d3279341507c91f2de83a3b174638'] = 'Protokół wydrukowany'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_b9ef6fb0879ec82c0446bda7233f01a2'] = 'Moduł nie został skonfigurowany poprawnie. Proszę sprawdzić ustawienia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_16_6c92285fa6d3e827b198d120ea3ac674'] = 'tu'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_aad9c2452ad2af0a0731c349e4308f1f'] = 'Wszystkie produkty powinny być przypisane do paczek!'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_9de8e0c21384ddfd634fd87a48f6b3b2'] = 'Pole zmodyfikowane'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_f5248d9b83c683ed331bfa7d2c8775ce'] = 'Wysyłka z DPD Polska'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_1a721faf2df53972bfd0831c64b6146d'] = 'zwiń'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_31407b18c5a9dd810565caedda2d0e42'] = 'rozwiń'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_d0949e93073cf252d5687ee5714e98fe'] = 'Moduł działa w trybie DEBUG'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_2e780f41b60cc7adce7ec82c077b1328'] = 'Podgląd pliku logów (DEBUG)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_092052146ff023c4bd1f904846dfc00c'] = 'Sposób dostawy:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_d2069e632908fea7573dca46cc582f17'] = 'DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_c171a57242868e49d3608da466642580'] = 'Numer Klienta DPD (Płatnik):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_8aace3ec18d83874d22850b7eee93c7d'] = 'Nadawca:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_c3e885b15c648365e50fc2126d698f7e'] = 'Dane adresowe nadawcy mogą być zmienione w ustawieniach modułu DPD Polska.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_5d6103b662f41b07e10687f03aca8fdc'] = 'Odbiorca:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_5e69f9d5bc6e6f0d29abb4990c21595d'] = 'Adres Odbiorcy:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_72d691a9e17cc6098782639bf0538184'] = 'Wartość COD (PLN)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_eb6a633d6af6b5e6819f4ed4884c9bb3'] = 'Za pobraniem (COD):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_3821d89292f0543e98ac2c7cd0779e43'] = 'Pozostaw puste jeżeli nie chcesz skorzystać z tej usługi'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_fd9d62700b7f3063c3e08b6266e5bf43'] = 'Paczka wartościowa:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_1e3578cde9a2a7d29fd8fe188dde1a20'] = 'Uwagi dodatkowe:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_129142cc236a68ed5288614ce1f911fb'] = 'Numer referencyjny 1'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_83fa39a28a4d159061c408fbd6a249e7'] = 'Numer zamówienia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_4ab7be371a4f201c7a97a876ed0d59b3'] = 'Numer referencyjny 2'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_db2d9ca9b008f4cdb2c5902adaa84fdc'] = 'Numer faktury:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_9cbf474d9a3d5deae6e47a2cede2f536'] = 'Przypisz produkty do paczek'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_ca92c5cc1d3c1d7d0a5336511faf61ec'] = 'Używając poniższej tabeli możesz przypisać konkretny produkt do konkretnej paczki.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_deb10517653c255364175796ace3553f'] = 'Produkt'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_8c489d0946f66d17d73f26366a4bf620'] = 'Waga'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_f38e9081d395bb971dd1bf81f65f22e6'] = 'Paczka'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_d31e97ad5d951fd5703d588011ccd63a'] = 'Zacznij wpisywać pierwsze litery nazwy produktu, a następnie wybierz produkt z listy rozwijanej.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_7bb36e0f484d91aeba5d83fe2af63d28'] = 'Szukaj produktu'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_11a738dd0c48f1401a059bca54bc119c'] = 'Dodaj produkt'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_0b55aebbd8b86751f6c70c6cf91094b1'] = 'Zarządzaj paczkami'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_adfb1922c661200f46a4a5fee00720fc'] = 'Tutaj możesz tworzyć nowe paczki i zarządzać ich parametrami'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_74d206f6125b574f5156627cac72de0d'] = 'Zawartość paczki'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_91721604210524b7051d99c4c8478715'] = 'Waga (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_20fbaa7c1bf32aa91ed46514737a0687'] = 'Wysokość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_d39e1498c3bd289bb7ed63f790adfb0d'] = 'Długość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_3d0ed3e9145be53d081d10fe37c93290'] = 'Szerokość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_d4250cdd2996e67db50a1fa27ca4379b'] = 'Waga gabarytowa (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_89dcc0ff4130fb8e1d64c5ee3c4bb4fc'] = 'Dodając paczkę: Dodatkowa opłata będzie doliczona przez DPD Polska sp. z o.o. w zależności od cennika Klienta DPD. Cena prezentowana kupującemu zawsze dotyczy jednej paczki dla zamówienia.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_af0924a4a04778667c6e5afb3024f8da'] = 'Dodaj paczkę'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_a5dc92780d2900af80753034fde4d386'] = 'Po wydruku etykiet nie będzie możliwości edycji danych wysyłki.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_006e74c9a72986777f0e4beb4d170671'] = 'Format wydruku:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_0c2f3adf2a48bab3adb470f4da57f3d0'] = 'A4'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_5a85bf1e6ff978507cc2be5e833b2dd1'] = 'Etykieciarka'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_5359e0d1b7e3d42fded6e0a420dbaffc'] = 'Zapisz i drukuj etykiety'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_c879cb3351593188d1178647eb2032fe'] = 'Drukuj etykiety'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_f9134937ba5da4d91eead723aee72481'] = 'Aktualny status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_004bf6c9a40003140292e97330236c53'] = 'Operacja'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_ec53a8c4f07baed5d8825072c89799be'] = 'Status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_611528c50da4256e1df65bc386518d70'] = 'Etykiety wydrukowane'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_93cba07454f06a4a960172bbd6e2a435'] = 'TAK'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_bafd7322c6e97d25b6299b5d6fe8920b'] = 'NIE'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_c91d3279341507c91f2de83a3b174638'] = 'Protokół wydrukowany'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_b9ef6fb0879ec82c0446bda7233f01a2'] = 'Moduł nie został skonfigurowany poprawnie. Proszę sprawdzić ustawienia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_17_6c92285fa6d3e827b198d120ea3ac674'] = 'tu'; +$_MODULE['<{dpdpoland}prestashop>adminorder_aad9c2452ad2af0a0731c349e4308f1f'] = 'Wszystkie produkty powinny być przypisane do paczek!'; +$_MODULE['<{dpdpoland}prestashop>adminorder_9de8e0c21384ddfd634fd87a48f6b3b2'] = 'Pole zmodyfikowane'; +$_MODULE['<{dpdpoland}prestashop>adminorder_f5248d9b83c683ed331bfa7d2c8775ce'] = 'Wysyłka z DPD Polska'; +$_MODULE['<{dpdpoland}prestashop>adminorder_1a721faf2df53972bfd0831c64b6146d'] = 'zwiń'; +$_MODULE['<{dpdpoland}prestashop>adminorder_31407b18c5a9dd810565caedda2d0e42'] = 'rozwiń'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d0949e93073cf252d5687ee5714e98fe'] = 'Moduł działa w trybie DEBUG'; +$_MODULE['<{dpdpoland}prestashop>adminorder_2e780f41b60cc7adce7ec82c077b1328'] = 'Podgląd pliku logów (DEBUG)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_092052146ff023c4bd1f904846dfc00c'] = 'Sposób dostawy:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_95834a67fc218c91e0dac20af36dbf0a'] = 'DPD Krajowa (DPD Classic)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_b78bc3c561d92a0e21c15bebcb5a096c'] = 'DPD Krajowa za pobraniem (COD)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d2069e632908fea7573dca46cc582f17'] = 'DPD Międzynarodowa (DPD Classic International)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c171a57242868e49d3608da466642580'] = 'Numer Klienta DPD (Płatnik):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c66d035abc5a2df1dded3f17486ed89c'] = 'Nadawca:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c3e885b15c648365e50fc2126d698f7e'] = 'Dane adresowe nadawcy mogą być zmienione w ustawieniach modułu DPD Polska.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_3841356b3344dcaf14dbccbe6e2b6fae'] = 'Odbiorca:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_5e69f9d5bc6e6f0d29abb4990c21595d'] = 'Adres Odbiorcy:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_eb6a633d6af6b5e6819f4ed4884c9bb3'] = 'Za pobraniem (COD):'; +$_MODULE['<{dpdpoland}prestashop>adminorder_72d691a9e17cc6098782639bf0538184'] = 'Wartość COD (PLN)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_fd9d62700b7f3063c3e08b6266e5bf43'] = 'Paczka wartościowa:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_3821d89292f0543e98ac2c7cd0779e43'] = 'Pozostaw puste jeżeli nie chcesz skorzystać z tej usługi'; +$_MODULE['<{dpdpoland}prestashop>adminorder_1e3578cde9a2a7d29fd8fe188dde1a20'] = 'Uwagi dodatkowe:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_83fa39a28a4d159061c408fbd6a249e7'] = 'Numer zamówienia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_129142cc236a68ed5288614ce1f911fb'] = 'Numer referencyjny 1'; +$_MODULE['<{dpdpoland}prestashop>adminorder_db2d9ca9b008f4cdb2c5902adaa84fdc'] = 'Numer faktury:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_4ab7be371a4f201c7a97a876ed0d59b3'] = 'Numer referencyjny 2'; +$_MODULE['<{dpdpoland}prestashop>adminorder_9cbf474d9a3d5deae6e47a2cede2f536'] = 'Przypisz produkty do paczek'; +$_MODULE['<{dpdpoland}prestashop>adminorder_ca92c5cc1d3c1d7d0a5336511faf61ec'] = 'Używając poniższej tabeli możesz przypisać konkretny produkt do konkretnej paczki.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_b718adec73e04ce3ec720dd11a06a308'] = 'ID'; +$_MODULE['<{dpdpoland}prestashop>adminorder_deb10517653c255364175796ace3553f'] = 'Produkt'; +$_MODULE['<{dpdpoland}prestashop>adminorder_8c489d0946f66d17d73f26366a4bf620'] = 'Waga'; +$_MODULE['<{dpdpoland}prestashop>adminorder_f38e9081d395bb971dd1bf81f65f22e6'] = 'Paczka'; +$_MODULE['<{dpdpoland}prestashop>adminorder_11a738dd0c48f1401a059bca54bc119c'] = 'Dodaj produkt'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d31e97ad5d951fd5703d588011ccd63a'] = 'Zacznij wpisywać pierwsze litery nazwy produktu, a następnie wybierz produkt z listy rozwijanej.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_0b55aebbd8b86751f6c70c6cf91094b1'] = 'Zarządzaj paczkami'; +$_MODULE['<{dpdpoland}prestashop>adminorder_adfb1922c661200f46a4a5fee00720fc'] = 'Tutaj możesz tworzyć nowe paczki i zarządzać ich parametrami'; +$_MODULE['<{dpdpoland}prestashop>adminorder_74d206f6125b574f5156627cac72de0d'] = 'Zawartość paczki'; +$_MODULE['<{dpdpoland}prestashop>adminorder_91721604210524b7051d99c4c8478715'] = 'Waga (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_20fbaa7c1bf32aa91ed46514737a0687'] = 'Wysokość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d39e1498c3bd289bb7ed63f790adfb0d'] = 'Długość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_3d0ed3e9145be53d081d10fe37c93290'] = 'Szerokość (cm)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_d4250cdd2996e67db50a1fa27ca4379b'] = 'Waga gabarytowa (kg)'; +$_MODULE['<{dpdpoland}prestashop>adminorder_89dcc0ff4130fb8e1d64c5ee3c4bb4fc'] = 'Dodając paczkę: Dodatkowa opłata będzie doliczona przez DPD Polska sp. z o.o. w zależności od cennika Klienta DPD. Cena prezentowana kupującemu zawsze dotyczy jednej paczki dla zamówienia.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_af0924a4a04778667c6e5afb3024f8da'] = 'Dodaj paczkę'; +$_MODULE['<{dpdpoland}prestashop>adminorder_119e5a3da4a4debfbcb786d189d2605d'] = 'Po wydruku etykiet nie będzie możliwości edycji danych wysyłki.'; +$_MODULE['<{dpdpoland}prestashop>adminorder_5359e0d1b7e3d42fded6e0a420dbaffc'] = 'Zapisz i drukuj etykiety'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c879cb3351593188d1178647eb2032fe'] = 'Drukuj etykiety'; +$_MODULE['<{dpdpoland}prestashop>adminorder_0c2f3adf2a48bab3adb470f4da57f3d0'] = 'A4'; +$_MODULE['<{dpdpoland}prestashop>adminorder_5a85bf1e6ff978507cc2be5e833b2dd1'] = 'Etykieciarka'; +$_MODULE['<{dpdpoland}prestashop>adminorder_006e74c9a72986777f0e4beb4d170671'] = 'Format wydruku:'; +$_MODULE['<{dpdpoland}prestashop>adminorder_f9134937ba5da4d91eead723aee72481'] = 'Aktualny status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_004bf6c9a40003140292e97330236c53'] = 'Operacja'; +$_MODULE['<{dpdpoland}prestashop>adminorder_ec53a8c4f07baed5d8825072c89799be'] = 'Status'; +$_MODULE['<{dpdpoland}prestashop>adminorder_611528c50da4256e1df65bc386518d70'] = 'Etykiety wydrukowane'; +$_MODULE['<{dpdpoland}prestashop>adminorder_93cba07454f06a4a960172bbd6e2a435'] = 'TAK'; +$_MODULE['<{dpdpoland}prestashop>adminorder_bafd7322c6e97d25b6299b5d6fe8920b'] = 'NIE'; +$_MODULE['<{dpdpoland}prestashop>adminorder_c91d3279341507c91f2de83a3b174638'] = 'Protokół wydrukowany'; +$_MODULE['<{dpdpoland}prestashop>adminorder_b9ef6fb0879ec82c0446bda7233f01a2'] = 'Moduł nie został skonfigurowany poprawnie. Proszę sprawdzić ustawienia'; +$_MODULE['<{dpdpoland}prestashop>adminorder_6c92285fa6d3e827b198d120ea3ac674'] = 'tu'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_a7d08faa4a52f066b672fdce45efb17e'] = 'Dostęp do systemu produkcyjnego'; +$_MODULE['<{dpdpoland}prestashop>configuration_16_41e0c41b4b28d608b75d4ad5df333865'] = 'Dostęp do systemu demonstracyjnego'; \ No newline at end of file diff --git a/modules/onepagecheckoutps/views/templates/front/carrier.tpl b/modules/onepagecheckoutps/views/templates/front/carrier.tpl index 6c595cda..2b69a679 100644 --- a/modules/onepagecheckoutps/views/templates/front/carrier.tpl +++ b/modules/onepagecheckoutps/views/templates/front/carrier.tpl @@ -12,6 +12,13 @@ {block name='step_carrier'} + +