P5-5822 Add DHL Economy EU and World delivery methods

This commit is contained in:
fredrikphotowall
2020-09-28 15:48:54 +02:00
committed by GitHub
parent 40cd310ef1
commit ae0fa9c4ec
+31
View File
@@ -0,0 +1,31 @@
-- P5-5822/5832 Add new shipping option DHL Economy
INSERT INTO "delivery-methods" (id, name) VALUES
(15, 'dhlEconomyEU'),
(16, 'dhlEconomyWorld');
-- Add DHL Economy World everywhere DHL is used with DHL's current price
INSERT INTO "delivery-methods_prices" (method, option, option_value, currency, price, territory)
SELECT 16, '', '', currency, price, territory
FROM "delivery-methods_prices"
WHERE method = 10
;
-- Add DHL Economy EU everywhere DHL Express is used (EU) with DHL Express' current price (zero)
INSERT INTO "delivery-methods_prices" (method, option, option_value, currency, price, territory)
SELECT 15, '', '', currency, price, territory
FROM "delivery-methods_prices"
WHERE method = 14
;
-- Add 7 to price of all USD and EUR DHL entries
UPDATE "delivery-methods_prices"
SET price = price + 7
WHERE method = 10 AND currency in ('EUR','USD');
;
-- Add 7 to price of all EUR and GBP DHL Express entries
UPDATE "delivery-methods_prices"
SET price = price + 7
WHERE method = 14 AND currency in ('EUR', 'GBP')
;