E-Ticaret Panel
Mağazalar
Mağaza Düzenle
Mağaza Adı
XML Linki
Shopify Store Name
.myshopify.com
Access Token
API Version
2025-07 (En Güncel - Önerilen)
2025-04
2025-01
2024-10
2024-07
2024-04 (Legacy)
2024-01 (Legacy)
Mevcut: 2025-07
Kontrol Süresi
Saniye
Dakika
Saat
Gün
Product Path (Opsiyonel)
XML'de ürünlerin bulunduğu path
🏷️ Vendor (Marka) Filtreleme
✅
2 marka
seçili:
TOMMYLIFE
Air Jones
← Ana sayfadan "Filtre Ekle" butonuyla vendor seçimi yapabilirsiniz
Converter Kodunuz
// Yakemall XML -> Shopify CSV (VAT dahil fiyat + sade açıklama + %20 kar) module.exports = function productToShopifyRows(item, utils = {}) { // ---------- helpers ---------- const trim = v => (v == null ? '' : String(v).trim()); const pick = (...vals) => vals.find(v => v !== undefined && v !== null && String(v).trim() !== ''); const isUrl = u => /^https?:\/\//i.test(String(u || '')); const toNum = v => { if (v == null || v === '') return null; const n = Number(String(v).replace(',', '.')); return Number.isFinite(n) ? n : null; }; const money = v => { const n = toNum(v); return n == null ? '' : n.toFixed(2); }; // %20 kar uygulanacak yardımcı const applyMargin = (v, rate = 0.20) => { const n = toNum(v); return n == null ? null : n * (1 + rate); }; const uniq = arr => Array.from(new Set((arr || []).filter(Boolean))); const slugify = (s='') => (utils.slugify ? utils.slugify(s) : String(s).toLowerCase().normalize('NFKD') .replace(/[\u0300-\u036f]/g,'') .replace(/[^a-z0-9]+/g,'-').replace(/(^-|-$)/g,'') ); const minifyHTML = (s='') => String(s) .replace(/\s+/g, ' ') .replace(/\s*(>|\<)\s*/g, '$1') .trim(); // xml2js esnekliği için const val = v => Array.isArray(v) ? val(v[0]) : (v && typeof v === 'object' && '_' in v ? val(v._) : v); // Beden sırası const SIZE_ORDER = ['XXS','XS','S','M','L','XL','2XL','3XL','4XL','5XL', '24','25','26','27','28','29','30','31','32','33','34','36','38','40','42','44','46','48','50']; const sizeRank = s => { const u = String(s || '').toUpperCase(); const i = SIZE_ORDER.indexOf(u); return i === -1 ? 999 : i; }; // ---------- product-level fields ---------- const brand = trim(val(item.brand)); const model = trim(val(item.model)); const name = trim(val(item.name)); const supplierCode = trim(val(item.supplier_code) || val(item.ws_code) || val(item.code)); const cat3 = trim(val(item.cat3name) || ''); const cat2 = trim(val(item.cat2name) || ''); const cat1 = trim(val(item.cat1name) || ''); const type = pick(cat3, cat2, cat1) || ''; const categoryPath = trim(val(item.category_path) || ''); const tags = uniq([brand, model, ...categoryPath.split('>').map(s => trim(s)), trim(val(item.currency))]).join(', '); const seoTitle = trim(val(item.seo_title)); const seoDesc = trim(val(item.seo_description)); const fabric = trim(val(item.additional_10)); const sizeInfo = trim(val(item.additional_2)); const productBarcode = trim(val(item.barcode)); const toArray = v => v == null ? [] : (Array.isArray(v) ? v : [v]); const images = uniq( toArray(item.img_item) .map(v => val(v)) .filter(isUrl) ); let subs = []; const spRoot = val(item.subproducts); if (spRoot && (spRoot.subproduct || Array.isArray(spRoot))) { let raw = spRoot.subproduct || spRoot; raw = Array.isArray(raw) ? raw : [raw]; subs = raw.map(x => ({ code: trim(val(x.code)), ws_code: trim(val(x.ws_code) || val(x.supplier_code) || val(x.code)), supplier_code: trim(val(x.supplier_code)), barcode: trim(val(x.barcode)), type1: trim(val(x.type1)), // renk type2: trim(val(x.type2)), // beden stock: trim(val(x.stock)) })); } const Handle = slugify([brand, model, supplierCode || name || val(item.code)].filter(Boolean).join(' ')); // Body (HTML) — sadece istenen bilgiler const bodyParts = []; if (supplierCode) bodyParts.push(`<p><strong>Ürün Kodu:</strong> ${supplierCode}</p>`); if (fabric) bodyParts.push(`<p><strong>Kumaş:</strong> ${fabric}</p>`); if (brand) bodyParts.push(`<p><strong>Marka:</strong> ${brand}</p>`); if (sizeInfo) bodyParts.push(`<p><strong>Manken Bilgileri:</strong> ${sizeInfo}</p>`); const BodyHTML = minifyHTML(bodyParts.join('')); // fiyatlar product-level’den (VAT included öncelikli) const topSell = pick(val(item.price_special_vat_included), val(item.price_special)); const topList = pick(val(item.price_list_vat_included), val(item.price_list)); // Shopify şablon (İLK SATIR için dolu) const baseFull = { Handle, Title: name, 'Body (HTML)': BodyHTML, Vendor: brand, Type: type, Tags: tags, Published: 'TRUE', 'Option1 Name': 'Beden', 'Option2 Name': 'Renk', 'Option3 Name': '', 'Variant Inventory Tracker': 'shopify', 'Variant Inventory Policy': 'deny', 'Variant Fulfillment Service': 'manual', 'Variant Requires Shipping': 'TRUE', 'Variant Taxable': 'TRUE', 'Gift Card': '', 'SEO Title': seoTitle, 'SEO Description': seoDesc, Status: 'active' }; // SONRAKİ VARYANT SATIRLARI için hafif şablon const baseLite = { Handle, Title: '', 'Body (HTML)': '', Vendor: '', Type: '', Tags: '', Published: '', 'Option1 Name': '', 'Option2 Name': '', 'Option3 Name': '', 'Variant Inventory Tracker': 'shopify', 'Variant Inventory Policy': 'deny', 'Variant Fulfillment Service': 'manual', 'Variant Requires Shipping': 'TRUE', 'Variant Taxable': 'TRUE', 'Gift Card': '', 'SEO Title': '', 'SEO Description': '', Status: '' }; const rows = []; if (subs.length === 0) { // tek varyantlı ürün const r = { ...baseFull }; r['Option1 Name'] = ''; r['Option2 Name'] = ''; r['Variant SKU'] = supplierCode || val(item.code); r['Variant Barcode'] = productBarcode; // %20 kar uygulanmış fiyatlar r['Variant Price'] = money(applyMargin(topSell)); r['Variant Compare At Price'] = money(applyMargin(topList)); r['Variant Inventory Qty'] = String(toNum(val(item.stock)) ?? 0); if (images.length) { r['Image Src'] = images[0]; r['Image Position'] = 1; r['Image Alt Text'] = name; } rows.push(r); } else { // çoklu varyant subs.sort((a, b) => sizeRank(a.type2) - sizeRank(b.type2)); subs.forEach((sp, idx) => { const size = trim(sp.type2); const color = trim(sp.type1 || val(item.type1) || ''); const sku = trim(sp.ws_code || sp.supplier_code || sp.code); const bc = trim(sp.barcode || productBarcode); const qty = String(toNum(sp.stock) ?? toNum(val(item.stock)) ?? 0); const base = (idx === 0) ? baseFull : baseLite; const row = { ...base, 'Option1 Value': size, 'Option2 Value': color, 'Variant SKU': sku, 'Variant Barcode': bc, // %20 kar uygulanmış fiyatlar 'Variant Price': money(applyMargin(topSell)), 'Variant Compare At Price': money(applyMargin(topList)), 'Variant Inventory Qty': qty }; if (idx === 0 && images.length) { row['Image Src'] = images[0]; row['Image Position'] = 1; row['Image Alt Text'] = name; } rows.push(row); }); } // ekstra görseller if (images.length > 1) { images.slice(1).forEach((src, i) => { rows.push({ Handle, 'Image Src': src, 'Image Position': i + 2, 'Image Alt Text': name }); }); } return rows; };
Güncelle
İptal
İstatistikler
Toplam Çalışma
2948
Başarı Oranı
96%
İşlenen Ürün
0
Push Edilen
0