Giter Club home page Giter Club logo

tiu-client's Introduction

tiu-client

Application for export orders from tiu.ru to retailCRM

Can be used with prom.ua, deal.by, satu.kz

##Setup

Execute in your shell

git clone https://github.com/retailcrm/tiu-client.git
cd tiu-client
curl -sS https://getcomposer.org/installer | php
php composer.phar require retailcrm/api-client-php ~3.0.0

Create & fill configuration file at config/config.php (see /config/config-dist.php)

##Usage

Create a Cron job

*/10 * * * * /usr/bin/php /path/to/tiu-client/run.php

##Data structure

tiu.ru exports orders data as xml file available via special link like this

    https://my.tiu.ru/cabinet/export_orders/xml/2372403?hash_tag=47158ffb1af38cb31f1c521dc8a1e1208

This link can be taken from backoffice

####XML example

<orders date="2015-08-31 17:32">
    <order id="2803303" state="new">
        <name>John Doe</name>
        <phone>+79111111111</phone>
        <email>[email protected]</email>
        <date>22.07.15 19:24</date>
        <address>Moscow, Sample st., 15</address>
        <paymentType>Cash</paymentType>
        <deliveryType>Courier</deliveryType>
        <priceRUB>691.00</priceRUB>
        <items>
            <item id="68534240">
                <external_id>717432</external_id>
                <name>Hama H-74229 hdmi 1.3 a-c (mini)</name>
                <quantity>1.00</quantity>
                <currency>RUB</currency>
                <image>http://images.ru.prom.st/hama-h-74229.jpg</image>
                <url>http://example-shop.tiu.ru/hama-h-74229</url>
                <price>366.00</price>
                <sku/>
            </item>
            <item id="68534241">
                <external_id>717436</external_id>
                <name>Hama H-74237 hdmi 1.3 a-c (mini)</name>
                <quantity>1.00</quantity>
                <currency>RUB</currency>
                <image>http://images.ru.prom.st/hama-h-74237.jpg</image>
                <url>http://example-shop.tiu.ru/hama-h-74237</url>
                <price>325.00</price>
                <sku/>
            </item>
        </items>
    </order>
</orders>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.