Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 6191bd8

Browse files
committed
fix: remove useless keys parts (ne pas se faire chier)
1 parent 23ce0fe commit 6191bd8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

App/Utils/Chronopost.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function getPrice(string $toCountry, int $toPostalCode, int $weight, bool
3636
{
3737
// corsica's cities postal code begin with 20 so between 20000 and 21000
3838
if ($toCountry == 'FR' && !($toPostalCode > 20000 && $toPostalCode < 21000))
39-
$key = 'chronopost_fr_13h';
39+
$key = 'chronopost_fr';
4040
else if (in_array($toCountry, $this->config['EU_ISO']))
41-
$key = 'chronopost_eu_48h';
41+
$key = 'chronopost_eu';
4242
else
4343
return 0;
4444
if ($relay)

public/chronopost_prices.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"legend": "ww: worldwide ; z*: zone ; relay: france to pick-up; eu: europe",
55
"EU_ISO": ["DE", "BE", "LU", "NL", "AT", "DK", "ES", "FI", "GR", "IE", "IT", "PT", "GB", "SE", "BG", "HR", "ES", "HU", "LV", "LT", "PT", "CZ", "RO", "SK", "SI", "LI", "NO", "CH"],
66
"comment": "France to Europe - Classic 48h (Based on Z3D/Z2R prices)",
7-
"chronopost_eu_48h": [
7+
"chronopost_eu": [
88
{"from": 0, "to": 1000, "price": 19.8},
99
{"from": 1001, "to": 2000, "price": 23},
1010
{"from": 2001, "to": 3000, "price": 26.3},
@@ -17,7 +17,7 @@
1717
{"from": 9001, "to": 10000, "price": 49},
1818
{"from": 10001, "to": 11000, "price": 52.2}
1919
],
20-
"chronopost_relay_eu_72h": [
20+
"chronopost_eu_relay": [
2121
{"from": 0, "to": 1000, "price": 15},
2222
{"from": 1001, "to": 2000, "price": 17.8},
2323
{"from": 2001, "to": 3000, "price": 20.6},
@@ -31,7 +31,7 @@
3131
{"from": 10001, "to": 11000, "price": 43.4}
3232
],
3333
"comment": "France to France - 13h (no dom-tom and corsica)",
34-
"chronopost_fr_13h": [
34+
"chronopost_fr": [
3535
{"from": 0, "to": 1000, "price": 15},
3636
{"from": 1001, "to": 2000, "price": 15.6},
3737
{"from": 2001, "to": 3000, "price": 16.2},
@@ -44,7 +44,7 @@
4444
{"from": 9001, "to": 10000, "price": 20.4},
4545
{"from": 10001, "to": 11000, "price": 21.3}
4646
],
47-
"chronopost_relay_fr_13h": [
47+
"chronopost_fr_relay": [
4848
{"from": 0, "to": 1000, "price": 10.2},
4949
{"from": 1001, "to": 2000, "price": 10.8},
5050
{"from": 2001, "to": 3000, "price": 11.4},

0 commit comments

Comments
 (0)