1b.app
Link copied -

Delivery address in cs cart

Интересует интгарация с cs-cart?
У нас есть готовый компонент для работы! Посмотреть компонент
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

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/
Original question is available on version: ru https://qube-soft.com/ crm erp onebox qubesoft внедрение аналитика 1с интегратор

Answers:

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?
19.05.2022, 11:51
Original comment available on version: ru

or we can just put 49100, prosp. Geroiv, 3 to the address of the process. Takes 2h.
19.05.2022, 11:52
Original comment available on version: ru

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
24.05.2022, 10:01
https://qube-soft.com/ crm erp onebox qubesoft внедрение аналитика 1с интегратор Original comment available on version: ru

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.
24.05.2022, 11:09
Original comment available on version: ru


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
24.05.2022, 11:15
https://qube-soft.com/ crm erp onebox qubesoft внедрение аналитика 1с интегратор Original comment available on version: ru

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
24.05.2022, 11:22
Original comment available on version: ru

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?
01.06.2022, 12:29
https://qube-soft.com/ crm erp onebox qubesoft внедрение аналитика 1с интегратор Original comment available on version: ru

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?
01.06.2022, 12:39
Original comment available on version: ru


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
02.06.2022, 16:50
https://qube-soft.com/ crm erp onebox qubesoft внедрение аналитика 1с интегратор Original comment available on version: ru

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
02.06.2022, 17:29
Original comment available on version: ru

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
15.06.2022, 15:07
Original comment available on version: ru

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