Smartfish – Zap Mirror for WooCommerce
=======================================
INTERNAL TOOL — not distributed via WordPress.org.

What it does
------------
Exposes your WooCommerce catalog as a "mirror site" in the format Zap.co.il's
crawler expects, so your store's products can be listed for price comparison.
This is a from-scratch reimplementation with the same feature set as the
"CeTu – Zap Mirror" plugin by Wisy, plus a few correctness/security fixes.

How the feed works (do not change these URL/tag names — Zap's crawler is
configured externally to expect exactly this):

  https://yoursite.com/your-mirror-page/                  -> HTML list of
                                                              category links
  https://yoursite.com/your-mirror-page/?product_cat={id}  -> XML product
                                                              feed for that
                                                              category

XML schema per product (unchanged from the original, required by Zap):
  <PRODUCT NUM="...">
    <PRODUCT_URL>, <PRODUCT_NAME>, <MODEL>, <DETAILS>, <CATALOG_NUMBER>,
    <PRODUCTCODE>, <CURRENCY>, <PRICE>, <SHIPMENT_COST>, <SIZE>,
    <DELIVERY_TIME>, <MANUFACTURER>, <WARRANTY>, <IMAGE>, <TAX>
  </PRODUCT>

Setup
-----
1. Install & activate (requires WooCommerce active, and the SimpleXMLElement
   PHP extension — present on virtually all hosts).
2. Create a blank WordPress Page to act as the mirror (e.g. slug "/zap/").
   Its content is irrelevant — the plugin replaces it entirely.
3. Go to Zap Mirror (left admin menu) and select that page, plus:
   - Categories to skip
   - Whether to hide out-of-stock products
   - A shipping cost method (or leave per-product overrides only)
   - Site-wide defaults for Description / Model / Size / Delivery /
     Manufacturer / Warranty (not set, a fixed value, or read from a
     product attribute)
4. Per product, open the "Zap Settings" tab in the product data box to
   override any of the above, or hide that product from the feed entirely.
5. Register your mirror page's URL with Zap.

Migrating from the CeTu plugin
-------------------------------
If a client previously used the "CeTu – Zap Mirror" plugin, this plugin
automatically reads its old `_woocommerce_zap_*` per-product meta as a
fallback when our own `_smzap_*` meta isn't set yet — so per-product data
already entered by the client is not lost. Deactivate/delete the old plugin
after confirming the feed still looks correct.

What's different from the original CeTu plugin
------------------------------------------------
- Modern WooCommerce API (get_description()/get_short_description() instead
  of deprecated public properties).
- Fixed a bug where the "automatic" shipping-cost mode compared a product's
  price against an undefined variable (silently always fell through).
- No PHP notices on a fresh install before settings are first saved
  (options always have sane defaults via wp_parse_args).
- Category walker no longer uses extract() on the args array.
- Dropped dead code (an unused JS-array builder left over in the original
  that was never actually output anywhere).

Changelog
---------
1.0.0 — Initial internal release.
