=== Konfiguratorius Product Feed ===
Contributors: konfiguratorius
Tags: woocommerce, xml, product feed, pc builder
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.2.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Exports your WooCommerce catalog as a secure XML product feed for our PC-builder sites.

== Description ==

Konfiguratorius runs PC-builder sites in several countries. Shoppers put a PC
together, see the offers for its parts, and click through to buy directly on
YOUR site - you keep the customer and the sale.

This plugin adds a single, token-protected XML feed endpoint to your shop:

`https://your-shop.example/?konfig_feed=1&token=SECRET`

Konfiguratorius fetches this feed about once an hour to keep your prices and
stock up to date. Nothing is pushed from your site and no code runs outside
this feed request.

**What is exported** - public product data only:

* product name, category, image URL
* EAN/GTIN barcode, manufacturer part number (MPN), SKU, brand
* price including VAT, currency
* stock status / quantity
* the product page URL on your shop

**What is NOT exported:** customers, orders, coupons, cost prices, or any other
private data. The feed is only readable with the secret token generated for
your shop.

The plugin auto-detects EAN/GTIN, MPN and brand from the WooCommerce core
fields (including the native GTIN field in WooCommerce 9.2+) and from popular
plugins (EAN for WooCommerce, Product GTIN, Germanized, Perfect Brands, YITH
Brands, WooCommerce Brands, and more). If your shop stores these somewhere
custom, map the field once under WooCommerce > Konfiguratorius Feed.

== Installation ==

1. Upload the plugin ZIP via Plugins > Add New > Upload Plugin, and activate it.
2. Open WooCommerce > Konfiguratorius Feed.
3. Check the "Can we identify your products?" panel. If the EAN share is low,
   fix that first - products without a barcode cannot be matched and will not
   be listed, however complete the rest of the feed is.
4. Copy the feed URL and send it to your Konfiguratorius contact.
5. (Optional) If EAN/MPN/brand are stored in custom fields, set the mapping on
   the same page. Barcodes (EAN) give the best product-match rate.

== Frequently Asked Questions ==

= Does this slow down my shop? =

No. The feed is generated only when Konfiguratorius requests it (about once an
hour), streams in batches, and is never visible to your customers or search
engines.

= Can I revoke access? =

Yes - click "Regenerate token" (the old URL stops working immediately) or
simply deactivate the plugin.

= Which products are included? =

All published products, including out-of-stock ones (stock status is part of
the feed). Variable products are exported per variation, since each variation
has its own barcode and price. Products without a price are skipped.

= I sell assembled PCs as well as parts. How do those work? =

In Settings, pick the product category that holds your built computers. Those
products are then exported with a <components> block listing the build's parts,
taken from the product attributes - so the PC is shown with its real
specification rather than whatever fits in the product name.

Attribute names are matched by keyword in English, German, Polish, Czech,
Slovak, Slovenian, Lithuanian, Latvian and Estonian, so no renaming is needed:
CPU / Processor / Prozessor / Procesorius, GPU / Graphics / Grafikkarte,
RAM / Memory / Arbeitsspeicher / Pamiec, SSD / Disk / Festplatte / Dysk,
Motherboard / Mainboard / Plyta glowna, PSU / Netzteil / Zasilacz, Case /
Gehaeuse / Obudowa, Cooler / CPU-Kuehler / Chlodzenie. A label naming a cooler
and its processor ("CPU-Kuehler") counts as the cooler. One part per slot;
sub-categories count too.

== Changelog ==

= 1.2.5 =
* Assembled PCs: component attributes named in German, Polish, Latvian or
  Estonian are now recognised ("Prozessor", "Arbeitsspeicher", "Netzteil",
  "Gehaeuse", "Plyta glowna", "Zasilacz", "Barosanas bloks", "Emaplaat"...).
  Before this they were left out of the <components> block.
* A cooler named after its processor ("CPU-Kuehler", "Chlodzenie procesora",
  "Procesora dzesetajs") is exported as the cooler, not as the processor.
* Two labels were read as the wrong part: Lithuanian "Vaizdo plokste"
  (graphics card) went into the motherboard slot and Slovenian "Shramba"
  (storage) into memory. Every other English, Lithuanian, Czech, Slovak or
  Slovenian label that was recognised before goes to the same slot as before.
* The readme now says the feed is read about once an hour, which is how often
  it is.

= 1.2.4 =
* The plugin no longer names particular sites or promises a price comparison,
  so its description is true on every site that offers it, including ones
  where your shop is the only retailer so far. The missing-barcode warning now
  says those products are not listed. The feed format is unchanged.

= 1.2.3 =
* The product's short description is now included. For a built PC that is where
  the actual configuration is written, while the title usually names only the
  processor, so without it a computer could be listed but not compared.

= 1.2.2 =
* A product your shop still sells at zero stock, because it accepts backorders,
  is now reported as in stock instead of as a bare 0. Before this it was hidden
  from the comparison even though you would have taken the order.

= 1.2.1 =
* A value that is not a barcode is no longer exported as one. An EAN is 8 to 14
  digits; anything else is dropped, so a feed cannot look populated while
  carrying shop codes in the EAN column.
* The coverage panel counts real barcodes rather than non-empty fields, reports
  how many values were dropped for not being barcodes, and calls out the
  specific mistake of mapping the EAN key to the SKU field.

= 1.2.0 =
* Settings page now reports whether your products can actually be identified:
  the share of a sampled 250 that export an EAN/GTIN and an MPN.
* Warns when most products have no barcode, since those cannot be matched to a
  catalogue product and will not be listed however complete the feed is.
* Warns when "Use SKU as MPN" is exporting shop SKUs as manufacturer part
  numbers, which match nothing outside your own shop.
* The check is cached for 10 minutes and refreshes as soon as you save a
  mapping, so you can see a field mapping take effect immediately.

= 1.1.0 =
* Assembled PCs: pick the product category that holds your built computers and
  the feed exports each one with a <components> block listing its parts, read
  from the product attributes. Attribute names are matched by keyword in
  English, Lithuanian, Czech, Slovak and Slovenian, so nothing needs renaming.
* Add an EAN in square brackets at the end of an attribute value -
  "AMD Ryzen 7 7800X3D [730143314930]" - to have that exact part matched instead
  of the cheapest one of the same model.
* Shops selling only components are unaffected: leave the category unset and the
  feed is byte-for-byte what it was.

= 1.0.0 =
* Initial release: token-protected XML feed endpoint, EAN/MPN/brand
  auto-detection, field-mapping settings page.
