H
H
hollanditkzn2017-07-21 14:41:06
Yii
hollanditkzn, 2017-07-21 14:41:06

How did you create the xml file after saving the data?

I need that when creating an order, when saving to the database, an xml file is created for 1s I need. I did not find how to implement this in Yii2, but creating an xml file in php https://myrusakov.ru/php-create-xml.html - there is another way to do it all.
And the save was on dropbox. Because, as I understand it, it is no longer possible to implement this file so that this file is transferred to the local 1s program.
I would be grateful to anyone who had experience and an approximate algorithm will tell you how to act so as not to stuff the bumps once again, since there was no experience in integration

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kinash, 2017-07-21
@hollanditkzn

Judging by the set of words that you used, you have very little experience in creating solutions in PHP and no understanding at all in working with 1C. Let me explain:
1) You are referring to an article where there is an example of creating an XML file using DOM tools. Could be so. And you can make an XSLT transformation of your order presentation into the form that you were given for integration with 1C. Or you can not bother at all and write just a text file. It all depends on your skill in PHP programming and the script execution context.
1.1) As far as I understood Yii2 is a framework for creating interfaces, not a set of basic libraries. Therefore, it is useless to look for means of uploading an order to a file in it - it does not know what an "order" is. He only knows what a grid is, which loads data from your order database.
2) Dropbox has nothing to do with 1C (and never had). Solutions based on the 1C Enterprise 8 platform (and some 7.7) are able to receive data from files, from external DBMS, request them via HTTPS or FTP, set themselves access and receive data via REST services, SOAP or even via COM. connection (and if you connect libraries, then the communication channels are limited only by the developer's imagination). In your case, you were given a clear TOR for development, where there is a described XML order format and a place where the file needs to be uploaded (to a dropbox, but they could also demand it to a Yandex disk) - this data is not directly related to 1C, it’s just so wanted the developers with whom you are in contact.
The most common scheme is Bitrix's (he was the first, while others were too lazy to make bicycles): a script is published especially for 1C, which periodically twitches and unloads fresh orders. This link is written very briefly, but there is also a training course where all formats and organizational procedures are described in great detail. But this approach is not suitable for you, since you were given the task of making files and uploading to dropbox.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question