=== Futurecode Ürün Feed for WooCommerce ===
Contributors: futurecodetr
Tags: product feed, xml feed, google merchant, price comparison, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

XML product feeds compatible with Akakçe, Cimri and Google Merchant Center: secret addresses, batch generation, category mapping, validation.

== Description ==

**English**

Send your WooCommerce products to price comparison sites and Google as XML. The plugin builds three feeds compatible with Akakçe, Cimri and Google Merchant Center and serves each from a secret address that only you know.

* Akakçe XML, Cimri XML and Google Merchant Center RSS 2.0 with the `g:` namespace.
* A fixed address per channel protected by a secret key (wrong key: 403), renewable with one click.
* Feeds are cached as files in a protected uploads folder and streamed; ETag / Last-Modified with 304.
* Built in small batches on Action Scheduler (or WP-Cron), refreshed by WP-Cron, swapped in atomically; memory stays flat on large catalogs.
* Category mapping with the full Google product taxonomy built in and searchable, inheritance to sub-categories, bulk actions, CSV export / template / import.
* Brand, GTIN / barcode and MPN on products and variations, with fallbacks to WooCommerce Brands, attributes, the WooCommerce GTIN field or a meta key.
* Variations as separate products (with `item_group_id`) or one row per parent.
* Shipping fee and shipping time, per product overrides, free shipping threshold, same-day cut-off hour.
* Filters by category, tag, price range and stock.
* Validation report with edit links, and a live preview.
* Declares HPOS and block checkout compatibility.

Coming soon (planned as a separate Pro plugin): multiple feeds, custom templates, AI title clean-up. Nothing in this free plugin is locked.

**Türkçe**

WooCommerce ürünlerinizi fiyat karşılaştırma sitelerine ve Google'a XML ile gönderin. Akakçe, Cimri ve Google Merchant Center ile uyumlu üç feed üretir; her birini yalnızca sizin bildiğiniz gizli bir adresten verir.

* **Üç kanal, üç biçim:** Akakçe XML'i (`<products><product>`), Cimri XML'i (`<MerchantItems>`) ve Google Merchant Center için `g:` ad alanlı RSS 2.0.
* **Gizli anahtarlı sabit adres:** örneğin `https://siteniz.com/?fcuf_feed=akakce&key=…`. Yanlış anahtar 403 alır. Anahtar tek tıkla yenilenir, eski adres o an kapanır. Kanal kapatılırsa adres 404 verir.
* **Dosya önbelleği:** feed `wp-content/uploads/fcuf-feeds/` altında, doğrudan erişime kapalı (`.htaccess`) ve adı tahmin edilemeyen bir dosyaya yazılır. Kanal her geldiğinde ürünler yeniden sorgulanmaz, dosya akıtılır; `ETag` / `Last-Modified` ile 304 desteklenir.
* **Büyük kataloglarda parça parça üretim:** ürünler ID sırasıyla küçük parçalar halinde işlenir, her parçadan sonra bellek temizlenir. Parçalar WooCommerce ile gelen Action Scheduler'da (yoksa WP-Cron'da) çalışır; düzenli yenileme WP-Cron ile saatlik, günde iki kez ya da günde bir kez yapılır. Yeni dosya bitince eskisinin yerine tek adımda geçer, kanal hiçbir zaman yarım dosya görmez. 5.000 ürünlük testte bellek parçalar arasında sabit kaldı.
* **Kategori eşleme:** WooCommerce kategorilerinizi Google ürün kategorisine (taksonominin tamamı eklentiye gömülü, Türkçe ve İngilizce, kelimeyle ya da ID ile aranır), Akakçe ve Cimri kategori yoluna eşleyin. Üst kategorideki eşleme alt kategorilere de geçer. Toplu atama, CSV dışa aktarma, şablon ve içe aktarma.
* **Marka, GTIN/barkod ve MPN:** ürün ve varyasyon düzeyinde alanlar. Boş bırakılırsa WooCommerce Markalar, bir öznitelik (ör. "Marka"), WooCommerce'in kendi "GTIN, UPC, EAN veya ISBN" alanı ya da seçtiğiniz bir meta alanı kullanılır. Varsayılan marka tanımlanabilir.
* **Varyasyonlar:** her varyasyon kendi fiyatı, stoğu, görseli, barkodu ve bağlantısıyla ayrı ürün olarak (Google'da `item_group_id` ile) ya da ana ürün en düşük fiyatıyla tek satır olarak gönderilir.
* **Kargo:** varsayılan kargo ücreti ve kargoya veriliş süresi, ürün bazında değiştirilebilir; "şu tutarın üstü ücretsiz kargo" ve aynı gün kargo için son saat.
* **Filtreler:** kategori (dahil / hariç, alt kategoriler kapsanır), etiket (dahil / hariç), fiyat aralığı ve stok. Gizli, parolalı ve "feed dışında bırak" işaretli ürünler hiç gönderilmez.
* **Doğrulama raporu ve önizleme:** her üretimde, zorunlu alanı eksik olduğu için feed dışında kalan ürünler ve uyarılar (ör. barkod eksik) "Düzenle" bağlantısıyla listelenir. Önizleme, ayarlarınızla ilk ürünlerin XML'ini dosyaya dokunmadan gösterir.
* **Her işlemde bildirim:** kaydetme, üretme, anahtar yenileme, içe/dışa aktarma; hepsi dönen göstergeli bildirim ve ilerleme çubuğu ile.
* HPOS (yüksek performanslı sipariş tabloları) ve blok ödeme ile uyumlu olduğunu bildirir (eklenti siparişlere dokunmaz).
* Ziyaretçi tarafına hiçbir dosya, bağlantı ya da imza eklenmez.

Akakçe ve Cimri'de listelenmek için o sitelerle mağaza anlaşmanız olmalıdır; bu eklenti yalnızca istedikleri XML dosyasını hazırlar.

**Yakında (Pro sürüm, ayrı eklenti olarak planlanıyor)**

* Çoklu feed (aynı kanal için farklı filtrelerle birden fazla feed)
* Özel şablon (kendi XML yapınızı tanımlama)
* Yapay zekâ ile ürün başlığı temizleme

Bu ücretsiz sürümdeki hiçbir özellik kilitli değildir ve hiçbir zaman kilitlenmeyecektir.

== Channel formats and sources ==

* **Google Merchant Center** — public official specification: [Product data specification](https://support.google.com/merchants/answer/7052112), [RSS 2.0 feed format](https://support.google.com/merchants/answer/160589), [Google product category](https://support.google.com/merchants/answer/6324436). Product taxonomy: `https://www.google.com/basepages/producttype/taxonomy-with-ids.tr-TR.txt` and `…en-US.txt` (version 2021-09-21), bundled in `data/`.
* **Akakçe** — Akakçe gives its XML guide to merchants after their store account is opened; it is not public. The fields follow the most detailed public description we found: [feedance.com/tr/integration/akakce](https://www.feedance.com/tr/integration/akakce) (required: sku, name, url, imgUrl, price, shipPrice, dayOfDelivery, productBrand, productCategory). Check the guide in your Akakçe merchant panel before going live.
* **Cimri** — no public official guide either. The structure (namespace `http://www.cimri.com/schema/merchant/upload`, `MerchantItems` / `MerchantItem`, `merchantItemId`, `itemTitle`, `brand`, `merchantItemCategoryName`, `itemUrl`, `itemImageUrl`, `pricePlusTax`, `priceEft`, `shippingFee`, `shippingDay`, `eans`) follows Cimri feeds produced by Turkish e-commerce platforms and [this AKINSOFT guide](https://bilgibankasi.akinsoft.net/tr/home/makale/3504-cimricom-urun-entegrasyonu). Check with Cimri before going live.

Prices are sent including VAT, in the shop currency, with a dot as decimal separator.

== External services ==

This plugin **does not send any data to any external service**. It makes no outgoing requests at all.

* The feeds are files on your own site. Akakçe, Cimri, Google Merchant Center (or any service you give the address to) download them from your site, when they choose to.
* What a feed contains: the products that pass your filters, with name, description, link, image addresses, price, stock, brand, barcode, MPN, category and shipping details. No customer or order data is ever included.
* **Keep the feed addresses private.** Anyone who has an address can read your product list and prices. Give each address only to its channel. If an address leaks, click *Renew key*: the old address stops working at once (403) and you give the new one to the channel.
* Feed files are written to `wp-content/uploads/fcuf-feeds/` with a random part in their names and a `.htaccess` that denies direct access (on nginx, the random name still keeps them hidden; you may also deny that folder in your server configuration).

**Türkçe:** Eklenti hiçbir dış servise veri göndermez, dışarıya hiçbir istek yapmaz. Feed'ler sizin sitenizdeki dosyalardır; Akakçe, Cimri ve Google kendi zamanlarında gizli adresten çeker. Feed'de müşteri ya da sipariş verisi yoktur. Feed adreslerini gizli tutun: adresi bilen herkes ürün listenizi ve fiyatlarınızı görebilir. Adres sızarsa "Anahtarı yenile" ile eskisini anında kapatın.

== Installation ==

1. Install and activate WooCommerce.
2. Upload and activate the plugin. A first build of all feeds starts a minute later.
3. Open *Product feed* in the admin menu. Copy each address on the *Feeds* tab and give it to the channel.
4. Map your categories on the *Category mapping* tab (at least the Google product category), choose brand / GTIN sources on *Product fields*, and set filters if needed.
5. Check the *Validation* tab and fix the products listed there.

**Türkçe:** WooCommerce'i kurun ve eklentiyi etkinleştirin. Yönetim menüsündeki *Ürün Feed* ekranında *Feedler* sekmesindeki adresleri kopyalayıp ilgili kanala verin. *Kategori eşleme* sekmesinden kategorilerinizi eşleyin, *Ürün alanları* sekmesinden marka ve barkod kaynağını seçin, *Doğrulama* sekmesindeki ürünleri düzeltin.

== Frequently Asked Questions ==

= Feed ne sıklıkla yenilenir? / How often are feeds refreshed? =

Varsayılan olarak her gece 03:00'te; ayarlardan saatlik, günde iki kez ya da yalnız elle seçilebilir. "Şimdi üret" düğmesi istediğiniz an yeniler. WP-Cron sitenize ziyaret geldikçe çalışır; az ziyaret alan sitelerde gerçek bir sunucu cron'u öneririz. / Every night at 03:00 by default; hourly, twice a day or manual can be chosen. WP-Cron runs on site visits, so low-traffic sites should use a real server cron.

= Çok ürünüm var, sunucu kaldırır mı? / Will it cope with a large catalog? =

Evet. Ürünler parça parça (varsayılan 200) işlenir, her parçadan sonra bellek boşaltılır ve dosyaya akıtılır. Paylaşımlı sunucularda parça boyutunu düşürebilirsiniz. / Yes. Products are handled in batches (200 by default), memory is released after each batch and output is streamed to disk.

= Bir ürün feed'de neden yok? / Why is a product missing from a feed? =

*Doğrulama* sekmesine bakın: zorunlu alanı (görsel, marka, fiyat …) eksik olan ürünler orada "Düzenle" bağlantısıyla listelenir. Ayrıca filtreler, stok durumu, katalog görünürlüğü "gizli" ve ürünün "Feed dışında bırak" kutusu ürünü dışarıda bırakır. / See the *Validation* tab; also check filters, stock, hidden visibility and the "Leave out of feeds" box.

= Barkodu nereye yazmalıyım? / Where do I enter the barcode? =

WooCommerce'in kendi "GTIN, UPC, EAN veya ISBN" alanı (Envanter sekmesi) varsayılan kaynaktır. Ürün verisi → *Ürün Feed* sekmesindeki ve her varyasyondaki "GTIN / barkod" alanı önceliklidir. Bir öznitelik ya da meta alanı da seçilebilir. / The WooCommerce GTIN field is the default source; the plugin's own field on products and variations wins; an attribute or meta key can be chosen too.

= Akakçe ve Cimri kategorilerini nereden bileceğim? / Which Akakçe and Cimri categories should I use? =

Bu iki sitenin kategori ağacı kamuya açık değildir. Boş bırakırsanız WooCommerce kategori yolunuz (ör. "Elektronik > Telefon") gönderilir ve siteler kendi tarafında eşler. Mağaza panelinizde bir yol isteniyorsa *Kategori eşleme* sekmesine yazın. / Their category trees are not public. When empty, your WooCommerce path is sent and the site maps it on its side.

= Feed adresim başkasının eline geçerse? / What if my feed address leaks? =

*Anahtarı yenile*'ye tıklayın. Eski adres anında 403 verir; yeni adresi kanala iletin. / Click *Renew key*; the old address answers 403 at once.

= Önbellek eklentimle çalışır mı? / Does it work with page cache plugins? =

Feed adresi sorgu parametreli olduğu ve `Cache-Control: private` gönderdiği için çoğu önbellek eklentisi atlar. Atlamıyorsa `fcuf_feed` parametresini önbellek dışına alın. Feed yenilendiğinde `fcuf_feed_generated` eylemi tetiklenir. / The address uses a query string and sends `Cache-Control: private`; exclude `fcuf_feed` if your cache plugin does not skip it.

== Screenshots ==

1. Feeds: three channels, secret addresses, generation progress and general settings. / Feedler ekranı.
2. Category mapping with the searchable Google product taxonomy and bulk actions. / Kategori eşleme.
3. Product fields: brand, GTIN and MPN sources and channel requirements. / Ürün alanları.
4. Validation report and live preview. / Doğrulama raporu ve önizleme.
5. Product feed fields on the product editor. / Ürün düzenleme ekranındaki feed alanları.

== Changelog ==

= 1.0.1 =
* New: the feeds are rebuilt about a minute after prices change (bulk edit, import, REST or the currency update of Futurecode Döviz Kuru). Changes in the same minute make a single run. Setting "Refresh the feeds when prices change", on by default.
* Yeni: fiyatlar değişince (toplu düzenleme, içe aktarma, REST ya da Futurecode Döviz Kuru'nun kur güncellemesi) feed'ler yaklaşık bir dakika sonra yeniden üretilir. Aynı dakikadaki değişiklikler tek iş olur. "Fiyatlar değişince feed'leri yenile" ayarı, varsayılan açık.

= 1.0.0 =
* First release: Akakçe, Cimri and Google Merchant Center XML feeds, secret addresses with renewable keys, protected file cache, batch generation on Action Scheduler / WP-Cron, category mapping with the embedded Google product taxonomy, brand / GTIN / MPN on products and variations, shipping fields, filters, validation report, preview, CSV import / export / template, HPOS compatibility.
