aktualizacja modułu dpd
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,33 @@
|
||||
{% set currentPath = app.request.pathinfo %}
|
||||
|
||||
{% block content %}
|
||||
{% trans_default_domain 'Modules.Dpdshipping.AdminNav' %}
|
||||
{% set menuItems = [
|
||||
{'path': 'connection', 'label': 'Connection with DPD Poland'|trans, 'form':'dpdshipping_connection_form'},
|
||||
{'path': 'address', 'label': 'Sender addresses'|trans, 'form':'dpdshipping_address_form'},
|
||||
{'path': 'carrier', 'label': 'Carriers'|trans, 'form':'dpdshipping_carrier_form'},
|
||||
{'path': 'specialPrice', 'label': 'Special prices'|trans, 'form':'dpdshipping_special_price_form'},
|
||||
{'path': 'parameters', 'label': 'Default parameters'|trans, 'form':'dpdshipping_parameters_form'},
|
||||
{'path': 'configuration', 'label': 'Settings'|trans, 'form':'dpdshipping_configuration_form'},
|
||||
{'path': 'pickupCourierSettingsList', 'label': 'Pickup courier settings'|trans, 'form':'dpdshipping_pickup_courier_settings_list_form'},
|
||||
{'path': 'onboarding', 'label': 'Onboarding'|trans, 'form':'dpdshipping_onboarding_form'},
|
||||
] %}
|
||||
|
||||
<nav class="navbar navbar-light bg-white mb-3 dpdshipping-box-shadow">
|
||||
<ul class="navbar-nav text-dark">
|
||||
{% for item in menuItems %}
|
||||
<li class="nav-item {% if currentPath == '/modules/dpdshipping/configuration/' ~ item.path %} dpdshipping-nav-active active {% endif %}">
|
||||
<a class="nav-link" href="{{ path(item.form) }}">{{ item.label }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ asset('../modules/dpdshipping/views/css/navbar.css') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{% set currentPath = app.request.pathinfo %}
|
||||
|
||||
{% block content %}
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white mb-3 dpdshipping-box-shadow">
|
||||
<a class="navbar-brand" href="{{ path('dpdshipping_shipping_history_form') }}"> <img class="dpdshipping-logo"
|
||||
src="/modules/dpdshipping/logo.png"
|
||||
alt="DPD Poland"/>{{ 'DPD Poland'|trans({}, 'Modules.Dpdshipping.AdminNav') }}
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item {% if currentPath == '/modules/dpdshipping/shipping-history' or currentPath == '/modules/dpdshipping/shipping-history/details' %}dpdshipping-nav-active active {% endif %}>">
|
||||
<a class="nav-link"
|
||||
href="{{ path('dpdshipping_shipping_history_form') }}">{{ 'Shipping history'|trans({}, 'Modules.Dpdshipping.AdminNav') }}</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item {% if currentPath == '/modules/dpdshipping/pickupCourier' %}dpdshipping-nav-active active {% endif %}>">
|
||||
<a class="nav-link"
|
||||
href="{{ path('dpdshipping_pickup_courier_form') }}">{{ 'Pickup courier'|trans({}, 'Modules.Dpdshipping.AdminNav') }}</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="my-2 my-lg-0">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item {% if currentPath starts with '/modules/dpdshipping/configuration' %}dpdshipping-nav-active active {% endif %}>">
|
||||
<a class="nav-link"
|
||||
href="{{ path('dpdshipping_connection_form') }}">{{ 'Configuration'|trans({}, 'Modules.Dpdshipping.AdminNav') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ asset('../modules/dpdshipping/views/css/navbar.css') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Address'|trans({}, 'Modules.Dpdshipping.AdminAddress') }} {{ addressId }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ 'You are editing settings for multiple shops contexts. These settings will be applied to other contexts and may override current values.'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-wrapper">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminAddress') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<a class="btn btn-primary float-right"
|
||||
href="{{ path('dpdshipping_address_edit_form') }}">{{ 'Add new sender address'|trans({}, 'Modules.Dpdshipping.AdminAddress') }}</a>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
||||
{% block quotes_list_panel %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% include '@PrestaShop/Admin/Common/Grid/grid_panel.html.twig' with {'grid': quoteGrid} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/address-grid.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,450 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Carriers'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info mb-4" role="alert">
|
||||
{{ 'Select an available shipping method for the Create Prestashop carrier. You can manage carriers on the standard prestashop page.'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}
|
||||
</div>
|
||||
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning mb-4" role="alert">
|
||||
{{ 'Select a single shop context to manage carriers.'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h4>{{ 'Available shipping methods'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</h4>
|
||||
|
||||
<div class="row pt-2">
|
||||
<div class="col-12">
|
||||
<div class="pl-2">
|
||||
{{ form_label(form.dpdPolandCarrierSwipBox) }}
|
||||
{{ form_widget(form.dpdPolandCarrierSwipBox) }}
|
||||
{{ form_errors(form.dpdPolandCarrierSwipBox) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-2 col-10">
|
||||
|
||||
{% if dpdCarrierSwipBox is not null and dpdCarrierSwipBox is not empty and dpdCarrierSwipBox[0].id is defined %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2" scope="col">{{ 'Id'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Id Shop'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-6" scope="col">{{ 'Name'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Visible'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Actions'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in dpdCarrierSwipBox %}
|
||||
{% if row.id is defined %}
|
||||
<tr>
|
||||
<th>{{ row.id }}</th>
|
||||
<th>{{ row.idShop }}</th>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>
|
||||
{% if row.active %}
|
||||
<i class="color_success"></i> <i class="material-icons" style="color:#009d00">done</i>
|
||||
{% else %}
|
||||
<i class="color_danger"></i> <i class="material-icons" style="color:red">blockade</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('admin_carriers_edit', {'carrierId': row.id }) }}" type="button"
|
||||
class="btn btn-sm btn-secondary">{{ 'Configure'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if shopContext == 1 %}
|
||||
{% set apiConnection = [
|
||||
form.dpdPolandCarrierSwipBoxFilterSwipBox,
|
||||
form.dpdPolandCarrierSwipBoxFilterPointsWithServices
|
||||
] %}
|
||||
<p class="font-weight-bold">{{ 'Filters for SwipBox map'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}:</p>
|
||||
<div class="row">
|
||||
{% for item in apiConnection %}
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-xl-3">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% set apiConnection = [
|
||||
form.dpdPolandCarrierSwipBoxFilterOpenLate,
|
||||
form.dpdPolandCarrierSwipBoxFilterOpenSaturdays,
|
||||
form.dpdPolandCarrierSwipBoxFilterOpenSundays,
|
||||
form.dpdPolandCarrierSwipBoxFilterParking,
|
||||
form.dpdPolandCarrierSwipBoxFilterDirectDelivery,
|
||||
form.dpdPolandCarrierSwipBoxFilterDirectDeliveryCod,
|
||||
form.dpdPolandCarrierSwipBoxFilterDropoffOnline,
|
||||
form.dpdPolandCarrierSwipBoxFilterDropoffOffline,
|
||||
form.dpdPolandCarrierSwipBoxFilterSwapParcel,
|
||||
form.dpdPolandCarrierSwipBoxFilterFresh,
|
||||
form.dpdPolandCarrierSwipBoxFilterFittingRoom,
|
||||
form.dpdPolandCarrierSwipBoxFilterCardPayment,
|
||||
form.dpdPolandCarrierSwipBoxFilterRod,
|
||||
form.dpdPolandCarrierSwipBoxFilterLQ,
|
||||
form.dpdPolandCarrierSwipBoxFilterDigitalLabel,
|
||||
form.dpdPolandCarrierSwipBoxFilterDisabledFriendly,
|
||||
|
||||
] %}
|
||||
<div class="row">
|
||||
{% for item in apiConnection %}
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-xl-3">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-2">
|
||||
<div class="col-12">
|
||||
<div class="pl-2">
|
||||
{{ form_label(form.dpdPolandCarrierPickup) }}
|
||||
{{ form_widget(form.dpdPolandCarrierPickup) }}
|
||||
{{ form_errors(form.dpdPolandCarrierPickup) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-2 col-10">
|
||||
|
||||
{% if dpdCarrierPickup is not null and dpdCarrierPickup is not empty and dpdCarrierPickup[0].id is defined %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2" scope="col">{{ 'Id'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Id Shop'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-6" scope="col">{{ 'Name'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Visible'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Actions'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in dpdCarrierPickup %}
|
||||
{% if row.id is defined %}
|
||||
<tr>
|
||||
<th>{{ row.id }}</th>
|
||||
<th>{{ row.idShop }}</th>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>
|
||||
{% if row.active %}
|
||||
<i class="color_success"></i> <i class="material-icons" style="color:#009d00">done</i>
|
||||
{% else %}
|
||||
<i class="color_danger"></i> <i class="material-icons" style="color:red">blockade</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('admin_carriers_edit', {'carrierId': row.id }) }}" type="button"
|
||||
class="btn btn-sm btn-secondary">{{ 'Configure'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if shopContext == 1 %}
|
||||
{% set apiConnection = [
|
||||
form.dpdPolandCarrierPickupFilterSwipBox,
|
||||
form.dpdPolandCarrierPickupFilterPointsWithServices
|
||||
] %}
|
||||
<p class="font-weight-bold">{{ 'Filters for Pickup map'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}:</p>
|
||||
<div class="row">
|
||||
{% for item in apiConnection %}
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-xl-3">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% set apiConnection = [
|
||||
form.dpdPolandCarrierPickupFilterOpenLate,
|
||||
form.dpdPolandCarrierPickupFilterOpenSaturdays,
|
||||
form.dpdPolandCarrierPickupFilterOpenSundays,
|
||||
form.dpdPolandCarrierPickupFilterParking,
|
||||
form.dpdPolandCarrierPickupFilterDirectDelivery,
|
||||
form.dpdPolandCarrierPickupFilterDirectDeliveryCod,
|
||||
form.dpdPolandCarrierPickupFilterDropoffOnline,
|
||||
form.dpdPolandCarrierPickupFilterDropoffOffline,
|
||||
form.dpdPolandCarrierPickupFilterSwapParcel,
|
||||
form.dpdPolandCarrierPickupFilterFresh,
|
||||
form.dpdPolandCarrierPickupFilterFittingRoom,
|
||||
form.dpdPolandCarrierPickupFilterCardPayment,
|
||||
form.dpdPolandCarrierPickupFilterRod,
|
||||
form.dpdPolandCarrierPickupFilterLQ,
|
||||
form.dpdPolandCarrierPickupFilterDigitalLabel,
|
||||
form.dpdPolandCarrierPickupFilterDisabledFriendly,
|
||||
|
||||
] %}
|
||||
<div class="row">
|
||||
{% for item in apiConnection %}
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-xl-3">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-2">
|
||||
<div class="col-12">
|
||||
<div class="pl-2">
|
||||
{{ form_label(form.dpdPolandCarrierPickupCOD) }}
|
||||
{{ form_widget(form.dpdPolandCarrierPickupCOD) }}
|
||||
{{ form_errors(form.dpdPolandCarrierPickupCOD) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-2 col-10">
|
||||
|
||||
{% if dpdCarrierPickupCod is not null and dpdCarrierPickupCod is not empty and dpdCarrierPickupCod[0].id is defined %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2" scope="col">{{ 'Id'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Id Shop'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-6" scope="col">{{ 'Name'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Visible'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Actions'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in dpdCarrierPickupCod %}
|
||||
{% if row.id is defined %}
|
||||
<tr>
|
||||
<th>{{ row.id }}</th>
|
||||
<th>{{ row.idShop }}</th>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>
|
||||
{% if row.active %}
|
||||
<i class="color_success"></i> <i class="material-icons" style="color:#009d00">done</i>
|
||||
{% else %}
|
||||
<i class="color_danger"></i> <i class="material-icons" style="color:red">blockade</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('admin_carriers_edit', {'carrierId': row.id }) }}" type="button"
|
||||
class="btn btn-sm btn-secondary">{{ 'Configure'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if shopContext == 1 %}
|
||||
{% set apiConnection = [
|
||||
form.dpdPolandCarrierPickupCODFilterSwipBox,
|
||||
form.dpdPolandCarrierPickupCODFilterPointsWithServices,
|
||||
] %}
|
||||
<p class="font-weight-bold">{{ 'Filters for Pickup map'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}:</p>
|
||||
<div class="row">
|
||||
{% for item in apiConnection %}
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-xl-3">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% set apiConnection = [
|
||||
form.dpdPolandCarrierPickupCODFilterOpenLate,
|
||||
form.dpdPolandCarrierPickupCODFilterOpenSaturdays,
|
||||
form.dpdPolandCarrierPickupCODFilterOpenSundays,
|
||||
form.dpdPolandCarrierPickupCODFilterParking,
|
||||
form.dpdPolandCarrierPickupCODFilterDirectDelivery,
|
||||
form.dpdPolandCarrierPickupCODFilterDirectDeliveryCod,
|
||||
form.dpdPolandCarrierPickupCODFilterDropoffOnline,
|
||||
form.dpdPolandCarrierPickupCODFilterDropoffOffline,
|
||||
form.dpdPolandCarrierPickupCODFilterSwapParcel,
|
||||
form.dpdPolandCarrierPickupCODFilterFresh,
|
||||
form.dpdPolandCarrierPickupCODFilterFittingRoom,
|
||||
form.dpdPolandCarrierPickupCODFilterCardPayment,
|
||||
form.dpdPolandCarrierPickupCODFilterRod,
|
||||
form.dpdPolandCarrierPickupCODFilterLQ,
|
||||
form.dpdPolandCarrierPickupCODFilterDigitalLabel,
|
||||
form.dpdPolandCarrierPickupCODFilterDisabledFriendly,
|
||||
] %}
|
||||
<div class="row">
|
||||
{% for item in apiConnection %}
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-xl-3">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-2">
|
||||
<div class="col-12">
|
||||
<div class="pl-2">
|
||||
{{ form_label(form.dpdPolandCarrierStandard) }}
|
||||
{{ form_widget(form.dpdPolandCarrierStandard) }}
|
||||
{{ form_errors(form.dpdPolandCarrierStandard) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-2 col-10">
|
||||
|
||||
{% if dpdCarrier is not null and dpdCarrier is not empty and dpdCarrier[0].id is defined %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2" scope="col">{{ 'Id'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Id Shop'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-6" scope="col">{{ 'Name'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Visible'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Actions'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in dpdCarrier %}
|
||||
{% if row.id is defined %}
|
||||
<tr>
|
||||
<th>{{ row.id }}</th>
|
||||
<th>{{ row.idShop }}</th>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>
|
||||
{% if row.active %}
|
||||
<i class="color_success"></i> <i class="material-icons" style="color:#009d00">done</i>
|
||||
{% else %}
|
||||
<i class="color_danger"></i> <i class="material-icons" style="color:red">blockade</i>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('admin_carriers_edit', {'carrierId': row.id }) }}" type="button"
|
||||
class="btn btn-sm btn-secondary">{{ 'Configure'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-2">
|
||||
<div class="col-12">
|
||||
<div class="pl-2">
|
||||
{{ form_label(form.dpdPolandCarrierStandardCod) }}
|
||||
{{ form_widget(form.dpdPolandCarrierStandardCod) }}
|
||||
{{ form_errors(form.dpdPolandCarrierStandardCod) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-2 col-10">
|
||||
{% if dpdCarrierCod is not null and dpdCarrierCod is not empty and dpdCarrierCod[0].id is defined %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2" scope="col">{{ 'Id'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Id Shop'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-6" scope="col">{{ 'Name'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Visible'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
<th class="col-2" scope="col">{{ 'Actions'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in dpdCarrierCod %}
|
||||
{% if row.id is defined %}
|
||||
<tr>
|
||||
<th>{{ row.id }}</th>
|
||||
<th>{{ row.idShop }}</th>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>
|
||||
{% if row.active %}
|
||||
<i class="color_success"></i> <i class="material-icons" style="color:#009d00">done</i>
|
||||
{% else %}
|
||||
<i class="color_danger"></i> <i class="material-icons" style="color:red">blockade</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('admin_carriers_edit', {'carrierId': row.id }) }}" type="button"
|
||||
class="btn btn-sm btn-secondary">{{ 'Configure'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if shopContext == 1 %}
|
||||
<div class="row pt-2">
|
||||
<div class="col ml-3">
|
||||
<p class="mt-3 font-weight-bold">{{ 'COD payment methods'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}:</p>
|
||||
|
||||
{% for codPaymentMethod in form.dpdCarrierCodPaymentMethods %}
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="form-check form-check-inline">
|
||||
{{ form_widget(codPaymentMethod.enable, {'attr': {'class': 'form-check-input'}}) }}
|
||||
<label class="form-check-label" for="{{ codPaymentMethod.enable.vars.id }}"></label>
|
||||
</div>
|
||||
<span> {{ codPaymentMethod.displayName.vars.value }}</span>
|
||||
{{ form_errors(codPaymentMethod.enable) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
{% if shopContext == 1 %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_widget(form._token) }}
|
||||
{{ form_end(form, {'render_rest': false}) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Configuration'|trans({}, 'Modules.Dpdshipping.AdminConfiguration') }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ 'You are editing settings for multiple shops contexts. These settings will be applied to other contexts and may override current values.'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-wrapper">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminConfiguration') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Connection with DPD Poland'|trans({}, 'Modules.Dpdshipping.AdminConnection') }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ 'You are editing settings for multiple shops contexts. These settings will be applied to other contexts and may override current values.'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-wrapper">
|
||||
{% set inputs = [
|
||||
form.name,
|
||||
form.login,
|
||||
form.password,
|
||||
form.masterfid,
|
||||
form.environment,
|
||||
] %}
|
||||
{% for item in inputs %}
|
||||
<div class="form-group row select-widget">
|
||||
{{ form_label(item) }}
|
||||
<div class="col-sm input-container">
|
||||
{{ form_widget(item, {'attr': {'class': 'form-control'}}) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div> <div class="form-wrapper">
|
||||
{% set inputs = [
|
||||
form.isDefault,
|
||||
] %}
|
||||
{% for item in inputs %}
|
||||
<div class="form-group row select-widget">
|
||||
{{ form_label(item) }}
|
||||
<div class="col-xs-12 col-sm-8 offset-sm-4">
|
||||
{{ form_widget(item, {'attr': {'class': 'form-control'}}) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-8 offset-sm-3">
|
||||
<h4>
|
||||
{{ 'Payer data'|trans({}, 'Modules.Dpdshipping.AdminConnection') }}
|
||||
</h4>
|
||||
|
||||
<table class="table mb-2" id="fidTable">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="col-4">{{ 'FID number'|trans({}, 'Modules.Dpdshipping.AdminConnection') }}</th>
|
||||
<th class="col-3">{{ 'FID name'|trans({}, 'Modules.Dpdshipping.AdminConnection') }}</th>
|
||||
<th class="col-1">{{ 'Default'|trans({}, 'Modules.Dpdshipping.AdminConnection') }}</th>
|
||||
<th class="col-1"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for payer in form.payerList %}
|
||||
<tr>
|
||||
<td>{{ form_widget(payer.name) }}</td>
|
||||
<td>{{ form_widget(payer.fid) }}</td>
|
||||
<td>{{ form_widget(payer.default) }}</td>
|
||||
<td><i class="material-icons btn btn-sm text-secondary delete-icon-gray dpdshipping-remove-row">delete</i></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-8 offset-sm-3 pb-2 mb-4">
|
||||
<button type="button" class="btn btn-sm btn-secondary float-right" id="addFidRow">
|
||||
{{ 'Add row'|trans({}, 'Modules.Dpdshipping.Button') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminConnection') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/connection.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<a class="btn btn-primary float-right"
|
||||
href="{{ path('dpdshipping_connection_edit_form') }}">{{ 'Add new API connection'|trans({}, 'Modules.Dpdshipping.AdminAddress') }}</a>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
||||
{% block quotes_list_panel %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% include '@PrestaShop/Admin/Common/Grid/grid_panel.html.twig' with {'grid': quoteGrid} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/connection-grid.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,130 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="bg-white p-2">
|
||||
|
||||
<h2 class="pt-2 pb-2"> {{ 'Onboarding'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}</h2>
|
||||
|
||||
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ 'You are editing settings for multiple shops contexts. These settings will be applied to other contexts and may override current values.'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ form_start(form, { 'attr' : { 'class': 'row' } }) }}
|
||||
|
||||
<div class="col-sm-12 col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ 'DPD Poland API connections'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info mb-4" role="alert">
|
||||
{{ 'Configure DPD Poland API connection'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</div>
|
||||
|
||||
{% set apiConnection = [
|
||||
form.login,
|
||||
form.password,
|
||||
form.masterfid,
|
||||
form.defaultFidNumber,
|
||||
form.environment] %}
|
||||
{% for item in apiConnection %}
|
||||
|
||||
<div class="form-group row text-widget">
|
||||
{{ form_label(item) }}
|
||||
<div class="col-sm input-container">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ 'Carriers'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="alert alert-info mb-4" role="alert">
|
||||
{{ 'Select available shipping method. '|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</div>
|
||||
|
||||
{% set apiConnection = [
|
||||
form.carrierDpdPolandSwipBox,
|
||||
form.carrierDpdPolandPickup,
|
||||
form.carrierDpdPolandPickupCod,
|
||||
form.carrierDpdPoland,
|
||||
form.carrierDpdPolandCod] %}
|
||||
{% for item in apiConnection %}
|
||||
|
||||
<div class="col-10 offset-2">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ 'Sender address'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info mb-4" role="alert">
|
||||
{{ 'Configure default Sender address'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</div>
|
||||
|
||||
{% set apiConnection = [
|
||||
form.alias,
|
||||
form.company,
|
||||
form.name,
|
||||
form.street,
|
||||
form.postcode,
|
||||
form.city,
|
||||
form.country,
|
||||
form.phone,
|
||||
form.mail
|
||||
] %}
|
||||
{% for item in apiConnection %}
|
||||
|
||||
<div class="form-group row text-widget">
|
||||
{{ form_label(item) }}
|
||||
<div class="col-sm input-container">
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminOnboarding') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Default parameters'|trans({}, 'Modules.Dpdshipping.AdminParameter') }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ 'You are editing settings for multiple shops contexts. These settings will be applied to other contexts and may override current values.'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-wrapper">
|
||||
{% set inputs = [
|
||||
[form.ref1, form.ref1StaticValue],
|
||||
[form.ref2, form.ref2StaticValue],
|
||||
[form.customerData, form.customerDataStaticValue],
|
||||
[form.content, form.contentStaticValue],
|
||||
] %}
|
||||
{% for item in inputs %}
|
||||
<div class="form-group row text-widget">
|
||||
{{ form_label(item[0]) }}
|
||||
<div class="col input-container">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ form_widget(item[0]) }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ form_widget(item[1]) }}
|
||||
</div>
|
||||
{{ form_errors(item[0]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminParameter') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/parameters.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Pickup courier settings'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }} {{ pickupCourierId }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-wrapper">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<a class="btn btn-primary float-right"
|
||||
href="{{ path('dpdshipping_pickup_courier_settings_form') }}">{{ 'Add'|trans({}, 'Modules.Dpdshipping.AdminAddress') }}</a>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
||||
{% block quotes_list_panel %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% include '@PrestaShop/Admin/Common/Grid/grid_panel.html.twig' with {'grid': quoteGrid} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/pickup-courier-settings-grid.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,153 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-3">
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar-configuration.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-9">
|
||||
{{ form_start(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Special prices'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if shopContext > 1 %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ 'You are editing settings for multiple shops contexts. These settings will be applied to other contexts and may override current values.'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<p>
|
||||
{{ 'Select an available shipping method for the Create Prestashop carrier. You can manage carriers on the standard prestashop page.'|trans({}, 'Modules.Dpdshipping.AdminCarrier') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="pl-2">
|
||||
{{ form_label(form.specialPrice) }}
|
||||
{{ form_widget(form.specialPrice) }}
|
||||
{{ form_errors(form.specialPrice) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="pagination-info" class="text-right" style="margin-top: 1rem;">
|
||||
<span id="pagination-info-rows-from"></span> - <span id="pagination-info-rows-to"></span>
|
||||
{{ 'from'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
<span id="pagination-info-pages"></span>
|
||||
</div>
|
||||
<table id="specialPriceTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-1">{{ 'Country'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Cart price from (PLN)'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Cart price up to (PLN)'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Package weight from (kg)'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Package weight up to (kg)'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Price per package (PLN)'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-4">{{ 'Delivery method'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Price for COD service (PLN)'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
<th class="col-1">{{ 'Action'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in form.specialPriceList %}
|
||||
<tr>
|
||||
<td>{{ form_widget(item.isoCountry) }}</td>
|
||||
<td>{{ form_widget(item.priceFrom) }}</td>
|
||||
<td>{{ form_widget(item.priceTo) }}</td>
|
||||
<td>{{ form_widget(item.weightFrom) }}</td>
|
||||
<td>{{ form_widget(item.weightTo) }}</td>
|
||||
<td>{{ form_widget(item.parcelPrice) }}</td>
|
||||
<td>{{ form_widget(item.carrierType) }}</td>
|
||||
<td>{{ form_widget(item.codPrice) }}</td>
|
||||
<td>
|
||||
<i class="material-icons btn btn-sm text-secondary delete-icon-gray dpdshipping-remove-row float-right">delete</i>
|
||||
<i class="material-icons btn btn-sm text-secondary delete-icon-gray dpdshipping-duplicate-row float-right">content_copy</i>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col pb-2 pt-2 mb-4">
|
||||
<button type="button" class="btn btn-sm btn-secondary float-right" id="addFidRow">
|
||||
{{ 'Add row'|trans({}, 'Modules.Dpdshipping.Button') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dpdSpecialPricePagination" class="text-center mb-2"></div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-secondary float-right" id="save-button">
|
||||
{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
<div class="card">
|
||||
<h3 class="card-header bg-white">
|
||||
{{ 'Special price configuration'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6 border-right">
|
||||
<h4>{{ 'Export Data'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</h4>
|
||||
<p class="text-muted">
|
||||
{{ 'Click the button below to export your special price configuration data as a CSV file.'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</p>
|
||||
<button class="btn btn-secondary export-btn w-20" id="dpdSpecialPriceExportButton">
|
||||
<i class="fas fa-file-export"></i> {{ 'Export to CSV'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h4>{{ 'Import Data'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</h4>
|
||||
<p class="text-muted">
|
||||
{{ 'Choose a CSV file to upload and update your special price configuration data.'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</p>
|
||||
<div class="d-flex align-items-center">
|
||||
<label for="dpdSpecialPriceImportFile" class="btn btn-secondary m-0">
|
||||
<i class="fas fa-file-upload"></i> {{ 'Choose File'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</label>
|
||||
<input
|
||||
type="file"
|
||||
id="dpdSpecialPriceImportFile"
|
||||
class="import-file d-none"
|
||||
accept=".csv"
|
||||
/>
|
||||
<span id="selectedFileName" class="ml-2 text-muted">{{ 'No file chosen'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}</span>
|
||||
</div>
|
||||
<button class="btn btn-secondary import-btn w-20 mt-3" id="dpdSpecialPriceImportFileButton">
|
||||
<i class="fas fa-upload"></i> {{ 'Import CSV'|trans({}, 'Modules.Dpdshipping.AdminSpecialPrice') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/special-price.js') }}"></script>
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/configuration/special-price-data.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
{% set currentTimestampOrderDetailsCss = date("now")|date("U") %}
|
||||
<link rel="stylesheet" href="{{ asset('../modules/dpdshipping/views/admin/special-price.css?' ~ currentTimestampOrderDetailsCss) }}"/>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,5 @@
|
||||
{% if record.is_delivered %}
|
||||
<span class="badge badge-success">YES</span>
|
||||
{% else %}
|
||||
<span class="badge badge-danger">NO</span>
|
||||
{% endif %}
|
||||
33
modules/dpdshipping/views/templates/admin/grid/index.php
Normal file
33
modules/dpdshipping/views/templates/admin/grid/index.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
33
modules/dpdshipping/views/templates/admin/index.php
Normal file
33
modules/dpdshipping/views/templates/admin/index.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,68 @@
|
||||
{% trans_default_domain 'Module.Dpdshipping.Admin.Order' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="card p-0 m-0 border-0">
|
||||
<div class="card-header">
|
||||
<h3>
|
||||
<img class="dpdshipping-logo" src="/modules/dpdshipping/logo.png"
|
||||
alt="DPD Poland"/> {{ 'DPD Poland generate shipping'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
|
||||
<a href="{{ path('dpdshipping_connection_form') }}"><i class="material-icons float-right">settings</i></a>
|
||||
<a href="{{ path('dpdshipping_shipping_history_form') }}"><i class="material-icons float-right">history</i></a>
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
<div class="card-body pt-2">
|
||||
|
||||
<div class="alert-messages">
|
||||
{% if successMsg|length %}
|
||||
<div class="alert alert-success">{{ successMsg }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if errorMsg|length %}
|
||||
<div class="alert alert-danger">{{ errorMsg }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success success-message-ajax" style="display: none"></div>
|
||||
<div class="alert alert-danger error-message-ajax" style="display: none"></div>
|
||||
|
||||
<a href="{{ path('admin_orders_view', {'orderId': orderId}) }}" type="button"
|
||||
class="btn btn-primary">{{ 'New shipping'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</a>
|
||||
<button id="print-label"
|
||||
class="btn btn-secondary"
|
||||
data-url="{{ path('dpdshipping_shipping_history_print_labels_form') }}"
|
||||
data-shipping-history-id="{{ shippingHistoryId }}">
|
||||
{{ 'Print label'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
|
||||
{% if showReturnLabel|length %}
|
||||
<button id="print-return-label"
|
||||
class="btn btn-secondary"
|
||||
data-url="{{ path('dpdshipping_return_label') }}"
|
||||
data-shipping-history-id="{{ shippingHistoryId }}"
|
||||
data-order-id="{{ orderId }}">
|
||||
{{ 'Print return label'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{# #}
|
||||
{# <a href="{{ path('dpdshipping_return_label', {'shippingHistoryId': shippingHistoryId, 'orderId': orderId}) }}" type="button" #}
|
||||
{# class="btn btn-secondary">{{ 'Print return label'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</a> #}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
<link rel="stylesheet" href="{{ asset('../modules/dpdshipping/views/css/order-details.css') }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{% set currentTimestamp = date("now")|date("U") %}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/order-details.js?' ~ currentTimestamp) }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,458 @@
|
||||
{% trans_default_domain 'Module.Dpdshipping.Admin.Order' %}
|
||||
|
||||
{% form_theme form '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<input type="hidden" id="dpdShippingOrderProducts" data-products="{{ products | json_encode }}"/>
|
||||
<input type="hidden" id="dpdShippingOrderNumber" data-order-number="{{ order_reference }}"/>
|
||||
<input type="hidden" id="dpdShippingOrderNumberEmpik" data-order-number-empik="{{ order_reference_empik }}"/>
|
||||
<input type="hidden" id="dpdShippingOrderId" data-order-id="{{ order_id }}"/>
|
||||
<input type="hidden" id="dpdShippingDefaultWeight" data-default-weight="{{ default_weight }}"/>
|
||||
<input type="hidden" id="dpdShippingInvoiceNumber" data-invoice-number="{{ invoice_number }}"/>
|
||||
<input type="hidden" id="dpdShippingIsDpdCarrier" data-dpd-carrier="{{ is_dpd_carrier }}"/>
|
||||
<input type="hidden" id="dpdPudoFinderUrl" data-dpd-pudo-finder-url="{{ dpdPudoFinderUrl }}"/>
|
||||
<input type="hidden" id="dpdShippingSource"
|
||||
data-content-source="{{ content_source }}"
|
||||
data-order-source="{{ order_source }}"
|
||||
data-content-source-static="{{ content_source_static }}"
|
||||
data-customer-source="{{ customer_source }}"
|
||||
data-customer-source-static="{{ customer_source_static }}"
|
||||
/>
|
||||
|
||||
<input type="hidden" id="packageGroupType" value="{{ package_group_type }}"/>
|
||||
|
||||
<div class="card p-0 m-0 border-0">
|
||||
<div class="card-header">
|
||||
<h3>
|
||||
<img class="dpdshipping-logo" src="/modules/dpdshipping/logo.png"
|
||||
alt="DPD Poland"/> {{ 'DPD Poland generate shipping'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
|
||||
<a href="#" id="dpdToggleButton" class="float-right"><span class="material-icons">expand_less</span></a>
|
||||
<a href="{{ path('dpdshipping_connection_form') }}"><i class="material-icons float-right">settings</i></a>
|
||||
<a href="{{ path('dpdshipping_shipping_history_form') }}"><i class="material-icons float-right">history</i></a>
|
||||
</h3>
|
||||
|
||||
{% if dpd_carrier %}
|
||||
<span class="dpdshipping-carrier-name">{{ 'Carrier: '|trans({}, 'Modules.Dpdshipping.AdminOrder') }} <b>{{ dpd_carrier.name }}</b></span>
|
||||
{% else %}
|
||||
<span class="dpdshipping-carrier-name">{{ 'Carrier: '|trans({}, 'Modules.Dpdshipping.AdminOrder') }} <b>{{ 'The shipping method is different from DPD Poland, but you can still send it with DPD!'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</b></span>
|
||||
{% endif %}
|
||||
|
||||
{% if payment_method %}
|
||||
<span class="dpdshipping-carrier-name">{{ 'Payment: '|trans({}, 'Modules.Dpdshipping.AdminOrder') }} <b>{{ payment_method }}</b></span>
|
||||
{% endif %}
|
||||
|
||||
{% if order_source %}
|
||||
{% if order_source == 'DELIVERY_EMPIK_STORE' %}
|
||||
<span class="dpdshipping-carrier-name">{{ 'Source: '|trans({}, 'Modules.Dpdshipping.AdminOrder') }} <b>{{ 'Delivery to the EMPIK store'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</b></span>
|
||||
{% elseif order_source == 'EMPIK' %}
|
||||
<span class="dpdshipping-carrier-name">{{ 'Source: '|trans({}, 'Modules.Dpdshipping.AdminOrder') }} <b>{{ 'EMPIK marketplace'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</b></span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="row dpdApiPayer">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
{% set apiConnection = [
|
||||
form.connection_id] %}
|
||||
{% for item in apiConnection %}
|
||||
<div class="form-group mb-0">
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
{% set payer = [
|
||||
form.payer_number] %}
|
||||
{% for item in payer %}
|
||||
<div class="form-group mb-0">
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-2">
|
||||
{% if successMsg|length %}
|
||||
<div class="alert alert-success">{{ successMsg }}</div>
|
||||
{% elseif errors|length %}
|
||||
<div class="alert alert-danger">
|
||||
{% for error in errors %}
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form.vars.errors is not empty %}
|
||||
<div class="alert alert-danger">
|
||||
{% for error in form.vars.errors %}
|
||||
<p>{{ error.message }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if is_cod_payment and form.service_cod.vars.data == false %}
|
||||
<div class="alert alert-danger">
|
||||
<p>{{ 'The selected payment method is COD. You should check the COD service!'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="row dpd-shipping-generate-form">
|
||||
<div class="col-xs-12 col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 mb-1">
|
||||
<h4>{{ 'Sender address'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</h4>
|
||||
<select id="dpdShippingSenderAddresses" class="form-control mb-2">
|
||||
{% for item in sender_address_list %}
|
||||
<option data-address="{{ item | json_encode }}">{{ item.company }} {{ item.name }} {{ item.street }} {{ item.postcode }} {{ item.city }} {{ item.country }} {{ item.phone }} {{ item.email }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% set sender_address = [
|
||||
form.sender_address_company,
|
||||
form.sender_address_name,
|
||||
form.sender_address_street,
|
||||
form.sender_address_postcode,
|
||||
form.sender_address_city,
|
||||
form.sender_address_country,
|
||||
form.sender_address_phone,
|
||||
form.sender_address_email] %}
|
||||
{% for item in sender_address %}
|
||||
<div class="form-group">
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6 border-generate-shipping">
|
||||
<h4>{{ 'Receiver address'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</h4>
|
||||
|
||||
<select id="dpdShippingReceiverAddresses" class="form-control mb-2">
|
||||
{% for item in receiver_address_list %}
|
||||
<option data-address="{{ item | json_encode }}">{{ item.company }} {{ item.name }} {{ item.street }} {{ item.postcode }} {{ item.city }} {{ item.country }} {{ item.phone }} {{ item.email }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
{% set receiver_address = [
|
||||
form.receiver_address_company,
|
||||
form.receiver_address_name,
|
||||
form.receiver_address_street,
|
||||
form.receiver_address_postcode,
|
||||
form.receiver_address_city,
|
||||
form.receiver_address_country,
|
||||
form.receiver_address_phone,
|
||||
form.receiver_address_email] %}
|
||||
{% for item in receiver_address %}
|
||||
<div class="form-group">
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 dpd-shipping-services">
|
||||
<h4 class="mb-2">{{ 'Services'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</h4>
|
||||
|
||||
<div class="row mr-0">
|
||||
{% set services = [
|
||||
form.service_guarantee,
|
||||
form.service_guarantee_type,
|
||||
form.service_guarantee_value,
|
||||
form.service_in_pers,
|
||||
form.service_priv_pers,
|
||||
form.service_cod,
|
||||
form.service_cod_value,
|
||||
form.service_cod_currency,
|
||||
form.service_self_con,
|
||||
form.service_self_con_value,
|
||||
form.service_dpd_pickup,
|
||||
form.service_dpd_pickup_value,
|
||||
form.service_dpd_pickup_map,
|
||||
form.service_rod,
|
||||
form.service_dox,
|
||||
form.service_cud,
|
||||
form.service_tires,
|
||||
form.service_declared_value,
|
||||
form.service_declared_value_value,
|
||||
form.service_declared_value_currency,
|
||||
form.service_dpd_express,
|
||||
form.service_dpd_food,
|
||||
form.service_dpd_food_value,
|
||||
form.service_duty,
|
||||
form.service_duty_value,
|
||||
form.service_duty_currency,
|
||||
form.service_adr,
|
||||
form.service_return_label,
|
||||
form.service_return_label_address_company,
|
||||
form.service_return_label_address_name,
|
||||
form.service_return_label_address_street,
|
||||
form.service_return_label_address_city,
|
||||
form.service_return_label_address_postcode,
|
||||
form.service_return_label_address_country,
|
||||
form.service_return_label_address_phone,
|
||||
form.service_return_label_address_email
|
||||
] %}
|
||||
{% for item in services %}
|
||||
<div class="{{ item.vars.name }} form-group mb-0
|
||||
{% if item.vars.attr['data-hidden']|default(false) == true %} hidden {% endif %}
|
||||
{% if item.vars.name starts with 'service_return_label_' or
|
||||
item.vars.name starts with 'service_dpd_food_value' %} col-12
|
||||
{% elseif item.vars.attr['data-attribute']|default(false) == true %} m-0 pl-3 pt-1 p-0 col-xs-12 col-md-6
|
||||
{% elseif
|
||||
item.vars.name starts with 'service_cod_value' or
|
||||
item.vars.name starts with 'service_cod_currency' or
|
||||
item.vars.name starts with 'service_duty_value' or
|
||||
item.vars.name starts with 'service_duty_currency' or
|
||||
item.vars.name starts with 'service_dpd_pickup_value' or
|
||||
item.vars.name starts with 'service_dpd_pickup_map' %} m-0 pl-3 pt-1 p-0 col-xs-12 col-md-6
|
||||
{% else %} col-12
|
||||
{% endif %}">
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{% if item.vars.block_prefixes[0] != 'button' %}
|
||||
{{ form_errors(item) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not item.vars.attr['data-attribute']|default(false) == true or
|
||||
item.vars.name starts with 'service_cod_value' or
|
||||
item.vars.name starts with 'service_cod_currency' or
|
||||
item.vars.name starts with 'service_duty_value' or
|
||||
item.vars.name starts with 'service_duty_currency' or
|
||||
item.vars.name starts with 'service_dpd_pickup_value' or
|
||||
item.vars.name starts with 'service_dpd_pickup_map' %}
|
||||
<div class="clearfix"></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col mt-2 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-secondary" id="dpdShippingSingleShipping">
|
||||
{{ 'Single Shipping'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-secondary" id="dpdShippingGroupShipping">
|
||||
{{ 'Shipping for products group'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-secondary" id="dpdShippingPackageShipping">
|
||||
{{ 'Shipping for each product'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#dpdShippingCustomShippingModal" id="dpdShippingCustomShipping">
|
||||
{{ 'Custom'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<table class="table mb-2" id="packagesTable">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="col-1">{{ 'Weight [kg]'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="dpdShippingWeightAdr hidden" class="col-1">{{ 'Weight ADR [kg]'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-3">{{ 'Content'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-4">{{ 'Customer Data'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-1">{{ 'Size X [cm]'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-1">{{ 'Size Y [cm]'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-1">{{ 'Size Z [cm]'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-1"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in form.packages %}
|
||||
<tr>
|
||||
<td>{{ form_widget(item.weight, {'attr': {'fieldType': 'weight'}}) }}</td>
|
||||
<td class="dpdShippingWeightAdr hidden">{{ form_widget(item.weightAdr, {'attr': {'fieldType': 'weightAdr'}}) }}</td>
|
||||
<td>{{ form_widget(item.content, {'attr': {'fieldType': 'content'}}) }}</td>
|
||||
<td>{{ form_widget(item.customerData, {'attr': {'fieldType': 'customerData'}}) }}</td>
|
||||
<td>{{ form_widget(item.sizeX, {'attr': {'fieldType': 'sizeX'}}) }}</td>
|
||||
<td>{{ form_widget(item.sizeY, {'attr': {'fieldType': 'sizeY'}}) }}</td>
|
||||
<td>{{ form_widget(item.sizeZ, {'attr': {'fieldType': 'sizeZ'}}) }}</td>
|
||||
<td><i class="material-icons btn btn-sm text-secondary delete-icon-gray dpdshipping-remove-row">delete</i></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-sm btn-secondary float-right" id="dpdShippingAddRow">
|
||||
{{ 'Add row'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
{% set additionalFields = [
|
||||
form.ref1,
|
||||
form.ref2] %}
|
||||
{% for item in additionalFields %}
|
||||
<div class="form-group additional-fields-generate-shipping">
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<div class="alert alert-danger dpdShippingEmpikDpdPickupAlert" style="display: none">
|
||||
<p>{{ 'Warning! You are generating a shipment to Empik without the DPD Pickup Point service.'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end">
|
||||
<button class="btn btn-primary float-right" id="save-button">
|
||||
{{ 'Generate shipping'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{# MODAL #}
|
||||
<div class="modal fade" id="dpdShippingCustomShippingModal" tabindex="-1" role="dialog" aria-labelledby="dpdShippingCustomShippingModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="dpdShippingCustomShippingModalLabel">{{ 'DPD Poland custom shipping'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-inline">
|
||||
<div class="form-group mr-3">
|
||||
<label for="dpdShippingCustomShippingParcels" class="mr-2">{{ 'Packages'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</label>
|
||||
<input type="number" class="form-control" id="dpdShippingCustomShippingParcels" name="dpdShippingCustomShippingParcels" value="1">
|
||||
</div>
|
||||
<button id="dpdShippingCalcShippingRows" type="button"
|
||||
class="btn btn-secondary">{{ 'Change'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% for product in products %}
|
||||
<table class="table mb-0 pb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="col-xs-12 col-md-9">{{ 'Product'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-xs-12 col-md-3">{{ 'Package'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for productRow in range(0, (product.product_quantity|round(0, 'ceil'))-1) %}
|
||||
<tr>
|
||||
<td> {{ productRow+1 }} : {{ product.product_name }}
|
||||
<input type="hidden" name="dpdShippingCustomShippingProductName[{{ productRow }}][]" value="{{ product.product_name }}">
|
||||
<input type="hidden" name="dpdShippingCustomShippingProductId[{{ productRow }}][]" value="{{ product.product_id }}">
|
||||
<input type="hidden" name="dpdShippingCustomShippingProductWeight[{{ productRow }}][]" value="{{ product.product_weight }}">
|
||||
<input type="hidden" name="dpdShippingCustomShippingProductReference[{{ productRow }}][]" value="{{ product.product_reference }}">
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control dpdShippingCustomParcelSelect" name="dpdShippingCustomShippingParcel[{{ productRow }}][]">
|
||||
<option value="">-</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row hidden" id="dpdShippingParcelSummaryRow">
|
||||
<div class="col">
|
||||
<h3 class="mt-3">{{ 'Summary'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</h3>
|
||||
<table class="table mb-0 pb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="col-xs-12 col-md-2">{{ 'Package number'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-xs-12 col-md-6">{{ 'Content'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-xs-12 col-md-6">{{ 'Customer data'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-xs-12 col-md-4">{{ 'Products weight'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="dpdShippingCustomParcelSummaryTable">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="dpdShippingCustomParcelSave" type="button" class="btn btn-secondary"
|
||||
data-dismiss="modal">{{ 'Save'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="dpdshippingPudoModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dpd-xl" role="document">
|
||||
<div class="modal-content modal-dpd-content">
|
||||
<div class="modal-body modal-dpd-body">
|
||||
|
||||
<script id="dpdshiping-widget-pudo" type="text/javascript">
|
||||
function dpdShippingPointSelected(pudoCode) {
|
||||
$('#dpd_shipping_generate_shipping_service_dpd_pickup_value').val(pudoCode);
|
||||
$('#dpdshippingPudoModal').modal('toggle');
|
||||
$(".modal-backdrop").hide();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
const dpdshipping_iframe = document.createElement("iframe");
|
||||
dpdshipping_iframe.setAttribute("id", "dpdshiping-widget-pudo-iframe");
|
||||
dpdshipping_iframe.setAttribute("allow", "geolocation");
|
||||
dpdshipping_iframe.src = '//pudofinder.dpd.com.pl/widget?key=1ae3418e27627ab52bebdcc1a958fa04';
|
||||
dpdshipping_iframe.style.width = "100%";
|
||||
dpdshipping_iframe.style.border = "none";
|
||||
dpdshipping_iframe.style.minHeight = "400px";
|
||||
dpdshipping_iframe.style.height = "700px";
|
||||
|
||||
const dpdshipping_script = document.getElementById("dpdshiping-widget-pudo");
|
||||
if (dpdshipping_script)
|
||||
dpdshipping_script.parentNode.insertBefore(dpdshipping_iframe, dpdshipping_script);
|
||||
|
||||
const dpdshipping_eventListener = window[window.addEventListener ? "addEventListener" : "attachEvent"];
|
||||
const dpdshipping_messageEvent = ("attachEvent" === dpdshipping_eventListener) ? "onmessage" : "message";
|
||||
dpdshipping_eventListener(dpdshipping_messageEvent, function (a) {
|
||||
if (a.data.height && !isNaN(a.data.height)) {
|
||||
dpdshipping_iframe.style.height = a.data.height + "px"
|
||||
} else if (a.data.point_id)
|
||||
dpdShippingPointSelected(a.data.point_id);
|
||||
}, !1);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<div class="modal-footer modal-dpd-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ 'Close'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block stylesheets %}
|
||||
{% set currentTimestampOrderDetailsCss = date("now")|date("U") %}
|
||||
<link rel="stylesheet" href="{{ asset('../modules/dpdshipping/views/css/order-details.css?' ~ currentTimestampOrderDetailsCss) }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{% set currentTimestampOrderDetailsJs = date("now")|date("U") %}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/order-details.js?' ~ currentTimestampOrderDetailsJs) }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
33
modules/dpdshipping/views/templates/admin/order/index.php
Normal file
33
modules/dpdshipping/views/templates/admin/order/index.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,17 @@
|
||||
{% trans_default_domain 'Module.Dpdshipping.Admin.Order' %}
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link"
|
||||
id="dpdShippingTrackingTab"
|
||||
data-toggle="tab"
|
||||
href="#dpdShippingTrackingTabContent"
|
||||
role="tab"
|
||||
aria-controls="dpdShippingTrackingTabContent"
|
||||
aria-expanded="true"
|
||||
aria-selected="false"
|
||||
>
|
||||
<img class="dpdshipping-logo" src="/modules/dpdshipping/logo.png"
|
||||
alt="DPD Poland" style="width: 25px; margin-right: 10px;"/>
|
||||
{{ 'DPD Shipping history'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -0,0 +1,62 @@
|
||||
{% trans_default_domain 'Module.Dpdshipping.Admin.Order' %}
|
||||
|
||||
<div class="tab-pane fade show" id="dpdShippingTrackingTabContent" role="tabpanel" aria-labelledby="trackingTab">
|
||||
<table class="table p-0 m-0">
|
||||
<tbody>
|
||||
{% if shippingHistory|length <= 0 %}
|
||||
{{ 'No shipments'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
{% endif %}
|
||||
|
||||
{% for shipment in shippingHistory %}
|
||||
<tr>
|
||||
<td class="col-md-3"><strong><a href="https://tracktrace.dpd.com.pl/parcelDetails?typ=1&p1={{ shipment.shippingNumber }}"
|
||||
target="_blank">{{ shipment.shippingNumber }}</a></strong>
|
||||
</td>
|
||||
<td class="col-md-1">
|
||||
{% set isDelivered = false %}
|
||||
{% for stateObject in shipment.states %}
|
||||
{% if stateObject.state|trim == "Przesyłka doręczona" %}
|
||||
{% set isDelivered = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if shipment.states|length <= 0 %}
|
||||
<i class="material-icons icon">not_listed_location</i>
|
||||
{% elseif isDelivered %}
|
||||
<i class="material-icons icon">done</i>
|
||||
{% else %}
|
||||
<i class="material-icons icon">flight_takeoff</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="col-md-8">
|
||||
{% if shipment.states is defined and shipment.states|length > 0 %}
|
||||
<button class="btn dpdshipping-tracking-detail-btn btn-icon-right dpdshipping-btn-full-width mb-2">
|
||||
{{ shipment.states[0].dateTime |date("d-m-Y H:i:s") }} - {{ shipment.states[0].state }}
|
||||
<i class="material-icons icon">expand_more</i>
|
||||
</button>
|
||||
{% else %}
|
||||
{{ 'No data'|trans({}, 'Modules.Dpdshipping.AdminOrder') }}
|
||||
{% endif %}
|
||||
|
||||
<table class="table pb-0 mb-0 dpdshipping-tracking-detail hidden">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="col-md-4 col-xl-3 border-0">{{ 'Date and time '|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
<th class="col-md-8 col-xs-9 border-0">{{ 'State '|trans({}, 'Modules.Dpdshipping.AdminOrder') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for state in shipment.states %}
|
||||
<tr>
|
||||
<td><strong>{{ state.dateTime |date("d-m-Y H:i:s") }}</strong></td>
|
||||
<td>{{ state.state }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,129 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
{% block quotes_list_panel %}
|
||||
|
||||
<p class="alert alert-danger errorMessagePickupCourier" style="display: none"></p>
|
||||
<p class="alert alert-warning warnMessagePickupCourier" style="display: none"></p>
|
||||
|
||||
<div class="bg-white p-2">
|
||||
<h2 class="pt-2 pb-2"> {{ 'Pickup courier'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}</h2>
|
||||
|
||||
{{ form_start(form, { 'attr' : { 'class': 'row','id': 'dpdshipping_pickup_courier_form' } }) }}
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<h3>
|
||||
{{ 'Sender address'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</h3>
|
||||
|
||||
{{ form_label(form.dpdshipping_pickup_courier_sender_address) }}
|
||||
{{ form_widget(form.dpdshipping_pickup_courier_sender_address) }}
|
||||
|
||||
<div class="card bg-light" id="senderAddressContainer" style="display: none">
|
||||
<div class="card-body">
|
||||
<p class="m-0" id="senderFullName"></p>
|
||||
<p class="m-0" id="senderName"></p>
|
||||
<p class="m-0" id="senderAddress"></p>
|
||||
<p class="m-0" id="senderPostalCode"></p>
|
||||
<p class="m-0" id="senderCity"></p>
|
||||
<p class="m-0" id="senderCountryCode"></p>
|
||||
<p class="m-0" id="senderPhone"></p>
|
||||
<p class="m-0"><strong>{{ 'Payer number:'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</strong> <span id="payerNumber"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set senderAddress = [
|
||||
form.customer_company,
|
||||
form.customer_name,
|
||||
form.customer_phone
|
||||
] %}
|
||||
{% for item in senderAddress %}
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item, { 'attr' : { 'class': 'mb-2' } }) }}
|
||||
{{ form_errors(item) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<h3>
|
||||
{{ 'Pickup date and time'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</h3>
|
||||
{% set pickup = [
|
||||
form.pickup_date
|
||||
] %}
|
||||
{% for item in pickup %}
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
{{ form_errors(item) }}
|
||||
<div class="mb-2"></div>
|
||||
{% endfor %}
|
||||
|
||||
<div id="button_get_pickup_time_frames" class="btn btn-primary btn-sm mb-3" style="float: right;">
|
||||
{{ 'Get pickup time frames'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div id="pickupTimeContainer" style="display: none">
|
||||
{% set pickup = [
|
||||
form.pickup_time
|
||||
] %}
|
||||
{% for item in pickup %}
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item) }}
|
||||
<div class="mb-2"></div>
|
||||
{% endfor %}
|
||||
|
||||
<p class="mt-2 alert alert-info">
|
||||
{{ 'Date available until'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
<span class="p-0" id="timeFrameHour"></span> {{ 'on '|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }} <span class="p-0" id="timeFrameDate"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<h3>
|
||||
{{ 'Shipping'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</h3>
|
||||
{% set shipping = [
|
||||
form.letters,
|
||||
form.letters_count,
|
||||
form.packages,
|
||||
form.packages_count,
|
||||
form.packages_weight_sum,
|
||||
form.packages_weight_max,
|
||||
form.packages_size_x_max,
|
||||
form.packages_size_y_max,
|
||||
form.packages_size_z_max,
|
||||
|
||||
form.palette,
|
||||
form.palette_count,
|
||||
form.palette_weight_sum,
|
||||
form.palette_weight_max,
|
||||
form.palette_size_y_max,
|
||||
] %}
|
||||
{% for item in shipping %}
|
||||
{{ form_label(item) }}
|
||||
{{ form_widget(item, { 'attr' : { 'class': 'mb-2' } }) }}
|
||||
{{ form_errors(item) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3 mb-3">
|
||||
<button class="btn btn-primary float-right" id="pickup-courier-add-save-button">
|
||||
{{ 'Pickup courier'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/dpdshipping-pickup-courier.js') }}"></script>
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/dpdshipping-pickup-courier-ajax.js') }}"></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
{% block quotes_list_panel %}
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<a class="btn btn-primary float-right"
|
||||
href="{{ path('dpdshipping_pickup_courier_edit_form') }}">{{ 'Pickup courier'|trans({}, 'Modules.Dpdshipping.AdminPickupCourier') }}</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
{% include '@PrestaShop/Admin/Common/Grid/grid_panel.html.twig' with {'grid': quoteGrid} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/pickup-courier-grid.js') }}"></script>
|
||||
<script src="{{ asset('themes/default/js/bundle/pagination.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2024 DPD Polska Sp. z o.o.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author DPD Polska Sp. z o.o.
|
||||
* @copyright 2024 DPD Polska Sp. z o.o.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -0,0 +1,260 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
<div class="container-fluid pt-2 pb-2 bg-white">
|
||||
|
||||
<h2 class="pt-2">
|
||||
{{ 'Shipping details'|trans({}, 'Modules.Dpdshipping.Admin') }}
|
||||
<p class="dpdshipping-order-detail-shipping-subtitle">2024-03-15 10:30:00</p>
|
||||
<p class="dpdshipping-order-detail-shipping-subtitle">{{ 'Order'|trans({}, 'Modules.Dpdshipping.Admin') }}: <b>{{ orderId }}</b></p>
|
||||
</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="mb-0">{{ 'Sender Address'|trans({}, 'Modules.Dpdshipping.Admin') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Company'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">Company name</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Sender Name'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">John Doe</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Address'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">123 Main Street, City, State, ZIP</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Phone'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">123-456-7890</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="mb-0">{{ 'Receiver Address'|trans({}, 'Modules.Dpdshipping.Admin') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Company'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">Company name</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Sender Name'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">John Doe</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Address'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">123 Main Street, City, State, ZIP</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Phone'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">123-456-7890</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="mb-0">{{ 'Services'|trans({}, 'Modules.Dpdshipping.Admin') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p class="card-text"><strong>COD</strong> 70,00 PLN</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="mb-0">{{ 'Additional Fields'|trans({}, 'Modules.Dpdshipping.Admin') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Reference 1'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">ref 1</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Reference 2'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">ref 2</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="mb-0">{{ 'Payer'|trans({}, 'Modules.Dpdshipping.Admin') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Payer FID'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">14002</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<p class="mb-0">{{ 'Tracking'|trans({}, 'Modules.Dpdshipping.Admin') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-bordered pb-0 mb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="col-md-6 col-xl-5 border-0">{{ 'Date and time'|trans({}, 'Modules.Dpdshipping.Admin') }}</th>
|
||||
<th class="col-md-6 col-xs-7 border-0">{{ 'State'|trans({}, 'Modules.Dpdshipping.Admin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>2024-03-15 10:30:00</strong></td>
|
||||
<td>In transit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>2024-03-16 08:45:00</strong></td>
|
||||
<td>Arrived at destination</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>2024-03-17 14:20:00</strong></td>
|
||||
<td>Delivered</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<h3 class="">Parcels</h3>
|
||||
<div class="card-columns">
|
||||
|
||||
{% for item in range(0,10) %}
|
||||
<div class="card bg-light mb-4" style="">
|
||||
<div class="card-header"><a href="https://tracktrace.dpd.com.pl/parcelDetails?typ=1&p1=1000729568879U"
|
||||
target="_blank">1000729568879U</a></div>
|
||||
<div class="card-body bg-white ">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Content'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">Content data</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Customer data'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text">Customer data</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Size X'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Size Y'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="card-text"><strong>{{ 'Size Z'|trans({}, 'Modules.Dpdshipping.Admin') }}:</strong></p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p class="card-text"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
{% set currentTimestampOrderDetailsCss = date("now")|date("U") %}
|
||||
<link rel="stylesheet" href="{{ asset('../modules/dpdshipping/views/css/admin/shipping-detail.css?' ~ currentTimestampOrderDetailsCss) }}"/>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,22 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include '@Modules/dpdshipping/views/templates/admin/_partials/navbar.html.twig' %}
|
||||
|
||||
{% block quotes_list_panel %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% include '@PrestaShop/Admin/Common/Grid/grid_panel.html.twig' with {'grid': quoteGrid} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src="{{ asset('../modules/dpdshipping/views/js/shipping-history-grid.js') }}"></script>
|
||||
<script src="{{ asset('themes/default/js/bundle/pagination.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user