A
A
Alexey2017-06-27 19:14:26
Database
Alexey, 2017-06-27 19:14:26

How to match the cities of delivery services in an online store?

Good afternoon.
There is an online store on Laravel. There is a task: when placing an order, to show the user the cost and terms of various delivery services.
Example 1: on the checkout page, at the "delivery" step, the user selects the country "Russia" and the city "St. Petersburg". He should see 4 options for receiving the goods:

  1. SDEK pickup
  2. CDEK by courier
  3. DHL pickup
  4. DHL courier

Example 2: exactly the same conditions, only the language of the site is "English" and the city is also in English "St. Petersburg". It will also display 4 options.
CDEK has its own database of Russian cities with names in Russian. DHL has its own database of cities with Russian and English names. The request to the CDEK calculator contains the identifiers of the cities of their own base. The request to the DHL calculator contains the abbreviated names of cities in English from their own database.
The obvious way to combine cities is to create your own common database of cities, which you can compare with the databases of delivery services. There are already 3 bases in total (1 common, 2 from services). The question is how to compare all these cities? After all, from a common feature - only the name of the city. But in different bases it may differ, for example, DHL does not have St. Petersburg, but ST PETERSBURG (without a dot). Does anyone have experience in integrating different deliveries into 1 store? Advise, please, a technique.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stoitli, 2017-06-27
@stoitli

Compare manually.
or write a website so that it does not matter which city.
That is, the choice of the city is already AFTER the choice of the delivery service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question