O
O
op_hlop2021-11-26 10:01:57
JavaScript
op_hlop, 2021-11-26 10:01:57

How to write a script to calculate the price depending on the distance?

Hi all! I received a request to write a script for a delivery store. When entering the address, he must send it to Yandex. maps or in Google maps, calculate the distance from the starting point to the delivery point, take out this data and go through checks to estimate how much the delivery will cost (free, 200 rubles, not delivered) and add it to the order amount in the basket or show the message "not deliver."

If I know how to check for shipping costs and how to attach this script to a form, I don’t know how to implement the possibility of such work with cards, except that an API key is needed.

Tell me if it's possible to do it? or where you can see something similar.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex_mos, 2021-11-26
@Alex_mos

look here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question