https://datapoint.center/
Integration with cs cart is set up, loading orders
The client has a personal account on the site, where he can enter his address, and when placing an order, he already indicates the delivery address. We checked, created an order, it shows the delivery address from the card and the address that he indicated during checkout
[file]15180[/file]
[file]15181[/file]
The order came, it was substituted not for the address that he indicated when placing the order, but for another
Order https://datapoint.center/admin/customorder/lead/2256103/edit/
https://datapoint.center/ Integration with cs cart is set up, loading orders The client has a personal account on the site, where he can enter his address, and when placing an order, he already indicates the delivery address. We checked, created an order, it shows the delivery address from the card and the address that he indicated during checkout
By default, the order address is taken from: s_country_descr+s_state_descr+s_city+s_address Also, if the response contains info on the warehouse_data key, we can fill in the data for new mail. [ab_up_post_office_data] => Array ( [id] => 12504 [city_id] => 10748 [address] => ave. Geroiv, 3 [latitude] => 48.420548 [longitude] => 35.062733 [lock_code] => 0 [lock_text] => Active entry [mereza_number] => [phone] => 050-160-46-28 [postindex] => 49100 [postterminal] => 1 [type] => MVPZ ) In your situation, there are lines like this in the answer. If you need to take the address from postindex + city_id + address, then you can follow this. Just need to understand how to determine the name of the city by city_id? Is this an ID directly in Ukrposhta or some kind of internal id for cscart?
By default, the order address is taken from: s_country_descr+s_state_descr+s_city+s_address
Also, if the response contains info on the warehouse_data key, we can fill in the data for new mail.
[ab_up_post_office_data] => Array
(
[id] => 12504
[city_id] => 10748
[address] => ave. Geroiv, 3
[latitude] => 48.420548
[longitude] => 35.062733
[lock_code] => 0
[lock_text] => Active entry
[mereza_number] =>
[phone] => 050-160-46-28
[postindex] => 49100
[postterminal] => 1
[type] => MVPZ
)
In your situation, there are lines like this in the answer. If you need to take the address from postindex + city_id + address, then you can follow this. Just need to understand how to determine the name of the city by city_id? Is this an ID directly in Ukrposhta or some kind of internal id for cscart?
Let me explain when NP - everything is OK, the address is correct, and when Ukr mail is not the same. I don’t understand from which fields in which case it pulls, it needs to be somehow universal so that it works for all methods. It's just that if we do as you wrote, it's not a fact that it will work correctly for NP. Specify, if we do as you wrote in 2 hours, from which fields will the address be taken? We will try to look in the database
Let me explain when NP - everything is OK, the address is correct, and when Ukr mail is not the same. I don’t understand from which fields in which case it pulls, it needs to be somehow universal so that it works for all methods. It's just that if we do as you wrote, it's not a fact that it will work correctly for NP. Specify, if we do as you wrote in 2 hours, from which fields will the address be taken? We will try to look in the database
if such an address suits "49100, avenue Geroiv, 3" then we can do it, it will take 2 hours. It is not possible here universally, because the api does not work universally. They give DIFFERENT data for each delivery method. This is solved either by adjusting to such data as I suggested above, or by adding a new field to the api, which will contain one line with the full delivery address. Those. either on our side or on the cs cart side, you need to even code. If on the cs cart side, then we also need to change where to get the address from in 1 hour, but this will be more universal since when adding a new delivery, we will not need to change anything.
if such an address suits "49100, avenue Geroiv, 3" then we can do it, it will take 2 hours. It is not possible here universally, because the api does not work universally. They give DIFFERENT data for each delivery method. This is solved either by adjusting to such data as I suggested above, or by adding a new field to the api, which will contain one line with the full delivery address. Those. either on our side or on the cs cart side, you need to even code. If on the cs cart side, then we also need to change where to get the address from in 1 hour, but this will be more universal since when adding a new delivery, we will not need to change anything.
anonymous hamster OneBox production wrote: if such an address suits "49100, avenue Geroiv, 3" then we can do it, it will take 2 hours. It is not possible here universally, because the api does not work universally. They give DIFFERENT data for each delivery method. This is solved either by adjusting to such data as I suggested above, or by adding a new field to the api, which will contain one line with the full delivery address. Those. either on our side or on the cs cart side, you need to even code. If on the cs cart side, then we also need to change where to get the address from in 1 hour, but this will be more universal since when adding a new delivery, we will not need to change anything.
OK, I understand, in 2 hours it will work for Ukrainian mail, but for NP, how was it and will it remain? There they also have in different languages, NP for 2x and Ukr mail for 2x
[quote]
anonymous hamster
OneBox production wrote:
if such an address suits "49100, avenue Geroiv, 3" then we can do it, it will take 2 hours. It is not possible here universally, because the api does not work universally. They give DIFFERENT data for each delivery method. This is solved either by adjusting to such data as I suggested above, or by adding a new field to the api, which will contain one line with the full delivery address. Those. either on our side or on the cs cart side, you need to even code. If on the cs cart side, then we also need to change where to get the address from in 1 hour, but this will be more universal since when adding a new delivery, we will not need to change anything.
[/quote]
OK, I understand, in 2 hours it will work for Ukrainian mail, but for NP, how was it and will it remain? There they also have in different languages, NP for 2x and Ukr mail for 2x
Yes, it will work for both new and Ukrainian. I won’t tell you about the two languages, I don’t know what it affects in the issuance of api. If it’s just on the text, then nothing on our part needs to be done additionally
Yes, it will work for both new and Ukrainian. I won’t tell you about the two languages, I don’t know what it affects in the issuance of api. If it’s just on the text, then nothing on our part needs to be done additionally
They say [city_id] => 10748 - this is the city id from the base of Ukrainian mail, can we substitute the city from there and glue it with the address for Ukrainian mail?
They say [city_id] => 10748 - this is the city id from the base of Ukrainian mail, can we substitute the city from there and glue it with the address for Ukrainian mail?
Ukrposhta does not have a directory of cities like the new mail. Those. it is physically impossible to get a list of all cities in Ukraine. From what I found, you can use "Otrimanya settlement for the KOATUU code" but perhaps this is not an id but a different number. There is also "Poshuk settlement" but there only by name, as far as it is written in the docks. Developers in api cannot immediately issue the name of the city in a separate field?
Ukrposhta does not have a directory of cities like the new mail. Those. it is physically impossible to get a list of all cities in Ukraine.
From what I found, you can use "Otrimanya settlement for the KOATUU code" but perhaps this is not an id but a different number. There is also "Poshuk settlement" but there only by name, as far as it is written in the docks.
Developers in api cannot immediately issue the name of the city in a separate field?
anonymous hamster OneBox production wrote: Ukrposhta does not have a directory of cities like the new mail. Those. it is physically impossible to get a list of all cities in Ukraine. From what I found, you can use "Otrimanya settlement for the KOATUU code" but perhaps this is not an id but a different number. There is also "Poshuk settlement" but there only by name, as far as it is written in the docks. Developers in api cannot immediately issue the name of the city in a separate field?
You need to search not by the city id, but by the index id, in fact it will be the same [postindex] => 49100 The client unloaded the database from Ukrainian mail, in the attachment, you can find the city by this index. According to the idea, using the API, you can also somehow get the city by index
[quote]
anonymous hamster
OneBox production wrote:
Ukrposhta does not have a directory of cities like the new mail. Those. it is physically impossible to get a list of all cities in Ukraine.
From what I found, you can use "Otrimanya settlement for the KOATUU code" but perhaps this is not an id but a different number. There is also "Poshuk settlement" but there only by name, as far as it is written in the docks.
Developers in api cannot immediately issue the name of the city in a separate field?
[/quote]
You need to search not by the city id, but by the index id, in fact it will be the same
[postindex] => 49100
The client unloaded the database from Ukrainian mail, in the attachment, you can find the city by this index. According to the idea, using the API, you can also somehow get the city by index
[file]15368[/file]
Yes, you can get the city by index. Method "Retrieving information about the population point by index" https://dev.ukrposhta.ua/uploads/Address-classifier-v3.11-28092021.pdf . Okay, then we take the index, look for the name of the city on it and substitute in the address + information on the streets. If you then need to create a TTN, then you need to deliver the index to the beginning of the address so that the address parser can parse it. 3h Ask the client what methods he used to get a list of all cities. Simply sorted out indexes and on each infa requested? And then in the api I don’t see a method by which at least somehow a list of cities can be obtained or a list of all branches
Yes, you can get the city by index. Method "Retrieving information about the population point by index" https://dev.ukrposhta.ua/uploads/Address-classifier-v3.11-28092021.pdf . Okay, then we take the index, look for the name of the city on it and substitute in the address + information on the streets. If you then need to create a TTN, then you need to deliver the index to the beginning of the address so that the address parser can parse it. 3h
Ask the client what methods he used to get a list of all cities. Simply sorted out indexes and on each infa requested? And then in the api I don’t see a method by which at least somehow a list of cities can be obtained or a list of all branches
check on a test order please as the address will tighten. I could only print on the old ones, it generates the address normally: 49000, Dnipro, ave. Dmitry Yavornitsky, 62 49100, Dnipro, ave. Geroiv, 3 etc
check on a test order please as the address will tighten. I could only print on the old ones, it generates the address normally:
49000, Dnipro, ave. Dmitry Yavornitsky, 62
49100, Dnipro, ave. Geroiv, 3
etc
Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter.
Log in and comment
Donate
You don't have enough funds in your account Top up