Anasayfa / XML İşlemleri / Dışarı XML Verme(Export) / Dışarı SİPARİŞ XML Oluşturma

Entegra ile Siparişlerin Xml ile Dışarıya Aktarılması

Entegra ile Siparişlerin Xml ile Dışarıya Aktarılması. Dışarı XML konusunda ücretsiz Entegra eğitim videosu. Pazaryeri entegrasyonu, ürün, sipariş ve kargo işle

Bu eğitim ücretsizdir. Canlı online programlar için TEKDEV eğitimlerine katılabilirsiniz.
        

Alttaki Hazır Sipariş XML Şablonunu Kullanmalısınız

select o.*,
(case o.status
when '1' then "Yeni Sipariş"
when '2' then 'Onaylandı'
when '3' then 'Kargolandı'
when '4' then 'Tamamlandı'
when '5' then 'Hatalı'
when '6' then 'Ön Sipariş'
when '7' then 'Kargoya Hazır'
when '8' then 'Ödeme Alındı'
when '9' then 'İade İptal'
when '10' then 'Onay Bekliyor'
else o.status end) as "durum_adi",
o.status as "durum_id",
(case o.cargo_company
when 'aras' then "Aras Kargo"
when 'yurtici' then 'Yurtiçi Kargo'
when 'surat' then 'Sürat Kargo'
when 'mng' then 'Mng Kargo'
when 'ase' then 'Ase Kargo'
when 'ups' then 'Ups Kargo'
when 'eptt' then 'Eptt'
when 'dhl' then 'DHL Kargo'
when 'fedex' then 'Fedex Kargo'
when 'pts' then 'Pts Kargo'
else o.cargo_company end) as "kargo_firma_adi",
(o.cargo_company) as "kargo_firma_code",
(case cargo_fee_type
when '1' then "Alıcı Öder"
when '2' then 'Satıcı Öder'
when '3' then 'Satıcı Öder Kapıda Nakit'
when '4' then 'Satıcı Öder Kapıda Kredikartı'
when '5' then 'GG Öder'
when '6' then 'N11 Öder'
when '7' then 'HB Öder'
when '8' then 'Alıcı Öder Kapıda Kredikartı'
when '9' then 'Alıcı Öder Kapıda Nakit'
else cargo_fee_type end) as "Kargo_Ödemesi_Adi",
o.cargo_fee_type as "Kargo_Ödemesi_id",
o.paymentType as "odeme-tipi_id",
substr(o.datetime,1,10) as "tarih",
substr(o.datetime,12,10) as "saat",
opt.name as "odeme-tipi",
banks.name as "Banka"
from [order] as o
left join order_payment_type as opt on opt.id=o.paymentType
left join banks as banks on banks.code=o.bank_code
where "datetime" > datetime('now','localtime','-3 day')



<?xml version="1.0" encoding="utf-8" ?>
<SIPARISLER>


<SIPARIS>
<SIPARIS_NO>[order_number]</SIPARIS_NO>
<status>[durum_id]</status>
<status_tanim>[durum_adi]</status_tanim>
<PAZARYERI_KARGOKODU>[cargo_code]</PAZARYERI_KARGOKODU>
<CariHesapKodu>[customer_code]</CariHesapKodu>
<CariHesapOzelKodu>[supplier]</CariHesapOzelKodu>
<tcno>[tc_id]</tcno>
<POSTA>[email]</POSTA>
<TARIH>[tarih]</TARIH>
<sipariszaman>[saat]</sipariszaman>
<NET_TOPLAM>[grand_total]</NET_TOPLAM>
<TeslimAlici>[ship_fullname]</TeslimAlici>
<TeslimAdresi>[ship_address] </TeslimAdresi>
<TeslimTelefon>[ship_gsm]</TeslimTelefon>
<teslimsekli>KR</teslimsekli>
<teslimUlke>[ship_country]</teslimUlke>
<teslimPostaKodu>[ship_postcode]</teslimPostaKodu>
<teslimil>[ship_city]</teslimil>
<teslimilce>[ship_district]</teslimilce>
<faturaalici>[invoice_fullname]</faturaalici>
<faturaAdresi>[invoice_address]</faturaAdresi>
<faturaTelefon>[invoice_tel]</faturaTelefon>
<faturavergino>[tax_number]</faturavergino>
<faturavergidairesi>[tax_office]</faturavergidairesi>
<faturaUlke>[invoice_country]</faturaUlke>
<faturaPostaKodu>[invoice_postcode]</faturaPostaKodu>
<faturail>[invoice_city]</faturail>
<faturailce>[invoice_district]</faturailce>
<tasiyicifirma_tanim>[kargo_firma_adi]</tasiyicifirma_tanim>
<tasiyicifirma>[kargo_firma_code]</tasiyicifirma>
<kargo_odemesi_tanim>[Kargo_Ödemesi_Adi]</kargo_odemesi_tanim>
<kargo_odemesi>[Kargo_Ödemesi_id]</kargo_odemesi>
<kargokodu>[cargo_code]</kargokodu>
<banka>[Banka]</banka>
<ODEME_SEKLI_TANIM>[odeme-tipi]</ODEME_SEKLI_TANIM>
<ODEME_SEKLI>[odeme-tipi_id]</ODEME_SEKLI>
<not>[note]</not>
{SqlCommand:
{sql:select model, quantity, price, name, currencyType ,barcode, product_option_value_name, invoice_name, pov_productCode, round((price*(cast((tax_id+100) as float)/100)),2) as "pricex", tax_id from order_product where order_id=[id];}
{header:<SATIRLAR>}
{body:<SATIR>
<KOD>[model]</KOD>
<VARKOD>[pov_productCode]</VARKOD>
<SECENEK_DEGERI>[product_option_value_name]</SECENEK_DEGERI>
<BARCODE>[barcode]</BARCODE>
<URUNADI>[name]</URUNADI>
<FATURA_ADI>[invoice_name]</FATURA_ADI>
<FIYAT>[pricex]</FIYAT>
<DOVIZ>[currencyType]</DOVIZ>
<MIKTAR>[quantity]</MIKTAR>
<BIRIM>Ad.</BIRIM>
<KDV>[tax_id]</KDV>
</SATIR>}
{footer:</SATIRLAR>}
}
</SIPARIS>


</SIPARISLER>

 

        

Alttaki Hazır Sipariş XML Şablonunu Kullanmalısınız

select o.*,
(case o.status
when '1' then "Yeni Sipariş"
when '2' then 'Onaylandı'
when '3' then 'Kargolandı'
when '4' then 'Tamamlandı'
when '5' then 'Hatalı'
when '6' then 'Ön Sipariş'
when '7' then 'Kargoya Hazır'
when '8' then 'Ödeme Alındı'
when '9' then 'İade İptal'
when '10' then 'Onay Bekliyor'
else o.status end) as "durum_adi",
o.status as "durum_id",
(case o.cargo_company
when 'aras' then "Aras Kargo"
when 'yurtici' then 'Yurtiçi Kargo'
when 'surat' then 'Sürat Kargo'
when 'mng' then 'Mng Kargo'
when 'ase' then 'Ase Kargo'
when 'ups' then 'Ups Kargo'
when 'eptt' then 'Eptt'
when 'dhl' then 'DHL Kargo'
when 'fedex' then 'Fedex Kargo'
when 'pts' then 'Pts Kargo'
else o.cargo_company end) as "kargo_firma_adi",
(o.cargo_company) as "kargo_firma_code",
(case cargo_fee_type
when '1' then "Alıcı Öder"
when '2' then 'Satıcı Öder'
when '3' then 'Satıcı Öder Kapıda Nakit'
when '4' then 'Satıcı Öder Kapıda Kredikartı'
when '5' then 'GG Öder'
when '6' then 'N11 Öder'
when '7' then 'HB Öder'
when '8' then 'Alıcı Öder Kapıda Kredikartı'
when '9' then 'Alıcı Öder Kapıda Nakit'
else cargo_fee_type end) as "Kargo_Ödemesi_Adi",
o.cargo_fee_type as "Kargo_Ödemesi_id",
o.paymentType as "odeme-tipi_id",
substr(o.datetime,1,10) as "tarih",
substr(o.datetime,12,10) as "saat",
opt.name as "odeme-tipi",
banks.name as "Banka"
from [order] as o
left join order_payment_type as opt on opt.id=o.paymentType
left join banks as banks on banks.code=o.bank_code
where "datetime" > datetime('now','localtime','-3 day')



<?xml version="1.0" encoding="utf-8" ?>
<SIPARISLER>


<SIPARIS>
<SIPARIS_NO>[order_number]</SIPARIS_NO>
<status>[durum_id]</status>
<status_tanim>[durum_adi]</status_tanim>
<PAZARYERI_KARGOKODU>[cargo_code]</PAZARYERI_KARGOKODU>
<CariHesapKodu>[customer_code]</CariHesapKodu>
<CariHesapOzelKodu>[supplier]</CariHesapOzelKodu>
<tcno>[tc_id]</tcno>
<POSTA>[email]</POSTA>
<TARIH>[tarih]</TARIH>
<sipariszaman>[saat]</sipariszaman>
<NET_TOPLAM>[grand_total]</NET_TOPLAM>
<TeslimAlici>[ship_fullname]</TeslimAlici>
<TeslimAdresi>[ship_address] </TeslimAdresi>
<TeslimTelefon>[ship_gsm]</TeslimTelefon>
<teslimsekli>KR</teslimsekli>
<teslimUlke>[ship_country]</teslimUlke>
<teslimPostaKodu>[ship_postcode]</teslimPostaKodu>
<teslimil>[ship_city]</teslimil>
<teslimilce>[ship_district]</teslimilce>
<faturaalici>[invoice_fullname]</faturaalici>
<faturaAdresi>[invoice_address]</faturaAdresi>
<faturaTelefon>[invoice_tel]</faturaTelefon>
<faturavergino>[tax_number]</faturavergino>
<faturavergidairesi>[tax_office]</faturavergidairesi>
<faturaUlke>[invoice_country]</faturaUlke>
<faturaPostaKodu>[invoice_postcode]</faturaPostaKodu>
<faturail>[invoice_city]</faturail>
<faturailce>[invoice_district]</faturailce>
<tasiyicifirma_tanim>[kargo_firma_adi]</tasiyicifirma_tanim>
<tasiyicifirma>[kargo_firma_code]</tasiyicifirma>
<kargo_odemesi_tanim>[Kargo_Ödemesi_Adi]</kargo_odemesi_tanim>
<kargo_odemesi>[Kargo_Ödemesi_id]</kargo_odemesi>
<kargokodu>[cargo_code]</kargokodu>
<banka>[Banka]</banka>
<ODEME_SEKLI_TANIM>[odeme-tipi]</ODEME_SEKLI_TANIM>
<ODEME_SEKLI>[odeme-tipi_id]</ODEME_SEKLI>
<not>[note]</not>
{SqlCommand:
{sql:select model, quantity, price, name, currencyType ,barcode, product_option_value_name, invoice_name, pov_productCode, round((price*(cast((tax_id+100) as float)/100)),2) as "pricex", tax_id from order_product where order_id=[id];}
{header:<SATIRLAR>}
{body:<SATIR>
<KOD>[model]</KOD>
<VARKOD>[pov_productCode]</VARKOD>
<SECENEK_DEGERI>[product_option_value_name]</SECENEK_DEGERI>
<BARCODE>[barcode]</BARCODE>
<URUNADI>[name]</URUNADI>
<FATURA_ADI>[invoice_name]</FATURA_ADI>
<FIYAT>[pricex]</FIYAT>
<DOVIZ>[currencyType]</DOVIZ>
<MIKTAR>[quantity]</MIKTAR>
<BIRIM>Ad.</BIRIM>
<KDV>[tax_id]</KDV>
</SATIR>}
{footer:</SATIRLAR>}
}
</SIPARIS>


</SIPARISLER>