=== Naqla Store Migrator for Salla and Zid ===
Contributors: elalmy111
Donate link: https://ahmed-abdelhamed.com/naqla-for-salla-zid
Tags: woocommerce, salla, zid, migration, arabic
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Zero-touch Salla & Zid to WooCommerce migrator: native .xlsx/.csv Arabic encoding healer, variable products, WebP images, HPOS orders, coupons & 301 SEO redirects.

== Description ==

**Migrate your Saudi & GCC store from Salla (سلة) or Zid (زد) to WooCommerce cleanly — without Excel encoding bugs, broken Arabic text, missing variations, or losing Google rankings.**

**Naqla Store Migrator for Salla and Zid** (**نقلة لسلة وزد**) reads raw `.xlsx` and `.csv` export files directly from Salla and Zid, automatically repairs Arabic encodings (`Windows-1256`, `UTF-16`, `BOM`), maps bilingual Arabic/English columns, builds Variable Products, sideloads WebP images locally, imports Historical Orders (HPOS), Customers, Coupons, Rank Math/Yoast SEO Meta, and protects your Google traffic with automatic **301 Redirects**.

Designed natively in **Arabic (RTL)** by default for Saudi, UAE, Kuwait, and Gulf merchants and WordPress agencies, with one-click switching to **English (LTR)**.

= المميزات الرئيسية (بالعربية) =

* **ارفع ملف سلة أو زد الخام بدون ما تفتحه في Excel:** محرك قراءة `.xlsx` و `.csv` مدمج بالكامل داخل PHP يقرأ ملفات سلة وزد مباشرة ويكتشف المنصة ويربط الأعمدة العربية والإنجليزية تلقائياً.
* **معالج تلقائي لمشاكل ترميز الحروف العربية (`؟؟؟`):** إصلاح فوري لمشاكل Windows-1256 و UTF-16 و BOM مع تحويل الأرقام العربية (`١٢٣`) تلقائياً لأسعار صحيحة.
* **بناء المنتجات المتغيرة (الألوان والمقاسات):** يدعم صفوف الأب والابن في زد (`parent_sku` و `option1/option2`) وعمود خيارات المنتج في سلة (`المقاس: 52, 54 | اللون: أسود, كحلي`).
* **سحب الصور محلياً وتحويلها إلى WebP:** يحمّل صور منتجاتك على استضافتك ويحولها لـ WebP تلقائياً عشان لو أغلقت اشتراك سلة أو زد صورك تفضل شغالة ومتجرك يكون أسرع.
* **نقل الطلبات السابقة (HPOS) والعملاء والكوبونات:** أداة ووكومرس الافتراضية لا تنقل هذه البيانات! نقلة تنقلها مع ربط تلقائي لحالات الطلب العربية (`تم التنفيذ`، `قيد التنفيذ`، `جاري التوصيل`، `ملغي`، `مسترجع`).
* **نقل بيانات السيو + تحويلات 301 + ماسح خريطة الموقع (Sitemap):** ينقل SEO Title & Description مباشرة لـ Rank Math و Yoast، وينشئ تحويلات 301 لروابط سلة (`/p123456`) وزد (`/products/...`) مع إمكانية فحص `sitemap.xml` القديم ومطابقة الروابط تلقائياً!
* **النقل التجريبي + التراجع الآمن بضغطة زر (One-Click Rollback):** جرّب نقل 10 منتجات أولاً، وتراجع بضغطة زر لو حبيت تعيد المحاولة.
* **مدقق جاهزية المتجر الخليجي (GCC Launch Readiness):** يفحص SSL، العملة الخليجية، الروابط الدائمة، WebP، الضريبة VAT، وبوابات الدفع قبل الإطلاق.

= Key Features (English) =

* **Zero-Dependency Native `.xlsx` & `.csv` Parser:** Powered by native PHP `ZipArchive` & `SimpleXML` with automatic delimiter detection and Arabic UTF-8 encoding healing.
* **Smart Salla & Zid Auto-Detection & Bilingual Column Mapping:** Recognizes both Arabic and English Salla & Zid export schemas automatically, with an interactive visual override step before importing.
* **Variable Products & Hierarchical Arabic Categories:** Supports nested categories (`عبايات > يومية`), Zid parent/child `parent_sku` variations, and Salla inline option lists.
* **Local Media Sideloader + Automatic WebP Conversion:** Deduplicated local WordPress Media Library downloads with automatic WebP optimization.
* **Historical Orders (HPOS), Customers & Coupons Importer:** Preserves original order dates, Arabic statuses, Saudi/GCC phone numbers, and percentage/fixed coupons.
* **Rank Math & Yoast SEO Meta + 301 Redirect Engine & Sitemap Matcher:** Imports SEO metadata, registers `/p{id}` and `/products/{slug}` 301 redirects, scans your old store's `sitemap.xml`, and exports Rank Math compatible CSVs.
* **Timeout-Safe Chunked Runner, Dry Run (10 items), One-Click Rollback & WP-CLI (`wp naqla-sz`).**

= Documentation, Support & Author =

Developed and maintained by **[Ahmed Abdelhamed](https://ahmed-abdelhamed.com/)** (**أحمد عبدالحميد**), specializing in WordPress engineering, WooCommerce automation, and Arab e-commerce systems.

* Official Plugin Page & Step-by-Step Arabic Guide: [Naqla for Salla & Zid Documentation](https://ahmed-abdelhamed.com/naqla-for-salla-zid)
* Developer Website: [ahmed-abdelhamed.com](https://ahmed-abdelhamed.com/)

== External Services ==

Naqla Store Migrator for Salla and Zid operates **100% locally inside WordPress** on files you upload. External HTTP requests occur **strictly on demand** only when you initiate:

1. **Image Sideloading:** Downloads remote product image URLs explicitly present inside your uploaded Salla or Zid export file directly into your WordPress Media Library.
2. **Optional Old Store Sitemap Scan:** Only when you manually enter your own old store's `sitemap.xml` URL in **SEO 301 & Sitemap** to auto-match legacy product URLs to your new WooCommerce products.

No store data, files, or customer records are ever transmitted to any external Naqla or third-party server.

== Installation ==

1. Ensure **WooCommerce 8.0+** is installed and active.
2. Upload the `naqla-for-salla-zid` folder to `/wp-content/plugins/` or install via **Plugins -> Add New -> Upload Plugin**.
3. Activate **Naqla Store Migrator for Salla and Zid**.
4. Open **نقلة سلة وزد (Naqla Salla & Zid)** from the WordPress Admin sidebar.
5. Export your products `.xlsx` or `.csv` from Salla or Zid and upload it raw in **استيراد المنتجات (Products Importer)** — try **Dry Run (10 items)** first, then run the full import!

== Frequently Asked Questions ==

= هل الإضافة مجانية بالكامل؟ =

نعم، الإضافة مجانية 100% ومفتوحة المصدر (GPLv2) وتنقل عدداً غير محدود من المنتجات والطلبات والعملاء مباشرة على استضافتك.

= هل أحتاج لتعديل ملف سلة أو زد في Excel قبل الرفع؟ =

لا أبداً! بل يُفضَّل عدم فتح الملف في Excel ورفعه مباشرة كما نزل من سلة أو زد، لأن نقلة تقرأ ملفات `.xlsx` و `.csv` الخام وتصلح ترميز الحروف العربية تلقائياً.

= هل تحافظ الإضافة على ترتيبي في جوجل (SEO) بعد ترك سلة أو زد؟ =

نعم! تنقل الإضافة العنوان والوصف التعريفي مباشرة إلى **Rank Math** و **Yoast SEO**، وتنشئ تحويلات **301 Redirects** تلقائياً لروابط سلة (`/p123456`) وزد (`/products/...`) مع ماسح `sitemap.xml` لضمان عدم ظهور أخطاء 404.

= هل الإضافة متوافقة مع WooCommerce HPOS؟ =

نعم، متوافقة رسمياً مع **High-Performance Order Storage (HPOS)** و **Cart & Checkout Blocks**.

== Screenshots ==

1. لوحة التحكم الرئيسية — إحصائيات النقل من سلة وزد، دليل التصدير السريع، وتحميل نماذج جاهزة مع مؤشر جاهزية المتجر.
2. مستورد المنتجات الذكي — رفع ملفات .xlsx/.csv الخام، إصلاح العربي تلقائياً، معاينة ربط الأعمدة، وشريط التقدم بالدفعات.
3. مستورد الطلبات (HPOS) والعملاء والكوبونات — نقل السجل التاريخي بالكامل مع ربط الحالات العربية تلقائياً.
4. تحويلات السيو 301 وماسح Sitemap — حماية روابط سلة وزد القديمة مع تصدير CSV لـ Rank Math.
5. السجلات والتراجع الآمن — متابعة كافة دفعات الاستيراد مع زر التراجع بضغطة زر (One-Click Rollback).
6. فحص جاهزية المتجر الخليجي والإعدادات — تدقيق SSL والعملة والضريبة وبوابات الدفع، تبديل اللغة، وأوامر WP-CLI.

== Changelog ==

= 1.0.0 =
* الإصدار الأول الرسمي على WordPress.org.
* قارئ أصلي لملفات Excel (.xlsx) و CSV الخام بدون مكتبات خارجية مع إصلاح تلقائي لترميز اللغة العربية.
* اكتشاف تلقائي لمنصة سلة (Salla) وزد (Zid) وربط ذكي للأعمدة العربية والإنجليزية.
* بناء المنتجات المتغيرة (صفوف parent_sku وخيارات المنتج المدمجة) والتصنيفات المتداخلة وسحب الصور بصيغة WebP.
* استيراد الطلبات السابقة (HPOS) والعملاء وكوبونات الخصم وبيانات السيو لـ Rank Math و Yoast SEO.
* محرك تحويلات 301 مدمج + ماسح Sitemap.xml + مدقق جاهزية المتجر الخليجي + التراجع الآمن بضغطة زر + WP-CLI.

== Upgrade Notice ==

= 1.0.0 =
Initial stable release of Naqla Store Migrator for Salla and Zid.
