From cbca0066a0445eaa1c94bd35417683f5cd523b6b Mon Sep 17 00:00:00 2001 From: Fredrik Ringqvist <35255659+fredrikphotowall@users.noreply.github.com> Date: Wed, 11 May 2022 15:25:55 +0200 Subject: [PATCH] Update delivery methods for AU and SG (#274) --- migrations/000.373.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 migrations/000.373.sql diff --git a/migrations/000.373.sql b/migrations/000.373.sql new file mode 100644 index 0000000..627a2b8 --- /dev/null +++ b/migrations/000.373.sql @@ -0,0 +1,17 @@ +-- Update delivery methods for AU and SG + +-- Add free delivery methods to Australia and Singapore +INSERT INTO "delivery-methods_prices" (territory, currency, option, option_value, price, method) VALUES + ('AU', 'AUD', '', '', 0, (select id from "delivery-methods" where name = 'dhlEconomyWorld')), + ('SG', 'USD', '', '', 0, (select id from "delivery-methods" where name = 'dhlEconomyWorld')) +; + +-- Update DHL Express price for AU+SG +UPDATE "delivery-methods_prices" + SET price = (SELECT 10 / vat FROM markets WHERE name = 'AU') + WHERE territory = 'AU' AND currency = 'AUD' AND method = 10; + +UPDATE "delivery-methods_prices" + SET price = (SELECT 7 / vat FROM markets WHERE name = 'SG') + WHERE territory = 'SG' AND currency = 'USD' AND method = 10; +