Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit d392ca54 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete e27d8c0f 03123859
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
<?php
/**
* This file contains package_quiqqer_shipping_ajax_backend_tracking_getList
*/
use QUI\ERP\Shipping\Tracking;
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_tracking_getList',
function () {
return Tracking\Tracking::getActiveCarriers();
},
false,
'Permission::checkAdminUser'
);
.quiqqer-shipping-trackingInput {
}
.quiqqer-shipping-trackingInput-input {
border: none;
width: calc(100% - 100px);
}
.quiqqer-shipping-trackingInput-input:hover {
border: none;
}
.quiqqer-shipping-trackingInput-contextMenu .qui-contextitem-icon,
.quiqqer-shipping-trackingInput .qui-select .icon {
background-size: 80% auto !important;
}
/**
* @module package/quiqqer/shipping/bin/backend/controls/TrackingInput
* @author www.pcsg.de (Henning Leutz)
*/
define('package/quiqqer/shipping/bin/backend/controls/TrackingInput', [
'qui/QUI',
'qui/controls/Control',
'qui/controls/buttons/Select',
'Ajax',
'css!package/quiqqer/shipping/bin/backend/controls/TrackingInput.css'
], function (QUI, QUIControl, QUISelect, QUIAjax) {
"use strict";
return new Class({
Extends: QUIControl,
Type : 'package/quiqqer/shipping/bin/backend/controls/TrackingInput',
Binds: [
'$onImport',
'$onChange'
],
initialize: function (options) {
this.parent(options);
this.addEvents({
onImport: this.$onImport
});
},
$onImport: function () {
this.$Value = this.$Elm;
this.$Value.setStyle('display', 'none');
this.$Elm = new Element('div').wraps(this.$Value);
this.$Elm.addClass('quiqqer-shipping-trackingInput');
this.$Elm.addClass('field-container-field');
this.$Elm.addClass('field-container-field-no-padding');
this.$TrackingType = new QUISelect({
events: {
onChange: this.$onChange
},
styles: {
width: 100
}
}).inject(this.$Elm);
this.$TrackingType.$Menu.getElm().addClass('quiqqer-shipping-trackingInput-contextMenu');
this.$Input = new Element('input').inject(this.$Elm);
this.$Input.addClass('quiqqer-shipping-trackingInput-input');
this.$Input.addEvent('change', this.$onChange);
this.$Input.addEvent('blur', this.$onChange);
this.getTrackingList().then((list) => {
for (let i = 0, len = list.length; i < len; i++) {
this.$TrackingType.appendChild(
list[i].title,
list[i].type,
URL_OPT_DIR + list[i].image
);
}
});
},
/**
* Return the tracking information
*
* @returns {Promise}
*/
getTrackingList: function () {
return new Promise((resolve) => {
QUIAjax.get('package_quiqqer_shipping_ajax_backend_tracking_getList', resolve, {
'package': 'quiqqer/shipping'
});
});
},
$onChange: function () {
const tracking = this.$TrackingType.getValue();
const trackingNumber = this.$Input.value;
this.$Value.set('value', JSON.encode({
type : tracking,
number: trackingNumber
}));
},
setValue: function (value) {
if (typeof value === 'string') {
value = JSON.decode(value);
}
this.$TrackingType.setValue(value.type);
this.$Input.value = value.number;
}
});
});
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Ebene_1"
width="175.748"
height="38.785999"
viewBox="0 0 175.748 38.786"
overflow="visible"
enable-background="new 0 0 175.748 38.786"
xml:space="preserve"
sodipodi:docname="DHL_Logo.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)"><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1680"
inkscape:window-height="988"
id="namedview7"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="2"
inkscape:cx="117.60352"
inkscape:cy="-18.612463"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Ebene_1" />
<polygon
fill="#fecc00"
points="0,38.786 0,0 175.748,0 175.748,38.786 "
id="polygon2" />
<path
fill="#d50029"
d="m 56.665,16.206 c -0.768,1.04 -2.053,2.848 -2.835,3.904 -0.397,0.537 -1.114,1.512 1.263,1.512 2.515,0 12.515,0 12.515,0 0,0 2.017,-2.744 3.708,-5.039 2.3,-3.122 0.199,-9.618 -8.024,-9.618 -7.36,0 -32.384,0 -32.384,0 l -5.615,7.629 c 0,0 29.109,0 30.603,0 1.545,0 1.524,0.588 0.769,1.612 z m -9.194,7.298 c -2.377,0 -1.66,-0.977 -1.263,-1.514 0.782,-1.056 2.088,-2.845 2.856,-3.885 0.756,-1.024 0.776,-1.612 -0.771,-1.612 -1.493,0 -13.996,0 -13.996,0 L 23.02,31.819 c 0,0 20.141,0 27.501,0 9.083,0 14.14,-6.178 15.699,-8.314 0,-10e-4 -16.235,-10e-4 -18.749,-10e-4 z m 17.89,8.315 h 16.133 l 6.116,-8.316 -16.131,0.002 c -0.005,-10e-4 -6.118,8.314 -6.118,8.314 z m 41.625,-24.854 -6.188,8.405 h -7.2 L 99.783,6.965 H 83.655 l -10.79,14.657 h 39.46 L 123.112,6.965 Z M 88.694,31.819 h 16.127 l 6.119,-8.314 H 94.813 c -0.006,-10e-4 -6.119,8.314 -6.119,8.314 z M 0,26.784 v 1.766 h 22.468 l 1.298,-1.766 z m 26.181,-3.28 H 0 v 1.764 H 24.88 Z M 0,31.819 h 20.061 l 1.292,-1.756 H 0 Z m 152.072,-3.27 h 23.676 v -1.766 h -22.376 z m -2.405,3.27 h 26.081 v -1.756 h -24.79 z m 6.116,-8.315 -1.297,1.766 h 21.262 V 23.504 Z M 134.659,21.622 145.448,6.965 h -17.081 c -0.006,0 -10.797,14.657 -10.797,14.657 z m -18.472,1.882 c 0,0 -1.179,1.611 -1.752,2.387 -2.025,2.736 -0.234,5.928 6.376,5.928 7.636,0 25.901,0 25.901,0 l 6.119,-8.314 h -36.644 z"
id="path4" />
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="DPD_Black" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="448.931px" height="206px" viewBox="79.5 293.5 448.931 206" enable-background="new 79.5 293.5 448.931 206"
xml:space="preserve">
<g>
<path fill="#414042" d="M372.345,441.876c-8.398,2.223-19.338,3.323-28.849,3.323c-24.413,0-40.579-12.992-40.579-36.771
c0-22.505,15.057-37.083,37.094-37.083c4.912,0,10.14,0.625,13.313,2.216v-32.668h19.021V441.876z M353.324,390.36
c-3.013-1.426-6.974-2.219-11.737-2.219c-11.563,0-19.333,7.136-19.333,19.656c0,13.476,8.399,21.087,21.874,21.087
c2.379,0,6.023-0.163,9.196-0.793V390.36z M528.431,441.876c-8.406,2.223-19.343,3.323-28.854,3.323
c-24.409,0-40.584-12.992-40.584-36.771c0-22.505,15.064-37.083,37.101-37.083c4.913,0,10.144,0.625,13.315,2.216v-32.668h19.021
V441.876z M509.409,390.36c-3.016-1.426-6.979-2.219-11.733-2.219c-11.57,0-19.336,7.136-19.336,19.656
c0,13.476,8.399,21.087,21.874,21.087c2.375,0,6.023-0.163,9.195-0.793V390.36z M402.258,390.204
c3.168-1.271,7.6-1.742,11.404-1.742c11.733,0,19.818,6.814,19.818,19.015c0,14.393-8.955,20.902-20.929,21.07v16.642
c0.314,0,0.634,0.011,0.957,0.011c24.565,0,39.312-13.785,39.312-38.354c0-22.35-15.691-35.501-38.836-35.501
c-11.727,0-23.304,2.695-30.91,5.862v94.953h19.184V390.204z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="366.751" y1="-291.9131" x2="736.271" y2="18.1508" gradientTransform="matrix(0.229 0 0 -0.229 0.3856 397.0497)">
<stop offset="0" style="stop-color:#A90034"/>
<stop offset="0.2717" style="stop-color:#BB0033"/>
<stop offset="0.7226" style="stop-color:#D30032"/>
<stop offset="1" style="stop-color:#DC0032"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M199.681,385.541c-0.787,0.459-2.021,0.423-2.789-0.052l-4.522-2.688
c-0.368-0.228-0.706-0.593-0.961-1.032c-0.015-0.025-0.03-0.051-0.045-0.077c-0.289-0.471-0.453-0.968-0.47-1.424l-0.115-5.272
c-0.034-0.888,0.552-1.971,1.342-2.432l54.362-31.67l-76.285-41.577c-0.84-0.466-1.948-0.691-3.057-0.693
c-1.11-0.002-2.22,0.229-3.061,0.693l-76.286,41.578l85.46,49.75c0.792,0.433,1.394,1.461,1.394,2.389v72.576
c0,0.911-0.652,1.958-1.45,2.384l-4.599,2.554c-0.382,0.203-0.868,0.312-1.376,0.312c-0.029,0-0.059,0-0.088,0
c-0.552,0.013-1.065-0.096-1.467-0.312l-4.614-2.555c-0.784-0.417-1.425-1.469-1.425-2.383l0.001-64.698
c-0.041-0.474-0.388-1.052-0.768-1.27l-75.292-43.829v85.848c-0.001,1.921,1.354,4.291,3.014,5.262l77.543,45.732
c0.829,0.486,1.921,0.728,3.012,0.724c1.092-0.003,2.184-0.231,3.011-0.723l77.555-45.733c1.654-0.981,3.005-3.338,3.003-5.262
v-85.847L199.681,385.541z"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 11 Build 196, SVG Export Plug-In -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="74.535995"
height="33.924999"
viewBox="-0.81 -0.354 74.535996 33.924999"
xml:space="preserve"
id="svg2"
version="1.1"
inkscape:version="0.48.1 "
sodipodi:docname="AJAX.svg"><metadata
id="metadata32"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1280"
inkscape:window-height="1004"
id="namedview30"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0.2"
fit-margin-bottom="0"
inkscape:zoom="10.026645"
inkscape:cx="50.329457"
inkscape:cy="13.826428"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g6" />
<defs
id="defs4">
</defs>
<g
id="g6"
transform="translate(-0.81,-0.35400034)">
<polygon
points="59.95,7.772 62.928,11.054 65.795,7.772 71.917,7.772 65.934,14.5 71.999,21.283 65.63,21.283 62.68,17.975 59.757,21.283 53.607,21.283 59.619,14.528 53.607,7.772 "
id="polygon10"
style="fill:#ff5900" />
<polygon
points="53.607,7.772 53.607,12.337 46.798,12.337 46.798,16.526 53.607,16.526 53.607,21.283 41.794,21.283 41.794,0 53.607,0 53.607,4.744 46.798,4.744 46.798,7.772 "
id="polygon12"
style="fill:#ff5900" />
<path
d="M 36.811,0 V 8.71 H 36.756 C 35.652,7.442 34.274,7.001 32.675,7.001 c -3.276,0 -5.744,2.228 -6.61,5.172 C 25.076,8.929 22.528,6.94 18.75,6.94 c -3.068,0 -5.491,1.377 -6.755,3.621 V 7.772 H 5.653 V 4.744 h 6.921 V 0 H 0 v 21.283 h 5.653 v -8.946 h 5.635 c -0.168,0.657 -0.258,1.361 -0.258,2.104 0,4.439 3.392,7.555 7.72,7.555 3.64,0 6.039,-1.709 7.307,-4.824 h -4.845 c -0.655,0.937 -1.152,1.214 -2.462,1.214 -1.519,0 -2.829,-1.325 -2.829,-2.896 h 9.865 c 0.428,3.526 3.175,6.567 6.944,6.567 1.626,0 3.115,-0.8 4.025,-2.15 h 0.055 v 1.378 h 4.983 V 0 H 36.811 z M 16.079,12.4 c 0.314,-1.352 1.363,-2.235 2.672,-2.235 1.441,0 2.436,0.856 2.698,2.235 0.11,0 -5.37,0 -5.37,0 z m 17.707,5.643 c -1.837,0 -2.979,-1.712 -2.979,-3.499 0,-1.91 0.993,-3.747 2.979,-3.747 2.059,0 2.879,1.837 2.879,3.747 0,1.811 -0.869,3.499 -2.879,3.499 z"
id="path14"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 41.795,31.925 v -7.627 h 4.214 v 0.569 H 42.49 v 2.812 h 3.37 v 0.569 h -3.37 v 3.106 h 3.676 v 0.57 h -4.371 z"
id="path16"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 46.669,31.925 2.055,-2.739 -1.949,-2.591 h 0.79 l 1.591,2.117 1.559,-2.117 h 0.79 l -1.98,2.591 2.064,2.739 h -0.8 l -1.707,-2.266 -1.622,2.266 h -0.791 z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 52.926,33.925 h -0.643 v -5.739 c 0,-0.527 0,-1.063 -0.032,-1.591 h 0.633 l 0.021,0.801 c 0.399,-0.633 0.926,-0.927 1.717,-0.927 1.643,0 2.348,1.358 2.348,2.79 0,1.434 -0.705,2.792 -2.348,2.792 -0.738,0 -1.317,-0.284 -1.696,-0.896 v 2.77 z m 3.36,-4.666 c 0,-1.137 -0.475,-2.254 -1.738,-2.254 -1.19,0 -1.622,0.98 -1.622,2.254 0,1.275 0.432,2.254 1.622,2.254 1.264,0 1.738,-1.116 1.738,-2.254 z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 60.274,27.089 c -1.064,0 -1.434,0.896 -1.434,1.822 v 3.014 h -0.643 v -3.762 c 0,-0.516 -0.01,-1.041 -0.031,-1.568 H 58.8 l 0.041,0.769 c 0.316,-0.61 0.844,-0.895 1.549,-0.895 0.095,0 0.2,0.01 0.295,0.021 v 0.643 C 60.537,27.11 60.421,27.089 60.274,27.089 z"
id="path22"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 61.472,29.375 c 0,1.2 0.568,2.19 1.737,2.19 0.905,0 1.327,-0.6 1.485,-1.2 h 0.611 c -0.285,1.116 -0.97,1.686 -2.181,1.686 -1.622,0 -2.339,-1.201 -2.339,-2.696 0,-1.527 0.748,-2.886 2.423,-2.886 1.696,0 2.149,1.484 2.149,2.906 h -3.885 z m 0.02,-0.484 h 3.181 c 0,-1.043 -0.494,-1.938 -1.506,-1.938 -0.916,-10e-4 -1.549,0.694 -1.675,1.938 z"
id="path24"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 67.866,32.051 c -1.095,0 -1.916,-0.517 -1.916,-1.686 h 0.643 c 0,0.8 0.526,1.2 1.306,1.2 0.727,0 1.295,-0.348 1.295,-1.062 0,-0.643 -0.663,-0.812 -1.358,-1.012 -0.842,-0.242 -1.759,-0.506 -1.759,-1.538 0,-1.147 0.958,-1.484 1.854,-1.484 1.031,0 1.801,0.399 1.832,1.505 H 69.12 c -0.031,-0.631 -0.484,-0.989 -1.169,-0.989 -0.537,0 -1.19,0.21 -1.19,0.905 0,0.633 0.653,0.812 1.348,1.001 0.844,0.231 1.77,0.484 1.77,1.517 -0.001,1.2 -0.927,1.643 -2.013,1.643 z"
id="path26"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
<path
d="m 72.322,32.051 c -1.096,0 -1.917,-0.517 -1.917,-1.686 h 0.643 c 0,0.8 0.526,1.2 1.307,1.2 0.727,0 1.295,-0.348 1.295,-1.062 0,-0.643 -0.664,-0.812 -1.359,-1.012 -0.842,-0.242 -1.758,-0.506 -1.758,-1.538 0,-1.147 0.958,-1.484 1.854,-1.484 1.031,0 1.801,0.399 1.832,1.505 h -0.643 c -0.031,-0.631 -0.484,-0.989 -1.169,-0.989 -0.537,0 -1.19,0.21 -1.19,0.905 0,0.633 0.653,0.812 1.349,1.001 0.843,0.231 1.77,0.484 1.77,1.517 -0.002,1.2 -0.929,1.643 -2.014,1.643 z"
id="path28"
inkscape:connector-curvature="0"
style="fill:#2a007c" />
</g>
</svg>
\ No newline at end of file
bin/images/tracking/lasership.png

24,1 KiB

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="142.47523"
height="92.536247"
viewBox="0 0 37.696571 24.483549"
version="1.1"
id="svg22441"
inkscape:version="0.92.0 r15299"
sodipodi:docname="ontrac.svg">
<defs
id="defs22435" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.9998627"
inkscape:cx="70.737612"
inkscape:cy="38.234782"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
units="px"
inkscape:window-width="1280"
inkscape:window-height="744"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1" />
<metadata
id="metadata22438">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-115.58054,-241.55678)">
<g
id="g22670"
transform="translate(0.13229129,-0.13228478)">
<path
inkscape:connector-curvature="0"
id="path20140"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 149.54662,263.00403 c 0,1.04704 -0.37006,1.48378 -1.04493,1.48378 -0.67486,0 -1.04634,-0.43674 -1.04634,-1.48378 v -3.34116 c 0,-1.04493 0.37148,-1.48449 1.04634,-1.48449 0.67487,0 1.04493,0.43956 1.04493,1.48449 v 0.23742 h 1.88912 c -0.0325,-1.94133 -0.80997,-3.27307 -2.93405,-3.27307 -2.15935,0 -2.93546,1.38324 -2.93546,3.37397 v 2.66629 c 0,1.99037 0.77611,3.37256 2.93546,3.37256 2.15971,0 2.93405,-1.38219 2.93405,-3.37256 v -0.23742 h -1.88912 z" />
<path
inkscape:connector-curvature="0"
id="path20144"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 144.77276,259.08954 c 0,-1.65241 -0.99483,-2.46239 -2.74955,-2.46239 -1.77094,0 -2.93476,0.99483 -3.03706,2.83386 h 1.89124 c 0.0321,-0.77646 0.21731,-1.28269 1.07879,-1.28269 0.62407,0 0.9271,0.40534 0.9271,1.16416 v 0.53975 c -2.71568,1.02941 -4.03154,2.12549 -4.03154,4.11762 0,1.16382 0.64135,2.04047 1.92299,2.04047 0.91122,0 1.50177,-0.30339 2.2098,-0.87665 0.0176,0.21837 0.0854,0.45543 0.10125,0.70838 h 1.80587 c -0.0505,-0.3041 -0.11889,-0.67487 -0.11889,-0.96168 z m -1.88948,4.55471 c -0.32032,0.45579 -0.74295,0.8435 -1.264,0.8435 -0.57503,0 -0.87771,-0.23531 -0.87771,-0.82515 0,-0.79269 0.42263,-1.41782 2.14171,-2.39572 z" />
<path
inkscape:connector-curvature="0"
id="path20148"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 137.73876,258.41475 c 0.55668,0 0.87771,0.10125 1.21497,0.18521 v -1.97309 h -0.38912 c -0.89394,0 -1.68663,0.45544 -2.14171,1.2319 h -0.0339 v -1.06221 h -1.80481 v 9.07556 h 1.88877 v -6.24276 c 0,-0.80856 0.62442,-1.21461 1.26577,-1.21461" />
<path
inkscape:connector-curvature="0"
id="path20152"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 130.97139,265.8719 h 2.09232 v -10.35932 h 2.0246 v -1.82139 h -6.14081 v 1.82139 h 2.02389 z" />
<path
inkscape:connector-curvature="0"
id="path20156"
style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 127.25992,256.62704 c -1.09679,0 -1.50142,0.40464 -2.29411,1.07879 v -0.90981 h -1.78823 v 9.07627 h 1.89018 v -7.12047 c 0.43815,-0.31962 0.80927,-0.57326 1.21461,-0.57326 0.40429,0 0.67346,0.20249 0.67346,0.65793 v 7.0358 h 1.88983 v -7.33919 c 0,-1.1811 -0.58985,-1.90606 -1.58574,-1.90606" />
<path
inkscape:connector-curvature="0"
id="path20160"
style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 119.06129,253.52263 c -2.19322,0 -3.20604,1.40053 -3.20604,3.12067 v 6.27592 c 0,1.7212 1.01282,3.12102 3.20604,3.12102 2.19287,0 3.20534,-1.39982 3.20534,-3.12102 v -6.27592 c 0,-1.72014 -1.01247,-3.12067 -3.20534,-3.12067 m 1.11372,9.34685 c 0,0.91052 -0.27058,1.34902 -1.11372,1.34902 -0.84349,0 -1.11372,-0.4385 -1.11372,-1.34902 v -6.17503 c 0,-0.91087 0.27023,-1.35043 1.11372,-1.35043 0.84314,0 1.11372,0.43956 1.11372,1.35043 z" />
<path
inkscape:connector-curvature="0"
id="path20164"
style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 115.58054,252.34907 c 1.54023,-1.13383 6.64492,-5.05495 14.19542,-1.89583 0,0 -3.5e-4,-3.31293 0,-3.83399 -8.14211,-1.39559 -12.43612,2.4818 -14.19542,5.72982" />
<path
inkscape:connector-curvature="0"
id="path20168"
style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 120.91634,245.73713 c -0.74824,0.51047 -1.58115,1.25518 -2.02071,1.82915 5.30119,-3.31752 11.34039,-1.71238 11.38908,-1.69792 0.0589,-0.0183 11.38237,-3.52354 11.38237,-3.52354 0,0 -12.12991,-2.49026 -20.75074,3.39231" />
<path
inkscape:connector-curvature="0"
id="path20172"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 142.97917,243.37224 -11.84945,3.65478 v 3.48932 l 9.63436,4.1522 11.79406,-4.3748 v -3.70911 z" />
<path
inkscape:connector-curvature="0"
id="path20176"
style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 153.01228,246.41436 c 0,-7.1e-4 0.008,-0.29175 -0.31432,-0.43427 -0.0162,-0.007 -9.67599,-3.16124 -9.67599,-3.16124 -0.0907,-0.0293 -0.19227,-0.0307 -0.28258,-0.002 l -11.87344,3.67276 c -0.29739,0.11854 -0.32703,0.37395 -0.32985,0.42757 v 3.71405 c 0,0.18803 0.11254,0.35806 0.28716,0.43038 l 9.80405,4.12327 v -3.5e-4 c 0.17427,0.0818 0.35807,0.031 0.40499,0.0141 l 11.678,-4.43018 c 0.18239,-0.0702 0.30198,-0.24413 0.30198,-0.43815 z m -21.54096,1.21179 8.87518,3.54365 v 2.86597 l -8.87518,-3.71651 z m 9.3479,2.72521 -8.41269,-3.3588 10.46621,-3.23779 8.26347,2.6991 z m 11.25714,-0.34361 -10.79324,4.09434 v -2.92594 l 10.79324,-4.07811 z" />
<path
inkscape:connector-curvature="0"
id="path20180"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 134.73465,247.23402 2.1657,-0.72531 c 0.0907,-0.0311 0.13229,-0.11959 0.0938,-0.19791 -0.0381,-0.0773 -0.14287,-0.11712 -0.23318,-0.0871 l -2.16641,0.72743 c -0.0903,0.0303 -0.13265,0.11854 -0.0942,0.19685 0.0392,0.0776 0.14322,0.11642 0.23424,0.0861" />
<path
inkscape:connector-curvature="0"
id="path20184"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 135.25559,247.43976 c 0.0395,0.0776 0.14217,0.11747 0.23248,0.0868 l 2.16606,-0.72742 c 0.0903,-0.0293 0.13299,-0.11783 0.0942,-0.19615 -0.0385,-0.0787 -0.14323,-0.11712 -0.23354,-0.0871 l -2.16676,0.72813 c -0.09,0.0296 -0.13194,0.11818 -0.0924,0.19579" />
<path
inkscape:connector-curvature="0"
id="path20188"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 139.79775,247.21459 2.95734,-1.07139 c 0.12135,-0.0437 0.17709,-0.16474 0.127,-0.26952 -0.0536,-0.10689 -0.19333,-0.15663 -0.31503,-0.11253 l -2.96334,1.06609 c -0.12559,0.0452 -0.18415,0.16792 -0.12947,0.27517 0.0533,0.10724 0.19826,0.15698 0.3235,0.11218" />
<path
inkscape:connector-curvature="0"
id="path20192"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 140.39352,247.49399 c 0.0533,0.10442 0.19473,0.15522 0.31997,0.10936 l 2.93264,-1.06997 c 0.121,-0.0444 0.17745,-0.16581 0.12524,-0.27129 -0.0504,-0.10372 -0.19086,-0.15346 -0.31186,-0.11007 l -2.93899,1.06786 c -0.12453,0.0441 -0.18133,0.16757 -0.127,0.27411" />
<path
inkscape:connector-curvature="0"
id="path20196"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 141.42561,247.86454 c 0.0533,0.10548 0.19614,0.15416 0.31891,0.10901 l 2.90583,-1.07103 c 0.11853,-0.0434 0.17463,-0.1644 0.12277,-0.26847 -0.0512,-0.10407 -0.18944,-0.15381 -0.30833,-0.11042 l -2.91112,1.06857 c -0.12242,0.0441 -0.18133,0.16686 -0.12806,0.27234" />
<path
inkscape:connector-curvature="0"
id="path20200"
style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778"
d="m 152.83014,255.71836 c 0.11853,0.11853 0.18239,0.27622 0.18239,0.44626 0,0.17357 -0.0639,0.32597 -0.18239,0.44274 -0.12382,0.12206 -0.28328,0.18944 -0.44979,0.18944 -0.16828,0 -0.32385,-0.0674 -0.4445,-0.18768 -0.1203,-0.12065 -0.18592,-0.27622 -0.18592,-0.4445 0,-0.16651 0.0656,-0.32596 0.18768,-0.44979 0.11677,-0.11853 0.27094,-0.18238 0.44274,-0.18238 0.1718,0 0.32949,0.0656 0.44979,0.18591 m -0.0441,0.0441 c -0.11006,-0.10972 -0.25153,-0.16828 -0.40569,-0.16828 -0.15381,0 -0.29387,0.0586 -0.39829,0.1651 -0.11006,0.11148 -0.17004,0.25471 -0.17004,0.40534 0,0.15064 0.06,0.2921 0.16793,0.40041 0.1083,0.10795 0.24976,0.16792 0.4004,0.16792 0.14887,0 0.29386,-0.06 0.40569,-0.17004 0.10619,-0.10442 0.16475,-0.24236 0.16475,-0.39829 0,-0.15416 -0.0586,-0.29562 -0.16475,-0.40216 m -0.085,0.2286 c 0,0.10089 -0.0674,0.17709 -0.17533,0.18944 l 0.16475,0.34008 h -0.11359 l -0.1577,-0.32597 h -0.18379 v 0.32597 h -0.0995 v -0.73131 h 0.26388 c 0.20214,0 0.30127,0.0603 0.30127,0.20179 m -0.46566,-0.13441 v 0.27093 h 0.14499 c 0.15416,0 0.21978,-0.0286 0.21978,-0.14005 0,-0.0921 -0.0727,-0.13088 -0.21978,-0.13088 z" />
</g>
</g>
</svg>
Dieser Diff ist reduziert.
bin/images/tracking/usps.png

283 KiB

......@@ -6,6 +6,12 @@
<event on="onPackageSetup"
fire="\QUI\ERP\Shipping\EventHandler::onPackageSetup"
/>
<event on="onPackageSetup"
fire="\QUI\ERP\Shipping\Tracking\Tracking::onPackageInstall"
/>
<event on="onPackageInstall"
fire="\QUI\ERP\Shipping\Tracking\Tracking::onPackageInstall"
/>
<event on="onQuiqqerPaymentCanUsedInOrder"
fire="\QUI\ERP\Shipping\EventHandler::onQuiqqerPaymentCanUsedInOrder"
/>
......
......@@ -422,8 +422,10 @@
<en><![CDATA[Active shipping information]]></en>
</locale>
<locale name="shipping.settings.showShippingInfoAfterPrice.enable.description">
<de><![CDATA[Wenn aktiviert, wird hinter jedem Preis ein kleiner Text angezeigt, den man klicken kann um mehr Informationen zu erhalten.]]></de>
<en><![CDATA[If enabled, a small text is displayed behind each price, which you can click to get more information.]]></en>
<de>
<![CDATA[Wenn aktiviert, wird hinter jedem Preis ein kleiner Text angezeigt, den man klicken kann um mehr Informationen zu erhalten.]]></de>
<en>
<![CDATA[If enabled, a small text is displayed behind each price, which you can click to get more information.]]></en>
</locale>
<locale name="shipping.settings.showShippingInfoAfterPrice.button">
<de><![CDATA[Button Text]]></de>
......@@ -438,8 +440,10 @@
<en><![CDATA[Popup content]]></en>
</locale>
<locale name="shipping.settings.showShippingInfoAfterPrice.popup.desc">
<de><![CDATA[Popup für mehr Informationen. Der Text kann kurz sein aber es sind auch längere Texte mit Tabellen möglich.]]></de>
<en><![CDATA[Popup for more information. The text can be short but longer texts with tables are also possible.]]></en>
<de>
<![CDATA[Popup für mehr Informationen. Der Text kann kurz sein aber es sind auch längere Texte mit Tabellen möglich.]]></de>
<en>
<![CDATA[Popup for more information. The text can be short but longer texts with tables are also possible.]]></en>
</locale>
<locale name="shipping.order.title">
......@@ -490,11 +494,13 @@
<p>Hallo [customerName],</p>
<p>der Versandstatus Ihrer Bestellung <b>[orderNo]</b> vom <b>[orderDate]</b> hat sich geändert.
Die Bestellung ist nun <b>[shippingStatus]</b>.
[trackingInfo]
]]></de>
<en><![CDATA[
<p>Hello [customerName],</p>
<p>the shipping status of your order <b>[orderNo]</b> from <b>[orderDate]</b> changed.
The order is now <b>[shippingStatus]</b>.
[trackingInfo]
]]></en>
</locale>
......
<?php
namespace QUI\ERP\Shipping\Tracking;
use QUI\Countries\Country;
use function array_filter;
use function file_exists;
use function file_get_contents;
use function file_put_contents;
use function json_decode;
use function strtolower;
use const ETC_DIR;
use const JSON_PRETTY_PRINT;
/**
* Helper class for shipping tracking
*/
class Tracking
{
protected static array $tracking = [
//UPS - UNITED PARCEL SERVICE
[
'active' => '1',
'type' => 'ups',
'title' => 'UPS',
'image' => 'quiqqer/shipping/bin/images/tracking/ups.svg',
'url' => 'https://wwwapps.ups.com/WebTracking/processInputRequest?TypeOfInquiryNumber=T&InquiryNumber1='
],
//USPS - UNITED STATES POSTAL SERVICE
[
'active' => '1',
'type' => 'usps',
'title' => 'USPS',
'image' => 'quiqqer/shipping/bin/images/tracking/usps.png',
'url' => 'https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1='
],
//FEDEX - FEDERAL EXPRESS
[
'active' => '1',
'type' => 'fedex',
'title' => 'FedEx',
'image' => 'quiqqer/shipping/bin/images/tracking/fedex.svg',
'url' => 'https://www.fedex.com/fedextrack/?trknbr='
],
//LaserShip
[
'active' => '1',
'type' => 'laser_ship',
'title' => 'LaserShip',
'image' => 'quiqqer/shipping/bin/images/tracking/lasership.png',
'url' => 'https://www.fedex.com/fedextrack/?trknbr='
],
//ONTRAC
[
'active' => '1',
'type' => 'ontrac',
'title' => 'OnTrac',
'image' => 'quiqqer/shipping/bin/images/tracking/ontrac.svg',
'url' => 'https://www.ontrac.com/trackres.asp?tracking_number='
],
//DHL
[
'active' => '1',
'type' => 'dhl',
'title' => 'DHL',
'image' => 'quiqqer/shipping/bin/images/tracking/dhl.svg',
'url' => 'https://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB=',
'country' => [
'en' => 'https://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB=',
'de' => 'https://www.dhl.com/de-de/home/tracking/tracking-parcel.html?submit=1&tracking-id='
]
],
//DPD
[
'active' => '1',
'type' => 'dpd',
'title' => 'DPD',
'image' => 'quiqqer/shipping/bin/images/tracking/dpd.svg',
'url' => 'https://track.dpdnl.nl/?parcelnumber='
]
];
/**
* @return string
*/
public static function getConfigFile(): string
{
return ETC_DIR . 'plugins/quiqqer/shippingTracking.json';
}
/**
* Create a shipping tracking json file into the etc folder
*
* @return void
*/
public static function onPackageInstall()
{
$file = self::getConfigFile();
if (!file_exists($file)) {
file_put_contents($file, json_encode(self::$tracking, JSON_PRETTY_PRINT));
}
}
/**
* @return array
*/
public static function getActiveCarriers(): array
{
$data = json_decode(
file_get_contents(self::getConfigFile()),
true
);
return array_filter($data, function ($entry) {
return (int)$entry['active'];
});
}
/**
* @param string|numeric $trackingId
* @param string $carrier
* @param ?Country $Country
*
* @return string
*/
public static function getUrl($trackingId, string $carrier, ?Country $Country): string
{
$carriers = self::getActiveCarriers();
$country = false;
if ($Country) {
$country = $Country->getCode();
$country = strtolower($country);
}
foreach ($carriers as $entry) {
if ($entry['type'] !== $carrier) {
continue;
}
if ($country && isset($entry['country'][$country])) {
return $entry['country'][$country] . $trackingId;
}
return $entry['url'] . $trackingId;
}
return '';
}
}
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren