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
📦 Tüm markalar işleniyor
← Ana sayfadan "Filtre Ekle" butonuyla vendor seçimi yapabilirsiniz
Converter Kodunuz
// Tekbitane XML -> Shopify CSV Converter // XML URL: https://www.tekbitane.com/output/2970435789 module.exports = function(item, utils) { // Temel değerleri al const stockCode = item.stockCode?.[0] || item.stockCode || ''; const title = item.label?.[0] || item.label || 'Untitled'; const brand = item.brand?.[0] || item.brand || ''; const barcode = item.barcode?.[0] || item.barcode || ''; const mainCategory = item.mainCategory?.[0] || item.mainCategory || ''; const details = item.details?.[0] || item.details || ''; const status = item.status?.[0] || item.status || '1'; // Fiyatlar const price1 = parseFloat(item.price1?.[0] || item.price1 || 0); const rebate = parseFloat(item.rebate?.[0] || item.rebate || 0); // Stok const stockAmount = parseInt(item.stockAmount?.[0] || item.stockAmount || 0); // Vergi const tax = parseInt(item.tax?.[0] || item.tax || 0); // Handle oluştur const handle = utils.toHandle(title) || utils.slugify(stockCode) || 'product-' + Date.now(); // Satış fiyatı (rebate varsa onu kullan, yoksa price1) const salePrice = rebate > 0 ? rebate : price1; // Karşılaştırma fiyatı (rebate varsa price1 karşılaştırma olur) const comparePrice = rebate > 0 && price1 > rebate ? price1 : null; // TÜM resimleri al (sınır yok) const images = []; let picIndex = 1; while (true) { const imgKey = `picture${picIndex}Path`; const imgUrl = item[imgKey]?.[0] || item[imgKey] || ''; if (!imgUrl && picIndex > 20) break; // 20'ye kadar kontrol et, boşsa dur if (imgUrl && utils.isValidUrl(imgUrl)) { images.push(imgUrl); } picIndex++; if (picIndex > 100) break; // Güvenlik limiti } // Varyantları kontrol et const variants = []; if (item.variants && item.variants[0] && item.variants[0].variant) { const variantList = item.variants[0].variant; variantList.forEach(v => { const vStockCode = v.vStockCode?.[0] || v.vStockCode || ''; const vStockAmount = parseInt(v.vStockAmount?.[0] || v.vStockAmount || stockAmount); const vBarcode = v.vBarcode?.[0] || v.vBarcode || ''; // Varyant fiyatları const vPrice1 = parseFloat(v.vPrice1?.[0] || v.vPrice1 || price1); const vRebate = parseFloat(v.vRebate?.[0] || v.vRebate || 0); const vSalePrice = vRebate > 0 ? vRebate : vPrice1; const vComparePrice = vRebate > 0 && vPrice1 > vRebate ? vPrice1 : null; // Varyant resimleri (tümünü al) const vImages = []; let vPicIndex = 1; while (true) { const vImgKey = `vPicture${vPicIndex}Path`; const vImgUrl = v[vImgKey]?.[0] || v[vImgKey] || ''; if (!vImgUrl && vPicIndex > 20) break; if (vImgUrl && utils.isValidUrl(vImgUrl)) { vImages.push(vImgUrl); } vPicIndex++; if (vPicIndex > 100) break; } // Option bilgileri let optionName = ''; let optionValue = ''; if (v.options && v.options[0]) { // options içinde option array'i olabilir const optionData = v.options[0].option || v.options[0]; if (Array.isArray(optionData)) { optionName = optionData[0]?.variantName?.[0] || optionData[0]?.variantName || 'Seçenek'; optionValue = optionData[0]?.variantValue?.[0] || optionData[0]?.variantValue || ''; } else { optionName = optionData.variantName?.[0] || optionData.variantName || 'Seçenek'; optionValue = optionData.variantValue?.[0] || optionData.variantValue || ''; } } variants.push({ sku: vStockCode, stock: vStockAmount, barcode: vBarcode, optionName: optionName, optionValue: optionValue, salePrice: vSalePrice, comparePrice: vComparePrice, images: vImages }); }); } // Sonuç satırları const rows = []; // Durum belirleme const productStatus = status === '1' || status === 1 ? 'active' : 'draft'; const published = productStatus === 'active' ? 'TRUE' : 'FALSE'; // Varyant yoksa tek satır if (variants.length === 0) { // Ana ürün satırı const mainRow = { 'Handle': handle, 'Title': utils.normalizeTitle(title), 'Body (HTML)': utils.cleanHTML(details), 'Vendor': utils.normalizeVendor(brand), 'Product Category': '', 'Type': utils.normalizeProductType(mainCategory), 'Tags': mainCategory, 'Published': published, 'Option1 Name': 'Title', 'Option1 Value': 'Default Title', 'Option2 Name': '', 'Option2 Value': '', 'Option3 Name': '', 'Option3 Value': '', 'Variant SKU': utils.normalizeSKU(stockCode), 'Variant Grams': 0, 'Variant Inventory Tracker': 'shopify', 'Variant Inventory Qty': stockAmount, 'Variant Inventory Policy': 'deny', 'Variant Fulfillment Service': 'manual', 'Variant Price': utils.formatPrice(salePrice), 'Variant Compare At Price': comparePrice ? utils.formatPrice(comparePrice) : '', 'Variant Requires Shipping': 'TRUE', 'Variant Taxable': tax > 0 ? 'TRUE' : 'FALSE', 'Variant Barcode': utils.validateBarcode(barcode) || '', 'Image Src': images[0] || '', 'Image Position': images[0] ? 1 : '', 'Image Alt Text': title, 'Gift Card': 'FALSE', 'SEO Title': utils.normalizeTitle(title), 'SEO Description': '', 'Variant Image': '', 'Variant Weight Unit': 'g', 'Variant Tax Code': '', 'Cost per item': '', 'Included / International': 'TRUE', 'Included / Turkey': 'TRUE', 'Status': productStatus }; rows.push(mainRow); // Ek resimler için satırlar for (let i = 1; i < images.length; i++) { rows.push({ 'Handle': handle, 'Title': '', 'Body (HTML)': '', 'Vendor': '', 'Product Category': '', 'Type': '', 'Tags': '', 'Published': '', 'Option1 Name': '', 'Option1 Value': '', 'Option2 Name': '', 'Option2 Value': '', 'Option3 Name': '', 'Option3 Value': '', 'Variant SKU': '', 'Variant Grams': '', 'Variant Inventory Tracker': '', 'Variant Inventory Qty': '', 'Variant Inventory Policy': '', 'Variant Fulfillment Service': '', 'Variant Price': '', 'Variant Compare At Price': '', 'Variant Requires Shipping': '', 'Variant Taxable': '', 'Variant Barcode': '', 'Image Src': images[i], 'Image Position': i + 1, 'Image Alt Text': title, 'Gift Card': '', 'SEO Title': '', 'SEO Description': '', 'Variant Image': '', 'Variant Weight Unit': '', 'Variant Tax Code': '', 'Cost per item': '', 'Included / International': '', 'Included / Turkey': '', 'Status': '' }); } } else { // Varyantlı ürün const optionName = variants[0]?.optionName || 'Seçenek'; // Tüm varyant resimlerini topla (ürün resimlerine eklenecek) const allVariantImages = []; variants.forEach(v => { v.images.forEach(img => { if (!allVariantImages.includes(img)) { allVariantImages.push(img); } }); }); variants.forEach((variant, index) => { const isFirstRow = index === 0; // Varyantın kendi resmi varsa onu kullan, yoksa ilk ürün resmini const variantImage = variant.images[0] || ''; const row = { 'Handle': handle, 'Title': isFirstRow ? utils.normalizeTitle(title) : '', 'Body (HTML)': isFirstRow ? utils.cleanHTML(details) : '', 'Vendor': isFirstRow ? utils.normalizeVendor(brand) : '', 'Product Category': '', 'Type': isFirstRow ? utils.normalizeProductType(mainCategory) : '', 'Tags': isFirstRow ? mainCategory : '', 'Published': isFirstRow ? published : '', 'Option1 Name': isFirstRow ? optionName : '', 'Option1 Value': variant.optionValue || 'Default', 'Option2 Name': '', 'Option2 Value': '', 'Option3 Name': '', 'Option3 Value': '', 'Variant SKU': utils.normalizeSKU(variant.sku || `${stockCode}-${index + 1}`), 'Variant Grams': 0, 'Variant Inventory Tracker': 'shopify', 'Variant Inventory Qty': variant.stock, 'Variant Inventory Policy': 'deny', 'Variant Fulfillment Service': 'manual', 'Variant Price': utils.formatPrice(variant.salePrice), 'Variant Compare At Price': variant.comparePrice ? utils.formatPrice(variant.comparePrice) : '', 'Variant Requires Shipping': 'TRUE', 'Variant Taxable': tax > 0 ? 'TRUE' : 'FALSE', 'Variant Barcode': utils.validateBarcode(variant.barcode) || '', 'Image Src': isFirstRow && images[0] ? images[0] : '', 'Image Position': isFirstRow && images[0] ? 1 : '', 'Image Alt Text': isFirstRow ? title : '', 'Gift Card': isFirstRow ? 'FALSE' : '', 'SEO Title': isFirstRow ? utils.normalizeTitle(title) : '', 'SEO Description': '', 'Variant Image': variantImage, // Varyanta özel resim 'Variant Weight Unit': 'g', 'Variant Tax Code': '', 'Cost per item': '', 'Included / International': isFirstRow ? 'TRUE' : '', 'Included / Turkey': isFirstRow ? 'TRUE' : '', 'Status': isFirstRow ? productStatus : '' }; rows.push(row); }); // Ek ürün resimleri (ilk resim zaten ilk satırda) for (let i = 1; i < images.length; i++) { rows.push({ 'Handle': handle, 'Title': '', 'Body (HTML)': '', 'Vendor': '', 'Product Category': '', 'Type': '', 'Tags': '', 'Published': '', 'Option1 Name': '', 'Option1 Value': '', 'Option2 Name': '', 'Option2 Value': '', 'Option3 Name': '', 'Option3 Value': '', 'Variant SKU': '', 'Variant Grams': '', 'Variant Inventory Tracker': '', 'Variant Inventory Qty': '', 'Variant Inventory Policy': '', 'Variant Fulfillment Service': '', 'Variant Price': '', 'Variant Compare At Price': '', 'Variant Requires Shipping': '', 'Variant Taxable': '', 'Variant Barcode': '', 'Image Src': images[i], 'Image Position': i + 1, 'Image Alt Text': title, 'Gift Card': '', 'SEO Title': '', 'SEO Description': '', 'Variant Image': '', 'Variant Weight Unit': '', 'Variant Tax Code': '', 'Cost per item': '', 'Included / International': '', 'Included / Turkey': '', 'Status': '' }); } // Varyant resimleri (ürün resimlerinde olmayan varyant resimleri) allVariantImages.forEach((vImg, idx) => { if (!images.includes(vImg)) { rows.push({ 'Handle': handle, 'Title': '', 'Body (HTML)': '', 'Vendor': '', 'Product Category': '', 'Type': '', 'Tags': '', 'Published': '', 'Option1 Name': '', 'Option1 Value': '', 'Option2 Name': '', 'Option2 Value': '', 'Option3 Name': '', 'Option3 Value': '', 'Variant SKU': '', 'Variant Grams': '', 'Variant Inventory Tracker': '', 'Variant Inventory Qty': '', 'Variant Inventory Policy': '', 'Variant Fulfillment Service': '', 'Variant Price': '', 'Variant Compare At Price': '', 'Variant Requires Shipping': '', 'Variant Taxable': '', 'Variant Barcode': '', 'Image Src': vImg, 'Image Position': images.length + idx + 1, 'Image Alt Text': title, 'Gift Card': '', 'SEO Title': '', 'SEO Description': '', 'Variant Image': '', 'Variant Weight Unit': '', 'Variant Tax Code': '', 'Cost per item': '', 'Included / International': '', 'Included / Turkey': '', 'Status': '' }); } }); } return rows; };
Güncelle
İptal
İstatistikler
Toplam Çalışma
2969
Başarı Oranı
94%
İşlenen Ürün
0
Push Edilen
0