Init du module DHL (sur la base du module Colissimo)
This commit is contained in:
425
local/modules/DHL/Config/areas.json
Normal file
425
local/modules/DHL/Config/areas.json
Normal file
@@ -0,0 +1,425 @@
|
||||
{
|
||||
"shippingZones": [
|
||||
{
|
||||
"name": "DHL - Delivery Zone 1",
|
||||
"delivery_time_in_days": 3,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"BEL",
|
||||
"LUX",
|
||||
"DEU",
|
||||
"ITA",
|
||||
"NLD",
|
||||
"ESP",
|
||||
"GBR",
|
||||
"VAT"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 23.09
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 26.11
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 30.19
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 36.31
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 47.01
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 79.31
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 2",
|
||||
"delivery_time_in_days": 5,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"AUT",
|
||||
"CZE",
|
||||
"DNK",
|
||||
"IRL",
|
||||
"POL",
|
||||
"PRT"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 23.65
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 27.28
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 31.36
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 37.48
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 48.18
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 80.48
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 3",
|
||||
"delivery_time_in_days": 3,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"BGR",
|
||||
"HRV",
|
||||
"CYP",
|
||||
"EST",
|
||||
"FIN",
|
||||
"GRC",
|
||||
"HUN",
|
||||
"LVA",
|
||||
"LTU",
|
||||
"MLT",
|
||||
"ROU",
|
||||
"SVK",
|
||||
"SVN",
|
||||
"SWE"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 24.01
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 27.64
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 31.72
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 37.84
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 48.54
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 80.84
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 4",
|
||||
"delivery_time_in_days": 5,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"ALB",
|
||||
"BIH",
|
||||
"ISR",
|
||||
"LIE",
|
||||
"MDA",
|
||||
"MKD",
|
||||
"NOR",
|
||||
"SMR",
|
||||
"CHE",
|
||||
"TUR"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 29.32
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 35.38
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 43.54
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 55.78
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 76.18
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 142.38
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 5",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"CAN",
|
||||
"MEX",
|
||||
"USA"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 29.32
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 35.38
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 43.54
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 55.78
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 76.18
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 142.38
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 6",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"DZA",
|
||||
"BGD",
|
||||
"KHM",
|
||||
"CHN",
|
||||
"EGY",
|
||||
"GUF",
|
||||
"GLP",
|
||||
"HKG",
|
||||
"IND",
|
||||
"IDN",
|
||||
"JPN",
|
||||
"KOR",
|
||||
"MYS",
|
||||
"MYT",
|
||||
"MTQ",
|
||||
"MAR",
|
||||
"PHL",
|
||||
"REU",
|
||||
"SGP",
|
||||
"ZAF",
|
||||
"LKA",
|
||||
"THA",
|
||||
"TUN",
|
||||
"ARE",
|
||||
"VNM"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 30.59
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 37.85
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 48.01
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 63.25
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 88.65
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 165.25
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 7",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"AFG",
|
||||
"AGO",
|
||||
"ATG",
|
||||
"ARG",
|
||||
"ARM",
|
||||
"AUS",
|
||||
"AZE",
|
||||
"BHS",
|
||||
"BHR",
|
||||
"BRB",
|
||||
"BLR",
|
||||
"BLZ",
|
||||
"BEN",
|
||||
"BTN",
|
||||
"BOL",
|
||||
"BWA",
|
||||
"BRA",
|
||||
"BRN",
|
||||
"BFA",
|
||||
"BDI",
|
||||
"CMR",
|
||||
"CPV",
|
||||
"CAF",
|
||||
"TCD",
|
||||
"CHL",
|
||||
"COL",
|
||||
"COM",
|
||||
"COG",
|
||||
"COK",
|
||||
"CRI",
|
||||
"CIV",
|
||||
"CUB",
|
||||
"DJI",
|
||||
"DMA",
|
||||
"DOM",
|
||||
"ECU",
|
||||
"SLV",
|
||||
"ERI",
|
||||
"ETH",
|
||||
"FJI",
|
||||
"GAB",
|
||||
"GMB",
|
||||
"GEO",
|
||||
"GHA",
|
||||
"GND",
|
||||
"GTM",
|
||||
"GIN",
|
||||
"GNB",
|
||||
"HTI",
|
||||
"HND",
|
||||
"ISL",
|
||||
"IRN",
|
||||
"IRQ",
|
||||
"JAM",
|
||||
"JOR",
|
||||
"KAZ",
|
||||
"KEN",
|
||||
"KIR",
|
||||
"KWT",
|
||||
"KGZ",
|
||||
"LAO",
|
||||
"LBN",
|
||||
"LSO",
|
||||
"LBR",
|
||||
"LBY",
|
||||
"MDG",
|
||||
"MWI",
|
||||
"MDV",
|
||||
"MLI",
|
||||
"MHL",
|
||||
"MRT",
|
||||
"MUS",
|
||||
"FSM",
|
||||
"MNG",
|
||||
"MOZ",
|
||||
"NAM",
|
||||
"NRU",
|
||||
"NPL",
|
||||
"KNA",
|
||||
"NCL",
|
||||
"OMN",
|
||||
"NZL",
|
||||
"PAK",
|
||||
"PAN",
|
||||
"PNG",
|
||||
"PRY",
|
||||
"PER",
|
||||
"QAT",
|
||||
"RUS",
|
||||
"RWA",
|
||||
"LCA",
|
||||
"VCT",
|
||||
"STP",
|
||||
"SAU",
|
||||
"SEN",
|
||||
"SYC",
|
||||
"SLE",
|
||||
"SLB",
|
||||
"SOM",
|
||||
"SDN",
|
||||
"PRK",
|
||||
"SUR",
|
||||
"SPM",
|
||||
"SWZ",
|
||||
"SYR",
|
||||
"TJK",
|
||||
"TZA",
|
||||
"TGO",
|
||||
"TON",
|
||||
"TTO",
|
||||
"TKM",
|
||||
"TUV",
|
||||
"UGA",
|
||||
"UKR",
|
||||
"URY",
|
||||
"UZB",
|
||||
"VUT",
|
||||
"VEN",
|
||||
"WLF",
|
||||
"WSM",
|
||||
"YEM",
|
||||
"COD",
|
||||
"ZMB",
|
||||
"ZWE"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 39.02
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 48.70
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 52.78
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 58.90
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 125.90
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 326.90
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
40
local/modules/DHL/Config/config.xml
Normal file
40
local/modules/DHL/Config/config.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<loops>
|
||||
<loop class="DHL\Loop\Price" name="dhl"/>
|
||||
<loop class="DHL\Loop\CheckRightsLoop" name="dhl.check.rights" />
|
||||
<loop class="DHL\Loop\NotSendLoop" name="dhl.notsend.loop" />
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<!-- <form name="dhl.freeshipping.form" class="DHL\Form\FreeShipping" />-->
|
||||
<!-- <form name="dhl.export.form" class="DHL\Form\Export" />-->
|
||||
<form name="dhl.configuration" class="DHL\Form\Configuration" />
|
||||
</forms>
|
||||
|
||||
<services>
|
||||
<service id="send.dhl.mail" class="DHL\Listener\SendMail">
|
||||
<argument type="service" id="thelia.parser" />
|
||||
<argument type="service" id="mailer"/>
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<services>
|
||||
<service id="area.deleted.listener" class="DHL\EventListener\AreaDeletedListener" scope="request">
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
<argument type="service" id="request" />
|
||||
</service>
|
||||
</services>
|
||||
|
||||
<hooks>
|
||||
<hook id="dhl.hook" class="DHL\Hook\HookManager">
|
||||
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfiguration" />
|
||||
<tag name="hook.event_listener" event="module.config-js" type="back" templates="render:assets/js/module-configuration-js.html" />
|
||||
</hook>
|
||||
</hooks>
|
||||
</config>
|
||||
18
local/modules/DHL/Config/module.xml
Normal file
18
local/modules/DHL/Config/module.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module>
|
||||
<fullnamespace>DHL\DHL</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>DHL delivery</title>
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Livraison par DHL</title>
|
||||
</descriptive>
|
||||
<version>2.3.3</version>
|
||||
<author>
|
||||
<name>Laurent LE CORRE</name>
|
||||
<email>laurent@thecoredev.fr</email>
|
||||
</author>
|
||||
<type>delivery</type>
|
||||
<thelia>1.0.0</thelia>
|
||||
<stability>alpha</stability>
|
||||
</module>
|
||||
425
local/modules/DHL/Config/prices.json
Normal file
425
local/modules/DHL/Config/prices.json
Normal file
@@ -0,0 +1,425 @@
|
||||
{
|
||||
"shippingZones": [
|
||||
{
|
||||
"name": "DHL - Delivery Zone 1",
|
||||
"delivery_time_in_days": 3,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"BEL",
|
||||
"LUX",
|
||||
"DEU",
|
||||
"ITA",
|
||||
"NLD",
|
||||
"ESP",
|
||||
"GBR",
|
||||
"VAT"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 23.09
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 26.11
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 30.19
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 36.31
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 47.01
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 79.31
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 2",
|
||||
"delivery_time_in_days": 5,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"AUT",
|
||||
"CZE",
|
||||
"DNK",
|
||||
"IRL",
|
||||
"POL",
|
||||
"PRT"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 23.65
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 27.28
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 31.36
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 37.48
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 48.18
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 80.48
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 3",
|
||||
"delivery_time_in_days": 3,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"BGR",
|
||||
"HRV",
|
||||
"CYP",
|
||||
"EST",
|
||||
"FIN",
|
||||
"GRC",
|
||||
"HUN",
|
||||
"LVA",
|
||||
"LTU",
|
||||
"MLT",
|
||||
"ROU",
|
||||
"SVK",
|
||||
"SVN",
|
||||
"SWE"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 24.01
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 27.64
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 31.72
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 37.84
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 48.54
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 80.84
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 4",
|
||||
"delivery_time_in_days": 5,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"ALB",
|
||||
"BIH",
|
||||
"ISR",
|
||||
"LIE",
|
||||
"MDA",
|
||||
"MKD",
|
||||
"NOR",
|
||||
"SMR",
|
||||
"CHE",
|
||||
"TUR"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 29.32
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 35.38
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 43.54
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 55.78
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 76.18
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 142.38
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 5",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"CAN",
|
||||
"MEX",
|
||||
"USA"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 29.32
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 35.38
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 43.54
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 55.78
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 76.18
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 142.38
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 6",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"DZA",
|
||||
"BGD",
|
||||
"KHM",
|
||||
"CHN",
|
||||
"EGY",
|
||||
"GUF",
|
||||
"GLP",
|
||||
"HKG",
|
||||
"IND",
|
||||
"IDN",
|
||||
"JPN",
|
||||
"KOR",
|
||||
"MYS",
|
||||
"MYT",
|
||||
"MTQ",
|
||||
"MAR",
|
||||
"PHL",
|
||||
"REU",
|
||||
"SGP",
|
||||
"ZAF",
|
||||
"LKA",
|
||||
"THA",
|
||||
"TUN",
|
||||
"ARE",
|
||||
"VNM"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 30.59
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 37.85
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 48.01
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 63.25
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 88.65
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 165.25
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DHL - Delivery Zone 7",
|
||||
"delivery_time_in_days": 6,
|
||||
"delivery_type": 2,
|
||||
"countries": [
|
||||
"AFG",
|
||||
"AGO",
|
||||
"ATG",
|
||||
"ARG",
|
||||
"ARM",
|
||||
"AUS",
|
||||
"AZE",
|
||||
"BHS",
|
||||
"BHR",
|
||||
"BRB",
|
||||
"BLR",
|
||||
"BLZ",
|
||||
"BEN",
|
||||
"BTN",
|
||||
"BOL",
|
||||
"BWA",
|
||||
"BRA",
|
||||
"BRN",
|
||||
"BFA",
|
||||
"BDI",
|
||||
"CMR",
|
||||
"CPV",
|
||||
"CAF",
|
||||
"TCD",
|
||||
"CHL",
|
||||
"COL",
|
||||
"COM",
|
||||
"COG",
|
||||
"COK",
|
||||
"CRI",
|
||||
"CIV",
|
||||
"CUB",
|
||||
"DJI",
|
||||
"DMA",
|
||||
"DOM",
|
||||
"ECU",
|
||||
"SLV",
|
||||
"ERI",
|
||||
"ETH",
|
||||
"FJI",
|
||||
"GAB",
|
||||
"GMB",
|
||||
"GEO",
|
||||
"GHA",
|
||||
"GND",
|
||||
"GTM",
|
||||
"GIN",
|
||||
"GNB",
|
||||
"HTI",
|
||||
"HND",
|
||||
"ISL",
|
||||
"IRN",
|
||||
"IRQ",
|
||||
"JAM",
|
||||
"JOR",
|
||||
"KAZ",
|
||||
"KEN",
|
||||
"KIR",
|
||||
"KWT",
|
||||
"KGZ",
|
||||
"LAO",
|
||||
"LBN",
|
||||
"LSO",
|
||||
"LBR",
|
||||
"LBY",
|
||||
"MDG",
|
||||
"MWI",
|
||||
"MDV",
|
||||
"MLI",
|
||||
"MHL",
|
||||
"MRT",
|
||||
"MUS",
|
||||
"FSM",
|
||||
"MNG",
|
||||
"MOZ",
|
||||
"NAM",
|
||||
"NRU",
|
||||
"NPL",
|
||||
"KNA",
|
||||
"NCL",
|
||||
"OMN",
|
||||
"NZL",
|
||||
"PAK",
|
||||
"PAN",
|
||||
"PNG",
|
||||
"PRY",
|
||||
"PER",
|
||||
"QAT",
|
||||
"RUS",
|
||||
"RWA",
|
||||
"LCA",
|
||||
"VCT",
|
||||
"STP",
|
||||
"SAU",
|
||||
"SEN",
|
||||
"SYC",
|
||||
"SLE",
|
||||
"SLB",
|
||||
"SOM",
|
||||
"SDN",
|
||||
"PRK",
|
||||
"SUR",
|
||||
"SPM",
|
||||
"SWZ",
|
||||
"SYR",
|
||||
"TJK",
|
||||
"TZA",
|
||||
"TGO",
|
||||
"TON",
|
||||
"TTO",
|
||||
"TKM",
|
||||
"TUV",
|
||||
"UGA",
|
||||
"UKR",
|
||||
"URY",
|
||||
"UZB",
|
||||
"VUT",
|
||||
"VEN",
|
||||
"WLF",
|
||||
"WSM",
|
||||
"YEM",
|
||||
"COD",
|
||||
"ZMB",
|
||||
"ZWE"
|
||||
],
|
||||
"prices": [
|
||||
{
|
||||
"up_to": 2,
|
||||
"price_euro": 39.02
|
||||
},
|
||||
{
|
||||
"up_to": 5,
|
||||
"price_euro": 48.70
|
||||
},
|
||||
{
|
||||
"up_to": 7,
|
||||
"price_euro": 52.78
|
||||
},
|
||||
{
|
||||
"up_to": 10,
|
||||
"price_euro": 58.90
|
||||
},
|
||||
{
|
||||
"up_to": 15,
|
||||
"price_euro": 125.90
|
||||
},
|
||||
{
|
||||
"up_to": 30,
|
||||
"price_euro": 326.90
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
21
local/modules/DHL/Config/routing.xml
Normal file
21
local/modules/DHL/Config/routing.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<route id="dhl.edit.prices" path="/admin/module/dhl/prices" methods="post">
|
||||
<default key="_controller">DHL\Controller\EditPrices::editprices</default>
|
||||
</route>
|
||||
|
||||
<!-- <route id="dhl.edit.freeshipping" path="/admin/module/dhl/freeshipping" methods="post">-->
|
||||
<!-- <default key="_controller">DHL\Controller\FreeShipping::set</default>-->
|
||||
<!-- </route>-->
|
||||
|
||||
<!-- <route id="dhl.export" path="/admin/module/dhl/export" methods="post">-->
|
||||
<!-- <default key="_controller">DHL\Controller\Export::exportAction</default>-->
|
||||
<!-- </route>-->
|
||||
|
||||
<route id="dhl.configuration" path="/admin/module/dhl/configuration/update" methods="post">
|
||||
<default key="_controller">DHL\Controller\Configuration::editConfiguration</default>
|
||||
</route>
|
||||
</routes>
|
||||
32
local/modules/DHL/Config/thelia.sql
Normal file
32
local/modules/DHL/Config/thelia.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Mail templates for dhl
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
-- First, delete existing entries
|
||||
SET @var := 0;
|
||||
SELECT @var := `id` FROM `message` WHERE name="mail_dhl";
|
||||
DELETE FROM `message` WHERE `id`=@var;
|
||||
-- Try if ON DELETE constraint isn't set
|
||||
DELETE FROM `message_i18n` WHERE `id`=@var;
|
||||
|
||||
-- Then add new entries
|
||||
SELECT @max := MAX(`id`) FROM `message`;
|
||||
SET @max := @max+1;
|
||||
-- insert message
|
||||
INSERT INTO `message` (`id`, `name`, `secured`) VALUES
|
||||
(@max,
|
||||
'mail_dhl',
|
||||
'0'
|
||||
);
|
||||
|
||||
-- and template fr_FR
|
||||
INSERT INTO `message_i18n` (`id`, `locale`, `title`, `subject`, `text_message`, `html_message`) VALUES
|
||||
(@max, 'en_US', 'DHL shipping message', 'Your order {$order_ref} has been shipped', '{loop type="customer" name="customer.order" current="false" id="$customer_id" backend_context="1"}\r\nDear {$FIRSTNAME} {$LASTNAME},\r\n{/loop}\r\nThank you for your order on our online store {config key="store_name"}.\r\nYour order {$order_ref} dated {format_date date=$order_date} has been shipped on {format_date date=$update_date}.\r\nThe tracking number for this delivery is {$package}. Please check the La Poste website for tracking your parcel: www.coliposte.net.\r\nYou can use this tracking number to get your parcel in your local La Poste office. If don''t get an advice in your mailbox after two working days, claim your parcel at your local La Poste office, using this tracking number.\r\nFeel free to contact us for any forther information\r\nBest Regards.', '{loop type="customer" name="customer.order" current="false" id="$customer_id" backend_context="1"}\r\n<p>Dear {$FIRSTNAME} {$LASTNAME},</p>\r\n{/loop}\r\n<p>Thank you for your order on our online store {config key="store_name"}.</p>\r\n<p>Your order {$order_ref} dated {format_date date=$order_date} has been shipped on {format_date date=$update_date}.\r\nThe tracking number for this delivery is {$package}. Please check the La Poste website for tracking your parcel: <a href="www.coliposte.net">www.coliposte.net</a>.</p>\r\n<p>You can use this tracking number to get your parcel in your local La Poste office. If don''t get an advice in your mailbox after two working days, claim your parcel at your local La Poste office, using this tracking number.</p>\r\n<p>Feel free to contact us for any forther information</p>\r\n<p>Best Regards.</p>'),
|
||||
(@max, 'fr_FR', 'Message d''expédition de DHL', 'Suivi DHL commande : {$order_ref}', '{loop type="customer" name="customer.order" current="false" id="$customer_id" backend_context="1"}\r\n{$LASTNAME} {$FIRSTNAME},\r\n{/loop}\r\nNous vous remercions de votre commande sur notre site {config key="store_name"}\r\nUn colis concernant votre commande {$order_ref} du {format_date date=$order_date} a quitté nos entrepôts pour être pris en charge par La Poste le {format_date date=$update_date}.\r\nSon numéro de suivi est le suivant : {$package}\r\nIl vous permet de suivre votre colis en ligne sur le site de La Poste : www.coliposte.net\r\nIl vous sera, par ailleurs, très utile si vous étiez absent au moment de la livraison de votre colis : en fournissant ce numéro de DHL Suivi, vous pourrez retirer votre colis dans le bureau de Poste le plus proche.\r\nATTENTION ! Si vous ne trouvez pas l''avis de passage normalement déposé dans votre boîte aux lettres au bout de 48 Heures jours ouvrables, n''hésitez pas à aller le réclamer à votre bureau de Poste, muni de votre numéro de DHL Suivi.\r\nNous restons à votre disposition pour toute information complémentaire.\r\nCordialement', '{loop type="customer" name="customer.order" current="false" id="$customer_id" backend_context="1"}\r\n{$LASTNAME} {$FIRSTNAME},\r\n{/loop}\r\nNous vous remercions de votre commande sur notre site {config key="store_name"}\r\nUn colis concernant votre commande {$order_ref} du {format_date date=$order_date} a quitté nos entrepôts pour être pris en charge par La Poste le {format_date date=$update_date}.\r\nSon numéro de suivi est le suivant : {$package}\r\nIl vous permet de suivre votre colis en ligne sur le site de La Poste : www.coliposte.net\r\nIl vous sera, par ailleurs, très utile si vous étiez absent au moment de la livraison de votre colis : en fournissant ce numéro de DHL Suivi, vous pourrez retirer votre colis dans le bureau de Poste le plus proche.\r\nATTENTION ! Si vous ne trouvez pas l''avis de passage normalement déposé dans votre boîte aux lettres au bout de 48 Heures jours ouvrables, n''hésitez pas à aller le réclamer à votre bureau de Poste, muni de votre numéro de DHL Suivi.\r\nNous restons à votre disposition pour toute information complémentaire.\r\nCordialement');
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user